~ubuntu-branches/ubuntu/warty/aqsis/warty

« back to all changes in this revision

Viewing changes to librib2/parser.cxx

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones
  • Date: 2004-08-24 07:25:04 UTC
  • Revision ID: james.westby@ubuntu.com-20040824072504-zf993vnevvisdsvb
Tags: upstream-0.9.1
ImportĀ upstreamĀ versionĀ 0.9.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* A Bison parser, made from parser.yxx
 
2
   by GNU bison 1.35.  */
 
3
 
 
4
#define YYBISON 1  /* Identify Bison output.  */
 
5
 
 
6
# define        EOL_TOKEN       257
 
7
# define        EOF_TOKEN       258
 
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
 
14
# define        COMMENT 265
 
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
 
125
 
 
126
#line 3 "parser.yxx"
 
127
 
 
128
 
 
129
#ifdef  WIN32
 
130
#pragma warning(disable : 4786)
 
131
#include <cstdio>
 
132
#include <memory>
 
133
#include <malloc.h>
 
134
namespace std
 
135
{ using ::size_t; 
 
136
  using ::malloc;
 
137
  using ::free;
 
138
}
 
139
#endif
 
140
 
 
141
#include "librib.h"
 
142
using namespace librib;
 
143
 
 
144
#include "libribtypes.h"
 
145
 
 
146
#include <algorithm>
 
147
#include <iostream>
 
148
#include <map>
 
149
#include <string>
 
150
#include <vector>
 
151
#include <cassert>
 
152
 
 
153
#ifdef  _DEBUG
 
154
#define YYDEBUG 1
 
155
#endif
 
156
 
 
157
namespace librib
 
158
{
 
159
 
 
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;
 
167
extern bool fParams;
 
168
extern RtArchiveCallback pArchiveCallback;
 
169
 
 
170
bool fRecovering;
 
171
 
 
172
}; // namespace librib
 
173
 
 
174
 
 
175
 
 
176
#line 55 "parser.yxx"
 
177
#ifndef YYSTYPE
 
178
typedef union
 
179
{
 
180
        int itype;
 
181
        float ftype;
 
182
        char* stype;
 
183
        char ctype;
 
184
 
 
185
        IntegerArray* aitype;
 
186
        FloatArray* aftype;
 
187
        StringArray* astype;
 
188
        TokenValuePair* tvtype;
 
189
        TokenValuePairs* atvtype;
 
190
} yystype;
 
191
# define YYSTYPE yystype
 
192
# define YYSTYPE_IS_TRIVIAL 1
 
193
#endif
 
194
#line 70 "parser.yxx"
 
195
 
 
196
 
 
197
extern int yylex( YYSTYPE* );
 
198
 
 
199
static void yyerror(const std::string Message);
 
200
 
 
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);
 
206
 
 
207
static void DeclareLightHandle(const RendermanInterface::RtInt ID, const RendermanInterface::RtLightHandle Handle);
 
208
static RendermanInterface::RtLightHandle LookupLightHandle(const RendermanInterface::RtInt ID);
 
209
 
 
210
static void DeclareLightHandleString(const RendermanInterface::RtString ID, const RendermanInterface::RtLightHandle Handle);
 
211
static RendermanInterface::RtLightHandle LookupLightHandleString(const RendermanInterface::RtString ID);
 
212
 
 
213
static void DeclareObjectHandle(const RendermanInterface::RtInt ID, const RendermanInterface::RtObjectHandle Handle);
 
214
static RendermanInterface::RtObjectHandle LookupObjectHandle(const RendermanInterface::RtInt ID);
 
215
 
 
216
static void DeclareObjectHandleString(const RendermanInterface::RtString ID, const RendermanInterface::RtObjectHandle Handle);
 
217
static RendermanInterface::RtObjectHandle LookupObjectHandleString(const RendermanInterface::RtString ID);
 
218
 
 
219
static ParameterType DeclareParameterType(const std::string& Name, const std::string& Type);
 
220
static ParameterType LookupParameterType(const std::string& Name);
 
221
 
 
222
static RendermanInterface::RtInt ColorSamples = 3;
 
223
 
 
224
#ifndef YYDEBUG
 
225
# define YYDEBUG 0
 
226
#endif
 
227
 
 
228
 
 
229
 
 
230
#define YYFINAL         575
 
231
#define YYFLAG          -32768
 
232
#define YYNTBASE        124
 
233
 
 
234
/* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */
 
235
#define YYTRANSLATE(x) ((unsigned)(x) <= 375 ? yytranslate[x] : 247)
 
236
 
 
237
/* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */
 
238
static const char yytranslate[] =
 
239
{
 
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
 
278
};
 
279
 
 
280
#if YYDEBUG
 
281
static const short yyprhs[] =
 
282
{
 
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
 
310
};
 
311
static const short yyrhs[] =
 
312
{
 
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
 
401
};
 
402
 
 
403
#endif
 
404
 
 
405
#if YYDEBUG
 
406
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
 
407
static const short yyrline[] =
 
408
{
 
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
 
436
};
 
437
#endif
 
438
 
 
439
 
 
440
#if (YYDEBUG) || defined YYERROR_VERBOSE
 
441
 
 
442
/* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
 
443
static const char *const yytname[] =
 
444
{
 
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
 
530
};
 
531
#endif
 
532
 
 
533
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
 
534
static const short yyr1[] =
 
535
{
 
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
 
563
};
 
564
 
 
565
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
 
566
static const short yyr2[] =
 
567
{
 
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
 
595
};
 
596
 
 
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
 
599
   error. */
 
600
static const short yydefact[] =
 
601
{
 
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,
 
659
       0,     0,   118,     0,     0,     0
 
660
};
 
661
 
 
662
static const short yydefgoto[] =
 
663
{
 
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,
 
676
     297,   298,   299
 
677
};
 
678
 
 
679
static const short yypact[] =
 
680
{
 
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
 
739
};
 
740
 
 
741
static const short yypgoto[] =
 
742
{
 
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,
 
755
    -262,   479,  -162
 
756
};
 
757
 
 
758
 
 
759
#define YYLAST          2607
 
760
 
 
761
 
 
762
static const short yytable[] =
 
763
{
 
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
 
1025
};
 
1026
 
 
1027
static const short yycheck[] =
 
1028
{
 
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
 
1290
};
 
1291
#define YYPURE 1
 
1292
 
 
1293
/* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
 
1294
#line 3 "/usr/share/bison/bison.simple"
 
1295
 
 
1296
/* Skeleton output parser for bison,
 
1297
 
 
1298
   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software
 
1299
   Foundation, Inc.
 
1300
 
 
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)
 
1304
   any later version.
 
1305
 
 
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.
 
1310
 
 
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.  */
 
1315
 
 
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.  */
 
1320
 
 
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.  */
 
1325
 
 
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.  */
 
1332
 
 
1333
#if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)
 
1334
 
 
1335
/* The parser invokes alloca or malloc; define the necessary symbols.  */
 
1336
 
 
1337
# if YYSTACK_USE_ALLOCA
 
1338
#  define YYSTACK_ALLOC alloca
 
1339
# else
 
1340
#  ifndef YYSTACK_USE_ALLOCA
 
1341
#   if defined (alloca) || defined (_ALLOCA_H)
 
1342
#    define YYSTACK_ALLOC alloca
 
1343
#   else
 
1344
#    ifdef __GNUC__
 
1345
#     define YYSTACK_ALLOC __builtin_alloca
 
1346
#    endif
 
1347
#   endif
 
1348
#  endif
 
1349
# endif
 
1350
 
 
1351
# ifdef YYSTACK_ALLOC
 
1352
   /* Pacify GCC's `empty if-body' warning. */
 
1353
#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
 
1354
# else
 
1355
#  if defined (__STDC__) || defined (__cplusplus)
 
1356
#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
 
1357
#   define YYSIZE_T size_t
 
1358
#  endif
 
1359
#  define YYSTACK_ALLOC malloc
 
1360
#  define YYSTACK_FREE free
 
1361
# endif
 
1362
#endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */
 
1363
 
 
1364
 
 
1365
#if (! defined (yyoverflow) \
 
1366
     && (! defined (__cplusplus) \
 
1367
         || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
 
1368
 
 
1369
/* A type that is properly aligned for any stack member.  */
 
1370
union yyalloc
 
1371
{
 
1372
  short yyss;
 
1373
  YYSTYPE yyvs;
 
1374
# if YYLSP_NEEDED
 
1375
  YYLTYPE yyls;
 
1376
# endif
 
1377
};
 
1378
 
 
1379
/* The size of the maximum gap between one aligned stack and the next.  */
 
1380
# define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
 
1381
 
 
1382
/* The size of an array large to enough to hold all stacks, each with
 
1383
   N elements.  */
 
1384
# if YYLSP_NEEDED
 
1385
#  define YYSTACK_BYTES(N) \
 
1386
     ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE))      \
 
1387
      + 2 * YYSTACK_GAP_MAX)
 
1388
# else
 
1389
#  define YYSTACK_BYTES(N) \
 
1390
     ((N) * (sizeof (short) + sizeof (YYSTYPE))                         \
 
1391
      + YYSTACK_GAP_MAX)
 
1392
# endif
 
1393
 
 
1394
/* Copy COUNT objects from FROM to TO.  The source and destination do
 
1395
   not overlap.  */
 
1396
# ifndef YYCOPY
 
1397
#  if 1 < __GNUC__
 
1398
#   define YYCOPY(To, From, Count) \
 
1399
      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
 
1400
#  else
 
1401
#   define YYCOPY(To, From, Count)              \
 
1402
      do                                        \
 
1403
        {                                       \
 
1404
          register YYSIZE_T yyi;                \
 
1405
          for (yyi = 0; yyi < (Count); yyi++)   \
 
1406
            (To)[yyi] = (From)[yyi];            \
 
1407
        }                                       \
 
1408
      while (0)
 
1409
#  endif
 
1410
# endif
 
1411
 
 
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
 
1416
   stack.  */
 
1417
# define YYSTACK_RELOCATE(Stack)                                        \
 
1418
    do                                                                  \
 
1419
      {                                                                 \
 
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);                          \
 
1425
      }                                                                 \
 
1426
    while (0)
 
1427
 
 
1428
#endif
 
1429
 
 
1430
 
 
1431
#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
 
1432
# define YYSIZE_T __SIZE_TYPE__
 
1433
#endif
 
1434
#if ! defined (YYSIZE_T) && defined (size_t)
 
1435
# define YYSIZE_T size_t
 
1436
#endif
 
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
 
1441
# endif
 
1442
#endif
 
1443
#if ! defined (YYSIZE_T)
 
1444
# define YYSIZE_T unsigned int
 
1445
#endif
 
1446
 
 
1447
#define yyerrok         (yyerrstatus = 0)
 
1448
#define yyclearin       (yychar = YYEMPTY)
 
1449
#define YYEMPTY         -2
 
1450
#define YYEOF           0
 
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)                                  \
 
1460
do                                                              \
 
1461
  if (yychar == YYEMPTY && yylen == 1)                          \
 
1462
    {                                                           \
 
1463
      yychar = (Token);                                         \
 
1464
      yylval = (Value);                                         \
 
1465
      yychar1 = YYTRANSLATE (yychar);                           \
 
1466
      YYPOPSTACK;                                               \
 
1467
      goto yybackup;                                            \
 
1468
    }                                                           \
 
1469
  else                                                          \
 
1470
    {                                                           \
 
1471
      yyerror ("syntax error: cannot back up");                 \
 
1472
      YYERROR;                                                  \
 
1473
    }                                                           \
 
1474
while (0)
 
1475
 
 
1476
#define YYTERROR        1
 
1477
#define YYERRCODE       256
 
1478
 
 
1479
 
 
1480
/* YYLLOC_DEFAULT -- Compute the default location (before the actions
 
1481
   are run).
 
1482
 
 
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.  */
 
1486
 
 
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;
 
1491
#endif
 
1492
 
 
1493
 
 
1494
/* YYLEX -- calling `yylex' with the right arguments.  */
 
1495
 
 
1496
#if YYPURE
 
1497
# if YYLSP_NEEDED
 
1498
#  ifdef YYLEX_PARAM
 
1499
#   define YYLEX                yylex (&yylval, &yylloc, YYLEX_PARAM)
 
1500
#  else
 
1501
#   define YYLEX                yylex (&yylval, &yylloc)
 
1502
#  endif
 
1503
# else /* !YYLSP_NEEDED */
 
1504
#  ifdef YYLEX_PARAM
 
1505
#   define YYLEX                yylex (&yylval, YYLEX_PARAM)
 
1506
#  else
 
1507
#   define YYLEX                yylex (&yylval)
 
1508
#  endif
 
1509
# endif /* !YYLSP_NEEDED */
 
1510
#else /* !YYPURE */
 
1511
# define YYLEX                  yylex ()
 
1512
#endif /* !YYPURE */
 
1513
 
 
1514
 
 
1515
/* Enable debugging if requested.  */
 
1516
#if YYDEBUG
 
1517
 
 
1518
# ifndef YYFPRINTF
 
1519
#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
 
1520
#  define YYFPRINTF fprintf
 
1521
# endif
 
1522
 
 
1523
# define YYDPRINTF(Args)                        \
 
1524
do {                                            \
 
1525
  if (yydebug)                                  \
 
1526
    YYFPRINTF Args;                             \
 
1527
} while (0)
 
1528
/* Nonzero means print parse trace.  It is left uninitialized so that
 
1529
   multiple parsers can coexist.  */
 
1530
int yydebug;
 
1531
#else /* !YYDEBUG */
 
1532
# define YYDPRINTF(Args)
 
1533
#endif /* !YYDEBUG */
 
1534
 
 
1535
/* YYINITDEPTH -- initial size of the parser's stacks.  */
 
1536
#ifndef YYINITDEPTH
 
1537
# define YYINITDEPTH 200
 
1538
#endif
 
1539
 
 
1540
/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
 
1541
   if the built-in stack extension method is used).
 
1542
 
 
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.  */
 
1546
 
 
1547
#if YYMAXDEPTH == 0
 
1548
# undef YYMAXDEPTH
 
1549
#endif
 
1550
 
 
1551
#ifndef YYMAXDEPTH
 
1552
# define YYMAXDEPTH 10000
 
1553
#endif
 
1554
 
 
1555
#ifdef YYERROR_VERBOSE
 
1556
 
 
1557
# ifndef yystrlen
 
1558
#  if defined (__GLIBC__) && defined (_STRING_H)
 
1559
#   define yystrlen strlen
 
1560
#  else
 
1561
/* Return the length of YYSTR.  */
 
1562
static YYSIZE_T
 
1563
#   if defined (__STDC__) || defined (__cplusplus)
 
1564
yystrlen (const char *yystr)
 
1565
#   else
 
1566
yystrlen (yystr)
 
1567
     const char *yystr;
 
1568
#   endif
 
1569
{
 
1570
  register const char *yys = yystr;
 
1571
 
 
1572
  while (*yys++ != '\0')
 
1573
    continue;
 
1574
 
 
1575
  return yys - yystr - 1;
 
1576
}
 
1577
#  endif
 
1578
# endif
 
1579
 
 
1580
# ifndef yystpcpy
 
1581
#  if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
 
1582
#   define yystpcpy stpcpy
 
1583
#  else
 
1584
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
 
1585
   YYDEST.  */
 
1586
static char *
 
1587
#   if defined (__STDC__) || defined (__cplusplus)
 
1588
yystpcpy (char *yydest, const char *yysrc)
 
1589
#   else
 
1590
yystpcpy (yydest, yysrc)
 
1591
     char *yydest;
 
1592
     const char *yysrc;
 
1593
#   endif
 
1594
{
 
1595
  register char *yyd = yydest;
 
1596
  register const char *yys = yysrc;
 
1597
 
 
1598
  while ((*yyd++ = *yys++) != '\0')
 
1599
    continue;
 
1600
 
 
1601
  return yyd - 1;
 
1602
}
 
1603
#  endif
 
1604
# endif
 
1605
#endif
 
1606
 
 
1607
#line 315 "/usr/share/bison/bison.simple"
 
1608
 
 
1609
 
 
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.  */
 
1615
 
 
1616
#ifdef YYPARSE_PARAM
 
1617
# if defined (__STDC__) || defined (__cplusplus)
 
1618
#  define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
 
1619
#  define YYPARSE_PARAM_DECL
 
1620
# else
 
1621
#  define YYPARSE_PARAM_ARG YYPARSE_PARAM
 
1622
#  define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
 
1623
# endif
 
1624
#else /* !YYPARSE_PARAM */
 
1625
# define YYPARSE_PARAM_ARG
 
1626
# define YYPARSE_PARAM_DECL
 
1627
#endif /* !YYPARSE_PARAM */
 
1628
 
 
1629
/* Prevent warning if -Wstrict-prototypes.  */
 
1630
#ifdef __GNUC__
 
1631
# ifdef YYPARSE_PARAM
 
1632
int yyparse (void *);
 
1633
# else
 
1634
int yyparse (void);
 
1635
# endif
 
1636
#endif
 
1637
 
 
1638
/* YY_DECL_VARIABLES -- depending whether we use a pure parser,
 
1639
   variables are global, or local to YYPARSE.  */
 
1640
 
 
1641
#define YY_DECL_NON_LSP_VARIABLES                       \
 
1642
/* The lookahead symbol.  */                            \
 
1643
int yychar;                                             \
 
1644
                                                        \
 
1645
/* The semantic value of the lookahead symbol. */       \
 
1646
YYSTYPE yylval;                                         \
 
1647
                                                        \
 
1648
/* Number of parse errors so far.  */                   \
 
1649
int yynerrs;
 
1650
 
 
1651
#if YYLSP_NEEDED
 
1652
# define YY_DECL_VARIABLES                      \
 
1653
YY_DECL_NON_LSP_VARIABLES                       \
 
1654
                                                \
 
1655
/* Location data for the lookahead symbol.  */  \
 
1656
YYLTYPE yylloc;
 
1657
#else
 
1658
# define YY_DECL_VARIABLES                      \
 
1659
YY_DECL_NON_LSP_VARIABLES
 
1660
#endif
 
1661
 
 
1662
 
 
1663
/* If nonreentrant, generate the variables here. */
 
1664
 
 
1665
#if !YYPURE
 
1666
YY_DECL_VARIABLES
 
1667
#endif  /* !YYPURE */
 
1668
 
 
1669
int
 
1670
yyparse (YYPARSE_PARAM_ARG)
 
1671
     YYPARSE_PARAM_DECL
 
1672
{
 
1673
  /* If reentrant, generate the variables here. */
 
1674
#if YYPURE
 
1675
  YY_DECL_VARIABLES
 
1676
#endif  /* !YYPURE */
 
1677
 
 
1678
  register int yystate;
 
1679
  register int yyn;
 
1680
  int yyresult;
 
1681
  /* Number of tokens to shift before error messages enabled.  */
 
1682
  int yyerrstatus;
 
1683
  /* Lookahead token as an internal (translated) token number.  */
 
1684
  int yychar1 = 0;
 
1685
 
 
1686
  /* Three stacks and their tools:
 
1687
     `yyss': related to states,
 
1688
     `yyvs': related to semantic values,
 
1689
     `yyls': related to locations.
 
1690
 
 
1691
     Refer to the stacks thru separate pointers, to allow yyoverflow
 
1692
     to reallocate them elsewhere.  */
 
1693
 
 
1694
  /* The state stack. */
 
1695
  short yyssa[YYINITDEPTH];
 
1696
  short *yyss = yyssa;
 
1697
  register short *yyssp;
 
1698
 
 
1699
  /* The semantic value stack.  */
 
1700
  YYSTYPE yyvsa[YYINITDEPTH];
 
1701
  YYSTYPE *yyvs = yyvsa;
 
1702
  register YYSTYPE *yyvsp;
 
1703
 
 
1704
#if YYLSP_NEEDED
 
1705
  /* The location stack.  */
 
1706
  YYLTYPE yylsa[YYINITDEPTH];
 
1707
  YYLTYPE *yyls = yylsa;
 
1708
  YYLTYPE *yylsp;
 
1709
#endif
 
1710
 
 
1711
#if YYLSP_NEEDED
 
1712
# define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
 
1713
#else
 
1714
# define YYPOPSTACK   (yyvsp--, yyssp--)
 
1715
#endif
 
1716
 
 
1717
  YYSIZE_T yystacksize = YYINITDEPTH;
 
1718
 
 
1719
 
 
1720
  /* The variables used to return semantic value and location from the
 
1721
     action routines.  */
 
1722
  YYSTYPE yyval;
 
1723
#if YYLSP_NEEDED
 
1724
  YYLTYPE yyloc;
 
1725
#endif
 
1726
 
 
1727
  /* When reducing, the number of symbols on the RHS of the reduced
 
1728
     rule. */
 
1729
  int yylen;
 
1730
 
 
1731
  YYDPRINTF ((stderr, "Starting parse\n"));
 
1732
 
 
1733
  yystate = 0;
 
1734
  yyerrstatus = 0;
 
1735
  yynerrs = 0;
 
1736
  yychar = YYEMPTY;             /* Cause a token to be read.  */
 
1737
 
 
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.  */
 
1742
 
 
1743
  yyssp = yyss;
 
1744
  yyvsp = yyvs;
 
1745
#if YYLSP_NEEDED
 
1746
  yylsp = yyls;
 
1747
#endif
 
1748
  goto yysetstate;
 
1749
 
 
1750
/*------------------------------------------------------------.
 
1751
| yynewstate -- Push a new state, which is found in yystate.  |
 
1752
`------------------------------------------------------------*/
 
1753
 yynewstate:
 
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.
 
1756
     */
 
1757
  yyssp++;
 
1758
 
 
1759
 yysetstate:
 
1760
  *yyssp = yystate;
 
1761
 
 
1762
  if (yyssp >= yyss + yystacksize - 1)
 
1763
    {
 
1764
      /* Get the current used size of the three stacks, in elements.  */
 
1765
      YYSIZE_T yysize = yyssp - yyss + 1;
 
1766
 
 
1767
#ifdef yyoverflow
 
1768
      {
 
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
 
1771
           memory.  */
 
1772
        YYSTYPE *yyvs1 = yyvs;
 
1773
        short *yyss1 = yyss;
 
1774
 
 
1775
        /* Each stack pointer address is followed by the size of the
 
1776
           data in use in that stack, in bytes.  */
 
1777
# if YYLSP_NEEDED
 
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),
 
1785
                    &yystacksize);
 
1786
        yyls = yyls1;
 
1787
# else
 
1788
        yyoverflow ("parser stack overflow",
 
1789
                    &yyss1, yysize * sizeof (*yyssp),
 
1790
                    &yyvs1, yysize * sizeof (*yyvsp),
 
1791
                    &yystacksize);
 
1792
# endif
 
1793
        yyss = yyss1;
 
1794
        yyvs = yyvs1;
 
1795
      }
 
1796
#else /* no yyoverflow */
 
1797
# ifndef YYSTACK_RELOCATE
 
1798
      goto yyoverflowlab;
 
1799
# else
 
1800
      /* Extend the stack our own way.  */
 
1801
      if (yystacksize >= YYMAXDEPTH)
 
1802
        goto yyoverflowlab;
 
1803
      yystacksize *= 2;
 
1804
      if (yystacksize > YYMAXDEPTH)
 
1805
        yystacksize = YYMAXDEPTH;
 
1806
 
 
1807
      {
 
1808
        short *yyss1 = yyss;
 
1809
        union yyalloc *yyptr =
 
1810
          (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
 
1811
        if (! yyptr)
 
1812
          goto yyoverflowlab;
 
1813
        YYSTACK_RELOCATE (yyss);
 
1814
        YYSTACK_RELOCATE (yyvs);
 
1815
# if YYLSP_NEEDED
 
1816
        YYSTACK_RELOCATE (yyls);
 
1817
# endif
 
1818
# undef YYSTACK_RELOCATE
 
1819
        if (yyss1 != yyssa)
 
1820
          YYSTACK_FREE (yyss1);
 
1821
      }
 
1822
# endif
 
1823
#endif /* no yyoverflow */
 
1824
 
 
1825
      yyssp = yyss + yysize - 1;
 
1826
      yyvsp = yyvs + yysize - 1;
 
1827
#if YYLSP_NEEDED
 
1828
      yylsp = yyls + yysize - 1;
 
1829
#endif
 
1830
 
 
1831
      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
 
1832
                  (unsigned long int) yystacksize));
 
1833
 
 
1834
      if (yyssp >= yyss + yystacksize - 1)
 
1835
        YYABORT;
 
1836
    }
 
1837
 
 
1838
  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
 
1839
 
 
1840
  goto yybackup;
 
1841
 
 
1842
 
 
1843
/*-----------.
 
1844
| yybackup.  |
 
1845
`-----------*/
 
1846
yybackup:
 
1847
 
 
1848
/* Do appropriate processing given the current state.  */
 
1849
/* Read a lookahead token if we need one and don't already have one.  */
 
1850
/* yyresume: */
 
1851
 
 
1852
  /* First try to decide what to do without reference to lookahead token.  */
 
1853
 
 
1854
  yyn = yypact[yystate];
 
1855
  if (yyn == YYFLAG)
 
1856
    goto yydefault;
 
1857
 
 
1858
  /* Not known => get a lookahead token if don't already have one.  */
 
1859
 
 
1860
  /* yychar is either YYEMPTY or YYEOF
 
1861
     or a valid token in external form.  */
 
1862
 
 
1863
  if (yychar == YYEMPTY)
 
1864
    {
 
1865
      YYDPRINTF ((stderr, "Reading a token: "));
 
1866
      yychar = YYLEX;
 
1867
    }
 
1868
 
 
1869
  /* Convert token to internal form (in yychar1) for indexing tables with */
 
1870
 
 
1871
  if (yychar <= 0)              /* This means end of input. */
 
1872
    {
 
1873
      yychar1 = 0;
 
1874
      yychar = YYEOF;           /* Don't call YYLEX any more */
 
1875
 
 
1876
      YYDPRINTF ((stderr, "Now at end of input.\n"));
 
1877
    }
 
1878
  else
 
1879
    {
 
1880
      yychar1 = YYTRANSLATE (yychar);
 
1881
 
 
1882
#if YYDEBUG
 
1883
     /* We have to keep this `#if YYDEBUG', since we use variables
 
1884
        which are defined only if `YYDEBUG' is set.  */
 
1885
      if (yydebug)
 
1886
        {
 
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.  */
 
1891
# ifdef YYPRINT
 
1892
          YYPRINT (stderr, yychar, yylval);
 
1893
# endif
 
1894
          YYFPRINTF (stderr, ")\n");
 
1895
        }
 
1896
#endif
 
1897
    }
 
1898
 
 
1899
  yyn += yychar1;
 
1900
  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
 
1901
    goto yydefault;
 
1902
 
 
1903
  yyn = yytable[yyn];
 
1904
 
 
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.  */
 
1911
 
 
1912
  if (yyn < 0)
 
1913
    {
 
1914
      if (yyn == YYFLAG)
 
1915
        goto yyerrlab;
 
1916
      yyn = -yyn;
 
1917
      goto yyreduce;
 
1918
    }
 
1919
  else if (yyn == 0)
 
1920
    goto yyerrlab;
 
1921
 
 
1922
  if (yyn == YYFINAL)
 
1923
    YYACCEPT;
 
1924
 
 
1925
  /* Shift the lookahead token.  */
 
1926
  YYDPRINTF ((stderr, "Shifting token %d (%s), ",
 
1927
              yychar, yytname[yychar1]));
 
1928
 
 
1929
  /* Discard the token being shifted unless it is eof.  */
 
1930
  if (yychar != YYEOF)
 
1931
    yychar = YYEMPTY;
 
1932
 
 
1933
  *++yyvsp = yylval;
 
1934
#if YYLSP_NEEDED
 
1935
  *++yylsp = yylloc;
 
1936
#endif
 
1937
 
 
1938
  /* Count tokens shifted since error; after three, turn off error
 
1939
     status.  */
 
1940
  if (yyerrstatus)
 
1941
    yyerrstatus--;
 
1942
 
 
1943
  yystate = yyn;
 
1944
  goto yynewstate;
 
1945
 
 
1946
 
 
1947
/*-----------------------------------------------------------.
 
1948
| yydefault -- do the default action for the current state.  |
 
1949
`-----------------------------------------------------------*/
 
1950
yydefault:
 
1951
  yyn = yydefact[yystate];
 
1952
  if (yyn == 0)
 
1953
    goto yyerrlab;
 
1954
  goto yyreduce;
 
1955
 
 
1956
 
 
1957
/*-----------------------------.
 
1958
| yyreduce -- Do a reduction.  |
 
1959
`-----------------------------*/
 
1960
yyreduce:
 
1961
  /* yyn is the number of a rule to reduce with.  */
 
1962
  yylen = yyr2[yyn];
 
1963
 
 
1964
  /* If YYLEN is nonzero, implement the default value of the action:
 
1965
     `$$ = $1'.
 
1966
 
 
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];
 
1973
 
 
1974
#if YYLSP_NEEDED
 
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);
 
1979
#endif
 
1980
 
 
1981
#if YYDEBUG
 
1982
  /* We have to keep this `#if YYDEBUG', since we use variables which
 
1983
     are defined only if `YYDEBUG' is set.  */
 
1984
  if (yydebug)
 
1985
    {
 
1986
      int yyi;
 
1987
 
 
1988
      YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
 
1989
                 yyn, yyrline[yyn]);
 
1990
 
 
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]]);
 
1995
    }
 
1996
#endif
 
1997
 
 
1998
  switch (yyn) {
 
1999
 
 
2000
case 1:
 
2001
#line 336 "parser.yxx"
 
2002
{ YYABORT; }
 
2003
    break;
 
2004
case 4:
 
2005
#line 344 "parser.yxx"
 
2006
 
2007
                                ExpectRequest(); 
 
2008
                                fRecovering = false;
 
2009
                        }
 
2010
    break;
 
2011
case 5:
 
2012
#line 349 "parser.yxx"
 
2013
{
 
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))
 
2017
                                {
 
2018
                                        DiscardStringValue(yyvsp[0].stype);
 
2019
                                        ExpectRequest(); 
 
2020
                                        fRecovering = false;
 
2021
                                        YYACCEPT;       
 
2022
                                };
 
2023
 
 
2024
                                if( pArchiveCallback != NULL )
 
2025
                                {
 
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
 
2028
                                        {
 
2029
                                                pArchiveCallback("structure", "%s", &( yyvsp[0].stype[2]) ); 
 
2030
                                        } else {  // User Data Record comment
 
2031
                                                pArchiveCallback("comment", "%s", &( yyvsp[0].stype[1]) ); 
 
2032
                                        };
 
2033
                                };
 
2034
                                DiscardStringValue(yyvsp[0].stype);
 
2035
 
 
2036
                                ExpectRequest(); 
 
2037
                                fRecovering = false;
 
2038
                        }
 
2039
    break;
 
2040
case 6:
 
2041
#line 379 "parser.yxx"
 
2042
{  }
 
2043
    break;
 
2044
case 7:
 
2045
#line 381 "parser.yxx"
 
2046
{
 
2047
                                ParserDeclare(*ParseCallbackInterface, yyvsp[-1].stype, yyvsp[0].stype);
 
2048
                                DiscardStringValue(yyvsp[-1].stype);
 
2049
                                DiscardStringValue(yyvsp[0].stype);
 
2050
                        }
 
2051
    break;
 
2052
case 8:
 
2053
#line 387 "parser.yxx"
 
2054
{ ParseCallbackInterface->RiFrameBegin(yyvsp[0].itype); }
 
2055
    break;
 
2056
case 9:
 
2057
#line 389 "parser.yxx"
 
2058
{ ParseCallbackInterface->RiFrameEnd(); }
 
2059
    break;
 
2060
case 10:
 
2061
#line 391 "parser.yxx"
 
2062
{ ParseCallbackInterface->RiWorldBegin(); }
 
2063
    break;
 
2064
case 11:
 
2065
#line 393 "parser.yxx"
 
2066
{ ParseCallbackInterface->RiWorldEnd(); /* YYACCEPT; */ }
 
2067
    break;
 
2068
case 12:
 
2069
#line 395 "parser.yxx"
 
2070
{ ParseCallbackInterface->RiFormat(yyvsp[-2].itype, yyvsp[-1].itype, yyvsp[0].ftype); }
 
2071
    break;
 
2072
case 13:
 
2073
#line 397 "parser.yxx"
 
2074
{ ParseCallbackInterface->RiFrameAspectRatio(yyvsp[0].ftype); }
 
2075
    break;
 
2076
case 14:
 
2077
#line 399 "parser.yxx"
 
2078
{ ParseCallbackInterface->RiScreenWindow(yyvsp[-3].ftype, yyvsp[-2].ftype, yyvsp[-1].ftype, yyvsp[0].ftype); }
 
2079
    break;
 
2080
case 15:
 
2081
#line 401 "parser.yxx"
 
2082
{ ParseCallbackInterface->RiCropWindow(yyvsp[-3].ftype, yyvsp[-2].ftype, yyvsp[-1].ftype, yyvsp[0].ftype); }
 
2083
    break;
 
2084
case 16:
 
2085
#line 403 "parser.yxx"
 
2086
{
 
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);
 
2090
                        }
 
2091
    break;
 
2092
case 17:
 
2093
#line 409 "parser.yxx"
 
2094
{ ParseCallbackInterface->RiClipping(yyvsp[-1].ftype, yyvsp[0].ftype); }
 
2095
    break;
 
2096
case 18:
 
2097
#line 411 "parser.yxx"
 
2098
{ ParseCallbackInterface->RiDepthOfField(yyvsp[-2].ftype, yyvsp[-1].ftype, yyvsp[0].ftype); }
 
2099
    break;
 
2100
case 19:
 
2101
#line 413 "parser.yxx"
 
2102
{ ParseCallbackInterface->RiShutter(yyvsp[-1].ftype, yyvsp[0].ftype); }
 
2103
    break;
 
2104
case 20:
 
2105
#line 415 "parser.yxx"
 
2106
{ ParseCallbackInterface->RiPixelVariance(yyvsp[0].ftype); }
 
2107
    break;
 
2108
case 21:
 
2109
#line 417 "parser.yxx"
 
2110
{ ParseCallbackInterface->RiPixelSamples(yyvsp[-1].ftype, yyvsp[0].ftype); }
 
2111
    break;
 
2112
case 22:
 
2113
#line 419 "parser.yxx"
 
2114
{
 
2115
                                RendermanInterface::RtFilterFunc pFilter=ParseCallbackInterface->GetFilterFunction(yyvsp[-2].stype);
 
2116
                                ParseCallbackInterface->RiPixelFilter(pFilter, yyvsp[-1].ftype, yyvsp[0].ftype);
 
2117
 
 
2118
                                DiscardStringValue(yyvsp[-2].stype);
 
2119
                        }
 
2120
    break;
 
2121
case 23:
 
2122
#line 426 "parser.yxx"
 
2123
{ ParseCallbackInterface->RiExposure(yyvsp[-1].ftype, yyvsp[0].ftype); }
 
2124
    break;
 
2125
case 24:
 
2126
#line 428 "parser.yxx"
 
2127
{
 
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);
 
2131
                        }
 
2132
    break;
 
2133
case 25:
 
2134
#line 434 "parser.yxx"
 
2135
{
 
2136
                                ParseCallbackInterface->RiQuantize((char*)(yyvsp[-4].stype), yyvsp[-3].itype, yyvsp[-2].itype, yyvsp[-1].itype, yyvsp[0].ftype);
 
2137
                                DiscardStringValue(yyvsp[-4].stype);
 
2138
                        }
 
2139
    break;
 
2140
case 26:
 
2141
#line 439 "parser.yxx"
 
2142
{
 
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);
 
2148
                        }
 
2149
    break;
 
2150
case 27:
 
2151
#line 447 "parser.yxx"
 
2152
{
 
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);
 
2156
                        }
 
2157
    break;
 
2158
case 28:
 
2159
#line 453 "parser.yxx"
 
2160
{
 
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);
 
2165
                        }
 
2166
    break;
 
2167
case 29:
 
2168
#line 460 "parser.yxx"
 
2169
{ ParseCallbackInterface->RiRelativeDetail(yyvsp[0].ftype); }
 
2170
    break;
 
2171
case 30:
 
2172
#line 462 "parser.yxx"
 
2173
{
 
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);
 
2177
                        }
 
2178
    break;
 
2179
case 31:
 
2180
#line 468 "parser.yxx"
 
2181
{ ParseCallbackInterface->RiAttributeBegin(); }
 
2182
    break;
 
2183
case 32:
 
2184
#line 470 "parser.yxx"
 
2185
{ ParseCallbackInterface->RiAttributeEnd(); }
 
2186
    break;
 
2187
case 33:
 
2188
#line 472 "parser.yxx"
 
2189
{
 
2190
                                if(yyvsp[0].aftype->Count() == ColorSamples)
 
2191
                                        ParseCallbackInterface->RiColor(&(*yyvsp[0].aftype)[0]);
 
2192
                                else
 
2193
                                        yyerror("Incorrect Number of Color Samples");
 
2194
                                        
 
2195
                                DiscardArrayValue(yyvsp[0].aftype);
 
2196
                        }
 
2197
    break;
 
2198
case 34:
 
2199
#line 481 "parser.yxx"
 
2200
{
 
2201
                                if(3 == ColorSamples)
 
2202
                                        {
 
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);
 
2208
                                        }
 
2209
                                else
 
2210
                                        {
 
2211
                                                yyerror("Incorrect Number of Color Samples");
 
2212
                                        }
 
2213
                        }
 
2214
    break;
 
2215
case 35:
 
2216
#line 496 "parser.yxx"
 
2217
{
 
2218
                                if(yyvsp[0].aftype->Count() == ColorSamples)
 
2219
                                        ParseCallbackInterface->RiOpacity(&(*yyvsp[0].aftype)[0]);
 
2220
                                else
 
2221
                                        yyerror("Incorrect Number of Color Samples");
 
2222
                                        
 
2223
                                DiscardArrayValue(yyvsp[0].aftype);
 
2224
                        }
 
2225
    break;
 
2226
case 36:
 
2227
#line 505 "parser.yxx"
 
2228
{
 
2229
                                if(3 == ColorSamples)
 
2230
                                        {
 
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);
 
2236
                                        }
 
2237
                                else
 
2238
                                        {
 
2239
                                                yyerror("Incorrect Number of Color Samples");
 
2240
                                        }
 
2241
                        }
 
2242
    break;
 
2243
case 37:
 
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); }
 
2246
    break;
 
2247
case 38:
 
2248
#line 522 "parser.yxx"
 
2249
{
 
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]);
 
2252
                                else
 
2253
                                        yyerror("Expecting 8 Values");
 
2254
                                        
 
2255
                                DiscardArrayValue(yyvsp[0].aftype);
 
2256
                        }
 
2257
    break;
 
2258
case 39:
 
2259
#line 531 "parser.yxx"
 
2260
{
 
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);
 
2264
                        }
 
2265
    break;
 
2266
case 40:
 
2267
#line 537 "parser.yxx"
 
2268
{
 
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);
 
2273
                        }
 
2274
    break;
 
2275
case 41:
 
2276
#line 544 "parser.yxx"
 
2277
{
 
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);
 
2281
                        }
 
2282
    break;
 
2283
case 42:
 
2284
#line 550 "parser.yxx"
 
2285
{
 
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);
 
2290
                        }
 
2291
    break;
 
2292
case 43:
 
2293
#line 557 "parser.yxx"
 
2294
{
 
2295
                                RendermanInterface::RtLightHandle handle = LookupLightHandle(yyvsp[-1].itype);
 
2296
                                if(handle)
 
2297
                                        ParseCallbackInterface->RiIlluminate(handle, yyvsp[0].itype != 0);
 
2298
                                else
 
2299
                                        yyerror("Undeclared Light");
 
2300
                        }
 
2301
    break;
 
2302
case 44:
 
2303
#line 565 "parser.yxx"
 
2304
{
 
2305
                                RendermanInterface::RtLightHandle handle = LookupLightHandleString(yyvsp[-1].stype);
 
2306
                                if(handle)
 
2307
                                        ParseCallbackInterface->RiIlluminate(handle, yyvsp[0].itype != 0);
 
2308
                                else
 
2309
                                        yyerror("Undeclared Light");
 
2310
                                DiscardStringValue(yyvsp[-1].stype);
 
2311
                        }
 
2312
    break;
 
2313
case 45:
 
2314
#line 574 "parser.yxx"
 
2315
{
 
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);
 
2319
                        }
 
2320
    break;
 
2321
case 46:
 
2322
#line 580 "parser.yxx"
 
2323
{
 
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);
 
2327
                        }
 
2328
    break;
 
2329
case 47:
 
2330
#line 586 "parser.yxx"
 
2331
{
 
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);
 
2335
                        }
 
2336
    break;
 
2337
case 48:
 
2338
#line 592 "parser.yxx"
 
2339
{
 
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);
 
2343
                        }
 
2344
    break;
 
2345
case 49:
 
2346
#line 598 "parser.yxx"
 
2347
{ ParseCallbackInterface->RiShadingRate(yyvsp[0].ftype); }
 
2348
    break;
 
2349
case 50:
 
2350
#line 600 "parser.yxx"
 
2351
{
 
2352
                                ParseCallbackInterface->RiShadingInterpolation((char*)(yyvsp[0].stype));
 
2353
                                DiscardStringValue(yyvsp[0].stype);
 
2354
                        }
 
2355
    break;
 
2356
case 51:
 
2357
#line 605 "parser.yxx"
 
2358
{ ParseCallbackInterface->RiMatte(yyvsp[0].itype!=0); }
 
2359
    break;
 
2360
case 52:
 
2361
#line 607 "parser.yxx"
 
2362
{
 
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);
 
2366
                        }
 
2367
    break;
 
2368
case 53:
 
2369
#line 613 "parser.yxx"
 
2370
{
 
2371
                                if(yyvsp[0].aftype->Count() == 6)
 
2372
                                        ParseCallbackInterface->RiBound(&(*yyvsp[0].aftype)[0]);
 
2373
                                else
 
2374
                                        yyerror("Expecting 6 Values");
 
2375
                                        
 
2376
                                DiscardArrayValue(yyvsp[0].aftype);
 
2377
                        }
 
2378
    break;
 
2379
case 54:
 
2380
#line 622 "parser.yxx"
 
2381
{
 
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);
 
2385
                        }
 
2386
    break;
 
2387
case 55:
 
2388
#line 628 "parser.yxx"
 
2389
{
 
2390
                                if(yyvsp[0].aftype->Count() == 6)
 
2391
                                        ParseCallbackInterface->RiDetail(&(*yyvsp[0].aftype)[0]);
 
2392
                                else
 
2393
                                        yyerror("Expecting 6 Values");
 
2394
                                DiscardArrayValue(yyvsp[0].aftype);
 
2395
                        }
 
2396
    break;
 
2397
case 56:
 
2398
#line 636 "parser.yxx"
 
2399
{ ParseCallbackInterface->RiDetailRange(yyvsp[-3].ftype, yyvsp[-2].ftype, yyvsp[-1].ftype, yyvsp[0].ftype); }
 
2400
    break;
 
2401
case 57:
 
2402
#line 638 "parser.yxx"
 
2403
{
 
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]);
 
2406
                                else
 
2407
                                        yyerror("Expecting 4 Values");
 
2408
                                DiscardArrayValue(yyvsp[0].aftype);
 
2409
                        }
 
2410
    break;
 
2411
case 58:
 
2412
#line 646 "parser.yxx"
 
2413
{
 
2414
                                ParseCallbackInterface->RiGeometricApproximation((char*)(yyvsp[-1].stype), yyvsp[0].ftype);
 
2415
                                DiscardStringValue(yyvsp[-1].stype);
 
2416
                        }
 
2417
    break;
 
2418
case 59:
 
2419
#line 651 "parser.yxx"
 
2420
{
 
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);
 
2425
                        }
 
2426
    break;
 
2427
case 60:
 
2428
#line 658 "parser.yxx"
 
2429
{
 
2430
                                ParseCallbackInterface->RiOrientation((char*)(yyvsp[0].stype));
 
2431
                                DiscardStringValue(yyvsp[0].stype);
 
2432
                        }
 
2433
    break;
 
2434
case 61:
 
2435
#line 663 "parser.yxx"
 
2436
{ ParseCallbackInterface->RiReverseOrientation(); }
 
2437
    break;
 
2438
case 62:
 
2439
#line 665 "parser.yxx"
 
2440
{ ParseCallbackInterface->RiSides(yyvsp[0].itype); }
 
2441
    break;
 
2442
case 63:
 
2443
#line 667 "parser.yxx"
 
2444
{ ParseCallbackInterface->RiIdentity(); }
 
2445
    break;
 
2446
case 64:
 
2447
#line 669 "parser.yxx"
 
2448
{
 
2449
                                RendermanInterface::RtMatrix Trans;
 
2450
                                if(yyvsp[0].aftype->Count() == 16)
 
2451
                                        {
 
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);
 
2469
                                        }
 
2470
                                else
 
2471
                                        {
 
2472
                                                yyerror("Expecting 16 Values");
 
2473
                                        }
 
2474
                                DiscardArrayValue(yyvsp[0].aftype);
 
2475
                        }
 
2476
    break;
 
2477
case 65:
 
2478
#line 698 "parser.yxx"
 
2479
{
 
2480
                                RendermanInterface::RtMatrix Trans;
 
2481
                                if(yyvsp[0].aftype->Count() == 16)
 
2482
                                        {
 
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);
 
2500
                                        }
 
2501
                                else
 
2502
                                        {
 
2503
                                                yyerror("Expecting 16 Values");
 
2504
                                        }
 
2505
                                DiscardArrayValue(yyvsp[0].aftype);
 
2506
                        }
 
2507
    break;
 
2508
case 66:
 
2509
#line 727 "parser.yxx"
 
2510
{ ParseCallbackInterface->RiPerspective(yyvsp[0].ftype); }
 
2511
    break;
 
2512
case 67:
 
2513
#line 729 "parser.yxx"
 
2514
{ ParseCallbackInterface->RiTranslate(yyvsp[-2].ftype, yyvsp[-1].ftype, yyvsp[0].ftype); }
 
2515
    break;
 
2516
case 68:
 
2517
#line 731 "parser.yxx"
 
2518
{ ParseCallbackInterface->RiRotate(yyvsp[-3].ftype, yyvsp[-2].ftype, yyvsp[-1].ftype, yyvsp[0].ftype); }
 
2519
    break;
 
2520
case 69:
 
2521
#line 733 "parser.yxx"
 
2522
{ ParseCallbackInterface->RiScale(yyvsp[-2].ftype, yyvsp[-1].ftype, yyvsp[0].ftype); }
 
2523
    break;
 
2524
case 70:
 
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); }
 
2527
    break;
 
2528
case 71:
 
2529
#line 737 "parser.yxx"
 
2530
{
 
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]);
 
2533
                                else
 
2534
                                        yyerror("Expecting 7 Values");
 
2535
                                DiscardArrayValue(yyvsp[0].aftype);
 
2536
                        }
 
2537
    break;
 
2538
case 72:
 
2539
#line 745 "parser.yxx"
 
2540
{
 
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);
 
2544
                        }
 
2545
    break;
 
2546
case 73:
 
2547
#line 751 "parser.yxx"
 
2548
{
 
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);
 
2552
                        }
 
2553
    break;
 
2554
case 74:
 
2555
#line 757 "parser.yxx"
 
2556
{
 
2557
                                ParseCallbackInterface->RiCoordinateSystem(yyvsp[0].stype);
 
2558
                                DiscardStringValue(yyvsp[0].stype);
 
2559
                        }
 
2560
    break;
 
2561
case 75:
 
2562
#line 762 "parser.yxx"
 
2563
{
 
2564
                                ParseCallbackInterface->RiCoordSysTransform(yyvsp[0].stype);
 
2565
                                DiscardStringValue(yyvsp[0].stype);
 
2566
                        }
 
2567
    break;
 
2568
case 76:
 
2569
#line 767 "parser.yxx"
 
2570
{ printf("TRANSFORMPOINTS\n"); }
 
2571
    break;
 
2572
case 77:
 
2573
#line 769 "parser.yxx"
 
2574
{ ParseCallbackInterface->RiTransformBegin(); }
 
2575
    break;
 
2576
case 78:
 
2577
#line 771 "parser.yxx"
 
2578
{ ParseCallbackInterface->RiTransformEnd(); }
 
2579
    break;
 
2580
case 79:
 
2581
#line 773 "parser.yxx"
 
2582
{
 
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);
 
2586
                        }
 
2587
    break;
 
2588
case 80:
 
2589
#line 779 "parser.yxx"
 
2590
{
 
2591
                                int vertices = 0;
 
2592
                                for(int i = 0; i < yyvsp[0].atvtype->Count(); i++)
 
2593
                                        {
 
2594
                                                if(yyvsp[0].atvtype->Tokens()[i] == std::string("P"))
 
2595
                                                        vertices = yyvsp[0].atvtype->Counts()[i] / 3;
 
2596
                                        }
 
2597
                                ParseCallbackInterface->RiPolygonV(vertices, yyvsp[0].atvtype->Count(), yyvsp[0].atvtype->Tokens(), yyvsp[0].atvtype->Values());
 
2598
                                DiscardTokenValuePairs(yyvsp[0].atvtype);
 
2599
                        }
 
2600
    break;
 
2601
case 81:
 
2602
#line 790 "parser.yxx"
 
2603
{
 
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);
 
2607
                        }
 
2608
    break;
 
2609
case 82:
 
2610
#line 796 "parser.yxx"
 
2611
{
 
2612
                int vertices = 0;
 
2613
                for(int i = 0; i < yyvsp[0].atvtype->Count(); i++) 
 
2614
                {
 
2615
                    if(yyvsp[0].atvtype->Tokens()[i] == std::string("P"))
 
2616
                    vertices = yyvsp[0].atvtype->Counts()[i] / 3;
 
2617
                }
 
2618
                if (vertices > 0)
 
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());
 
2620
                else 
 
2621
                    yyerror("Expecting \"P\"");
 
2622
                DiscardStringValue(yyvsp[-3].stype);
 
2623
                DiscardArrayValue(yyvsp[-2].aitype); 
 
2624
                DiscardStringValue(yyvsp[-1].stype);  
 
2625
                DiscardTokenValuePairs(yyvsp[0].atvtype);
 
2626
            }
 
2627
    break;
 
2628
case 83:
 
2629
#line 813 "parser.yxx"
 
2630
{
 
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);
 
2639
            }
 
2640
    break;
 
2641
case 84:
 
2642
#line 824 "parser.yxx"
 
2643
{
 
2644
                ParseCallbackInterface->RiReadArchive( yyvsp[0].stype, NULL );
 
2645
                DiscardStringValue( yyvsp[0].stype );
 
2646
            }
 
2647
    break;
 
2648
case 85:
 
2649
#line 829 "parser.yxx"
 
2650
{
 
2651
                if (!(
 
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"); 
 
2656
                    
 
2657
                        if(yyvsp[-1].aftype->Count() != 6)
 
2658
                           yyerror("Expecting 6 Values");
 
2659
 
 
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
 
2662
                // big lump
 
2663
                size_t size = 0;
 
2664
                int i;
 
2665
                for(i=0; i<yyvsp[-2].astype->Count(); i++)
 
2666
                {
 
2667
                        size += sizeof( char* ); //one pointer for this entry
 
2668
                        size += strlen((*yyvsp[-2].astype)[i]) + 1; //and space for the string
 
2669
                }
 
2670
 
 
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++)
 
2674
                {
 
2675
                        ((char**) pdata)[i] = stringstart;
 
2676
                        strcpy(stringstart, (*yyvsp[-2].astype)[i]);
 
2677
                        stringstart += strlen( stringstart ) + 1;
 
2678
                }
 
2679
 
 
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);
 
2687
            }
 
2688
    break;
 
2689
case 86:
 
2690
#line 868 "parser.yxx"
 
2691
{
 
2692
                int vertices = 0;
 
2693
                for(int i = 0; i < yyvsp[0].atvtype->Count(); i++) 
 
2694
                {
 
2695
                    if(yyvsp[0].atvtype->Tokens()[i] == std::string("P"))
 
2696
                    vertices = yyvsp[0].atvtype->Counts()[i] / 3;
 
2697
                }
 
2698
                if (vertices > 0)
 
2699
                    ParseCallbackInterface->RiPointsV(vertices, yyvsp[0].atvtype->Count(), yyvsp[0].atvtype->Tokens(), yyvsp[0].atvtype->Values());
 
2700
                else 
 
2701
                    yyerror("Expecting \"P\"");
 
2702
                    
 
2703
                                DiscardTokenValuePairs(yyvsp[0].atvtype);
 
2704
            }
 
2705
    break;
 
2706
case 87:
 
2707
#line 883 "parser.yxx"
 
2708
{
 
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);
 
2713
                        }
 
2714
    break;
 
2715
case 88:
 
2716
#line 890 "parser.yxx"
 
2717
{
 
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);
 
2723
                        }
 
2724
    break;
 
2725
case 89:
 
2726
#line 898 "parser.yxx"
 
2727
{
 
2728
 
 
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);
 
2734
 
 
2735
                        }
 
2736
    break;
 
2737
case 90:
 
2738
#line 908 "parser.yxx"
 
2739
{
 
2740
 
 
2741
                                if(yyvsp[-1].aftype->Count() == 16)
 
2742
                                        {
 
2743
                                                RtBasis v;
 
2744
                                                int i,j;
 
2745
                                                for(i=0; i<4; i++)
 
2746
                                                        for(j=0; j<4; j++)
 
2747
                                                                v[i][j]=(*yyvsp[-1].aftype)[(i*4)+j];
 
2748
 
 
2749
                                                RendermanInterface::RtBasis *u=ParseCallbackInterface->GetBasisMatrix(yyvsp[-3].stype);
 
2750
                                                ParseCallbackInterface->RiBasis(*u, yyvsp[-2].itype,v, yyvsp[0].itype);
 
2751
                                        }
 
2752
                                else
 
2753
                                        {
 
2754
                                                yyerror("Expecting 16 floats");
 
2755
                                        }
 
2756
                                DiscardStringValue(yyvsp[-3].stype);
 
2757
                                DiscardArrayValue(yyvsp[-1].aftype);
 
2758
 
 
2759
                                                                        }
 
2760
    break;
 
2761
case 91:
 
2762
#line 930 "parser.yxx"
 
2763
{
 
2764
 
 
2765
                                if(yyvsp[-3].aftype->Count() == 16)
 
2766
                                        {
 
2767
 
 
2768
                                                RtBasis u;
 
2769
                                                int i,j;
 
2770
                                                for(i=0; i<4; i++)
 
2771
                                                        for(j=0; j<4; j++)
 
2772
                                                                u[i][j]=(*yyvsp[-3].aftype)[(i*4)+j];
 
2773
 
 
2774
                                                RendermanInterface::RtBasis *v=ParseCallbackInterface->GetBasisMatrix(yyvsp[-1].stype);
 
2775
                                                ParseCallbackInterface->RiBasis(u, yyvsp[-2].itype,*v, yyvsp[0].itype);
 
2776
                                        }
 
2777
                                else
 
2778
                                        {
 
2779
                                                yyerror("Expecting 16 floats");
 
2780
                                        }
 
2781
                                DiscardArrayValue(yyvsp[-3].aftype);
 
2782
                                DiscardStringValue(yyvsp[-1].stype);
 
2783
 
 
2784
                                                                        }
 
2785
    break;
 
2786
case 92:
 
2787
#line 953 "parser.yxx"
 
2788
{
 
2789
                                if(yyvsp[-3].aftype->Count( ) == 16 && yyvsp[-1].aftype->Count() == 16)
 
2790
                                        {
 
2791
                                                // Build a matrix for the u and v directions
 
2792
                                                RendermanInterface::RtBasis u, v;
 
2793
                                                int i,j;
 
2794
                                                for(i=0; i<4; i++)
 
2795
                                                        {
 
2796
                                                                for(j=0; j<4; j++)
 
2797
                                                                        {
 
2798
                                                                                u[i][j]=(*yyvsp[-3].aftype)[(i*4)+j];
 
2799
                                                                                v[i][j]=(*yyvsp[-1].aftype)[(i*4)+j];
 
2800
                                                                        }
 
2801
                                                        }
 
2802
                                                ParseCallbackInterface->RiBasis(u, yyvsp[-2].itype,v, yyvsp[0].itype);
 
2803
                                        }
 
2804
                                else
 
2805
                                        {
 
2806
                                                yyerror("Expecting 16 Values");
 
2807
                                        }
 
2808
                                DiscardArrayValue(yyvsp[-3].aftype);
 
2809
                                DiscardArrayValue(yyvsp[-1].aftype);
 
2810
                        }
 
2811
    break;
 
2812
case 93:
 
2813
#line 977 "parser.yxx"
 
2814
{
 
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);
 
2818
                        }
 
2819
    break;
 
2820
case 94:
 
2821
#line 983 "parser.yxx"
 
2822
{
 
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);
 
2828
                        }
 
2829
    break;
 
2830
case 95:
 
2831
#line 991 "parser.yxx"
 
2832
{
 
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);
 
2837
                        }
 
2838
    break;
 
2839
case 96:
 
2840
#line 998 "parser.yxx"
 
2841
{
 
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);
 
2852
                        }
 
2853
    break;
 
2854
case 97:
 
2855
#line 1011 "parser.yxx"
 
2856
{
 
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);
 
2859
                        }
 
2860
    break;
 
2861
case 98:
 
2862
#line 1016 "parser.yxx"
 
2863
{
 
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);
 
2866
                        }
 
2867
    break;
 
2868
case 99:
 
2869
#line 1021 "parser.yxx"
 
2870
{
 
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);
 
2873
                        }
 
2874
    break;
 
2875
case 100:
 
2876
#line 1026 "parser.yxx"
 
2877
{
 
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);
 
2881
                        }
 
2882
    break;
 
2883
case 101:
 
2884
#line 1032 "parser.yxx"
 
2885
{
 
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);
 
2895
                        }
 
2896
    break;
 
2897
case 102:
 
2898
#line 1044 "parser.yxx"
 
2899
{
 
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);
 
2902
                        }
 
2903
    break;
 
2904
case 103:
 
2905
#line 1049 "parser.yxx"
 
2906
{
 
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);
 
2909
                        }
 
2910
    break;
 
2911
case 104:
 
2912
#line 1054 "parser.yxx"
 
2913
{
 
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);
 
2916
                        }
 
2917
    break;
 
2918
case 105:
 
2919
#line 1059 "parser.yxx"
 
2920
{
 
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);
 
2924
                        }
 
2925
    break;
 
2926
case 106:
 
2927
#line 1065 "parser.yxx"
 
2928
{
 
2929
                                ParseCallbackInterface->RiSolidBegin(const_cast<char*>(yyvsp[0].stype));
 
2930
                                DiscardStringValue(yyvsp[0].stype);
 
2931
                        }
 
2932
    break;
 
2933
case 107:
 
2934
#line 1070 "parser.yxx"
 
2935
{ ParseCallbackInterface->RiSolidEnd(); }
 
2936
    break;
 
2937
case 108:
 
2938
#line 1072 "parser.yxx"
 
2939
{
 
2940
                                DeclareObjectHandle(yyvsp[0].itype, ParseCallbackInterface->RiObjectBegin());
 
2941
                        }
 
2942
    break;
 
2943
case 109:
 
2944
#line 1076 "parser.yxx"
 
2945
{
 
2946
                                DeclareObjectHandleString(yyvsp[0].stype, ParseCallbackInterface->RiObjectBegin());
 
2947
                                DiscardStringValue(yyvsp[0].stype);
 
2948
                        }
 
2949
    break;
 
2950
case 110:
 
2951
#line 1081 "parser.yxx"
 
2952
{ ParseCallbackInterface->RiObjectEnd(); }
 
2953
    break;
 
2954
case 111:
 
2955
#line 1083 "parser.yxx"
 
2956
{
 
2957
                                RendermanInterface::RtObjectHandle handle = LookupObjectHandle(yyvsp[0].itype);
 
2958
                                if(handle)
 
2959
                                        ParseCallbackInterface->RiObjectInstance(handle);
 
2960
                                else
 
2961
                                        yyerror("Undeclared Object");
 
2962
                        }
 
2963
    break;
 
2964
case 112:
 
2965
#line 1091 "parser.yxx"
 
2966
{
 
2967
                                RendermanInterface::RtObjectHandle handle = LookupObjectHandleString(yyvsp[0].stype);
 
2968
                                if(handle)
 
2969
                                        ParseCallbackInterface->RiObjectInstance(handle);
 
2970
                                else
 
2971
                                        yyerror("Undeclared Object");
 
2972
                                DiscardStringValue(yyvsp[0].stype);
 
2973
                        }
 
2974
    break;
 
2975
case 113:
 
2976
#line 1100 "parser.yxx"
 
2977
{
 
2978
                                ParseCallbackInterface->RiMotionBeginV(yyvsp[0].aftype->Count(), &(*yyvsp[0].aftype)[0]);
 
2979
                                DiscardArrayValue(yyvsp[0].aftype);
 
2980
                        }
 
2981
    break;
 
2982
case 114:
 
2983
#line 1105 "parser.yxx"
 
2984
{ ParseCallbackInterface->RiMotionEnd(); }
 
2985
    break;
 
2986
case 115:
 
2987
#line 1107 "parser.yxx"
 
2988
{
 
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());
 
2992
                        }
 
2993
    break;
 
2994
case 116:
 
2995
#line 1113 "parser.yxx"
 
2996
{
 
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());
 
3000
                        }
 
3001
    break;
 
3002
case 117:
 
3003
#line 1119 "parser.yxx"
 
3004
{
 
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());
 
3008
                        }
 
3009
    break;
 
3010
case 118:
 
3011
#line 1125 "parser.yxx"
 
3012
{
 
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),
 
3019
                                                         yyvsp[-4].ftype,
 
3020
                                                         pFilter,
 
3021
                                                         yyvsp[-2].ftype, yyvsp[-1].ftype,
 
3022
                                                         yyvsp[0].atvtype->Count(), yyvsp[0].atvtype->Tokens(), yyvsp[0].atvtype->Values());
 
3023
                        }
 
3024
    break;
 
3025
case 119:
 
3026
#line 1138 "parser.yxx"
 
3027
{
 
3028
                                ParseCallbackInterface->RiMakeShadowV(yyvsp[-2].stype, yyvsp[-1].stype, yyvsp[0].atvtype->Count(), yyvsp[0].atvtype->Tokens(), yyvsp[0].atvtype->Values());
 
3029
                        }
 
3030
    break;
 
3031
case 120:
 
3032
#line 1142 "parser.yxx"
 
3033
{
 
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());
 
3035
                        }
 
3036
    break;
 
3037
case 121:
 
3038
#line 1146 "parser.yxx"
 
3039
{
 
3040
/*
 
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);
 
3048
*/
 
3049
                                                                        }
 
3050
    break;
 
3051
case 122:
 
3052
#line 1158 "parser.yxx"
 
3053
{ printf("ERRORIGNORE\n"); }
 
3054
    break;
 
3055
case 123:
 
3056
#line 1160 "parser.yxx"
 
3057
{ printf("ERRORPRINT\n"); }
 
3058
    break;
 
3059
case 124:
 
3060
#line 1162 "parser.yxx"
 
3061
{ printf("ERRORABORT\n"); }
 
3062
    break;
 
3063
case 125:
 
3064
#line 1164 "parser.yxx"
 
3065
{
 
3066
                                char** ptags=new char*[yyvsp[-4].astype->Count()];
 
3067
                                int i;
 
3068
                                for(i=0; i<yyvsp[-4].astype->Count(); i++)
 
3069
                                {
 
3070
                                        char* ptag=new char[strlen((*yyvsp[-4].astype)[i]) + 1];
 
3071
                                        strcpy(ptag, (*yyvsp[-4].astype)[i]);
 
3072
                                        ptags[i]=ptag;
 
3073
                                }
 
3074
 
 
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());
 
3082
 
 
3083
                                for(i=0; i<yyvsp[-4].astype->Count(); i++)
 
3084
                                        delete[](ptags[i]);
 
3085
                                delete[](ptags);
 
3086
 
 
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);
 
3095
                        }
 
3096
    break;
 
3097
case 126:
 
3098
#line 1196 "parser.yxx"
 
3099
{
 
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);
 
3105
                        }
 
3106
    break;
 
3107
case 127:
 
3108
#line 1204 "parser.yxx"
 
3109
{
 
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");
 
3114
                                fRecovering = true;
 
3115
                                ExpectRequest();
 
3116
                        }
 
3117
    break;
 
3118
case 128:
 
3119
#line 1213 "parser.yxx"
 
3120
{
 
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.
 
3124
                                if( !fRecovering )
 
3125
                                {
 
3126
                                        yyerror("Unrecognised RIB request");
 
3127
                                        fRecovering = true;
 
3128
                                        ExpectRequest();
 
3129
                                }
 
3130
                        }
 
3131
    break;
 
3132
case 129:
 
3133
#line 1225 "parser.yxx"
 
3134
{
 
3135
                                // A value has been found when a request is expected, quietly eat it...
 
3136
                        }
 
3137
    break;
 
3138
case 130:
 
3139
#line 1230 "parser.yxx"
 
3140
{ ExpectParams(); }
 
3141
    break;
 
3142
case 131:
 
3143
#line 1231 "parser.yxx"
 
3144
{ ExpectParams(); }
 
3145
    break;
 
3146
case 132:
 
3147
#line 1232 "parser.yxx"
 
3148
{ ExpectParams(); }
 
3149
    break;
 
3150
case 133:
 
3151
#line 1233 "parser.yxx"
 
3152
{ ExpectParams(); }
 
3153
    break;
 
3154
case 134:
 
3155
#line 1234 "parser.yxx"
 
3156
{ ExpectParams(); }
 
3157
    break;
 
3158
case 135:
 
3159
#line 1235 "parser.yxx"
 
3160
{ ExpectParams(); }
 
3161
    break;
 
3162
case 136:
 
3163
#line 1236 "parser.yxx"
 
3164
{ ExpectParams(); }
 
3165
    break;
 
3166
case 137:
 
3167
#line 1237 "parser.yxx"
 
3168
{ ExpectParams(); }
 
3169
    break;
 
3170
case 138:
 
3171
#line 1238 "parser.yxx"
 
3172
{ ExpectParams(); }
 
3173
    break;
 
3174
case 139:
 
3175
#line 1239 "parser.yxx"
 
3176
{ ExpectParams(); }
 
3177
    break;
 
3178
case 140:
 
3179
#line 1240 "parser.yxx"
 
3180
{ ExpectParams(); }
 
3181
    break;
 
3182
case 141:
 
3183
#line 1241 "parser.yxx"
 
3184
{ ExpectParams(); }
 
3185
    break;
 
3186
case 142:
 
3187
#line 1242 "parser.yxx"
 
3188
{ ExpectParams(); }
 
3189
    break;
 
3190
case 143:
 
3191
#line 1243 "parser.yxx"
 
3192
{ ExpectParams(); }
 
3193
    break;
 
3194
case 144:
 
3195
#line 1244 "parser.yxx"
 
3196
{ ExpectParams(); }
 
3197
    break;
 
3198
case 145:
 
3199
#line 1245 "parser.yxx"
 
3200
{ ExpectParams(); }
 
3201
    break;
 
3202
case 146:
 
3203
#line 1246 "parser.yxx"
 
3204
{ ExpectParams(); }
 
3205
    break;
 
3206
case 147:
 
3207
#line 1247 "parser.yxx"
 
3208
{ ExpectParams(); }
 
3209
    break;
 
3210
case 148:
 
3211
#line 1248 "parser.yxx"
 
3212
{ ExpectParams(); }
 
3213
    break;
 
3214
case 149:
 
3215
#line 1249 "parser.yxx"
 
3216
{ ExpectParams(); }
 
3217
    break;
 
3218
case 150:
 
3219
#line 1250 "parser.yxx"
 
3220
{ ExpectParams(); }
 
3221
    break;
 
3222
case 151:
 
3223
#line 1251 "parser.yxx"
 
3224
{ ExpectParams(); }
 
3225
    break;
 
3226
case 152:
 
3227
#line 1252 "parser.yxx"
 
3228
{ ExpectParams(); }
 
3229
    break;
 
3230
case 153:
 
3231
#line 1253 "parser.yxx"
 
3232
{ ExpectParams(); }
 
3233
    break;
 
3234
case 154:
 
3235
#line 1254 "parser.yxx"
 
3236
{ ExpectParams(); }
 
3237
    break;
 
3238
case 155:
 
3239
#line 1255 "parser.yxx"
 
3240
{ ExpectParams(); }
 
3241
    break;
 
3242
case 156:
 
3243
#line 1256 "parser.yxx"
 
3244
{ ExpectParams(); }
 
3245
    break;
 
3246
case 157:
 
3247
#line 1257 "parser.yxx"
 
3248
{ ExpectParams(); }
 
3249
    break;
 
3250
case 158:
 
3251
#line 1258 "parser.yxx"
 
3252
{ ExpectParams(); }
 
3253
    break;
 
3254
case 159:
 
3255
#line 1259 "parser.yxx"
 
3256
{ ExpectParams(); }
 
3257
    break;
 
3258
case 160:
 
3259
#line 1260 "parser.yxx"
 
3260
{ ExpectParams(); }
 
3261
    break;
 
3262
case 161:
 
3263
#line 1261 "parser.yxx"
 
3264
{ ExpectParams(); }
 
3265
    break;
 
3266
case 162:
 
3267
#line 1262 "parser.yxx"
 
3268
{ ExpectParams(); }
 
3269
    break;
 
3270
case 163:
 
3271
#line 1263 "parser.yxx"
 
3272
{ ExpectParams(); }
 
3273
    break;
 
3274
case 164:
 
3275
#line 1264 "parser.yxx"
 
3276
{ ExpectParams(); }
 
3277
    break;
 
3278
case 165:
 
3279
#line 1265 "parser.yxx"
 
3280
{ ExpectParams(); }
 
3281
    break;
 
3282
case 166:
 
3283
#line 1266 "parser.yxx"
 
3284
{ ExpectParams(); }
 
3285
    break;
 
3286
case 167:
 
3287
#line 1267 "parser.yxx"
 
3288
{ ExpectParams(); }
 
3289
    break;
 
3290
case 168:
 
3291
#line 1268 "parser.yxx"
 
3292
{ ExpectParams(); }
 
3293
    break;
 
3294
case 169:
 
3295
#line 1269 "parser.yxx"
 
3296
{ ExpectParams(); }
 
3297
    break;
 
3298
case 170:
 
3299
#line 1270 "parser.yxx"
 
3300
{ ExpectParams(); }
 
3301
    break;
 
3302
case 171:
 
3303
#line 1271 "parser.yxx"
 
3304
{ ExpectParams(); }
 
3305
    break;
 
3306
case 172:
 
3307
#line 1272 "parser.yxx"
 
3308
{ ExpectParams(); }
 
3309
    break;
 
3310
case 173:
 
3311
#line 1273 "parser.yxx"
 
3312
{ ExpectParams(); }
 
3313
    break;
 
3314
case 174:
 
3315
#line 1274 "parser.yxx"
 
3316
{ ExpectParams(); }
 
3317
    break;
 
3318
case 175:
 
3319
#line 1275 "parser.yxx"
 
3320
{ ExpectParams(); }
 
3321
    break;
 
3322
case 176:
 
3323
#line 1276 "parser.yxx"
 
3324
{ ExpectParams(); }
 
3325
    break;
 
3326
case 177:
 
3327
#line 1277 "parser.yxx"
 
3328
{ ExpectParams(); }
 
3329
    break;
 
3330
case 178:
 
3331
#line 1278 "parser.yxx"
 
3332
{ ExpectParams(); }
 
3333
    break;
 
3334
case 179:
 
3335
#line 1279 "parser.yxx"
 
3336
{ ExpectParams(); }
 
3337
    break;
 
3338
case 180:
 
3339
#line 1280 "parser.yxx"
 
3340
{ ExpectParams(); }
 
3341
    break;
 
3342
case 181:
 
3343
#line 1281 "parser.yxx"
 
3344
{ ExpectParams(); }
 
3345
    break;
 
3346
case 182:
 
3347
#line 1282 "parser.yxx"
 
3348
{ ExpectParams(); }
 
3349
    break;
 
3350
case 183:
 
3351
#line 1283 "parser.yxx"
 
3352
{ ExpectParams(); }
 
3353
    break;
 
3354
case 184:
 
3355
#line 1284 "parser.yxx"
 
3356
{ ExpectParams(); }
 
3357
    break;
 
3358
case 185:
 
3359
#line 1285 "parser.yxx"
 
3360
{ ExpectParams(); }
 
3361
    break;
 
3362
case 186:
 
3363
#line 1286 "parser.yxx"
 
3364
{ ExpectParams(); }
 
3365
    break;
 
3366
case 187:
 
3367
#line 1287 "parser.yxx"
 
3368
{ ExpectParams(); }
 
3369
    break;
 
3370
case 188:
 
3371
#line 1288 "parser.yxx"
 
3372
{ ExpectParams(); }
 
3373
    break;
 
3374
case 189:
 
3375
#line 1289 "parser.yxx"
 
3376
{ ExpectParams(); }
 
3377
    break;
 
3378
case 190:
 
3379
#line 1290 "parser.yxx"
 
3380
{ ExpectParams(); }
 
3381
    break;
 
3382
case 191:
 
3383
#line 1291 "parser.yxx"
 
3384
{ ExpectParams(); }
 
3385
    break;
 
3386
case 192:
 
3387
#line 1292 "parser.yxx"
 
3388
{ ExpectParams(); }
 
3389
    break;
 
3390
case 193:
 
3391
#line 1293 "parser.yxx"
 
3392
{ ExpectParams(); }
 
3393
    break;
 
3394
case 194:
 
3395
#line 1294 "parser.yxx"
 
3396
{ ExpectParams(); }
 
3397
    break;
 
3398
case 195:
 
3399
#line 1295 "parser.yxx"
 
3400
{ ExpectParams(); }
 
3401
    break;
 
3402
case 196:
 
3403
#line 1296 "parser.yxx"
 
3404
{ ExpectParams(); }
 
3405
    break;
 
3406
case 197:
 
3407
#line 1297 "parser.yxx"
 
3408
{ ExpectParams(); }
 
3409
    break;
 
3410
case 198:
 
3411
#line 1298 "parser.yxx"
 
3412
{ ExpectParams(); }
 
3413
    break;
 
3414
case 199:
 
3415
#line 1299 "parser.yxx"
 
3416
{ ExpectParams(); }
 
3417
    break;
 
3418
case 200:
 
3419
#line 1300 "parser.yxx"
 
3420
{ ExpectParams(); }
 
3421
    break;
 
3422
case 201:
 
3423
#line 1301 "parser.yxx"
 
3424
{ ExpectParams(); }
 
3425
    break;
 
3426
case 202:
 
3427
#line 1302 "parser.yxx"
 
3428
{ ExpectParams(); }
 
3429
    break;
 
3430
case 203:
 
3431
#line 1303 "parser.yxx"
 
3432
{ ExpectParams(); }
 
3433
    break;
 
3434
case 204:
 
3435
#line 1304 "parser.yxx"
 
3436
{ ExpectParams(); }
 
3437
    break;
 
3438
case 205:
 
3439
#line 1305 "parser.yxx"
 
3440
{ ExpectParams(); }
 
3441
    break;
 
3442
case 206:
 
3443
#line 1306 "parser.yxx"
 
3444
{ ExpectParams(); }
 
3445
    break;
 
3446
case 207:
 
3447
#line 1307 "parser.yxx"
 
3448
{ ExpectParams(); }
 
3449
    break;
 
3450
case 208:
 
3451
#line 1308 "parser.yxx"
 
3452
{ ExpectParams(); }
 
3453
    break;
 
3454
case 209:
 
3455
#line 1309 "parser.yxx"
 
3456
{ ExpectParams(); }
 
3457
    break;
 
3458
case 210:
 
3459
#line 1310 "parser.yxx"
 
3460
{ ExpectParams(); }
 
3461
    break;
 
3462
case 211:
 
3463
#line 1311 "parser.yxx"
 
3464
{ ExpectParams(); }
 
3465
    break;
 
3466
case 212:
 
3467
#line 1312 "parser.yxx"
 
3468
{ ExpectParams(); }
 
3469
    break;
 
3470
case 213:
 
3471
#line 1313 "parser.yxx"
 
3472
{ ExpectParams(); }
 
3473
    break;
 
3474
case 214:
 
3475
#line 1314 "parser.yxx"
 
3476
{ ExpectParams(); }
 
3477
    break;
 
3478
case 215:
 
3479
#line 1315 "parser.yxx"
 
3480
{ ExpectParams(); }
 
3481
    break;
 
3482
case 216:
 
3483
#line 1316 "parser.yxx"
 
3484
{ ExpectParams(); }
 
3485
    break;
 
3486
case 217:
 
3487
#line 1317 "parser.yxx"
 
3488
{ ExpectParams(); }
 
3489
    break;
 
3490
case 218:
 
3491
#line 1318 "parser.yxx"
 
3492
{ ExpectParams(); }
 
3493
    break;
 
3494
case 219:
 
3495
#line 1319 "parser.yxx"
 
3496
{ ExpectParams(); }
 
3497
    break;
 
3498
case 220:
 
3499
#line 1320 "parser.yxx"
 
3500
{ ExpectParams(); }
 
3501
    break;
 
3502
case 221:
 
3503
#line 1321 "parser.yxx"
 
3504
{ ExpectParams(); }
 
3505
    break;
 
3506
case 222:
 
3507
#line 1322 "parser.yxx"
 
3508
{ ExpectParams(); }
 
3509
    break;
 
3510
case 223:
 
3511
#line 1323 "parser.yxx"
 
3512
{ ExpectParams(); }
 
3513
    break;
 
3514
case 224:
 
3515
#line 1324 "parser.yxx"
 
3516
{ ExpectParams(); }
 
3517
    break;
 
3518
case 225:
 
3519
#line 1325 "parser.yxx"
 
3520
{ ExpectParams(); }
 
3521
    break;
 
3522
case 226:
 
3523
#line 1326 "parser.yxx"
 
3524
{ ExpectParams(); }
 
3525
    break;
 
3526
case 227:
 
3527
#line 1327 "parser.yxx"
 
3528
{ ExpectParams(); }
 
3529
    break;
 
3530
case 228:
 
3531
#line 1328 "parser.yxx"
 
3532
{ ExpectParams(); }
 
3533
    break;
 
3534
case 229:
 
3535
#line 1329 "parser.yxx"
 
3536
{ ExpectParams(); }
 
3537
    break;
 
3538
case 230:
 
3539
#line 1330 "parser.yxx"
 
3540
{ ExpectParams(); }
 
3541
    break;
 
3542
case 231:
 
3543
#line 1331 "parser.yxx"
 
3544
{ ExpectParams(); }
 
3545
    break;
 
3546
case 232:
 
3547
#line 1332 "parser.yxx"
 
3548
{ ExpectParams(); }
 
3549
    break;
 
3550
case 234:
 
3551
#line 1337 "parser.yxx"
 
3552
{ yyval.ftype = static_cast<float>(yyvsp[0].itype); }
 
3553
    break;
 
3554
case 235:
 
3555
#line 1341 "parser.yxx"
 
3556
{
 
3557
                                yyval.aftype = new FloatArray(yyvsp[0].ftype);
 
3558
                        }
 
3559
    break;
 
3560
case 236:
 
3561
#line 1345 "parser.yxx"
 
3562
{
 
3563
                                yyval.aftype = yyvsp[-1].aftype;
 
3564
                                yyval.aftype->push_back(yyvsp[0].ftype);
 
3565
                        }
 
3566
    break;
 
3567
case 237:
 
3568
#line 1350 "parser.yxx"
 
3569
{
 
3570
                                yyval.aftype = yyvsp[-1].aftype;
 
3571
                                yyval.aftype->push_back(yyvsp[0].itype);
 
3572
                        }
 
3573
    break;
 
3574
case 238:
 
3575
#line 1355 "parser.yxx"
 
3576
{
 
3577
                                yyval.aftype = new FloatArray(yyvsp[-1].aitype);
 
3578
                                yyval.aftype->push_back(yyvsp[0].ftype);
 
3579
                                DiscardArrayValue(yyvsp[-1].aitype);
 
3580
                        }
 
3581
    break;
 
3582
case 239:
 
3583
#line 1364 "parser.yxx"
 
3584
{
 
3585
                                yyval.aftype = yyvsp[-1].aftype;
 
3586
                        }
 
3587
    break;
 
3588
case 240:
 
3589
#line 1370 "parser.yxx"
 
3590
{
 
3591
                                yyval.itype = yyvsp[0].itype;
 
3592
                        }
 
3593
    break;
 
3594
case 241:
 
3595
#line 1376 "parser.yxx"
 
3596
{
 
3597
                                yyval.aitype = new IntegerArray(yyvsp[0].itype);
 
3598
                        }
 
3599
    break;
 
3600
case 242:
 
3601
#line 1380 "parser.yxx"
 
3602
{
 
3603
                                yyval.aitype = yyvsp[-1].aitype;
 
3604
                                yyval.aitype->push_back(yyvsp[0].itype);
 
3605
                        }
 
3606
    break;
 
3607
case 243:
 
3608
#line 1387 "parser.yxx"
 
3609
{
 
3610
                                yyval.aitype = yyvsp[-1].aitype;
 
3611
                        }
 
3612
    break;
 
3613
case 245:
 
3614
#line 1394 "parser.yxx"
 
3615
{
 
3616
                                yyval.aitype = new IntegerArray;
 
3617
                        }
 
3618
    break;
 
3619
case 246:
 
3620
#line 1400 "parser.yxx"
 
3621
{
 
3622
                                yyval.stype = yyvsp[0].stype;
 
3623
                        }
 
3624
    break;
 
3625
case 247:
 
3626
#line 1406 "parser.yxx"
 
3627
{
 
3628
                                yyval.astype = new StringArray(yyvsp[0].stype);
 
3629
                        }
 
3630
    break;
 
3631
case 248:
 
3632
#line 1410 "parser.yxx"
 
3633
{
 
3634
                                yyval.astype = yyvsp[-1].astype;
 
3635
                                yyval.astype->push_back(yyvsp[0].stype);
 
3636
                        }
 
3637
    break;
 
3638
case 249:
 
3639
#line 1417 "parser.yxx"
 
3640
{
 
3641
                                yyval.astype = yyvsp[-1].astype;
 
3642
                        }
 
3643
    break;
 
3644
case 251:
 
3645
#line 1424 "parser.yxx"
 
3646
{
 
3647
                                yyval.astype = new StringArray;
 
3648
                        }
 
3649
    break;
 
3650
case 253:
 
3651
#line 1431 "parser.yxx"
 
3652
{
 
3653
                                yyval.aftype = new FloatArray(yyvsp[0].aitype);
 
3654
                                DiscardArrayValue(yyvsp[0].aitype);
 
3655
                        }
 
3656
    break;
 
3657
case 255:
 
3658
#line 1440 "parser.yxx"
 
3659
{
 
3660
                                yyval.aftype = new FloatArray;
 
3661
                        }
 
3662
    break;
 
3663
case 256:
 
3664
#line 1446 "parser.yxx"
 
3665
{
 
3666
                                // Set default value ...
 
3667
                                yyval.tvtype = 0;
 
3668
 
 
3669
                                switch(LookupParameterType(yyvsp[-1].stype))
 
3670
                                        {
 
3671
                                                case Type_Unknown:
 
3672
                                                        yyerror("Undeclared Integer Parameter [" + std::string(yyvsp[-1].stype) + "]");
 
3673
                                                        DiscardStringValue(yyvsp[-1].stype);
 
3674
                                                        break;
 
3675
 
 
3676
                                                case Type_Integer:
 
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));
 
3679
                                                        break;
 
3680
 
 
3681
                                                // This is where we perform type conversion from integer to float, based on the declared parameter type ...
 
3682
                                                case Type_Float:
 
3683
                                                case Type_Point:
 
3684
                                                case Type_Color:
 
3685
                                                case Type_hPoint:
 
3686
                                                case Type_Normal:
 
3687
                                                case Type_Vector:
 
3688
                                                case Type_Matrix:
 
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)));
 
3691
                                                        break;
 
3692
 
 
3693
                                                default:
 
3694
                                                        yyerror("Integer Parameter Type Mismatch [" + std::string(yyvsp[-1].stype) + "]");
 
3695
                                                        DiscardStringValue(yyvsp[-1].stype);
 
3696
                                                        break;
 
3697
                                        }
 
3698
                        }
 
3699
    break;
 
3700
case 257:
 
3701
#line 1481 "parser.yxx"
 
3702
{
 
3703
                                // Set default value ...
 
3704
                                yyval.tvtype = 0;
 
3705
 
 
3706
                                switch(LookupParameterType(yyvsp[-1].stype))
 
3707
                                        {
 
3708
                                                case Type_Unknown:
 
3709
                                                        yyerror("Undeclared Integer Array Parameter [" + std::string(yyvsp[-1].stype) + "]");
 
3710
                                                        DiscardStringValue(yyvsp[-1].stype);
 
3711
                                                        DiscardArrayValue(yyvsp[0].aitype);
 
3712
                                                        break;
 
3713
 
 
3714
                                                case Type_Integer:
 
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);
 
3717
                                                        break;
 
3718
 
 
3719
                                                // This is where we perform type conversion from integer to float, based on the declared parameter type ...
 
3720
                                                case Type_Float:
 
3721
                                                case Type_Point:
 
3722
                                                case Type_Color:
 
3723
                                                case Type_hPoint:
 
3724
                                                case Type_Normal:
 
3725
                                                case Type_Vector:
 
3726
                                                case Type_Matrix:
 
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);
 
3730
                                                        break;
 
3731
 
 
3732
                                                default:
 
3733
                                                        yyerror("Integer Array Parameter Type Mismatch [" + std::string(yyvsp[-1].stype) + "]");
 
3734
                                                        DiscardStringValue(yyvsp[-1].stype);
 
3735
                                                        DiscardArrayValue(yyvsp[0].aitype);
 
3736
                                                        break;
 
3737
                                        }
 
3738
                        }
 
3739
    break;
 
3740
case 258:
 
3741
#line 1519 "parser.yxx"
 
3742
{
 
3743
                                // Set default value ...
 
3744
                                yyval.tvtype = 0;
 
3745
 
 
3746
                                switch(LookupParameterType(yyvsp[-1].stype))
 
3747
                                        {
 
3748
                                                case Type_Unknown:
 
3749
                                                        yyerror("Undeclared Float Parameter: [" + std::string(yyvsp[-1].stype) + "]");
 
3750
                                                        DiscardStringValue(yyvsp[-1].stype);
 
3751
                                                        break;
 
3752
 
 
3753
                                                case Type_Float:
 
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));
 
3756
                                                        break;
 
3757
 
 
3758
                                                default:
 
3759
                                                        yyerror("Float Parameter Type Mismatch [" + std::string(yyvsp[-1].stype) + "]");
 
3760
                                                        DiscardStringValue(yyvsp[-1].stype);
 
3761
                                                        break;
 
3762
                                        }
 
3763
                        }
 
3764
    break;
 
3765
case 259:
 
3766
#line 1542 "parser.yxx"
 
3767
{
 
3768
                                // Set default value ...
 
3769
                                yyval.tvtype = 0;
 
3770
 
 
3771
                                switch(LookupParameterType(yyvsp[-1].stype))
 
3772
                                        {
 
3773
                                                case Type_Unknown:
 
3774
                                                        yyerror("Undeclared Float Array Parameter: [" + std::string(yyvsp[-1].stype) + "]");
 
3775
                                                        DiscardStringValue(yyvsp[-1].stype);
 
3776
                                                        DiscardArrayValue(yyvsp[0].aftype);
 
3777
                                                        break;
 
3778
 
 
3779
                                                case Type_Float:
 
3780
                                                case Type_Point:
 
3781
                                                case Type_Color:
 
3782
                                                case Type_hPoint:
 
3783
                                                case Type_Normal:
 
3784
                                                case Type_Vector:
 
3785
                                                case Type_Matrix:
 
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);
 
3788
                                                        break;
 
3789
 
 
3790
                                                default:
 
3791
                                                        yyerror("Float Array Parameter Type Mismatch [" + std::string(yyvsp[-1].stype) + "]");
 
3792
                                                        DiscardStringValue(yyvsp[-1].stype);
 
3793
                                                        DiscardArrayValue(yyvsp[0].aftype);
 
3794
                                                        break;
 
3795
                                        }
 
3796
                        }
 
3797
    break;
 
3798
case 260:
 
3799
#line 1573 "parser.yxx"
 
3800
{
 
3801
                                // Set default value ...
 
3802
                                yyval.tvtype = 0;
 
3803
 
 
3804
                                switch(LookupParameterType(yyvsp[-1].stype))
 
3805
                                        {
 
3806
                                                case Type_Unknown:
 
3807
                                                        yyerror("Undeclared String Parameter [" + std::string(yyvsp[-1].stype) + "]");
 
3808
                                                        DiscardStringValue(yyvsp[-1].stype);
 
3809
                                                        DiscardStringValue(yyvsp[0].stype);
 
3810
                                                        break;
 
3811
 
 
3812
                                                case Type_String:
 
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));
 
3815
                                                        break;
 
3816
 
 
3817
                                                default:
 
3818
                                                        yyerror("String Parameter Type Mismatch [" + std::string(yyvsp[-1].stype) + "]");
 
3819
                                                        DiscardStringValue(yyvsp[-1].stype);
 
3820
                                                        DiscardStringValue(yyvsp[0].stype);
 
3821
                                                        break;
 
3822
                                        }
 
3823
                        }
 
3824
    break;
 
3825
case 261:
 
3826
#line 1598 "parser.yxx"
 
3827
{
 
3828
                                // Set default value ...
 
3829
                                yyval.tvtype = 0;
 
3830
 
 
3831
                                switch(LookupParameterType(yyvsp[-1].stype))
 
3832
                                        {
 
3833
                                                case Type_Unknown:
 
3834
                                                        yyerror("Undeclared String Array Parameter [" + std::string(yyvsp[-1].stype) + "]");
 
3835
                                                        DiscardStringValue(yyvsp[-1].stype);
 
3836
                                                        DiscardArrayValue(yyvsp[0].astype);
 
3837
                                                        break;
 
3838
 
 
3839
                                                case Type_String:
 
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);
 
3842
                                                        break;
 
3843
 
 
3844
                                                default:
 
3845
                                                        yyerror("String Array Parameter Type Mismatch [" + std::string(yyvsp[-1].stype) + "]");
 
3846
                                                        DiscardStringValue(yyvsp[-1].stype);
 
3847
                                                        DiscardArrayValue(yyvsp[0].astype);
 
3848
                                                        break;
 
3849
                                        }
 
3850
                        }
 
3851
    break;
 
3852
case 262:
 
3853
#line 1625 "parser.yxx"
 
3854
{
 
3855
                                yyval.atvtype = new TokenValuePairs;
 
3856
                        }
 
3857
    break;
 
3858
case 263:
 
3859
#line 1629 "parser.yxx"
 
3860
{
 
3861
                                yyval.atvtype = new TokenValuePairs;
 
3862
                        }
 
3863
    break;
 
3864
case 265:
 
3865
#line 1637 "parser.yxx"
 
3866
{
 
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);
 
3869
                        }
 
3870
    break;
 
3871
case 266:
 
3872
#line 1642 "parser.yxx"
 
3873
{
 
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);
 
3876
                        }
 
3877
    break;
 
3878
case 267:
 
3879
#line 1647 "parser.yxx"
 
3880
{
 
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);
 
3885
                        }
 
3886
    break;
 
3887
}
 
3888
 
 
3889
#line 705 "/usr/share/bison/bison.simple"
 
3890
 
 
3891
 
 
3892
  yyvsp -= yylen;
 
3893
  yyssp -= yylen;
 
3894
#if YYLSP_NEEDED
 
3895
  yylsp -= yylen;
 
3896
#endif
 
3897
 
 
3898
#if YYDEBUG
 
3899
  if (yydebug)
 
3900
    {
 
3901
      short *yyssp1 = yyss - 1;
 
3902
      YYFPRINTF (stderr, "state stack now");
 
3903
      while (yyssp1 != yyssp)
 
3904
        YYFPRINTF (stderr, " %d", *++yyssp1);
 
3905
      YYFPRINTF (stderr, "\n");
 
3906
    }
 
3907
#endif
 
3908
 
 
3909
  *++yyvsp = yyval;
 
3910
#if YYLSP_NEEDED
 
3911
  *++yylsp = yyloc;
 
3912
#endif
 
3913
 
 
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.  */
 
3917
 
 
3918
  yyn = yyr1[yyn];
 
3919
 
 
3920
  yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
 
3921
  if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
 
3922
    yystate = yytable[yystate];
 
3923
  else
 
3924
    yystate = yydefgoto[yyn - YYNTBASE];
 
3925
 
 
3926
  goto yynewstate;
 
3927
 
 
3928
 
 
3929
/*------------------------------------.
 
3930
| yyerrlab -- here on detecting error |
 
3931
`------------------------------------*/
 
3932
yyerrlab:
 
3933
  /* If not already recovering from an error, report this error.  */
 
3934
  if (!yyerrstatus)
 
3935
    {
 
3936
      ++yynerrs;
 
3937
 
 
3938
#ifdef YYERROR_VERBOSE
 
3939
      yyn = yypact[yystate];
 
3940
 
 
3941
      if (yyn > YYFLAG && yyn < YYLAST)
 
3942
        {
 
3943
          YYSIZE_T yysize = 0;
 
3944
          char *yymsg;
 
3945
          int yyx, yycount;
 
3946
 
 
3947
          yycount = 0;
 
3948
          /* Start YYX at -YYN if negative to avoid negative indexes in
 
3949
             YYCHECK.  */
 
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);
 
3957
          if (yymsg != 0)
 
3958
            {
 
3959
              char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
 
3960
              yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);
 
3961
 
 
3962
              if (yycount < 5)
 
3963
                {
 
3964
                  yycount = 0;
 
3965
                  for (yyx = yyn < 0 ? -yyn : 0;
 
3966
                       yyx < (int) (sizeof (yytname) / sizeof (char *));
 
3967
                       yyx++)
 
3968
                    if (yycheck[yyx + yyn] == yyx)
 
3969
                      {
 
3970
                        const char *yyq = ! yycount ? ", expecting " : " or ";
 
3971
                        yyp = yystpcpy (yyp, yyq);
 
3972
                        yyp = yystpcpy (yyp, yytname[yyx]);
 
3973
                        yycount++;
 
3974
                      }
 
3975
                }
 
3976
              yyerror (yymsg);
 
3977
              YYSTACK_FREE (yymsg);
 
3978
            }
 
3979
          else
 
3980
            yyerror ("parse error; also virtual memory exhausted");
 
3981
        }
 
3982
      else
 
3983
#endif /* defined (YYERROR_VERBOSE) */
 
3984
        yyerror ("parse error");
 
3985
    }
 
3986
  goto yyerrlab1;
 
3987
 
 
3988
 
 
3989
/*--------------------------------------------------.
 
3990
| yyerrlab1 -- error raised explicitly by an action |
 
3991
`--------------------------------------------------*/
 
3992
yyerrlab1:
 
3993
  if (yyerrstatus == 3)
 
3994
    {
 
3995
      /* If just tried and failed to reuse lookahead token after an
 
3996
         error, discard it.  */
 
3997
 
 
3998
      /* return failure if at end of input */
 
3999
      if (yychar == YYEOF)
 
4000
        YYABORT;
 
4001
      YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
 
4002
                  yychar, yytname[yychar1]));
 
4003
      yychar = YYEMPTY;
 
4004
    }
 
4005
 
 
4006
  /* Else will try to reuse lookahead token after shifting the error
 
4007
     token.  */
 
4008
 
 
4009
  yyerrstatus = 3;              /* Each real token shifted decrements this */
 
4010
 
 
4011
  goto yyerrhandle;
 
4012
 
 
4013
 
 
4014
/*-------------------------------------------------------------------.
 
4015
| yyerrdefault -- current state does not do anything special for the |
 
4016
| error token.                                                       |
 
4017
`-------------------------------------------------------------------*/
 
4018
yyerrdefault:
 
4019
#if 0
 
4020
  /* This is wrong; only states that explicitly want error tokens
 
4021
     should shift them.  */
 
4022
 
 
4023
  /* If its default is to accept any token, ok.  Otherwise pop it.  */
 
4024
  yyn = yydefact[yystate];
 
4025
  if (yyn)
 
4026
    goto yydefault;
 
4027
#endif
 
4028
 
 
4029
 
 
4030
/*---------------------------------------------------------------.
 
4031
| yyerrpop -- pop the current state because it cannot handle the |
 
4032
| error token                                                    |
 
4033
`---------------------------------------------------------------*/
 
4034
yyerrpop:
 
4035
  if (yyssp == yyss)
 
4036
    YYABORT;
 
4037
  yyvsp--;
 
4038
  yystate = *--yyssp;
 
4039
#if YYLSP_NEEDED
 
4040
  yylsp--;
 
4041
#endif
 
4042
 
 
4043
#if YYDEBUG
 
4044
  if (yydebug)
 
4045
    {
 
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");
 
4051
    }
 
4052
#endif
 
4053
 
 
4054
/*--------------.
 
4055
| yyerrhandle.  |
 
4056
`--------------*/
 
4057
yyerrhandle:
 
4058
  yyn = yypact[yystate];
 
4059
  if (yyn == YYFLAG)
 
4060
    goto yyerrdefault;
 
4061
 
 
4062
  yyn += YYTERROR;
 
4063
  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
 
4064
    goto yyerrdefault;
 
4065
 
 
4066
  yyn = yytable[yyn];
 
4067
  if (yyn < 0)
 
4068
    {
 
4069
      if (yyn == YYFLAG)
 
4070
        goto yyerrpop;
 
4071
      yyn = -yyn;
 
4072
      goto yyreduce;
 
4073
    }
 
4074
  else if (yyn == 0)
 
4075
    goto yyerrpop;
 
4076
 
 
4077
  if (yyn == YYFINAL)
 
4078
    YYACCEPT;
 
4079
 
 
4080
  YYDPRINTF ((stderr, "Shifting error token, "));
 
4081
 
 
4082
  *++yyvsp = yylval;
 
4083
#if YYLSP_NEEDED
 
4084
  *++yylsp = yylloc;
 
4085
#endif
 
4086
 
 
4087
  yystate = yyn;
 
4088
  goto yynewstate;
 
4089
 
 
4090
 
 
4091
/*-------------------------------------.
 
4092
| yyacceptlab -- YYACCEPT comes here.  |
 
4093
`-------------------------------------*/
 
4094
yyacceptlab:
 
4095
  yyresult = 0;
 
4096
  goto yyreturn;
 
4097
 
 
4098
/*-----------------------------------.
 
4099
| yyabortlab -- YYABORT comes here.  |
 
4100
`-----------------------------------*/
 
4101
yyabortlab:
 
4102
  yyresult = 1;
 
4103
  goto yyreturn;
 
4104
 
 
4105
/*---------------------------------------------.
 
4106
| yyoverflowab -- parser overflow comes here.  |
 
4107
`---------------------------------------------*/
 
4108
yyoverflowlab:
 
4109
  yyerror ("parser stack overflow");
 
4110
  yyresult = 2;
 
4111
  /* Fall through.  */
 
4112
 
 
4113
yyreturn:
 
4114
#ifndef yyoverflow
 
4115
  if (yyss != yyssa)
 
4116
    YYSTACK_FREE (yyss);
 
4117
#endif
 
4118
  return yyresult;
 
4119
}
 
4120
#line 1656 "parser.yxx"
 
4121
 
 
4122
 
 
4123
static void yyerror(const std::string Message)
 
4124
{
 
4125
        ParseSucceeded = false;
 
4126
        (*ParseErrorStream) << "librib > parser > error: " << Message << " at " << ParseStreamName << " line " << ParseLineNumber << std::endl;
 
4127
}
 
4128
 
 
4129
static void ExpectRequest()
 
4130
{
 
4131
        fRequest=true;
 
4132
}
 
4133
 
 
4134
static void ExpectParams()
 
4135
{
 
4136
        fParams=true;
 
4137
}
 
4138
 
 
4139
static void DiscardStringValue(char* const Value)
 
4140
{
 
4141
        delete[] Value;
 
4142
}
 
4143
 
 
4144
static void DiscardTokenValuePairs(TokenValuePairs* const Value)
 
4145
{
 
4146
        delete Value;
 
4147
}
 
4148
 
 
4149
static void DiscardArrayValue(Array* const Value)
 
4150
{
 
4151
        delete Value;
 
4152
}
 
4153
 
 
4154
static bool notspace(char C)
 
4155
{
 
4156
bool retval = true;
 
4157
 
 
4158
        if ((C == 0x20) || 
 
4159
                (( C >= 0x09 ) && (C <= 0x0D)))
 
4160
                retval = false;
 
4161
                
 
4162
        return retval;
 
4163
}
 
4164
static bool sspace(char C)
 
4165
{
 
4166
        bool retval = false;
 
4167
 
 
4168
        if ((C == 0x20) || 
 
4169
                (( C >= 0x09 ) && (C <= 0x0D)))
 
4170
                retval = true;
 
4171
                
 
4172
        return retval;
 
4173
}
 
4174
 
 
4175
 
 
4176
 
 
4177
 
 
4178
typedef std::vector<std::string> Strings;
 
4179
typedef Strings::iterator StringIterator;
 
4180
static Strings Words(const std::string& Source)
 
4181
{
 
4182
        Strings results;
 
4183
 
 
4184
        std::string::const_iterator i = Source.begin();
 
4185
        while(i != Source.end())
 
4186
                {
 
4187
                        i = std::find_if(i, Source.end(), notspace);
 
4188
                        if(i == Source.end())
 
4189
                                break;
 
4190
                        
 
4191
            std::string::const_iterator j = std::find_if(i, Source.end(), sspace);
 
4192
 
 
4193
                        
 
4194
                        results.push_back(std::string(i, j));
 
4195
                        
 
4196
                        i = j;
 
4197
                }
 
4198
        
 
4199
        return results;
 
4200
}
 
4201
 
 
4202
static std::string CleanParameterType(const std::string& Source)
 
4203
{
 
4204
        return Source.substr(0, Source.find("["));
 
4205
}
 
4206
 
 
4207
static ParameterType ParseParameterType(const std::string& Source)
 
4208
{
 
4209
        if(0 == Source.size())
 
4210
                {
 
4211
                        yyerror("Cannot Parse Empty Parameter Type");
 
4212
                        return Type_Unknown;
 
4213
                }
 
4214
 
 
4215
        // Break the source string into whitespace delimited "words" ...
 
4216
        Strings words(Words(Source));
 
4217
 
 
4218
        // Figure out the parameter type ...
 
4219
        for(StringIterator word = words.begin(); word != words.end(); word++)
 
4220
                {
 
4221
                        std::string cleanword = CleanParameterType(*word);
 
4222
                
 
4223
                        if(cleanword == "integer")
 
4224
                                return Type_Integer;
 
4225
 
 
4226
                        if(cleanword == "int")
 
4227
                                return Type_Integer;
 
4228
 
 
4229
                        if(cleanword == "float")
 
4230
                                return Type_Float;
 
4231
                                
 
4232
                        if(cleanword == "hpoint")
 
4233
                                return Type_hPoint;
 
4234
                        
 
4235
                        if(cleanword == "point")
 
4236
                                return Type_Point;
 
4237
                                
 
4238
                        if(cleanword == "color")
 
4239
                                return Type_Color;
 
4240
                                
 
4241
                        if(cleanword == "vector")
 
4242
                                return Type_Vector;
 
4243
                                
 
4244
                        if(cleanword == "normal")
 
4245
                                return Type_Normal;
 
4246
                                
 
4247
                        if(cleanword == "matrix")
 
4248
                                return Type_Matrix;
 
4249
                                
 
4250
                        if(cleanword == "string")
 
4251
                                return Type_String;
 
4252
                }
 
4253
 
 
4254
        return Type_Unknown;
 
4255
}
 
4256
 
 
4257
typedef std::map<RendermanInterface::RtInt, RendermanInterface::RtLightHandle> LightHandleMap;
 
4258
typedef LightHandleMap::iterator LightHandleIterator;
 
4259
static LightHandleMap LightMap;
 
4260
 
 
4261
typedef std::map<std::string, RendermanInterface::RtLightHandle> LightStringHandleMap;
 
4262
typedef LightStringHandleMap::iterator LightStringHandleIterator;
 
4263
static LightStringHandleMap LightMapString;
 
4264
 
 
4265
typedef std::map<RendermanInterface::RtInt, RendermanInterface::RtObjectHandle> ObjectHandleMap;
 
4266
typedef ObjectHandleMap::iterator ObjectHandleIterator;
 
4267
static ObjectHandleMap ObjectMap;
 
4268
 
 
4269
typedef std::map<std::string, RendermanInterface::RtObjectHandle> ObjectStringHandleMap;
 
4270
typedef ObjectStringHandleMap::iterator ObjectStringHandleIterator;
 
4271
static ObjectStringHandleMap ObjectMapString;
 
4272
 
 
4273
static void DeclareLightHandle(const RendermanInterface::RtInt ID, const RendermanInterface::RtLightHandle Handle)
 
4274
{
 
4275
        if(0 == Handle)
 
4276
                {
 
4277
                        yyerror("NULL Light Handle");
 
4278
                        return;
 
4279
                }
 
4280
 
 
4281
        LightMap[ID] = Handle;
 
4282
}
 
4283
 
 
4284
static RendermanInterface::RtLightHandle LookupLightHandle(const RendermanInterface::RtInt ID)
 
4285
{
 
4286
        if(LightMap.find(ID) == LightMap.end())
 
4287
                {
 
4288
                        yyerror("Undeclared Light ID");
 
4289
                        return 0;
 
4290
                }
 
4291
                
 
4292
        return LightMap[ID];
 
4293
}
 
4294
 
 
4295
 
 
4296
static void DeclareLightHandleString(const RendermanInterface::RtString ID, const RendermanInterface::RtLightHandle Handle)
 
4297
{
 
4298
        if(0 == Handle)
 
4299
                {
 
4300
                        yyerror("NULL Light Handle");
 
4301
                        return;
 
4302
                }
 
4303
 
 
4304
        LightMapString[ID] = Handle;
 
4305
}
 
4306
 
 
4307
static RendermanInterface::RtLightHandle LookupLightHandleString(const RendermanInterface::RtString ID)
 
4308
{
 
4309
        if(LightMapString.find(ID) == LightMapString.end())
 
4310
                {
 
4311
                        yyerror("Undeclared Light name");
 
4312
                        return 0;
 
4313
                }
 
4314
                
 
4315
        return LightMapString[ID];
 
4316
}
 
4317
 
 
4318
 
 
4319
static void DeclareObjectHandle(const RendermanInterface::RtInt ID, const RendermanInterface::RtObjectHandle Handle)
 
4320
{
 
4321
        if(0 == Handle)
 
4322
                {
 
4323
                        yyerror("NULL Object Handle");
 
4324
                        return;
 
4325
                }
 
4326
 
 
4327
        ObjectMap[ID] = Handle;
 
4328
}
 
4329
 
 
4330
static RendermanInterface::RtObjectHandle LookupObjectHandle(const RendermanInterface::RtInt ID)
 
4331
{
 
4332
        if(ObjectMap.find(ID) == ObjectMap.end())
 
4333
                {
 
4334
                        yyerror("Undeclared Object ID");
 
4335
                        return 0;
 
4336
                }
 
4337
                
 
4338
        return ObjectMap[ID];
 
4339
}
 
4340
 
 
4341
 
 
4342
static void DeclareObjectHandleString(const RendermanInterface::RtString ID, const RendermanInterface::RtObjectHandle Handle)
 
4343
{
 
4344
        if(0 == Handle)
 
4345
                {
 
4346
                        yyerror("NULL Object Handle");
 
4347
                        return;
 
4348
                }
 
4349
 
 
4350
        ObjectMapString[ID] = Handle;
 
4351
}
 
4352
 
 
4353
static RendermanInterface::RtObjectHandle LookupObjectHandleString(const RendermanInterface::RtString ID)
 
4354
{
 
4355
        if(ObjectMapString.find(ID) == ObjectMapString.end())
 
4356
                {
 
4357
                        yyerror("Undeclared Object name");
 
4358
                        return 0;
 
4359
                }
 
4360
                
 
4361
        return ObjectMapString[ID];
 
4362
}
 
4363
 
 
4364
typedef std::map<std::string, ParameterType> ParameterTypeMap;
 
4365
typedef ParameterTypeMap::iterator ParameterTypeIterator;
 
4366
static ParameterTypeMap TypeMap;
 
4367
 
 
4368
static ParameterType DeclareParameterType(const std::string& Name, const std::string& Type)
 
4369
{
 
4370
        if(0 == Name.size())
 
4371
                {
 
4372
                        yyerror("Cannot Declare Unnamed Type");
 
4373
                        return Type_Unknown;
 
4374
                }
 
4375
 
 
4376
        const ParameterType type = ParseParameterType(Type);
 
4377
 
 
4378
        if(type != Type_Unknown)
 
4379
                TypeMap[Name] = type;
 
4380
 
 
4381
        return type;
 
4382
}
 
4383
 
 
4384
static ParameterType LookupParameterType(const std::string& Name)
 
4385
{
 
4386
        if(0 == Name.size())
 
4387
                {
 
4388
                        yyerror("Cannot Lookup Unnamed Type");
 
4389
                        return Type_Unknown;
 
4390
                }
 
4391
 
 
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);
 
4396
 
 
4397
        // Check to see if the type declaration is part of the parameter name ...
 
4398
        return ParseParameterType(Name);
 
4399
}
 
4400
 
 
4401
 
 
4402
namespace librib
 
4403
{
 
4404
 
 
4405
void ParserDeclare(librib::RendermanInterface& CallbackInterface, const std::string Name, const std::string Type)
 
4406
{
 
4407
        if(Type_Unknown == DeclareParameterType(Name, Type))
 
4408
                yyerror("RiDeclare: Unknown type [" + Name + ", " + Type + "]");
 
4409
                
 
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);
 
4415
        delete[](_name);
 
4416
        delete[](_type);
 
4417
}
 
4418
 
 
4419
void ClearDeclarations()
 
4420
{
 
4421
        TypeMap.clear();
 
4422
}
 
4423
 
 
4424
}; // namespace librib
 
4425
 
 
4426