home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / developm / source / macraysh.sit / Code / Source / yacc2.c < prev    next >
Encoding:
Text File  |  1992-05-11  |  77.2 KB  |  2,775 lines

  1. # line 16 "yacc2.y"
  2. #include "rayshade.h"
  3.  
  4. #include "symtab.h"
  5. #include "builtin.h"
  6.  
  7. #include "atmosphere.h"
  8. #include "surface.h"
  9. #include "texture.h"
  10. #include "image.h"
  11. #include "geom.h"
  12. #include "light.h"
  13. #include "options.h"
  14. #include "stats.h"
  15. #include "viewing.h"
  16.  
  17. #include "blob.h"
  18. #include "box.h"
  19. #include "cone.h"
  20. #include "csg.h"
  21. #include "cylinder.h"
  22. #include "disc.h"
  23. #include "grid.h"
  24. #include "hf.h"
  25. #include "instance.h"
  26. #include "list.h"
  27. #include "plane.h"
  28. #include "poly.h"
  29. #include "sphere.h"
  30. #include "torus.h"
  31. #include "triangle.h"
  32.  
  33. #include "point.h"
  34. #include "infinite.h"
  35. #include "spot.h"
  36. #include "jittered.h"
  37. #include "extended.h"
  38.  
  39. #include "blotch.h"
  40. #include "bump.h"
  41. #include "checker.h"
  42. #include "cloud.h"
  43. #include "fbm.h"
  44. #include "fbmbump.h"
  45. #include "gloss.h"
  46. #include "imagetext.h"
  47. #include "marble.h"
  48. #include "mount.h"
  49. #include "sky.h"
  50. #include "stripe.h"
  51. #include "windy.h"
  52. #include "wood.h"
  53.  
  54. #include "fog.h"
  55. #include "fogdeck.h"
  56. #include "mist.h"
  57.  
  58. #include "rotate.h"
  59. #include "scale.h" 
  60. #include "translate.h"
  61. #include "xform.h"
  62. Geom *NewAggregate();
  63. char yyfilename[BUFSIZ];            /* Input filename */
  64. GeomList *Defstack;                /* Geom definition stack. */
  65. int Npoints = 0;                /* # of points in Polypoints */
  66. Surface *tmpsurf;                /* Working surface */
  67. SurfList *CurSurf;
  68. Texture *CurText;                /* Working list of textures */
  69. ImageText *Imagetext;                /* Working image texture */
  70. Trans *TransHead, *TransTail;            /* Linked list of current transformations */
  71. Atmosphere *CurEffect = (Atmosphere *)NULL;    /* Current atmos. effects */ 
  72. PointList *Polypoints;                /* List of vertices */
  73. MetaList *Metapoints, *Metapoint;
  74. extern FILE *yyin;                /* input file pointer */
  75. extern int yylineno;                /* Current line # in file */
  76. extern Atmosphere *AtmosEffects;        /* atmospheric effects */
  77. extern Medium TopMedium;            /* "air" */
  78. extern void    GeomAddToDefined(),
  79.         LightAddToDefined(),
  80.         SurfaceAddToDefined();
  81. extern Surface    *SurfaceGetNamed();
  82. extern Geom     *GeomGetNamed();
  83.  
  84. # line 98 "yacc2.y"
  85. typedef union  {
  86.     char *c;
  87.     int i;
  88.     Float d;
  89.     Vector v;
  90.     Vec2d uv;
  91.     Color col;
  92.     Atmosphere *atmos;
  93.     Light *light;
  94.     Surface *surf;
  95.     Geom *obj;
  96.     Texture *text;
  97.     Mapping *map;
  98.     Trans *trans;
  99.     Expr *e;
  100.     SymtabEntry *sym;
  101. } YYSTYPE;
  102. # define tFLOAT 257
  103. # define tSTRING 258
  104. # define tFILENAME 259
  105. # define tAPERTURE 260
  106. # define tAPPLYSURF 261
  107. # define tBACKGROUND 262
  108. # define tBLOB 263
  109. # define tBLOTCH 264
  110. # define tBOX 265
  111. # define tBUMP 266
  112. # define tCONE 267
  113. # define tCYL 268
  114. # define tDIRECTIONAL 269
  115. # define tCURSURF 270
  116. # define tEXTENDED 271
  117. # define tEYEP 272
  118. # define tFBM 273
  119. # define tFBMBUMP 274
  120. # define tFOCALDIST 275
  121. # define tFOG 276
  122. # define tFOGDECK 277
  123. # define tFOV 278
  124. # define tGLOSS 279
  125. # define tGRID 280
  126. # define tHEIGHTFIELD 281
  127. # define tLIGHT 282
  128. # define tLIST 283
  129. # define tLOOKP 284
  130. # define tMARBLE 285
  131. # define tMAXDEPTH 286
  132. # define tMIST 287
  133. # define tJITTER 288
  134. # define tNOJITTER 289
  135. # define tDEFINE 290
  136. # define tOBJECT 291
  137. # define tOUTFILE 292
  138. # define tSKY 293
  139. # define tDISC 294
  140. # define tDIFFERENCE 295
  141. # define tUNION 296
  142. # define tINTERSECT 297
  143. # define tPLANE 298
  144. # define tPOINT 299
  145. # define tPOLY 300
  146. # define tROTATE 301
  147. # define tSPOT 302
  148. # define tPRINT 303
  149. # define tSCALE 304
  150. # define tSCREEN 305
  151. # define tSPHERE 306
  152. # define tSURFACE 307
  153. # define tTHRESH 308
  154. # define tTRANSLATE 309
  155. # define tTRANSFORM 310
  156. # define tTRIANGLE 311
  157. # define tTRIANGLEUV 312
  158. # define tUP 313
  159. # define tEND 314
  160. # define tTEXTURE 315
  161. # define tCHECKER 316
  162. # define tWOOD 317
  163. # define tCONTRAST 318
  164. # define tCUTOFF 319
  165. # define tCLOUD 320
  166. # define tAMBIENT 321
  167. # define tDIFFUSE 322
  168. # define tREFLECT 323
  169. # define tTRANSP 324
  170. # define tSPECULAR 325
  171. # define tSPECPOW 326
  172. # define tINDEX 327
  173. # define tATMOSPHERE 328
  174. # define tNOSHADOW 329
  175. # define tAREA 330
  176. # define tTRANSLU 331
  177. # define tTORUS 332
  178. # define tEYESEP 333
  179. # define tSHADOWTRANSP 334
  180. # define tREPORT 335
  181. # define tVERBOSE 336
  182. # define tQUIET 337
  183. # define tWINDOW 338
  184. # define tSTRIPE 339
  185. # define tMAP 340
  186. # define tUV 341
  187. # define tSPHERICAL 342
  188. # define tCYLINDRICAL 343
  189. # define tPLANAR 344
  190. # define tIMAGE 345
  191. # define tSMOOTH 346
  192. # define tCOMPONENT 347
  193. # define tTEXTSURF 348
  194. # define tRANGE 349
  195. # define tTILE 350
  196. # define tSTARTTIME 351
  197. # define tFRAMELENGTH 352
  198. # define tNAME 353
  199. # define tFILTER 354
  200. # define tGAUSS 355
  201. # define tBODY 356
  202. # define tSAMPLE 357
  203. # define tEXTINCT 358
  204. # define tWINDY 359
  205. # define tMOUNT 360
  206. # define tSHUTTER 361
  207. # define tFRAMES 362
  208. # define UMINUS 363
  209. #define yyclearin yychar = -1
  210. #define yyerrok yyerrflag = 0
  211. extern int yychar;
  212. extern int yyerrflag;
  213. #ifndef YYMAXDEPTH
  214. #define YYMAXDEPTH 150
  215. #endif
  216. YYSTYPE yylval, yyval;
  217. # define YYERRCODE 256
  218.  
  219. # line 1443 "yacc2.y"
  220.  
  221. /*
  222.  * Issue error message containing filename and line number, and exit.
  223.  */
  224. /*VARARGS1*/
  225. yyerror(s, pat1, pat2)
  226. char *s, *pat1, *pat2;
  227. {
  228.     fprintf(stderr,"%s: Error: %s: line %d: ", Options.progname,
  229.             yyfilename, yylineno);
  230.     fprintf(stderr, s, pat1, pat2);
  231.     if (*s && s[strlen(s) -1] != '\n')
  232.         /* YACC doesn't put newlines on error messages. */
  233.         fprintf(stderr,"\n");    
  234.     fflush(stderr);
  235.     exit(1);
  236. }
  237.  
  238. Geom *
  239. NewAggregate(obj)
  240. Geom *obj;
  241. {
  242.     obj->name = Defstack->obj->name;
  243.     obj->next = Defstack->obj->next;
  244.     return obj;
  245. }
  246. int yyexca[] ={
  247. -1, 1,
  248.     0, -1,
  249.     -2, 0,
  250. -1, 149,
  251.     321, 153,
  252.     322, 153,
  253.     323, 153,
  254.     324, 153,
  255.     325, 153,
  256.     326, 153,
  257.     327, 153,
  258.     329, 153,
  259.     331, 153,
  260.     356, 153,
  261.     358, 153,
  262.     -2, 149,
  263. -1, 150,
  264.     321, 154,
  265.     322, 154,
  266.     323, 154,
  267.     324, 154,
  268.     325, 154,
  269.     326, 154,
  270.     327, 154,
  271.     329, 154,
  272.     331, 154,
  273.     356, 154,
  274.     358, 154,
  275.     -2, 150,
  276. -1, 191,
  277.     258, 149,
  278.     321, 153,
  279.     322, 153,
  280.     323, 153,
  281.     324, 153,
  282.     325, 153,
  283.     326, 153,
  284.     327, 153,
  285.     329, 153,
  286.     331, 153,
  287.     356, 153,
  288.     358, 153,
  289.     -2, 89,
  290. -1, 204,
  291.     258, 149,
  292.     259, 149,
  293.     321, 153,
  294.     322, 153,
  295.     323, 153,
  296.     324, 153,
  297.     325, 153,
  298.     326, 153,
  299.     327, 153,
  300.     329, 153,
  301.     331, 153,
  302.     356, 153,
  303.     358, 153,
  304.     -2, 274,
  305. -1, 215,
  306.     40, 276,
  307.     -2, 256,
  308.     };
  309. # define YYNPROD 277
  310. # define YYLAST 1114
  311. int yyact[]={
  312.  
  313.    109,   415,   386,   414,   318,   224,   319,   129,   123,   204,
  314.    178,   463,   137,   321,   322,   231,   194,   262,   269,   324,
  315.    189,   150,   225,   226,   182,   320,   452,   453,   454,   455,
  316.    176,   177,   178,   326,   446,   255,   256,   118,   120,   121,
  317.    212,   124,   125,   126,   120,   120,   254,   131,   133,   136,
  318.    179,   141,   133,   142,   144,   240,   317,   323,   211,   120,
  319.    325,   120,   184,   185,   186,   187,   180,   296,    25,    56,
  320.     24,   145,   165,   166,   170,   171,   167,   168,   173,   328,
  321.    175,   140,   174,   132,   143,   332,   297,    22,   190,   439,
  322.    440,   443,   444,   442,   445,   447,   252,   130,   392,   329,
  323.    330,   134,   348,    21,   120,   267,    73,   169,   265,   172,
  324.    210,   202,   139,   266,   268,   149,   344,   283,   217,   220,
  325.    120,   219,   222,   218,   441,   203,   164,   150,   163,   209,
  326.    227,   228,   229,   162,   230,   138,   115,   230,   415,   114,
  327.    161,   113,   160,   235,   413,   409,   411,   412,   410,   115,
  328.    135,   159,   114,   295,   113,   110,   158,   157,   293,   156,
  329.    155,   237,   154,   294,   152,   151,   136,   136,   136,   244,
  330.    136,   246,   247,   248,   249,   250,   223,   111,   165,   166,
  331.    170,   171,   167,   168,   173,   122,   175,   258,   174,   263,
  332.    408,   379,   331,   327,   261,   270,   277,   192,   188,    32,
  333.    281,   282,    31,    30,    29,    28,   285,   286,   287,   120,
  334.    296,   289,    27,   169,    26,   172,   153,    23,    20,    19,
  335.     18,    17,    16,   301,   120,    15,    14,    13,    12,    11,
  336.    304,   305,    10,   284,     9,     8,     7,     6,     5,     4,
  337.     54,     3,    97,     2,    88,     1,    92,    91,   257,   251,
  338.    216,   136,   264,   469,   303,   136,   136,   315,   451,   103,
  339.     94,   275,   102,   272,   147,   148,   146,   241,   242,   243,
  340.     71,   245,    68,    95,   107,   105,   106,    86,    85,    93,
  341.    274,   100,    99,    98,    83,    87,    53,   347,    77,   120,
  342.     89,    90,    75,   271,   309,   310,   273,    80,    74,    81,
  343.     82,    78,   358,    79,    76,    84,    67,   120,    65,   361,
  344.     66,    96,    70,   362,   136,   136,   365,   101,    69,   368,
  345.    369,    72,   371,   372,   213,   373,   374,   375,    50,   253,
  346.    377,   104,    57,   359,   367,   214,   215,   366,   259,   438,
  347.    316,    52,   387,     0,   389,   376,     0,     0,     0,   393,
  348.      0,   370,   312,   112,   177,   178,   313,   314,     0,     0,
  349.    260,   378,   397,   380,   398,     0,   112,     0,   238,   239,
  350.      0,     0,   401,   402,     0,   403,   404,   405,   406,   407,
  351.      0,     0,     0,     0,     0,   400,     0,     0,   422,     0,
  352.      0,     0,     0,     0,   425,     0,     0,   120,   428,   429,
  353.    430,     0,   431,   432,   433,   434,   435,   436,   437,     0,
  354.      0,   448,     0,   450,     0,   363,   364,     0,     0,     0,
  355.      0,   259,   259,   259,   259,     0,   460,     0,   449,     0,
  356.      0,   120,   465,   466,   120,   120,     0,   471,     0,   470,
  357.      0,     0,     0,   260,   260,   260,   260,     0,     0,   472,
  358.      0,   473,     0,   333,   334,   335,   336,   311,     0,   119,
  359.    387,   480,   479,     0,     0,   136,   120,   120,   485,   486,
  360.      0,     0,   120,     0,     0,     0,     0,     0,     0,     0,
  361.      0,   493,     0,   136,   497,     0,   498,   499,   500,   259,
  362.    259,   259,   259,     0,     0,     0,     0,   193,     0,   508,
  363.      0,   509,     0,   127,   128,     0,   387,     0,   511,     0,
  364.    514,   260,   260,   260,   260,     0,     0,   108,   181,     0,
  365.    183,   381,   382,   383,   384,   295,   311,   311,   507,   512,
  366.    293,   291,   513,   292,     0,   294,     0,   259,   259,   259,
  367.    259,   295,   298,   299,   300,   494,   293,   291,   495,   292,
  368.      0,   294,   116,   117,     0,     0,     0,     0,     0,   260,
  369.    260,   260,   260,   208,     0,     0,   482,     0,     0,   416,
  370.    417,   418,   419,     0,   259,   259,     0,     0,     0,   221,
  371.      0,     0,   296,     0,   496,   195,   196,   197,   198,   199,
  372.    200,   201,     0,   205,   206,   207,   260,   260,   296,     0,
  373.      0,     0,     0,     0,     0,     0,   456,   457,     0,     0,
  374.      0,     0,     0,   259,     0,     0,   350,   351,   352,   353,
  375.    354,   355,   356,     0,   295,     0,     0,     0,   461,   293,
  376.    291,   462,   292,   259,   294,   260,     0,     0,     0,     0,
  377.      0,     0,     0,     0,   295,   477,     0,   259,   394,   293,
  378.    291,   395,   292,     0,   294,   260,     0,   232,   233,   234,
  379.    259,   236,   191,     0,     0,   491,   259,     0,   288,   260,
  380.      0,   259,     0,   259,   150,   259,     0,     0,     0,   504,
  381.      0,   296,   260,   302,     0,     0,     0,     0,   260,     0,
  382.      0,     0,   510,   260,     0,   260,     0,   260,   515,     0,
  383.      0,   296,     0,   517,     0,   519,     0,   520,     0,     0,
  384.      0,   276,     0,   295,   278,   279,   280,   518,   293,   291,
  385.    426,   292,     0,   294,     0,   165,   166,   170,   171,   167,
  386.    168,   173,     0,   175,     0,   174,   165,   166,   170,   171,
  387.    167,   168,   173,     0,   175,     0,   174,     0,   349,     0,
  388.    306,   295,     0,   307,   308,   357,   293,   291,     0,   292,
  389.    169,   294,   172,     0,     0,     0,   360,     0,     0,     0,
  390.    296,   169,   295,   172,     0,     0,   290,   293,   291,     0,
  391.    292,     0,   294,     0,     0,     0,     0,   481,     0,     0,
  392.      0,     0,     0,     0,   337,   338,   339,   340,   341,   342,
  393.    343,   345,     0,   346,     0,     0,     0,     0,   296,     0,
  394.      0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
  395.    506,     0,     0,     0,     0,     0,     0,     0,     0,   296,
  396.      0,     0,     0,     0,     0,     0,     0,     0,   516,     0,
  397.      0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
  398.      0,     0,     0,     0,     0,     0,   427,     0,   385,     0,
  399.    388,     0,     0,     0,   390,   391,     0,     0,     0,     0,
  400.      0,     0,     0,     0,     0,     0,     0,     0,   396,     0,
  401.     97,     0,    88,   399,    92,    91,     0,     0,     0,     0,
  402.    464,     0,     0,   467,   468,     0,     0,   103,    94,     0,
  403.    102,     0,     0,   420,   421,     0,     0,   423,    71,   424,
  404.      0,    95,   107,   105,   106,    86,     0,    93,     0,     0,
  405.      0,     0,     0,    87,     0,   483,   484,     0,    89,    90,
  406.      0,   487,     0,     0,     0,     0,     0,     0,   458,   459,
  407.      0,     0,     0,     0,     0,     0,     0,     0,     0,    96,
  408.      0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
  409.      0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
  410.      0,   474,   475,   476,     0,     0,   478,     0,     0,     0,
  411.      0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
  412.      0,     0,   488,   489,   490,     0,     0,   492,     0,     0,
  413.      0,     0,     0,     0,     0,     0,   501,   502,   503,     0,
  414.    505,    40,    54,    48,    97,     0,    88,     0,    92,    91,
  415.      0,     0,     0,    33,     0,     0,    41,     0,     0,    36,
  416.      0,   103,    94,    51,   102,    34,     0,    43,     0,     0,
  417.      0,    59,    71,    55,     0,    95,   107,   105,   106,    86,
  418.      0,    93,     0,     0,    64,     0,    37,    87,    53,     0,
  419.      0,     0,    89,    90,    35,     0,     0,     0,     0,    46,
  420.     47,     0,     0,     0,     0,     0,     0,     0,     0,    58,
  421.      0,     0,     0,    96,    42,    49,    39,     0,     0,    38,
  422.      0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
  423.      0,     0,    61,    63,    57,    45,     0,     0,    44,     0,
  424.      0,     0,    62,    60 };
  425. int yypact[]={
  426.  
  427.  -1000,   751, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
  428.  -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
  429.  -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
  430.  -1000, -1000, -1000,   109,   109,   109,   109,   109,   109,  -328,
  431.    109,   109,   109,   109,   109,  -258,   109,   109,   109, -1000,
  432.   -317,   109,  -218,  -204,  -143,  -227, -1000,  -208,   109,  -234,
  433.    109,   109,   109,   109,   109, -1000, -1000, -1000, -1000, -1000,
  434.  -1000,   404, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
  435.  -1000, -1000, -1000, -1000, -1000, -1000,  -143,  -143,  -143,  -143,
  436.   -143,  -143,  -143,  -143,  -249,  -143,  -143,  -143, -1000, -1000,
  437.  -1000, -1000, -1000,   109, -1000, -1000, -1000, -1000, -1000,   109,
  438.  -1000, -1000, -1000,  -199,  -217,    78, -1000, -1000,   109,   109,
  439.  -1000,   109,  -332, -1000, -1000, -1000, -1000, -1000,  -266,   109,
  440.    109,   109, -1000,   109, -1000, -1000,   109, -1000,  -306,   109,
  441.    109,   109,   109,   109,  -143, -1000, -1000, -1000, -1000, -1000,
  442.  -1000,   415,   415, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
  443.  -1000, -1000, -1000, -1000, -1000,   109,   109,   109,   109,   109,
  444.    109,   109,   109,   109,   109, -1000, -1000, -1000, -1000,   617,
  445.   -241, -1000,   109, -1000, -1000, -1000, -1000, -1000,  -298,  -196,
  446.   -240, -1000,   -21,   109, -1000,   109,   109,   109,   109,   109,
  447.    109, -1000,  -227, -1000, -1000,   109,   109,   109,   109,  -196,
  448.    109, -1000, -1000,   735, -1000, -1000,    46,    78,    78,    78,
  449.  -1000, -1000,   109,    96, -1000, -1000, -1000, -1000, -1000,   109,
  450.    109, -1000,   109, -1000, -1000,   109,   109, -1000, -1000, -1000,
  451.    415, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
  452.    109, -1000, -1000, -1000,   109,   109,   109,  -241, -1000, -1000,
  453.  -1000, -1000,  -260, -1000, -1000,   109,   109,   109,   109, -1000,
  454.  -1000, -1000, -1000, -1000, -1000, -1000,   109,   109,   109,   109,
  455.    109,   109,   109,   109, -1000,   109,   109, -1000,   109, -1000,
  456.  -1000,    78,    78,    78,    78,    78,    78,    78,   714,   -27,
  457.    -27,   109,  -227, -1000, -1000, -1000,   109, -1000,   109,   415,
  458.    415, -1000,   109,   109,   109,   109, -1000,  -143,   109,   109,
  459.   -227,   109,   109, -1000,   109,   109,   109, -1000,  -143,   109,
  460.   -227, -1000,  -227,   109,   109,   109,   109, -1000, -1000, -1000,
  461.    109,   109,   109,   109, -1000, -1000,   109,   109,   109, -1000,
  462.    116,   116,   -27,   -27,   -27,   -27,   607, -1000, -1000, -1000,
  463.    109,   109, -1000,   109, -1000,   109,  -196, -1000,  -143, -1000,
  464.  -1000,   109,   109, -1000,   109,   109,   109,   109,   109,  -202,
  465.  -1000,   109,   109,   109,   109,   109,   109,   109, -1000,   109,
  466.  -1000,   109, -1000,   109, -1000,    78,   109,   109,   109,   109,
  467.  -1000,   109,   109,   109,   109,   109,   109,   109, -1000,  -232,
  468.    109,  -143,   109, -1000, -1000,  -315, -1000, -1000,   109,   109,
  469.    109,   109, -1000, -1000, -1000,   109,   587,  -318, -1000, -1000,
  470.    109,   109,   109,   109,   109,  -339,   109, -1000, -1000, -1000,
  471.  -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,   109, -1000,
  472.    109, -1000, -1000,   109,   109,   109, -1000,   109,   109,   109,
  473.    109, -1000,    78, -1000,   109,   109,   109,   109,   109, -1000,
  474.  -1000,   109, -1000, -1000,   109,   109,   109,   109, -1000,   109,
  475.    109,   504,   109,   109, -1000,   109,   109,   109,   109,   109,
  476.    109,   109,   109, -1000, -1000,    78, -1000,  -227,   109, -1000,
  477.    109, -1000, -1000, -1000,   109,   109,   488, -1000, -1000,   109,
  478.    109, -1000, -1000,    78, -1000,   109,   676,   109, -1000,   109,
  479.  -1000 };
  480. int yypgo[]={
  481.  
  482.      0,    30,   187,   324,   177,     0,   155,   517,     2,   101,
  483.     83,   341,   340,   339,   459,   331,   329,   328,   321,   318,
  484.     69,   317,   312,   310,   308,   306,   305,   304,   303,   301,
  485.    300,   299,   298,   297,   292,   288,   284,   283,   282,   281,
  486.    278,   272,    16,   497,   266,   265,   264,     3,   258,   253,
  487.    252,   250,   245,   243,   241,   239,   238,   237,   236,   235,
  488.    234,   232,   229,   228,   227,   226,   225,   222,   221,   220,
  489.    219,   218,   103,    87,   217,    70,    68,   214,   212,   205,
  490.    204,   203,   202,   199,   198,    20,   197,   195,   194,   193,
  491.    192,   191,   190,   189,   185,   176,   165,   216,    55,   164,
  492.    162,   160,   159,   157,   156,   151,   142,   140,   133,   128,
  493.    126,   117,   116,   106,   102,    98,    66,    96 };
  494. int yyr1[]={
  495.  
  496.      0,    52,    52,    53,    53,    53,    53,    53,    53,    53,
  497.     53,    53,    53,    53,    53,    53,    53,    53,    53,    53,
  498.     53,    53,    53,    53,    53,    53,    53,    53,    53,    53,
  499.     53,    53,    53,    75,    20,    24,    23,    23,    25,    25,
  500.     19,    18,    18,    18,    18,    18,    18,    18,    18,    18,
  501.     18,    18,    76,    86,    86,    87,    87,    87,    87,    84,
  502.     84,    88,    12,    12,    12,    12,    12,    12,    12,    12,
  503.     12,    12,    12,    12,    12,    12,    12,    12,    89,    90,
  504.     91,    91,    92,    92,    92,    92,    92,    92,    41,    41,
  505.     85,    85,    93,    50,    50,    50,    50,    50,    54,    55,
  506.     56,    57,    57,    65,    65,    65,    66,    66,    66,    66,
  507.     80,    79,    82,    81,    67,    68,    58,    59,    60,    60,
  508.     60,    60,    94,    94,    95,    95,    61,    62,    63,    64,
  509.     69,    70,    71,    71,    71,    71,    71,    17,    17,    17,
  510.     17,    17,    11,    73,    43,    43,    42,    42,    42,    44,
  511.     44,    46,    46,    96,    99,    45,    72,    72,    98,    98,
  512.     97,    97,    97,    97,    97,    97,    97,    97,    97,    97,
  513.     97,   100,   101,   102,   104,   107,   103,   105,   106,   108,
  514.    109,   110,    31,    31,    33,   111,   111,   112,    22,   113,
  515.     40,    37,    37,    37,    38,    39,    21,    15,    15,    15,
  516.     28,    29,    34,    30,    27,    35,    35,    35,    32,    36,
  517.     26,   114,   114,   115,    74,    77,    77,   116,   116,   117,
  518.     16,    16,    16,     9,     7,     8,    49,    49,    47,    48,
  519.     48,    48,    48,    48,    48,    48,    13,    13,    13,    13,
  520.     13,    13,    13,    13,    13,    10,    10,    83,    78,    14,
  521.      5,     5,     2,     2,     4,     3,     3,     3,     3,     3,
  522.      3,     3,     3,     3,     3,     3,     3,     3,     3,     3,
  523.      3,     6,     6,     6,     1,     1,    51 };
  524. int yyr2[]={
  525.  
  526.      0,     0,     4,     2,     2,     2,     2,     2,     2,     2,
  527.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  528.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  529.      2,     2,     2,     3,     5,     5,     3,     2,     2,     2,
  530.      3,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  531.      2,     2,     7,     4,     0,     2,     2,     2,     2,     4,
  532.      0,     7,     5,     7,     5,     3,     5,    15,    17,    13,
  533.      3,     5,    17,    15,     3,    11,    19,     9,     4,     5,
  534.      4,     0,     5,     7,     5,     7,     3,     3,     7,     5,
  535.      4,     1,     3,     9,     9,    11,    21,    27,     7,     5,
  536.      5,     7,     5,     7,     7,     5,     7,     5,     7,     5,
  537.      5,     5,     5,     5,     9,     5,     7,    11,    11,     9,
  538.      9,     6,     3,     0,     3,     0,     5,     5,     5,     5,
  539.      5,     3,     3,     5,     7,    15,    17,     7,     7,     9,
  540.     11,    15,     5,     5,     2,     1,     2,     2,     2,     3,
  541.      3,     7,     7,     3,     3,     5,     7,     5,     4,     0,
  542.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  543.      2,     5,     5,     5,     5,     5,     5,     5,     5,     5,
  544.      9,     3,     7,     5,     7,     0,     4,     3,     3,     7,
  545.      3,     2,     2,     2,     3,     9,     3,     3,     3,     3,
  546.     13,    11,     9,    11,     9,    11,    17,    23,     9,    13,
  547.      9,     0,     4,    11,     5,     5,     7,     4,     0,     3,
  548.     11,     7,    17,     7,     7,     5,     2,     1,     5,     3,
  549.      3,     9,     3,     9,     3,     9,     3,     3,     3,     3,
  550.      3,     3,     3,     3,     3,     3,     2,     5,     7,     3,
  551.      2,     3,     3,     2,     7,     3,     3,     9,    13,    17,
  552.     21,    25,     7,     7,     7,     7,     7,     7,     5,     5,
  553.      7,     2,     5,     5,     2,     2,     3 };
  554. int yychk[]={
  555.  
  556.  -1000,   -52,   -53,   -54,   -55,   -56,   -57,   -58,   -59,   -60,
  557.    -61,   -62,   -63,   -64,   -65,   -66,   -67,   -68,   -69,   -70,
  558.    -71,   -72,   -73,   -74,   -75,   -76,   -77,   -78,   -79,   -80,
  559.    -81,   -82,   -83,   272,   284,   313,   278,   305,   338,   335,
  560.    260,   275,   333,   286,   357,   354,   318,   319,   262,   334,
  561.    -17,   282,   -11,   307,   261,   292,   -20,   353,   328,   290,
  562.    362,   351,   361,   352,   303,   -24,   -23,   -25,   -41,   -19,
  563.    -22,   291,   -18,  -113,   -32,   -34,   -27,   -35,   -29,   -28,
  564.    -33,   -31,   -30,   -36,   -26,   -40,   298,   306,   265,   311,
  565.    312,   268,   267,   300,   281,   294,   332,   263,   -37,   -38,
  566.    -39,   -21,   283,   280,   -15,   296,   297,   295,    -7,    -5,
  567.     -6,    -4,   257,    45,    43,    40,    -7,    -7,    -5,   -14,
  568.     -5,    -5,   -94,   336,    -5,    -5,    -5,   -14,   -14,   265,
  569.    355,    -5,   -10,    -5,    -9,    -9,    -5,   329,   -10,   330,
  570.    299,   269,   271,   302,   258,   -42,   -44,   -46,   -45,   258,
  571.    270,   -96,   -99,   -97,  -100,  -101,  -102,  -103,  -104,  -105,
  572.   -106,  -107,  -108,  -109,  -110,   321,   322,   325,   326,   356,
  573.    323,   324,   358,   327,   331,   329,    -1,   258,   259,   258,
  574.   -116,   -14,   258,   -14,    -5,    -5,    -5,    -5,   -84,   -85,
  575.    -42,   258,   -86,   -43,   -42,   -43,   -43,   -43,   -43,   -43,
  576.    -43,   -43,   -42,    -1,   258,   -43,   -43,   -43,   -14,   -85,
  577.     -5,   257,   257,    -3,   257,   258,   -51,    40,    45,    43,
  578.     -5,   -14,    -5,   -95,   337,   288,   289,    -5,    -5,    -5,
  579.     -5,   321,    -7,    -7,    -7,    -5,    -7,   -42,   -97,   -97,
  580.    -98,    -9,    -9,    -9,    -5,    -9,    -5,    -5,    -5,    -5,
  581.     -5,   -20,  -117,   -16,   287,   276,   277,  -116,    -2,    -6,
  582.     -4,   -88,   315,   -93,   -50,   304,   309,   301,   310,   258,
  583.    -87,   314,   -75,   -72,   -73,   -76,    -7,    -5,    -7,    -7,
  584.     -7,    -5,    -5,  -111,    -1,    -5,    -5,    -5,   -14,    -5,
  585.     41,    43,    45,    42,    47,    37,    94,    40,    -3,    -3,
  586.     -3,    -5,   -14,    -1,    -5,    -5,    -7,    -7,    -7,   -98,
  587.    -98,   -97,    -9,    -9,    -9,    -5,   -12,   316,   264,   266,
  588.    285,   273,   274,   317,   279,   320,   293,   -89,   339,   359,
  589.    360,   -90,   345,    -2,    -2,    -2,    -2,    -7,    -7,    -7,
  590.     -7,    -7,    -7,    -7,  -112,    -7,    -7,    -5,  -114,   -14,
  591.     -3,    -3,    -3,    -3,    -3,    -3,    -3,    41,    -5,    -1,
  592.    -14,    -5,    -5,    -9,    -9,    -5,   -85,   -42,    -5,    -5,
  593.     -1,    -5,    -5,    -5,    -5,    -5,   -42,    -5,    -1,   -91,
  594.     -1,    -2,    -2,    -2,    -2,    -7,    -8,    -5,    -7,    -5,
  595.     -7,    -7,  -115,    -5,    41,    44,    -7,    -5,    -5,    -7,
  596.    -42,    -5,    -5,    -5,    -5,    -5,    -5,    -5,   -92,   347,
  597.    350,   348,   349,   346,   -47,   340,    -2,    -2,    -2,    -2,
  598.     -7,    -7,    -5,    -7,    -7,    -5,    -3,   -14,    -5,    -5,
  599.     -5,    -5,    -5,    -5,    -5,    -5,    -5,    -5,   -13,   321,
  600.    322,   356,   325,   323,   324,   326,   266,   327,    -5,   -42,
  601.     -5,   -48,   341,   342,   343,   344,    -2,    -2,    -7,    -7,
  602.     -5,    41,    44,   329,   -14,    -5,    -5,   -14,   -14,   -49,
  603.    -47,    -5,    -5,    -5,    -7,    -7,    -7,    -2,    -7,    -8,
  604.     -5,    -3,    -9,   -14,   -14,    -5,    -5,   -14,    -7,    -7,
  605.     -7,    -2,    -7,    -5,    41,    44,    -9,    -5,    -5,    -5,
  606.     -5,    -7,    -7,    -7,    -2,    -7,    -3,    -1,    -5,    -5,
  607.     -2,    -8,    41,    44,    -5,    -2,    -3,    -2,    41,    -2,
  608.     -2 };
  609. int yydef[]={
  610.  
  611.      1,    -2,     2,     3,     4,     5,     6,     7,     8,     9,
  612.     10,    11,    12,    13,    14,    15,    16,    17,    18,    19,
  613.     20,    21,    22,    23,    24,    25,    26,    27,    28,    29,
  614.     30,    31,    32,     0,     0,     0,     0,     0,     0,   123,
  615.      0,     0,     0,     0,     0,     0,     0,     0,     0,   131,
  616.    132,     0,     0,     0,     0,     0,    33,     0,   218,     0,
  617.      0,     0,     0,     0,     0,    60,    91,    36,    37,    38,
  618.     39,     0,    40,   188,    41,    42,    43,    44,    45,    46,
  619.     47,    48,    49,    50,    51,    54,   145,   145,   145,   145,
  620.    145,   145,   145,   145,     0,   145,   145,   145,   190,   191,
  621.    192,   193,   194,     0,   196,   197,   198,   199,    91,     0,
  622.    250,   251,   271,     0,     0,     0,    99,   100,   102,     0,
  623.    249,     0,   125,   122,   126,   127,   128,   129,   105,   107,
  624.    109,     0,   115,   245,   246,   130,     0,   133,   142,     0,
  625.      0,     0,     0,     0,   157,   143,   146,   147,   148,    -2,
  626.     -2,     0,     0,   159,   160,   161,   162,   163,   164,   165,
  627.    166,   167,   168,   169,   170,     0,     0,     0,     0,     0,
  628.      0,     0,     0,     0,     0,   181,   214,   274,   275,     0,
  629.    215,   218,     0,   111,   110,   113,   112,   247,    34,    35,
  630.      0,    -2,     0,     0,   144,     0,     0,     0,     0,     0,
  631.      0,   185,     0,   183,    -2,     0,     0,     0,     0,    98,
  632.      0,   272,   273,     0,   255,    -2,     0,     0,     0,     0,
  633.    101,   116,     0,   121,   124,   103,   104,   106,   108,     0,
  634.      0,   134,     0,   137,   138,     0,     0,   156,   159,   159,
  635.    155,   171,   172,   173,   176,   174,   177,   178,   175,   179,
  636.      0,    52,   217,   219,     0,     0,     0,   216,   248,   252,
  637.    253,    59,     0,    90,    92,     0,     0,     0,     0,    88,
  638.     53,   189,    55,    56,    57,    58,     0,     0,     0,     0,
  639.      0,     0,     0,   184,   182,     0,     0,   211,     0,   224,
  640.    254,     0,     0,     0,     0,     0,     0,     0,     0,   268,
  641.    269,     0,   119,   120,   114,   223,     0,   139,     0,   151,
  642.    152,   158,     0,     0,     0,     0,    91,     0,     0,     0,
  643.     65,     0,     0,    70,     0,     0,     0,    74,     0,     0,
  644.      0,    81,     0,     0,     0,     0,     0,   208,   202,   204,
  645.      0,     0,     0,     0,   186,   187,     0,     0,   210,   195,
  646.    263,   264,   265,   266,   267,   270,     0,   262,   117,   118,
  647.      0,   140,   180,     0,   221,     0,    61,    62,     0,    64,
  648.     66,     0,     0,    71,     0,     0,     0,     0,     0,    78,
  649.     79,     0,     0,     0,     0,   205,     0,     0,   201,     0,
  650.    203,     0,   212,     0,   257,     0,     0,     0,     0,     0,
  651.     63,     0,     0,     0,     0,     0,     0,     0,    80,     0,
  652.      0,     0,     0,    86,    87,     0,    93,    94,     0,     0,
  653.      0,     0,   225,   200,   209,     0,     0,   135,   141,   220,
  654.      0,     0,     0,     0,     0,   227,     0,    77,    82,   236,
  655.    237,   238,   239,   240,   241,   242,   243,   244,     0,    84,
  656.      0,   228,   229,   230,   232,   234,    95,     0,     0,     0,
  657.      0,   258,     0,   136,     0,     0,     0,     0,     0,    75,
  658.    226,     0,    83,    85,     0,     0,     0,     0,   206,     0,
  659.      0,     0,     0,     0,    69,     0,     0,     0,     0,     0,
  660.      0,     0,     0,   213,   259,     0,   222,    67,     0,    73,
  661.      0,   231,   233,   235,     0,     0,     0,    68,    72,     0,
  662.      0,   207,   260,     0,    76,    96,     0,     0,   261,     0,
  663.     97 };
  664. typedef struct { char *t_name; int t_val; } yytoktype;
  665. #ifndef YYDEBUG
  666. #    define YYDEBUG    0    /* don't allow debugging */
  667. #endif
  668.  
  669. #if YYDEBUG
  670.  
  671. yytoktype yytoks[] =
  672. {
  673.     "tFLOAT",    257,
  674.     "tSTRING",    258,
  675.     "tFILENAME",    259,
  676.     "tAPERTURE",    260,
  677.     "tAPPLYSURF",    261,
  678.     "tBACKGROUND",    262,
  679.     "tBLOB",    263,
  680.     "tBLOTCH",    264,
  681.     "tBOX",    265,
  682.     "tBUMP",    266,
  683.     "tCONE",    267,
  684.     "tCYL",    268,
  685.     "tDIRECTIONAL",    269,
  686.     "tCURSURF",    270,
  687.     "tEXTENDED",    271,
  688.     "tEYEP",    272,
  689.     "tFBM",    273,
  690.     "tFBMBUMP",    274,
  691.     "tFOCALDIST",    275,
  692.     "tFOG",    276,
  693.     "tFOGDECK",    277,
  694.     "tFOV",    278,
  695.     "tGLOSS",    279,
  696.     "tGRID",    280,
  697.     "tHEIGHTFIELD",    281,
  698.     "tLIGHT",    282,
  699.     "tLIST",    283,
  700.     "tLOOKP",    284,
  701.     "tMARBLE",    285,
  702.     "tMAXDEPTH",    286,
  703.     "tMIST",    287,
  704.     "tJITTER",    288,
  705.     "tNOJITTER",    289,
  706.     "tDEFINE",    290,
  707.     "tOBJECT",    291,
  708.     "tOUTFILE",    292,
  709.     "tSKY",    293,
  710.     "tDISC",    294,
  711.     "tDIFFERENCE",    295,
  712.     "tUNION",    296,
  713.     "tINTERSECT",    297,
  714.     "tPLANE",    298,
  715.     "tPOINT",    299,
  716.     "tPOLY",    300,
  717.     "tROTATE",    301,
  718.     "tSPOT",    302,
  719.     "tPRINT",    303,
  720.     "tSCALE",    304,
  721.     "tSCREEN",    305,
  722.     "tSPHERE",    306,
  723.     "tSURFACE",    307,
  724.     "tTHRESH",    308,
  725.     "tTRANSLATE",    309,
  726.     "tTRANSFORM",    310,
  727.     "tTRIANGLE",    311,
  728.     "tTRIANGLEUV",    312,
  729.     "tUP",    313,
  730.     "tEND",    314,
  731.     "tTEXTURE",    315,
  732.     "tCHECKER",    316,
  733.     "tWOOD",    317,
  734.     "tCONTRAST",    318,
  735.     "tCUTOFF",    319,
  736.     "tCLOUD",    320,
  737.     "tAMBIENT",    321,
  738.     "tDIFFUSE",    322,
  739.     "tREFLECT",    323,
  740.     "tTRANSP",    324,
  741.     "tSPECULAR",    325,
  742.     "tSPECPOW",    326,
  743.     "tINDEX",    327,
  744.     "tATMOSPHERE",    328,
  745.     "tNOSHADOW",    329,
  746.     "tAREA",    330,
  747.     "tTRANSLU",    331,
  748.     "tTORUS",    332,
  749.     "tEYESEP",    333,
  750.     "tSHADOWTRANSP",    334,
  751.     "tREPORT",    335,
  752.     "tVERBOSE",    336,
  753.     "tQUIET",    337,
  754.     "tWINDOW",    338,
  755.     "tSTRIPE",    339,
  756.     "tMAP",    340,
  757.     "tUV",    341,
  758.     "tSPHERICAL",    342,
  759.     "tCYLINDRICAL",    343,
  760.     "tPLANAR",    344,
  761.     "tIMAGE",    345,
  762.     "tSMOOTH",    346,
  763.     "tCOMPONENT",    347,
  764.     "tTEXTSURF",    348,
  765.     "tRANGE",    349,
  766.     "tTILE",    350,
  767.     "tSTARTTIME",    351,
  768.     "tFRAMELENGTH",    352,
  769.     "tNAME",    353,
  770.     "tFILTER",    354,
  771.     "tGAUSS",    355,
  772.     "tBODY",    356,
  773.     "tSAMPLE",    357,
  774.     "tEXTINCT",    358,
  775.     "tWINDY",    359,
  776.     "tMOUNT",    360,
  777.     "tSHUTTER",    361,
  778.     "tFRAMES",    362,
  779.     "+",    43,
  780.     "-",    45,
  781.     "*",    42,
  782.     "/",    47,
  783.     "%",    37,
  784.     "UMINUS",    363,
  785.     "^",    94,
  786.     "-unknown-",    -1    /* ends search */
  787. };
  788.  
  789. char * yyreds[] =
  790. {
  791.     "-no such reduction-",
  792.     "Items : /* empty */",
  793.     "Items : Items Item",
  794.     "Item : Eyep",
  795.     "Item : Lookp",
  796.     "Item : Up",
  797.     "Item : Fov",
  798.     "Item : Screen",
  799.     "Item : Window",
  800.     "Item : Report",
  801.     "Item : Aperture",
  802.     "Item : Focaldist",
  803.     "Item : Eyesep",
  804.     "Item : Maxdepth",
  805.     "Item : Sample",
  806.     "Item : Filter",
  807.     "Item : Contrast",
  808.     "Item : Cutoff",
  809.     "Item : Background",
  810.     "Item : Shadowtransp",
  811.     "Item : Light",
  812.     "Item : SurfDef",
  813.     "Item : CurSurf",
  814.     "Item : Outfile",
  815.     "Item : Instance",
  816.     "Item : NameObject",
  817.     "Item : GlobalEffects",
  818.     "Item : Define",
  819.     "Item : Frames",
  820.     "Item : Starttime",
  821.     "Item : Shutter",
  822.     "Item : Framelength",
  823.     "Item : Print",
  824.     "Instance : TransTextObj",
  825.     "TransTextObj : TransObj Textures",
  826.     "TransObj : Object Transforms",
  827.     "Object : ObjType",
  828.     "Object : NamedObject",
  829.     "ObjType : Primitive",
  830.     "ObjType : Aggregate",
  831.     "Primitive : PrimType",
  832.     "PrimType : Plane",
  833.     "PrimType : Sphere",
  834.     "PrimType : Box",
  835.     "PrimType : Triangle",
  836.     "PrimType : Cylinder",
  837.     "PrimType : Cone",
  838.     "PrimType : Poly",
  839.     "PrimType : HeightField",
  840.     "PrimType : Disc",
  841.     "PrimType : Torus",
  842.     "PrimType : Blob",
  843.     "NameObject : tNAME tSTRING TransTextObj",
  844.     "Aggdefs : Aggdefs Aggdef",
  845.     "Aggdefs : /* empty */",
  846.     "Aggdef : Instance",
  847.     "Aggdef : SurfDef",
  848.     "Aggdef : CurSurf",
  849.     "Aggdef : NameObject",
  850.     "Textures : Textures Texture",
  851.     "Textures : /* empty */",
  852.     "Texture : tTEXTURE Texturetype Transforms",
  853.     "Texturetype : tCHECKER Surface",
  854.     "Texturetype : tBLOTCH Expr Surface",
  855.     "Texturetype : tBUMP Expr",
  856.     "Texturetype : tMARBLE",
  857.     "Texturetype : tMARBLE Filename",
  858.     "Texturetype : tFBM Expr Expr Expr Expr IExpr Expr",
  859.     "Texturetype : tFBM Expr Expr Expr Expr IExpr Expr Filename",
  860.     "Texturetype : tFBMBUMP Expr Expr Expr Expr IExpr",
  861.     "Texturetype : tWOOD",
  862.     "Texturetype : tGLOSS Expr",
  863.     "Texturetype : tCLOUD Expr Expr Expr IExpr Expr Expr Expr",
  864.     "Texturetype : tSKY Expr Expr Expr IExpr Expr Expr",
  865.     "Texturetype : ImageText",
  866.     "Texturetype : tSTRIPE Surface Expr Expr OptMapping",
  867.     "Texturetype : tWINDY Expr Expr Expr Expr IExpr Expr Expr Expr",
  868.     "Texturetype : tMOUNT Filename Expr Expr",
  869.     "ImageText : ImageTextType ImageTextOptions",
  870.     "ImageTextType : tIMAGE Filename",
  871.     "ImageTextOptions : ImageTextOptions ImageTextOption",
  872.     "ImageTextOptions : /* empty */",
  873.     "ImageTextOption : tCOMPONENT SurfCompName",
  874.     "ImageTextOption : tTILE Expr Expr",
  875.     "ImageTextOption : tTEXTSURF Surface",
  876.     "ImageTextOption : tRANGE Expr Expr",
  877.     "ImageTextOption : tSMOOTH",
  878.     "ImageTextOption : Mapping",
  879.     "NamedObject : tOBJECT Surface tSTRING",
  880.     "NamedObject : tOBJECT tSTRING",
  881.     "Transforms : Transforms PostTransform",
  882.     "Transforms : /* empty */",
  883.     "PostTransform : TransformType",
  884.     "TransformType : tSCALE AnimExpr AnimExpr AnimExpr",
  885.     "TransformType : tTRANSLATE AnimExpr AnimExpr AnimExpr",
  886.     "TransformType : tROTATE AnimExpr AnimExpr AnimExpr AnimExpr",
  887.     "TransformType : tTRANSFORM AnimExpr AnimExpr AnimExpr AnimExpr AnimExpr AnimExpr AnimExpr AnimExpr AnimExpr",
  888.     "TransformType : tTRANSFORM AnimExpr AnimExpr AnimExpr AnimExpr AnimExpr AnimExpr AnimExpr AnimExpr AnimExpr AnimExpr AnimExpr AnimExpr",
  889.     "Eyep : tEYEP Vector Transforms",
  890.     "Lookp : tLOOKP Vector",
  891.     "Up : tUP Vector",
  892.     "Fov : tFOV Expr Expr",
  893.     "Fov : tFOV Expr",
  894.     "Sample : tSAMPLE IExpr tJITTER",
  895.     "Sample : tSAMPLE IExpr tNOJITTER",
  896.     "Sample : tSAMPLE IExpr",
  897.     "Filter : tFILTER tBOX Expr",
  898.     "Filter : tFILTER tBOX",
  899.     "Filter : tFILTER tGAUSS Expr",
  900.     "Filter : tFILTER tGAUSS",
  901.     "Starttime : tSTARTTIME Expr",
  902.     "Frames : tFRAMES IExpr",
  903.     "Framelength : tFRAMELENGTH Expr",
  904.     "Shutter : tSHUTTER Expr",
  905.     "Contrast : tCONTRAST Expr Expr Expr",
  906.     "Cutoff : tCUTOFF Intensity",
  907.     "Screen : tSCREEN IExpr IExpr",
  908.     "Window : tWINDOW Expr Expr Expr Expr",
  909.     "Report : tREPORT Verbose Quiet IExpr Filename",
  910.     "Report : tREPORT Verbose Quiet IExpr",
  911.     "Report : tREPORT Verbose Quiet Filename",
  912.     "Report : tREPORT Verbose Quiet",
  913.     "Verbose : tVERBOSE",
  914.     "Verbose : /* empty */",
  915.     "Quiet : tQUIET",
  916.     "Quiet : /* empty */",
  917.     "Aperture : tAPERTURE Expr",
  918.     "Focaldist : tFOCALDIST Expr",
  919.     "Eyesep : tEYESEP Expr",
  920.     "Maxdepth : tMAXDEPTH IExpr",
  921.     "Background : tBACKGROUND Color",
  922.     "Shadowtransp : tSHADOWTRANSP",
  923.     "Light : LightType",
  924.     "Light : LightType tNOSHADOW",
  925.     "Light : tLIGHT Intensity tAMBIENT",
  926.     "Light : Lightdef tAREA Vector Vector IExpr Vector IExpr",
  927.     "Light : Lightdef tAREA Vector Vector IExpr Vector IExpr tNOSHADOW",
  928.     "LightType : Lightdef tPOINT Vector",
  929.     "LightType : Lightdef tDIRECTIONAL Vector",
  930.     "LightType : Lightdef tEXTENDED Expr Vector",
  931.     "LightType : Lightdef tSPOT Vector Vector Expr",
  932.     "LightType : Lightdef tSPOT Vector Vector Expr Expr Expr",
  933.     "Lightdef : tLIGHT Intensity",
  934.     "CurSurf : tAPPLYSURF Surface",
  935.     "OptSurface : Surface",
  936.     "OptSurface : /* empty */",
  937.     "Surface : NamedSurf",
  938.     "Surface : ModifyNamedSurf",
  939.     "Surface : SurfSpec",
  940.     "NamedSurf : tSTRING",
  941.     "NamedSurf : tCURSURF",
  942.     "ModifyNamedSurf : CopyNamedSurf SurfComponent SurfComponents",
  943.     "ModifyNamedSurf : CopyCurSurf SurfComponent SurfComponents",
  944.     "CopyNamedSurf : tSTRING",
  945.     "CopyCurSurf : tCURSURF",
  946.     "SurfSpec : SurfComponent SurfComponents",
  947.     "SurfDef : tSURFACE tSTRING Surface",
  948.     "SurfDef : tSURFACE tSTRING",
  949.     "SurfComponents : SurfComponents SurfComponent",
  950.     "SurfComponents : /* empty */",
  951.     "SurfComponent : Ambient",
  952.     "SurfComponent : Diffuse",
  953.     "SurfComponent : Specular",
  954.     "SurfComponent : Specpow",
  955.     "SurfComponent : Body",
  956.     "SurfComponent : Reflect",
  957.     "SurfComponent : Transp",
  958.     "SurfComponent : Extinct",
  959.     "SurfComponent : Index",
  960.     "SurfComponent : Translu",
  961.     "SurfComponent : Noshadow",
  962.     "Ambient : tAMBIENT Color",
  963.     "Diffuse : tDIFFUSE Color",
  964.     "Specular : tSPECULAR Color",
  965.     "Body : tBODY Color",
  966.     "Extinct : tEXTINCT Expr",
  967.     "Specpow : tSPECPOW Expr",
  968.     "Reflect : tREFLECT Expr",
  969.     "Transp : tTRANSP Expr",
  970.     "Index : tINDEX Expr",
  971.     "Translu : tTRANSLU Expr Color Expr",
  972.     "Noshadow : tNOSHADOW",
  973.     "HeightField : tHEIGHTFIELD Surface Filename",
  974.     "HeightField : tHEIGHTFIELD Filename",
  975.     "Poly : tPOLY OptSurface Polypoints",
  976.     "Polypoints : /* empty */",
  977.     "Polypoints : Polypoints Polypoint",
  978.     "Polypoint : Vector",
  979.     "Aggregate : AggregateDef",
  980.     "AggregateDef : AggregateCreate Aggdefs tEND",
  981.     "AggregateCreate : AggregateType",
  982.     "AggregateType : List",
  983.     "AggregateType : Grid",
  984.     "AggregateType : Csg",
  985.     "List : tLIST",
  986.     "Grid : tGRID IExpr IExpr IExpr",
  987.     "Csg : CombineOp",
  988.     "CombineOp : tUNION",
  989.     "CombineOp : tINTERSECT",
  990.     "CombineOp : tDIFFERENCE",
  991.     "Cone : tCONE OptSurface Expr Vector Expr Vector",
  992.     "Cylinder : tCYL OptSurface Expr Vector Vector",
  993.     "Sphere : tSPHERE OptSurface Expr Vector",
  994.     "Disc : tDISC OptSurface Expr Vector Vector",
  995.     "Box : tBOX OptSurface Vector Vector",
  996.     "Triangle : tTRIANGLE OptSurface Vector Vector Vector",
  997.     "Triangle : tTRIANGLE OptSurface Vector Vector Vector Vector Vector Vector",
  998.     "Triangle : tTRIANGLEUV OptSurface Vector Vector Vec2d Vector Vector Vec2d Vector Vector Vec2d",
  999.     "Plane : tPLANE OptSurface Vector Vector",
  1000.     "Torus : tTORUS OptSurface Expr Expr Vector Vector",
  1001.     "Blob : tBLOB OptSurface Expr MetaPoints",
  1002.     "MetaPoints : /* empty */",
  1003.     "MetaPoints : MetaPoints MetaPoint",
  1004.     "MetaPoint : Expr Expr Expr Expr Expr",
  1005.     "Outfile : tOUTFILE Filename",
  1006.     "GlobalEffects : tATMOSPHERE Effects",
  1007.     "GlobalEffects : tATMOSPHERE IExpr Effects",
  1008.     "Effects : Effects Effect",
  1009.     "Effects : /* empty */",
  1010.     "Effect : EffectType",
  1011.     "EffectType : tMIST Color Color Expr Expr",
  1012.     "EffectType : tFOG Color Color",
  1013.     "EffectType : tFOGDECK Expr Expr Vector Expr IExpr Color Color",
  1014.     "Color : Expr Expr Expr",
  1015.     "Vector : Expr Expr Expr",
  1016.     "Vec2d : Expr Expr",
  1017.     "OptMapping : Mapping",
  1018.     "OptMapping : /* empty */",
  1019.     "Mapping : tMAP MapMethod",
  1020.     "MapMethod : tUV",
  1021.     "MapMethod : tSPHERICAL",
  1022.     "MapMethod : tSPHERICAL Vector Vector Vector",
  1023.     "MapMethod : tCYLINDRICAL",
  1024.     "MapMethod : tCYLINDRICAL Vector Vector Vector",
  1025.     "MapMethod : tPLANAR",
  1026.     "MapMethod : tPLANAR Vector Vector Vector",
  1027.     "SurfCompName : tAMBIENT",
  1028.     "SurfCompName : tDIFFUSE",
  1029.     "SurfCompName : tBODY",
  1030.     "SurfCompName : tSPECULAR",
  1031.     "SurfCompName : tREFLECT",
  1032.     "SurfCompName : tTRANSP",
  1033.     "SurfCompName : tSPECPOW",
  1034.     "SurfCompName : tBUMP",
  1035.     "SurfCompName : tINDEX",
  1036.     "Intensity : Expr",
  1037.     "Intensity : Color",
  1038.     "Print : tPRINT Expr",
  1039.     "Define : tDEFINE tSTRING AnimExpr",
  1040.     "IExpr : Expr",
  1041.     "Expr : Float",
  1042.     "Expr : ParenExpr",
  1043.     "AnimExpr : Float",
  1044.     "AnimExpr : ParenExpr",
  1045.     "ParenExpr : '(' MExpr ')'",
  1046.     "MExpr : tFLOAT",
  1047.     "MExpr : tSTRING",
  1048.     "MExpr : Symtabent '(' MExpr ')'",
  1049.     "MExpr : Symtabent '(' MExpr ',' MExpr ')'",
  1050.     "MExpr : Symtabent '(' MExpr ',' MExpr ',' MExpr ')'",
  1051.     "MExpr : Symtabent '(' MExpr ',' MExpr ',' MExpr ',' MExpr ')'",
  1052.     "MExpr : Symtabent '(' MExpr ',' MExpr ',' MExpr ',' MExpr ',' MExpr ')'",
  1053.     "MExpr : '(' MExpr ')'",
  1054.     "MExpr : MExpr '+' MExpr",
  1055.     "MExpr : MExpr '-' MExpr",
  1056.     "MExpr : MExpr '*' MExpr",
  1057.     "MExpr : MExpr '/' MExpr",
  1058.     "MExpr : MExpr '%' MExpr",
  1059.     "MExpr : '-' MExpr",
  1060.     "MExpr : '+' MExpr",
  1061.     "MExpr : MExpr '^' MExpr",
  1062.     "Float : tFLOAT",
  1063.     "Float : '-' tFLOAT",
  1064.     "Float : '+' tFLOAT",
  1065.     "Filename : tSTRING",
  1066.     "Filename : tFILENAME",
  1067.     "Symtabent : tSTRING",
  1068. };
  1069. #endif /* YYDEBUG */
  1070. #line 1 "/usr/lib/yaccpar"
  1071. /*    @(#)yaccpar 1.10 89/04/04 SMI; from S5R3 1.10    */
  1072.  
  1073. /*
  1074. ** Skeleton parser driver for yacc output
  1075. */
  1076.  
  1077. /*
  1078. ** yacc user known macros and defines
  1079. */
  1080. #define YYERROR        goto yyerrlab
  1081. #define YYACCEPT    { free(yys); free(yyv); return(0); }
  1082. #define YYABORT        { free(yys); free(yyv); return(1); }
  1083. #define YYBACKUP( newtoken, newvalue )\
  1084. {\
  1085.     if ( yychar >= 0 || ( yyr2[ yytmp ] >> 1 ) != 1 )\
  1086.     {\
  1087.         yyerror( "syntax error - cannot backup" );\
  1088.         goto yyerrlab;\
  1089.     }\
  1090.     yychar = newtoken;\
  1091.     yystate = *yyps;\
  1092.     yylval = newvalue;\
  1093.     goto yynewstate;\
  1094. }
  1095. #define YYRECOVERING()    (!!yyerrflag)
  1096. #ifndef YYDEBUG
  1097. #    define YYDEBUG    1    /* make debugging available */
  1098. #endif
  1099.  
  1100. /*
  1101. ** user known globals
  1102. */
  1103. int yydebug;            /* set to 1 to get debugging */
  1104.  
  1105. /*
  1106. ** driver internal defines
  1107. */
  1108. #define YYFLAG        (-1000)
  1109.  
  1110. /*
  1111. ** static variables used by the parser
  1112. */
  1113. static YYSTYPE *yyv;            /* value stack */
  1114. static int *yys;            /* state stack */
  1115.  
  1116. static YYSTYPE *yypv;            /* top of value stack */
  1117. static int *yyps;            /* top of state stack */
  1118.  
  1119. static int yystate;            /* current state */
  1120. static int yytmp;            /* extra var (lasts between blocks) */
  1121.  
  1122. int yynerrs;            /* number of errors */
  1123.  
  1124. int yyerrflag;            /* error recovery flag */
  1125. int yychar;            /* current input token number */
  1126.  
  1127.  
  1128. /*
  1129. ** yyparse - return 0 if worked, 1 if syntax error not recovered from
  1130. */
  1131. int
  1132. yyparse()
  1133. {
  1134.     register YYSTYPE *yypvt;    /* top of value stack for $vars */
  1135.     unsigned yymaxdepth = YYMAXDEPTH;
  1136.  
  1137.     /*
  1138.     ** Initialize externals - yyparse may be called more than once
  1139.     */
  1140.     yyv = (YYSTYPE*)malloc(yymaxdepth*sizeof(YYSTYPE));
  1141.     yys = (int*)malloc(yymaxdepth*sizeof(int));
  1142.     if (!yyv || !yys)
  1143.     {
  1144.         yyerror( "out of memory" );
  1145.         return(1);
  1146.     }
  1147.     yypv = &yyv[-1];
  1148.     yyps = &yys[-1];
  1149.     yystate = 0;
  1150.     yytmp = 0;
  1151.     yynerrs = 0;
  1152.     yyerrflag = 0;
  1153.     yychar = -1;
  1154.  
  1155.     goto yystack;
  1156.     {
  1157.         register YYSTYPE *yy_pv;    /* top of value stack */
  1158.         register int *yy_ps;        /* top of state stack */
  1159.         register int yy_state;        /* current state */
  1160.         register int  yy_n;        /* internal state number info */
  1161.  
  1162.         /*
  1163.         ** get globals into registers.
  1164.         ** branch to here only if YYBACKUP was called.
  1165.         */
  1166.     yynewstate:
  1167.         yy_pv = yypv;
  1168.         yy_ps = yyps;
  1169.         yy_state = yystate;
  1170.         goto yy_newstate;
  1171.  
  1172.         /*
  1173.         ** get globals into registers.
  1174.         ** either we just started, or we just finished a reduction
  1175.         */
  1176.     yystack:
  1177.         yy_pv = yypv;
  1178.         yy_ps = yyps;
  1179.         yy_state = yystate;
  1180.  
  1181.         /*
  1182.         ** top of for (;;) loop while no reductions done
  1183.         */
  1184.     yy_stack:
  1185.         /*
  1186.         ** put a state and value onto the stacks
  1187.         */
  1188. #if YYDEBUG
  1189.         /*
  1190.         ** if debugging, look up token value in list of value vs.
  1191.         ** name pairs.  0 and negative (-1) are special values.
  1192.         ** Note: linear search is used since time is not a real
  1193.         ** consideration while debugging.
  1194.         */
  1195.         if ( yydebug )
  1196.         {
  1197.             register int yy_i;
  1198.  
  1199.             (void)printf( "State %d, token ", yy_state );
  1200.             if ( yychar == 0 )
  1201.                 (void)printf( "end-of-file\n" );
  1202.             else if ( yychar < 0 )
  1203.                 (void)printf( "-none-\n" );
  1204.             else
  1205.             {
  1206.                 for ( yy_i = 0; yytoks[yy_i].t_val >= 0;
  1207.                     yy_i++ )
  1208.                 {
  1209.                     if ( yytoks[yy_i].t_val == yychar )
  1210.                         break;
  1211.                 }
  1212.                 (void)printf( "%s\n", yytoks[yy_i].t_name );
  1213.             }
  1214.         }
  1215. #endif /* YYDEBUG */
  1216.         if ( ++yy_ps >= &yys[ yymaxdepth ] )    /* room on stack? */
  1217.         {
  1218.             /*
  1219.             ** reallocate and recover.  Note that pointers
  1220.             ** have to be reset, or bad things will happen
  1221.             */
  1222.             int yyps_index = (yy_ps - yys);
  1223.             int yypv_index = (yy_pv - yyv);
  1224.             int yypvt_index = (yypvt - yyv);
  1225.             yymaxdepth += YYMAXDEPTH;
  1226.             yyv = (YYSTYPE*)realloc((char*)yyv,
  1227.                 yymaxdepth * sizeof(YYSTYPE));
  1228.             yys = (int*)realloc((char*)yys,
  1229.                 yymaxdepth * sizeof(int));
  1230.             if (!yyv || !yys)
  1231.             {
  1232.                 yyerror( "yacc stack overflow" );
  1233.                 return(1);
  1234.             }
  1235.             yy_ps = yys + yyps_index;
  1236.             yy_pv = yyv + yypv_index;
  1237.             yypvt = yyv + yypvt_index;
  1238.         }
  1239.         *yy_ps = yy_state;
  1240.         *++yy_pv = yyval;
  1241.  
  1242.         /*
  1243.         ** we have a new state - find out what to do
  1244.         */
  1245.     yy_newstate:
  1246.         if ( ( yy_n = yypact[ yy_state ] ) <= YYFLAG )
  1247.             goto yydefault;        /* simple state */
  1248. #if YYDEBUG
  1249.         /*
  1250.         ** if debugging, need to mark whether new token grabbed
  1251.         */
  1252.         yytmp = yychar < 0;
  1253. #endif
  1254.         if ( ( yychar < 0 ) && ( ( yychar = yylex() ) < 0 ) )
  1255.             yychar = 0;        /* reached EOF */
  1256. #if YYDEBUG
  1257.         if ( yydebug && yytmp )
  1258.         {
  1259.             register int yy_i;
  1260.  
  1261.             (void)printf( "Received token " );
  1262.             if ( yychar == 0 )
  1263.                 (void)printf( "end-of-file\n" );
  1264.             else if ( yychar < 0 )
  1265.                 (void)printf( "-none-\n" );
  1266.             else
  1267.             {
  1268.                 for ( yy_i = 0; yytoks[yy_i].t_val >= 0;
  1269.                     yy_i++ )
  1270.                 {
  1271.                     if ( yytoks[yy_i].t_val == yychar )
  1272.                         break;
  1273.                 }
  1274.                 (void)printf( "%s\n", yytoks[yy_i].t_name );
  1275.             }
  1276.         }
  1277. #endif /* YYDEBUG */
  1278.         if ( ( ( yy_n += yychar ) < 0 ) || ( yy_n >= YYLAST ) )
  1279.             goto yydefault;
  1280.         if ( yychk[ yy_n = yyact[ yy_n ] ] == yychar )    /*valid shift*/
  1281.         {
  1282.             yychar = -1;
  1283.             yyval = yylval;
  1284.             yy_state = yy_n;
  1285.             if ( yyerrflag > 0 )
  1286.                 yyerrflag--;
  1287.             goto yy_stack;
  1288.         }
  1289.  
  1290.     yydefault:
  1291.         if ( ( yy_n = yydef[ yy_state ] ) == -2 )
  1292.         {
  1293. #if YYDEBUG
  1294.             yytmp = yychar < 0;
  1295. #endif
  1296.             if ( ( yychar < 0 ) && ( ( yychar = yylex() ) < 0 ) )
  1297.                 yychar = 0;        /* reached EOF */
  1298. #if YYDEBUG
  1299.             if ( yydebug && yytmp )
  1300.             {
  1301.                 register int yy_i;
  1302.  
  1303.                 (void)printf( "Received token " );
  1304.                 if ( yychar == 0 )
  1305.                     (void)printf( "end-of-file\n" );
  1306.                 else if ( yychar < 0 )
  1307.                     (void)printf( "-none-\n" );
  1308.                 else
  1309.                 {
  1310.                     for ( yy_i = 0;
  1311.                         yytoks[yy_i].t_val >= 0;
  1312.                         yy_i++ )
  1313.                     {
  1314.                         if ( yytoks[yy_i].t_val
  1315.                             == yychar )
  1316.                         {
  1317.                             break;
  1318.                         }
  1319.                     }
  1320.                     (void)printf( "%s\n", yytoks[yy_i].t_name );
  1321.                 }
  1322.             }
  1323. #endif /* YYDEBUG */
  1324.             /*
  1325.             ** look through exception table
  1326.             */
  1327.             {
  1328.                 register int *yyxi = yyexca;
  1329.  
  1330.                 while ( ( *yyxi != -1 ) ||
  1331.                     ( yyxi[1] != yy_state ) )
  1332.                 {
  1333.                     yyxi += 2;
  1334.                 }
  1335.                 while ( ( *(yyxi += 2) >= 0 ) &&
  1336.                     ( *yyxi != yychar ) )
  1337.                     ;
  1338.                 if ( ( yy_n = yyxi[1] ) < 0 )
  1339.                     YYACCEPT;
  1340.             }
  1341.         }
  1342.  
  1343.         /*
  1344.         ** check for syntax error
  1345.         */
  1346.         if ( yy_n == 0 )    /* have an error */
  1347.         {
  1348.             /* no worry about speed here! */
  1349.             switch ( yyerrflag )
  1350.             {
  1351.             case 0:        /* new error */
  1352.                 yyerror( "syntax error" );
  1353.                 goto skip_init;
  1354.             yyerrlab:
  1355.                 /*
  1356.                 ** get globals into registers.
  1357.                 ** we have a user generated syntax type error
  1358.                 */
  1359.                 yy_pv = yypv;
  1360.                 yy_ps = yyps;
  1361.                 yy_state = yystate;
  1362.                 yynerrs++;
  1363.             skip_init:
  1364.             case 1:
  1365.             case 2:        /* incompletely recovered error */
  1366.                     /* try again... */
  1367.                 yyerrflag = 3;
  1368.                 /*
  1369.                 ** find state where "error" is a legal
  1370.                 ** shift action
  1371.                 */
  1372.                 while ( yy_ps >= yys )
  1373.                 {
  1374.                     yy_n = yypact[ *yy_ps ] + YYERRCODE;
  1375.                     if ( yy_n >= 0 && yy_n < YYLAST &&
  1376.                         yychk[yyact[yy_n]] == YYERRCODE)                    {
  1377.                         /*
  1378.                         ** simulate shift of "error"
  1379.                         */
  1380.                         yy_state = yyact[ yy_n ];
  1381.                         goto yy_stack;
  1382.                     }
  1383.                     /*
  1384.                     ** current state has no shift on
  1385.                     ** "error", pop stack
  1386.                     */
  1387. #if YYDEBUG
  1388. #    define _POP_ "Error recovery pops state %d, uncovers state %d\n"
  1389.                     if ( yydebug )
  1390.                         (void)printf( _POP_, *yy_ps,
  1391.                             yy_ps[-1] );
  1392. #    undef _POP_
  1393. #endif
  1394.                     yy_ps--;
  1395.                     yy_pv--;
  1396.                 }
  1397.                 /*
  1398.                 ** there is no state on stack with "error" as
  1399.                 ** a valid shift.  give up.
  1400.                 */
  1401.                 YYABORT;
  1402.             case 3:        /* no shift yet; eat a token */
  1403. #if YYDEBUG
  1404.                 /*
  1405.                 ** if debugging, look up token in list of
  1406.                 ** pairs.  0 and negative shouldn't occur,
  1407.                 ** but since timing doesn't matter when
  1408.                 ** debugging, it doesn't hurt to leave the
  1409.                 ** tests here.
  1410.                 */
  1411.                 if ( yydebug )
  1412.                 {
  1413.                     register int yy_i;
  1414.  
  1415.                     (void)printf( "Error recovery discards " );
  1416.                     if ( yychar == 0 )
  1417.                         (void)printf( "token end-of-file\n" );
  1418.                     else if ( yychar < 0 )
  1419.                         (void)printf( "token -none-\n" );
  1420.                     else
  1421.                     {
  1422.                         for ( yy_i = 0;
  1423.                             yytoks[yy_i].t_val >= 0;
  1424.                             yy_i++ )
  1425.                         {
  1426.                             if ( yytoks[yy_i].t_val
  1427.                                 == yychar )
  1428.                             {
  1429.                                 break;
  1430.                             }
  1431.                         }
  1432.                         (void)printf( "token %s\n",
  1433.                             yytoks[yy_i].t_name );
  1434.                     }
  1435.                 }
  1436. #endif /* YYDEBUG */
  1437.                 if ( yychar == 0 )    /* reached EOF. quit */
  1438.                     YYABORT;
  1439.                 yychar = -1;
  1440.                 goto yy_newstate;
  1441.             }
  1442.         }/* end if ( yy_n == 0 ) */
  1443.         /*
  1444.         ** reduction by production yy_n
  1445.         ** put stack tops, etc. so things right after switch
  1446.         */
  1447. #if YYDEBUG
  1448.         /*
  1449.         ** if debugging, print the string that is the user's
  1450.         ** specification of the reduction which is just about
  1451.         ** to be done.
  1452.         */
  1453.         if ( yydebug )
  1454.             (void)printf( "Reduce by (%d) \"%s\"\n",
  1455.                 yy_n, yyreds[ yy_n ] );
  1456. #endif
  1457.         yytmp = yy_n;            /* value to switch over */
  1458.         yypvt = yy_pv;            /* $vars top of value stack */
  1459.         /*
  1460.         ** Look in goto table for next state
  1461.         ** Sorry about using yy_state here as temporary
  1462.         ** register variable, but why not, if it works...
  1463.         ** If yyr2[ yy_n ] doesn't have the low order bit
  1464.         ** set, then there is no action to be done for
  1465.         ** this reduction.  So, no saving & unsaving of
  1466.         ** registers done.  The only difference between the
  1467.         ** code just after the if and the body of the if is
  1468.         ** the goto yy_stack in the body.  This way the test
  1469.         ** can be made before the choice of what to do is needed.
  1470.         */
  1471.         {
  1472.             /* length of production doubled with extra bit */
  1473.             register int yy_len = yyr2[ yy_n ];
  1474.  
  1475.             if ( !( yy_len & 01 ) )
  1476.             {
  1477.                 yy_len >>= 1;
  1478.                 yyval = ( yy_pv -= yy_len )[1];    /* $$ = $1 */
  1479.                 yy_state = yypgo[ yy_n = yyr1[ yy_n ] ] +
  1480.                     *( yy_ps -= yy_len ) + 1;
  1481.                 if ( yy_state >= YYLAST ||
  1482.                     yychk[ yy_state =
  1483.                     yyact[ yy_state ] ] != -yy_n )
  1484.                 {
  1485.                     yy_state = yyact[ yypgo[ yy_n ] ];
  1486.                 }
  1487.                 goto yy_stack;
  1488.             }
  1489.             yy_len >>= 1;
  1490.             yyval = ( yy_pv -= yy_len )[1];    /* $$ = $1 */
  1491.             yy_state = yypgo[ yy_n = yyr1[ yy_n ] ] +
  1492.                 *( yy_ps -= yy_len ) + 1;
  1493.             if ( yy_state >= YYLAST ||
  1494.                 yychk[ yy_state = yyact[ yy_state ] ] != -yy_n )
  1495.             {
  1496.                 yy_state = yyact[ yypgo[ yy_n ] ];
  1497.             }
  1498.         }
  1499.                     /* save until reenter driver code */
  1500.         yystate = yy_state;
  1501.         yyps = yy_ps;
  1502.         yypv = yy_pv;
  1503.     }
  1504.     /*
  1505.     ** code supplied by user is placed in this switch
  1506.     */
  1507.     switch( yytmp )
  1508.     {
  1509.         
  1510. case 33:
  1511. # line 195 "yacc2.y"
  1512. {
  1513.             if (yypvt[-0].obj) {
  1514.                 /*
  1515.                  * Add instance to current object.
  1516.                  */
  1517.                 yypvt[-0].obj->next = Defstack->obj->next;
  1518.                 Defstack->obj->next = yypvt[-0].obj;
  1519.             }
  1520.         } break;
  1521. case 34:
  1522. # line 205 "yacc2.y"
  1523. {
  1524.             if (yyval.obj && CurText) {
  1525.                 yyval.obj->texture = TextAppend(CurText, yyval.obj->texture);
  1526.             }
  1527.             CurText = (Texture *)NULL;
  1528.         } break;
  1529. case 35:
  1530. # line 213 "yacc2.y"
  1531. {
  1532.             yyval.obj = yypvt[-1].obj;
  1533.             if (yyval.obj != (Geom *)NULL) {
  1534.                 if (TransHead) {
  1535.                     yyval.obj->trans = TransHead;
  1536.                     yyval.obj->transtail = TransTail;
  1537.                     /*
  1538.                      * We compose non-animated tranformation lists,
  1539.                      * so we're only animated if it's one long,
  1540.                      * or it's animated itself.
  1541.                      */
  1542.                     if (yyval.obj->trans->assoc || yyval.obj->trans->next)
  1543.                         /* geometry is animated...*/
  1544.                         yyval.obj->animtrans = TRUE;
  1545.                 }
  1546.             }
  1547.         } break;
  1548. case 36:
  1549. # line 232 "yacc2.y"
  1550. {
  1551.             if (yyval.obj)
  1552.                 StatsAddRep(yyval.obj);
  1553.         } break;
  1554. case 40:
  1555. # line 242 "yacc2.y"
  1556. {
  1557.             if (yyval.obj)
  1558.                 yyval.obj->prims = 1;    /* one primitive */
  1559.         } break;
  1560. case 52:
  1561. # line 260 "yacc2.y"
  1562. {
  1563.             if (yypvt[-0].obj) {
  1564.                 yypvt[-0].obj->name = yypvt[-1].c;
  1565.                 GeomAddToDefined(yypvt[-0].obj);
  1566.             }
  1567.         } break;
  1568. case 61:
  1569. # line 278 "yacc2.y"
  1570. {
  1571.             if (yypvt[-1].text != (Texture *)NULL) {
  1572.                 /*
  1573.                  * Set transformation information.
  1574.                  */
  1575.                 if (TransHead) {
  1576.                     yypvt[-1].text->trans = TransHead;
  1577.                     /*
  1578.                      * We compose non-animated tranformation lists,
  1579.                      * so we're only animated if it's one long,
  1580.                      * or it's animated itself.
  1581.                      */
  1582.                     if (yypvt[-1].text->trans->assoc || yypvt[-1].text->trans->next)
  1583.                         /* texture transformation is animated...*/
  1584.                         yypvt[-1].text->animtrans = TRUE;
  1585.                 }
  1586.                 /*
  1587.                  * Walk to the end of list of textures and
  1588.                  * append new texture.  This is done so that
  1589.                  * textures are applied in the expected order.
  1590.                  */
  1591.                 CurText = TextAppend(yypvt[-1].text, CurText);
  1592.             }
  1593.         } break;
  1594. case 62:
  1595. # line 304 "yacc2.y"
  1596. {
  1597.             yyval.text = TextCheckerCreate(yypvt[-0].surf);
  1598.         } break;
  1599. case 63:
  1600. # line 308 "yacc2.y"
  1601. {
  1602.             yyval.text = TextBlotchCreate(yypvt[-1].d, yypvt[-0].surf);
  1603.         } break;
  1604. case 64:
  1605. # line 312 "yacc2.y"
  1606. {
  1607.             yyval.text = TextBumpCreate(yypvt[-0].d);
  1608.         } break;
  1609. case 65:
  1610. # line 316 "yacc2.y"
  1611. {
  1612.             yyval.text = TextMarbleCreate((char *)NULL);
  1613.         } break;
  1614. case 66:
  1615. # line 320 "yacc2.y"
  1616. {
  1617.             yyval.text = TextMarbleCreate(yypvt[-0].c);
  1618.         } break;
  1619. case 67:
  1620. # line 324 "yacc2.y"
  1621. {
  1622.             yyval.text = TextFBmCreate(yypvt[-5].d, yypvt[-4].d, yypvt[-3].d, yypvt[-2].d, yypvt[-1].i, yypvt[-0].d,
  1623.                         (char *)NULL);
  1624.         } break;
  1625. case 68:
  1626. # line 329 "yacc2.y"
  1627. {
  1628.             yyval.text = TextFBmCreate(yypvt[-6].d, yypvt[-5].d, yypvt[-4].d, yypvt[-3].d, yypvt[-2].i, yypvt[-1].d, yypvt[-0].c);
  1629.         } break;
  1630. case 69:
  1631. # line 333 "yacc2.y"
  1632. {
  1633.             yyval.text = TextFBmBumpCreate(yypvt[-4].d, yypvt[-3].d, yypvt[-2].d, yypvt[-1].d, yypvt[-0].i);
  1634.         } break;
  1635. case 70:
  1636. # line 337 "yacc2.y"
  1637. {
  1638.             yyval.text = TextWoodCreate();
  1639.         } break;
  1640. case 71:
  1641. # line 341 "yacc2.y"
  1642. {
  1643.             yyval.text = TextGlossCreate(yypvt[-0].d);
  1644.         } break;
  1645. case 72:
  1646. # line 345 "yacc2.y"
  1647. {
  1648.             yyval.text = TextCloudCreate(yypvt[-6].d, yypvt[-5].d, yypvt[-4].d, yypvt[-3].i, yypvt[-2].d, yypvt[-1].d, yypvt[-0].d);
  1649.         } break;
  1650. case 73:
  1651. # line 349 "yacc2.y"
  1652. {
  1653.             yyval.text = TextSkyCreate(yypvt[-5].d, yypvt[-4].d, yypvt[-3].d, yypvt[-2].i, yypvt[-1].d, yypvt[-0].d);
  1654.         } break;
  1655. case 74:
  1656. # line 353 "yacc2.y"
  1657. {
  1658.             /*
  1659.              * Image texturing has so many options
  1660.              * that specification is keyword-based.
  1661.              */
  1662.             if (Imagetext->image == (Image *)NULL)
  1663.                 yyval.text = (Texture *)NULL;
  1664.             else
  1665.                 yyval.text = TextCreate(Imagetext, ImageTextApply);
  1666.             Imagetext = (ImageText *)NULL;
  1667.         } break;
  1668. case 75:
  1669. # line 365 "yacc2.y"
  1670. {
  1671.             yyval.text = TextStripeCreate(yypvt[-3].surf, yypvt[-2].d, yypvt[-1].d, yypvt[-0].map);
  1672.         } break;
  1673. case 76:
  1674. # line 369 "yacc2.y"
  1675. {
  1676.             yyval.text = TextWindyCreate(yypvt[-7].d, yypvt[-6].d, yypvt[-5].d, yypvt[-4].d, yypvt[-3].i, yypvt[-2].d, yypvt[-1].d, yypvt[-0].d);
  1677.         } break;
  1678. case 77:
  1679. # line 373 "yacc2.y"
  1680. {
  1681.             yyval.text = TextMountCreate(yypvt[-2].c, yypvt[-1].d, yypvt[-0].d);
  1682.         } break;
  1683. case 79:
  1684. # line 380 "yacc2.y"
  1685. {
  1686.             Imagetext = ImageTextCreate(yypvt[-0].c);
  1687.         } break;
  1688. case 82:
  1689. # line 388 "yacc2.y"
  1690. {
  1691.             /* set texture to modify given component */    
  1692.             ImageTextSetComponent(Imagetext, yypvt[-0].i);
  1693.         } break;
  1694. case 83:
  1695. # line 393 "yacc2.y"
  1696. {
  1697.             Imagetext->tileu = yypvt[-1].d;
  1698.             Imagetext->tilev = yypvt[-0].d;
  1699.         } break;
  1700. case 84:
  1701. # line 398 "yacc2.y"
  1702. {
  1703.             Imagetext->surf = yypvt[-0].surf;
  1704.         } break;
  1705. case 85:
  1706. # line 402 "yacc2.y"
  1707. {
  1708.             Imagetext->hi = yypvt[-1].d;
  1709.             Imagetext->lo = yypvt[-0].d;
  1710.         } break;
  1711. case 86:
  1712. # line 407 "yacc2.y"
  1713. {
  1714.             Imagetext->smooth = TRUE;
  1715.         } break;
  1716. case 87:
  1717. # line 411 "yacc2.y"
  1718. {
  1719.             Imagetext->mapping = yypvt[-0].map;
  1720.         } break;
  1721. case 88:
  1722. # line 415 "yacc2.y"
  1723. {
  1724.             Geom *otmp;
  1725.             /*
  1726.              * Create an instance of the named object.
  1727.              */
  1728.             otmp = GeomGetNamed(yypvt[-0].c);
  1729.             if (otmp == (Geom *)NULL)
  1730.                 RLerror(RL_PANIC,
  1731.                   "There is no object named \"%s\".", yypvt[-0].c,0,0);
  1732.             yyval.obj = GeomInstanceCreate(otmp);
  1733.             yyval.obj->surf = yypvt[-1].surf;
  1734.             yyval.obj->prims = otmp->prims;
  1735.         } break;
  1736. case 89:
  1737. # line 429 "yacc2.y"
  1738. {
  1739.             Geom *otmp;
  1740.  
  1741.             otmp = GeomGetNamed(yypvt[-0].c);
  1742.             if (otmp == (Geom *)NULL)
  1743.                 RLerror(RL_PANIC,
  1744.                   "There is no object named \"%s\".", yypvt[-0].c,0,0);
  1745.             yyval.obj = GeomInstanceCreate(otmp);
  1746.             yyval.obj->surf = CurSurf->surf;
  1747.             yyval.obj->prims = otmp->prims;
  1748.         } break;
  1749. case 91:
  1750. # line 442 "yacc2.y"
  1751. {
  1752.             TransHead = TransTail = (Trans *)NULL;
  1753.         } break;
  1754. case 92:
  1755. # line 446 "yacc2.y"
  1756. {
  1757.             if (TransHead == (Trans *)NULL) {
  1758.                 /* we're the list, head and tail */
  1759.                 TransHead = TransTail = yypvt[-0].trans;
  1760.             } else {
  1761.                 if (yypvt[-0].trans->animated || TransTail->animated) {
  1762.                     /* new tail */
  1763.                     yypvt[-0].trans->prev = TransTail;
  1764.                     TransTail->next = yypvt[-0].trans;
  1765.                     TransTail = yypvt[-0].trans;
  1766.                 } else {
  1767.                     /* collapse with tail */
  1768.                     TransCompose(TransTail, yypvt[-0].trans, TransTail);
  1769.                     TransFree(yypvt[-0].trans);
  1770.                 }
  1771.             }
  1772.         } break;
  1773. case 93:
  1774. # line 465 "yacc2.y"
  1775. {
  1776.             yyval.trans = TransScaleCreate();
  1777.             TransScaleSetX(yyval.trans, yypvt[-2].e);
  1778.             TransScaleSetY(yyval.trans, yypvt[-1].e);
  1779.             TransScaleSetZ(yyval.trans, yypvt[-0].e);
  1780.             if (!yyval.trans->animated)
  1781.                 TransPropagate(yyval.trans);
  1782.                 
  1783.         } break;
  1784. case 94:
  1785. # line 475 "yacc2.y"
  1786. {
  1787.             yyval.trans = TransTranslateCreate();
  1788.             TransTranslateSetX(yyval.trans, yypvt[-2].e);
  1789.             TransTranslateSetY(yyval.trans, yypvt[-1].e);
  1790.             TransTranslateSetZ(yyval.trans, yypvt[-0].e);
  1791.             if (!yyval.trans->animated)
  1792.                 TransPropagate(yyval.trans);
  1793.         } break;
  1794. case 95:
  1795. # line 484 "yacc2.y"
  1796. {
  1797.             yyval.trans = TransRotateCreate();
  1798.             TransRotateSetX(yyval.trans, yypvt[-3].e);
  1799.             TransRotateSetY(yyval.trans, yypvt[-2].e);
  1800.             TransRotateSetZ(yyval.trans, yypvt[-1].e);
  1801.             TransRotateSetTheta(yyval.trans, yypvt[-0].e);
  1802.             if (!yyval.trans->animated)
  1803.                 TransPropagate(yyval.trans);
  1804.         } break;
  1805. case 96:
  1806. # line 496 "yacc2.y"
  1807. {
  1808.             yyval.trans = TransXformCreate();
  1809.             TransXformSetX0(yyval.trans, yypvt[-8].e);
  1810.             TransXformSetY0(yyval.trans, yypvt[-7].e);
  1811.             TransXformSetZ0(yyval.trans, yypvt[-6].e);
  1812.             TransXformSetX1(yyval.trans, yypvt[-5].e);
  1813.             TransXformSetY1(yyval.trans, yypvt[-4].e);
  1814.             TransXformSetZ1(yyval.trans, yypvt[-3].e);
  1815.             TransXformSetX2(yyval.trans, yypvt[-2].e);
  1816.             TransXformSetY2(yyval.trans, yypvt[-1].e);
  1817.             TransXformSetZ2(yyval.trans, yypvt[-0].e);
  1818.             if (!yyval.trans->animated)
  1819.             TransPropagate(yyval.trans);
  1820.         } break;
  1821. case 97:
  1822. # line 514 "yacc2.y"
  1823. {
  1824.             yyval.trans = TransXformCreate();
  1825.             TransXformSetX0(yyval.trans, yypvt[-11].e);
  1826.             TransXformSetY0(yyval.trans, yypvt[-10].e);
  1827.             TransXformSetZ0(yyval.trans, yypvt[-9].e);
  1828.             TransXformSetX1(yyval.trans, yypvt[-8].e);
  1829.             TransXformSetY1(yyval.trans, yypvt[-7].e);
  1830.             TransXformSetZ1(yyval.trans, yypvt[-6].e);
  1831.             TransXformSetX2(yyval.trans, yypvt[-5].e);
  1832.             TransXformSetY2(yyval.trans, yypvt[-4].e);
  1833.             TransXformSetZ2(yyval.trans, yypvt[-3].e);
  1834.             TransXformSetXt(yyval.trans, yypvt[-2].e);
  1835.             TransXformSetYt(yyval.trans, yypvt[-1].e);
  1836.             TransXformSetZt(yyval.trans, yypvt[-0].e);
  1837.             if (!yyval.trans->animated)
  1838.             TransPropagate(yyval.trans);
  1839.         } break;
  1840. case 98:
  1841. # line 533 "yacc2.y"
  1842. {
  1843.             Camera.pos = yypvt[-1].v;
  1844.             /*
  1845.              * Eye can be transformed...
  1846.             if (CurMatrix) {
  1847.                 PointTransform(&Camera.pos, CurMatrix);
  1848.                 free((voidstar)CurMatrix);
  1849.                 CurMatrix = (Matrix*)NULL;
  1850.             }
  1851.              */
  1852.         } break;
  1853. case 99:
  1854. # line 546 "yacc2.y"
  1855. {
  1856.             Camera.lookp = yypvt[-0].v;
  1857.         } break;
  1858. case 100:
  1859. # line 551 "yacc2.y"
  1860. {
  1861.             Camera.up = yypvt[-0].v;
  1862.         } break;
  1863. case 101:
  1864. # line 556 "yacc2.y"
  1865. {
  1866.             Camera.hfov = yypvt[-1].d;
  1867.             Camera.vfov = yypvt[-0].d;
  1868.         } break;
  1869. case 102:
  1870. # line 561 "yacc2.y"
  1871. {
  1872.             Camera.hfov = yypvt[-0].d;
  1873.             Camera.vfov = UNSET;
  1874.         } break;
  1875. case 103:
  1876. # line 567 "yacc2.y"
  1877. {
  1878.             if (!Options.samples_set)
  1879.                 Options.samples = yypvt[-1].i;
  1880.             if (!Options.jitter_set)
  1881.                 Options.jitter = TRUE;
  1882.         } break;
  1883. case 104:
  1884. # line 574 "yacc2.y"
  1885. {
  1886.             if (!Options.samples_set)
  1887.                 Options.samples = yypvt[-1].i;
  1888.             if (!Options.jitter_set)
  1889.                 Options.jitter = FALSE;
  1890.         } break;
  1891. case 105:
  1892. # line 581 "yacc2.y"
  1893. {
  1894.             if (!Options.samples_set)
  1895.                 Options.samples = yypvt[-0].i;
  1896.         } break;
  1897. case 106:
  1898. # line 587 "yacc2.y"
  1899. {
  1900.             Options.gaussian = FALSE;
  1901.             Options.filterwidth = yypvt[-0].d;
  1902.         } break;
  1903. case 107:
  1904. # line 592 "yacc2.y"
  1905. {
  1906.             Options.gaussian = FALSE;
  1907.         } break;
  1908. case 108:
  1909. # line 596 "yacc2.y"
  1910. {
  1911.             Options.gaussian = TRUE;
  1912.             Options.filterwidth = yypvt[-0].d;
  1913.         } break;
  1914. case 109:
  1915. # line 601 "yacc2.y"
  1916. {
  1917.             Options.gaussian = TRUE;
  1918.         } break;
  1919. case 110:
  1920. # line 605 "yacc2.y"
  1921. {
  1922.             Options.starttime = yypvt[-0].d;
  1923.         } break;
  1924. case 111:
  1925. # line 609 "yacc2.y"
  1926. {
  1927.             if (!Options.totalframes_set)
  1928.                 Options.totalframes = yypvt[-0].i;
  1929.         } break;
  1930. case 112:
  1931. # line 614 "yacc2.y"
  1932. {
  1933.             Options.framelength = yypvt[-0].d;
  1934.         } break;
  1935. case 113:
  1936. # line 618 "yacc2.y"
  1937. {
  1938.             Options.shutterspeed = yypvt[-0].d;
  1939.         } break;
  1940. case 114:
  1941. # line 622 "yacc2.y"
  1942. {
  1943.             if (!Options.contrast_set) {
  1944.                 Options.contrast.r = yypvt[-2].d;
  1945.                 Options.contrast.g = yypvt[-1].d;
  1946.                 Options.contrast.b = yypvt[-0].d;
  1947.             }
  1948.         } break;
  1949. case 115:
  1950. # line 631 "yacc2.y"
  1951. {
  1952.             if (!Options.cutoff_set)
  1953.                 Options.cutoff = yypvt[-0].col;
  1954.         } break;
  1955. case 116:
  1956. # line 637 "yacc2.y"
  1957. {
  1958.             if (!Options.resolution_set) {
  1959.                 Screen.xres = yypvt[-1].i;
  1960.                 Screen.yres = yypvt[-0].i;
  1961.             }
  1962.         } break;
  1963. case 117:
  1964. # line 645 "yacc2.y"
  1965. {
  1966.             if (!Options.window_set) {
  1967.                 Options.xmin = yypvt[-3].d;
  1968.                 Options.xmax = yypvt[-2].d;
  1969.                 Options.ymin = yypvt[-1].d;
  1970.                 Options.ymax = yypvt[-0].d;
  1971.             }
  1972.         } break;
  1973. case 118:
  1974. # line 654 "yacc2.y"
  1975. {
  1976.             if (!Options.freq_set)
  1977.                 Options.report_freq = yypvt[-1].i;
  1978.         } break;
  1979. case 119:
  1980. # line 661 "yacc2.y"
  1981. {
  1982.             if (!Options.freq_set)
  1983.                 Options.report_freq = yypvt[-0].i;
  1984.         } break;
  1985. case 120:
  1986. # line 666 "yacc2.y"
  1987. {
  1988.         } break;
  1989. case 122:
  1990. # line 673 "yacc2.y"
  1991. { Options.verbose = TRUE; } break;
  1992. case 124:
  1993. # line 677 "yacc2.y"
  1994. { Options.quiet = TRUE; } break;
  1995. case 126:
  1996. # line 681 "yacc2.y"
  1997. {
  1998.             Camera.aperture = yypvt[-0].d;
  1999.         } break;
  2000. case 127:
  2001. # line 686 "yacc2.y"
  2002. {
  2003.             Camera.focaldist = yypvt[-0].d;
  2004.         } break;
  2005. case 128:
  2006. # line 691 "yacc2.y"
  2007. {
  2008.             if (!Options.eyesep_set)
  2009.                 Options.eyesep = yypvt[-0].d;
  2010.         } break;
  2011. case 129:
  2012. # line 697 "yacc2.y"
  2013. {
  2014.             if (!Options.maxdepth_set)
  2015.                 Options.maxdepth = yypvt[-0].i;
  2016.         } break;
  2017. case 130:
  2018. # line 703 "yacc2.y"
  2019. {
  2020.             Screen.background = yypvt[-0].col;
  2021.         } break;
  2022. case 131:
  2023. # line 708 "yacc2.y"
  2024. {
  2025.             Options.shadowtransp = TRUE;
  2026.         } break;
  2027. case 132:
  2028. # line 713 "yacc2.y"
  2029. {
  2030.             LightAddToDefined(yypvt[-0].light);
  2031.         } break;
  2032. case 133:
  2033. # line 717 "yacc2.y"
  2034. {
  2035.             yypvt[-1].light->shadow = FALSE;
  2036.             LightAddToDefined(yypvt[-1].light);
  2037.         } break;
  2038. case 134:
  2039. # line 722 "yacc2.y"
  2040. {
  2041.             Options.ambient = yypvt[-1].col;
  2042.         } break;
  2043. case 135:
  2044. # line 726 "yacc2.y"
  2045. {
  2046.             extern void AreaLightCreate();
  2047.             /* Area light is strange in that the
  2048.              * Creation routine does the installation.
  2049.              */
  2050.             AreaLightCreate(&yypvt[-6].col, &yypvt[-4].v, &yypvt[-3].v, yypvt[-2].i, &yypvt[-1].v, yypvt[-0].i, TRUE);
  2051.         } break;
  2052. case 136:
  2053. # line 734 "yacc2.y"
  2054. {
  2055.             extern void AreaLightCreate();
  2056.             /* Area light is strange in that the
  2057.              * Creation routine does the installation.
  2058.              */
  2059.             AreaLightCreate(&yypvt[-7].col, &yypvt[-5].v, &yypvt[-4].v, yypvt[-3].i, &yypvt[-2].v, yypvt[-1].i, FALSE);
  2060.         } break;
  2061. case 137:
  2062. # line 742 "yacc2.y"
  2063. {
  2064.             yyval.light = LightPointCreate(&yypvt[-2].col, &yypvt[-0].v);
  2065.         } break;
  2066. case 138:
  2067. # line 746 "yacc2.y"
  2068. {
  2069.             yyval.light = LightInfiniteCreate(&yypvt[-2].col, &yypvt[-0].v);
  2070.         } break;
  2071. case 139:
  2072. # line 750 "yacc2.y"
  2073. {
  2074.             yyval.light = LightExtendedCreate(&yypvt[-3].col, yypvt[-1].d, &yypvt[-0].v);
  2075.         } break;
  2076. case 140:
  2077. # line 754 "yacc2.y"
  2078. {
  2079.             yyval.light = LightSpotCreate(&yypvt[-4].col, &yypvt[-2].v, &yypvt[-1].v, yypvt[-0].d, 0., 0.);
  2080.         } break;
  2081. case 141:
  2082. # line 758 "yacc2.y"
  2083. {
  2084.             /* light <intens> spot from <to> coef inner_rad
  2085.                     outer_rad */
  2086.             yyval.light = LightSpotCreate(&yypvt[-6].col, &yypvt[-4].v, &yypvt[-3].v, yypvt[-2].d, yypvt[-1].d, yypvt[-0].d);
  2087.         } break;
  2088. case 142:
  2089. # line 764 "yacc2.y"
  2090. {
  2091.             yyval.col = yypvt[-0].col;
  2092.         } break;
  2093. case 143:
  2094. # line 769 "yacc2.y"
  2095. {
  2096.             CurSurf->surf = yypvt[-0].surf;
  2097.         } break;
  2098. case 145:
  2099. # line 775 "yacc2.y"
  2100. {
  2101.             yyval.surf = CurSurf->surf;
  2102.         } break;
  2103. case 149:
  2104. # line 784 "yacc2.y"
  2105. {
  2106.             yyval.surf = SurfaceGetNamed(yypvt[-0].c);
  2107.             /*
  2108.              * Free up memory allocated for surf name.
  2109.              * We bother doing this because for large models
  2110.              * converted from 3.0, surfnames this can account
  2111.              * for lots o' bytes.
  2112.              */
  2113.             free((voidstar)yypvt[-0].c);
  2114.         } break;
  2115. case 150:
  2116. # line 795 "yacc2.y"
  2117. {
  2118.             extern Surface DefaultSurface;
  2119.  
  2120.             if (CurSurf->surf)
  2121.                 yyval.surf = CurSurf->surf;
  2122.             else
  2123.                 yyval.surf = &DefaultSurface;
  2124.         } break;
  2125. case 151:
  2126. # line 805 "yacc2.y"
  2127. {
  2128.             yyval.surf = tmpsurf;
  2129.             tmpsurf = (Surface *)NULL;
  2130.         } break;
  2131. case 152:
  2132. # line 810 "yacc2.y"
  2133. {
  2134.             yyval.surf = tmpsurf;
  2135.             tmpsurf = (Surface *)NULL;
  2136.         } break;
  2137. case 153:
  2138. # line 816 "yacc2.y"
  2139. {
  2140.             tmpsurf = SurfaceCopy(SurfaceGetNamed(yypvt[-0].c));
  2141.         } break;
  2142. case 154:
  2143. # line 821 "yacc2.y"
  2144. {
  2145.             extern Surface DefaultSurface;
  2146.             if (CurSurf->surf)
  2147.                 tmpsurf = SurfaceCopy(CurSurf->surf);
  2148.             else
  2149.                 tmpsurf = SurfaceCopy(&DefaultSurface);
  2150.         } break;
  2151. case 155:
  2152. # line 830 "yacc2.y"
  2153. {
  2154.             yyval.surf = tmpsurf;
  2155.             tmpsurf = (Surface *)NULL;
  2156.         } break;
  2157. case 156:
  2158. # line 836 "yacc2.y"
  2159. {
  2160.             tmpsurf = SurfaceCopy(yypvt[-0].surf);
  2161.             tmpsurf->name = strsave(yypvt[-1].c);
  2162.             SurfaceAddToDefined(tmpsurf);
  2163.             tmpsurf = (Surface *)NULL;
  2164.         } break;
  2165. case 157:
  2166. # line 843 "yacc2.y"
  2167. {
  2168.             /* black surface */
  2169.             tmpsurf = SurfaceCreate();
  2170.             tmpsurf->name = strsave(yypvt[-0].c);
  2171.             SurfaceAddToDefined(tmpsurf);
  2172.             tmpsurf = (Surface *)NULL;
  2173.         } break;
  2174. case 171:
  2175. # line 867 "yacc2.y"
  2176. {
  2177.             if (tmpsurf == (Surface *)NULL)
  2178.                 tmpsurf = SurfaceCreate();
  2179.             tmpsurf->amb = yypvt[-0].col;
  2180.         } break;
  2181. case 172:
  2182. # line 874 "yacc2.y"
  2183. {
  2184.             if (tmpsurf == (Surface *)NULL)
  2185.                 tmpsurf = SurfaceCreate();
  2186.             tmpsurf->diff = yypvt[-0].col;
  2187.         } break;
  2188. case 173:
  2189. # line 881 "yacc2.y"
  2190. {
  2191.             if (tmpsurf == (Surface *)NULL)
  2192.                 tmpsurf = SurfaceCreate();
  2193.             tmpsurf->spec = yypvt[-0].col;
  2194.         } break;
  2195. case 174:
  2196. # line 888 "yacc2.y"
  2197. {
  2198.             if (tmpsurf == (Surface *)NULL)
  2199.                 tmpsurf = SurfaceCreate();
  2200.             tmpsurf->body = yypvt[-0].col;
  2201.         } break;
  2202. case 175:
  2203. # line 894 "yacc2.y"
  2204. {
  2205.             if (tmpsurf == (Surface *)NULL)
  2206.                 tmpsurf = SurfaceCreate();
  2207.             tmpsurf->statten = yypvt[-0].d;
  2208.         } break;
  2209. case 176:
  2210. # line 900 "yacc2.y"
  2211. {
  2212.             if (tmpsurf == (Surface *)NULL)
  2213.                 tmpsurf = SurfaceCreate();
  2214.             tmpsurf->srexp = yypvt[-0].d;
  2215.         } break;
  2216. case 177:
  2217. # line 907 "yacc2.y"
  2218. {
  2219.             if (tmpsurf == (Surface *)NULL)
  2220.                 tmpsurf = SurfaceCreate();
  2221.             tmpsurf->reflect = yypvt[-0].d;
  2222.         } break;
  2223. case 178:
  2224. # line 914 "yacc2.y"
  2225. {
  2226.             if (tmpsurf == (Surface *)NULL)
  2227.                 tmpsurf = SurfaceCreate();
  2228.             tmpsurf->transp = yypvt[-0].d;
  2229.         } break;
  2230. case 179:
  2231. # line 921 "yacc2.y"
  2232. {
  2233.             if (tmpsurf == (Surface *)NULL)
  2234.                 tmpsurf = SurfaceCreate();
  2235.             tmpsurf->index = yypvt[-0].d;
  2236.         } break;
  2237. case 180:
  2238. # line 928 "yacc2.y"
  2239. {
  2240.             if (tmpsurf == (Surface *)NULL)
  2241.                 tmpsurf = SurfaceCreate();
  2242.             tmpsurf->translucency = yypvt[-2].d;
  2243.             tmpsurf->translu = yypvt[-1].col;
  2244.             tmpsurf->stexp = yypvt[-0].d;
  2245.         } break;
  2246. case 181:
  2247. # line 937 "yacc2.y"
  2248. {
  2249.             if (tmpsurf == (Surface *)NULL)
  2250.                 tmpsurf = SurfaceCreate();
  2251.             tmpsurf->noshadow = TRUE;
  2252.         } break;
  2253. case 182:
  2254. # line 944 "yacc2.y"
  2255. {
  2256.             yyval.obj = GeomHfCreate(yypvt[-0].c);
  2257.             if (yyval.obj)
  2258.                 yyval.obj->surf = yypvt[-1].surf;
  2259.         } break;
  2260. case 183:
  2261. # line 950 "yacc2.y"
  2262. {
  2263.             yyval.obj = GeomHfCreate(yypvt[-0].c);
  2264.         } break;
  2265. case 184:
  2266. # line 955 "yacc2.y"
  2267. {
  2268.             yyval.obj = GeomPolygonCreate(Polypoints, Npoints,
  2269.                 Options.flipnorm);
  2270.             if (yyval.obj)
  2271.                 yyval.obj->surf = yypvt[-1].surf;
  2272.             Polypoints = (PointList *)NULL;
  2273.             Npoints = 0;
  2274.         } break;
  2275. case 187:
  2276. # line 968 "yacc2.y"
  2277. {
  2278.             PointList *ptmp;
  2279.  
  2280.             ptmp = (PointList *)Malloc(sizeof(PointList));
  2281.             ptmp->vec = yypvt[-0].v;
  2282.             ptmp->next = Polypoints;
  2283.             Polypoints = ptmp;
  2284.             Npoints++;
  2285.         } break;
  2286. case 188:
  2287. # line 979 "yacc2.y"
  2288. {
  2289.             if (Defstack->obj) {
  2290.                 /*
  2291.                  * Set object texture to current texture.
  2292.                  */
  2293.                 Defstack->obj->texture = CurText;
  2294.             }
  2295.             CurText = (Texture *)NULL;
  2296.             /*
  2297.              * Pop topmost object on stack.
  2298.              */
  2299.             yyval.obj = Defstack->obj;
  2300.             Defstack = GeomStackPop(Defstack);
  2301.             /* Pop current surface */
  2302.             CurSurf = SurfPop(CurSurf);
  2303.         } break;
  2304. case 189:
  2305. # line 997 "yacc2.y"
  2306. {
  2307.             /* Convert aggregate, pop stacks, etc. */
  2308.             if (yypvt[-2].obj) {
  2309.                 if (Defstack->obj->next == (Geom *)NULL) {
  2310.                     RLerror(RL_WARN,
  2311.                         "Null object defined.\n",0,0,0);
  2312.                     Defstack->obj = (Geom *)NULL;
  2313.                 } else {
  2314.                     /*
  2315.                      * Convert the linked list of objects
  2316.                      * associated with the topmost object
  2317.                      * to the appropriate aggregate type.
  2318.                      */
  2319.                     Defstack->obj->prims=AggregateConvert(
  2320.                         Defstack->obj,
  2321.                         Defstack->obj->next);
  2322.                     /*
  2323.                      * Make sure conversion worked OK.
  2324.                      */
  2325.                     if (Defstack->obj->prims <= 0)
  2326.                         Defstack->obj = (Geom *)NULL;
  2327.                 }
  2328.             }
  2329.         } break;
  2330. case 190:
  2331. # line 1023 "yacc2.y"
  2332. {
  2333.             if (yypvt[-0].obj) {
  2334.                 Defstack = GeomStackPush(yypvt[-0].obj, Defstack);
  2335.                 CurSurf = SurfPush((Surface *)NULL, CurSurf);
  2336.             }
  2337.         } break;
  2338. case 194:
  2339. # line 1034 "yacc2.y"
  2340. {
  2341.             yyval.obj = GeomListCreate();
  2342.         } break;
  2343. case 195:
  2344. # line 1039 "yacc2.y"
  2345. {
  2346.             yyval.obj = GeomGridCreate(yypvt[-2].i, yypvt[-1].i, yypvt[-0].i);
  2347.         } break;
  2348. case 196:
  2349. # line 1044 "yacc2.y"
  2350. {
  2351.             yyval.obj = GeomCsgCreate(yypvt[-0].i);
  2352.             Options.csg = TRUE;
  2353.         } break;
  2354. case 197:
  2355. # line 1050 "yacc2.y"
  2356. {
  2357.             yyval.i = CSG_UNION;
  2358.         } break;
  2359. case 198:
  2360. # line 1054 "yacc2.y"
  2361. {
  2362.             yyval.i = CSG_INTERSECT;
  2363.         } break;
  2364. case 199:
  2365. # line 1058 "yacc2.y"
  2366. {
  2367.             yyval.i = CSG_DIFFERENCE;
  2368.         } break;
  2369. case 200:
  2370. # line 1063 "yacc2.y"
  2371. {
  2372.             if (equal(yypvt[-3].d, yypvt[-1].d)) {
  2373.                 /* It's really a cylinder */
  2374.                 yyval.obj = GeomCylinderCreate(yypvt[-3].d, &yypvt[-2].v, &yypvt[-0].v);
  2375.             } else
  2376.                 yyval.obj = GeomConeCreate(yypvt[-3].d, &yypvt[-2].v, yypvt[-1].d, &yypvt[-0].v);
  2377.             if (yyval.obj)
  2378.                 yyval.obj->surf = yypvt[-4].surf;
  2379.         } break;
  2380. case 201:
  2381. # line 1074 "yacc2.y"
  2382. {
  2383.             yyval.obj = GeomCylinderCreate(yypvt[-2].d, &yypvt[-1].v, &yypvt[-0].v);
  2384.             if (yyval.obj)
  2385.                 yyval.obj->surf = yypvt[-3].surf;
  2386.         } break;
  2387. case 202:
  2388. # line 1081 "yacc2.y"
  2389. {
  2390.             yyval.obj = GeomSphereCreate(yypvt[-1].d, &(yypvt[-0].v));
  2391.             if (yyval.obj)
  2392.                 yyval.obj->surf = yypvt[-2].surf;
  2393.         } break;
  2394. case 203:
  2395. # line 1088 "yacc2.y"
  2396. {
  2397.             yyval.obj = GeomDiscCreate(yypvt[-2].d, &(yypvt[-1].v), &(yypvt[-0].v));
  2398.             if (yyval.obj)
  2399.                 yyval.obj->surf = yypvt[-3].surf;
  2400.         } break;
  2401. case 204:
  2402. # line 1095 "yacc2.y"
  2403. {
  2404.             yyval.obj = GeomBoxCreate(&yypvt[-1].v, &yypvt[-0].v);
  2405.             if (yyval.obj)
  2406.                 yyval.obj->surf = yypvt[-2].surf;
  2407.         } break;
  2408. case 205:
  2409. # line 1102 "yacc2.y"
  2410. {
  2411.             yyval.obj = GeomTriangleCreate(FLATTRI, &(yypvt[-2].v), &(yypvt[-1].v), &(yypvt[-0].v),
  2412.                 (Vector *)NULL, (Vector *)NULL, (Vector *)NULL,
  2413.                 (Vec2d *)NULL, (Vec2d *)NULL, (Vec2d *)NULL,
  2414.                 Options.flipnorm);
  2415.             if (yyval.obj)
  2416.                 yyval.obj->surf = yypvt[-3].surf;
  2417.         } break;
  2418. case 206:
  2419. # line 1113 "yacc2.y"
  2420. {
  2421.             yyval.obj = GeomTriangleCreate(PHONGTRI, &(yypvt[-5].v), &(yypvt[-3].v),
  2422.                 &(yypvt[-1].v), &(yypvt[-4].v), &(yypvt[-2].v), &(yypvt[-0].v),
  2423.                 (Vec2d *)NULL, (Vec2d *)NULL, (Vec2d *)NULL,
  2424.                 Options.flipnorm);
  2425.             if (yyval.obj)
  2426.                 yyval.obj->surf = yypvt[-6].surf;
  2427.         } break;
  2428. case 207:
  2429. # line 1124 "yacc2.y"
  2430. {
  2431.             yyval.obj = GeomTriangleCreate(PHONGTRI, &(yypvt[-8].v), &(yypvt[-5].v), &(yypvt[-2].v),
  2432.                         &(yypvt[-7].v), &(yypvt[-4].v), &(yypvt[-1].v),
  2433.                         &(yypvt[-6].uv), &(yypvt[-3].uv), &(yypvt[-0].uv),
  2434.                         Options.flipnorm);
  2435.             if (yyval.obj)
  2436.                 yyval.obj->surf = yypvt[-9].surf;
  2437.         } break;
  2438. case 208:
  2439. # line 1134 "yacc2.y"
  2440. {
  2441.             yyval.obj = GeomPlaneCreate(&(yypvt[-1].v), &(yypvt[-0].v));
  2442.             if (yyval.obj)
  2443.                 yyval.obj->surf = yypvt[-2].surf;
  2444.         } break;
  2445. case 209:
  2446. # line 1141 "yacc2.y"
  2447. {
  2448.             yyval.obj = GeomTorusCreate(yypvt[-3].d, yypvt[-2].d, &(yypvt[-1].v), &(yypvt[-0].v));
  2449.             if (yyval.obj)
  2450.                 yyval.obj->surf = yypvt[-4].surf;
  2451.         } break;
  2452. case 210:
  2453. # line 1148 "yacc2.y"
  2454. {
  2455.             yyval.obj = GeomBlobCreate(yypvt[-1].d, Metapoints, Npoints);
  2456.             if (yyval.obj)
  2457.                 yyval.obj->surf = yypvt[-2].surf;
  2458.             Metapoints = (MetaList *)NULL;
  2459.             Npoints = 0;
  2460.         } break;
  2461. case 213:
  2462. # line 1160 "yacc2.y"
  2463. {
  2464.             Metapoint = (MetaList *)Malloc(sizeof(MetaList));
  2465.             Metapoint->mvec.c0 = yypvt[-4].d;
  2466.             Metapoint->mvec.rs = yypvt[-3].d;
  2467.             Metapoint->mvec.x = yypvt[-2].d;
  2468.             Metapoint->mvec.y = yypvt[-1].d;
  2469.             Metapoint->mvec.z = yypvt[-0].d;
  2470.             Metapoint->next = Metapoints;
  2471.             Metapoints = Metapoint;
  2472.             Npoints++;
  2473.         } break;
  2474. case 214:
  2475. # line 1173 "yacc2.y"
  2476. {
  2477.             if (Options.imgname != (char *)NULL)
  2478.                 /* Already set on command line. */
  2479.                 RLerror(RL_WARN,
  2480.                     "Ignoring output file name \"%s\".\n",
  2481.                     yypvt[-0].c,0,0);
  2482.             else
  2483.                 Options.imgname = strsave(yypvt[-0].c);
  2484.         } break;
  2485. case 215:
  2486. # line 1184 "yacc2.y"
  2487. {
  2488.             AtmosEffects = CurEffect;
  2489.             CurEffect = (Atmosphere *)NULL;
  2490.         } break;
  2491. case 216:
  2492. # line 1189 "yacc2.y"
  2493. {
  2494.             if (yypvt[-1].i <= 0.)
  2495.                 RLerror(RL_PANIC,
  2496.                 "Index of refraction must be positive.\n",0,0,0);
  2497.             TopMedium.index = yypvt[-1].i;
  2498.             AtmosEffects = CurEffect;
  2499.             CurEffect = (Atmosphere *)NULL;
  2500.         } break;
  2501. case 219:
  2502. # line 1202 "yacc2.y"
  2503. {
  2504.             yypvt[-0].atmos->next = CurEffect;
  2505.             CurEffect = yypvt[-0].atmos;
  2506.         } break;
  2507. case 220:
  2508. # line 1208 "yacc2.y"
  2509. {
  2510.             yyval.atmos = AtmosMistCreate(&(yypvt[-3].col), &(yypvt[-2].col), yypvt[-1].d, yypvt[-0].d);
  2511.         } break;
  2512. case 221:
  2513. # line 1212 "yacc2.y"
  2514. {
  2515.             yyval.atmos = AtmosFogCreate(&(yypvt[-1].col), &(yypvt[-0].col));
  2516.         } break;
  2517. case 222:
  2518. # line 1216 "yacc2.y"
  2519. {
  2520.             yyval.atmos = AtmosFogdeckCreate(yypvt[-6].d, yypvt[-5].d, &yypvt[-4].v, yypvt[-3].d, yypvt[-2].i, &yypvt[-1].col, &yypvt[-0].col);
  2521.         } break;
  2522. case 223:
  2523. # line 1221 "yacc2.y"
  2524. {
  2525.             yyval.col.r = yypvt[-2].d;
  2526.             yyval.col.g = yypvt[-1].d;
  2527.             yyval.col.b = yypvt[-0].d;
  2528.         } break;
  2529. case 224:
  2530. # line 1228 "yacc2.y"
  2531. {
  2532.             yyval.v.x = yypvt[-2].d;
  2533.             yyval.v.y = yypvt[-1].d;
  2534.             yyval.v.z = yypvt[-0].d;
  2535.         } break;
  2536. case 225:
  2537. # line 1235 "yacc2.y"
  2538. {
  2539.             yyval.uv.u = yypvt[-1].d;
  2540.             yyval.uv.v = yypvt[-0].d;
  2541.         } break;
  2542. case 227:
  2543. # line 1242 "yacc2.y"
  2544. {
  2545.             yyval.map = UVMappingCreate();
  2546.         } break;
  2547. case 228:
  2548. # line 1247 "yacc2.y"
  2549. {
  2550.             yyval.map = yypvt[-0].map;
  2551.         } break;
  2552. case 229:
  2553. # line 1252 "yacc2.y"
  2554. {
  2555.             yyval.map = UVMappingCreate();
  2556.         } break;
  2557. case 230:
  2558. # line 1256 "yacc2.y"
  2559. {
  2560.             yyval.map = SphereMappingCreate((Vector *)NULL,
  2561.                 (Vector *)NULL, (Vector *)NULL);
  2562.         } break;
  2563. case 231:
  2564. # line 1261 "yacc2.y"
  2565. {
  2566.             /* origin up uaxis */
  2567.             yyval.map = SphereMappingCreate(&yypvt[-2].v, &yypvt[-1].v, &yypvt[-0].v);
  2568.         } break;
  2569. case 232:
  2570. # line 1266 "yacc2.y"
  2571. {
  2572.             yyval.map = CylMappingCreate((Vector *)NULL,
  2573.                 (Vector *)NULL, (Vector *)NULL);
  2574.         } break;
  2575. case 233:
  2576. # line 1271 "yacc2.y"
  2577. {
  2578.             /* origin up uaxis */
  2579.             yyval.map = CylMappingCreate(&yypvt[-2].v, &yypvt[-1].v, &yypvt[-0].v);
  2580.         } break;
  2581. case 234:
  2582. # line 1276 "yacc2.y"
  2583. {
  2584.             yyval.map = LinearMappingCreate((Vector *)NULL,
  2585.                 (Vector *)NULL, (Vector *)NULL);
  2586.         } break;
  2587. case 235:
  2588. # line 1281 "yacc2.y"
  2589. {
  2590.             /* origin up uaxis */
  2591.             yyval.map = LinearMappingCreate(&yypvt[-2].v, &yypvt[-1].v, &yypvt[-0].v);
  2592.         } break;
  2593. case 236:
  2594. # line 1287 "yacc2.y"
  2595. {
  2596.             yyval.i = AMBIENT;
  2597.         } break;
  2598. case 237:
  2599. # line 1291 "yacc2.y"
  2600. {
  2601.             yyval.i = DIFFUSE;
  2602.         } break;
  2603. case 238:
  2604. # line 1295 "yacc2.y"
  2605. {
  2606.             yyval.i = BODY;
  2607.         } break;
  2608. case 239:
  2609. # line 1299 "yacc2.y"
  2610. {
  2611.             yyval.i = SPECULAR;
  2612.         } break;
  2613. case 240:
  2614. # line 1303 "yacc2.y"
  2615. {
  2616.             yyval.i = REFLECT;
  2617.         } break;
  2618. case 241:
  2619. # line 1307 "yacc2.y"
  2620. {
  2621.             yyval.i = TRANSP;
  2622.         } break;
  2623. case 242:
  2624. # line 1311 "yacc2.y"
  2625. {
  2626.             yyval.i = SPECPOW;
  2627.         } break;
  2628. case 243:
  2629. # line 1315 "yacc2.y"
  2630. {
  2631.             yyval.i = BUMP;
  2632.         } break;
  2633. case 244:
  2634. # line 1319 "yacc2.y"
  2635. {
  2636.             yyval.i = INDEX;
  2637.         } break;
  2638. case 245:
  2639. # line 1324 "yacc2.y"
  2640. { yyval.col.r = yyval.col.g = yyval.col.b = yypvt[-0].d; } break;
  2641. case 247:
  2642. # line 1328 "yacc2.y"
  2643. {
  2644.             fprintf(stderr,"%f\n",yypvt[-0].d);
  2645.         } break;
  2646. case 248:
  2647. # line 1332 "yacc2.y"
  2648. {
  2649.             SymtabAddEntry(yypvt[-1].c, yypvt[-0].e->type, yypvt[-0].e, NULL, yypvt[-0].e->timevary, 0);
  2650.         } break;
  2651. case 249:
  2652. # line 1336 "yacc2.y"
  2653. { yyval.i = (int)yypvt[-0].d; } break;
  2654. case 251:
  2655. # line 1340 "yacc2.y"
  2656. {
  2657.             if (!yypvt[-0].e->timevary) {
  2658.                 yyval.d = ExprEval(yypvt[-0].e);
  2659.             } else {
  2660.                 RLerror(RL_PANIC, "Illegal expression use.\n",0,0,0);
  2661.             }
  2662.         } break;
  2663. case 252:
  2664. # line 1349 "yacc2.y"
  2665. {
  2666.             yyval.e = ExprReuseFloatCreate(yypvt[-0].d);
  2667.         } break;
  2668. case 254:
  2669. # line 1355 "yacc2.y"
  2670. {
  2671.             yyval.e = yypvt[-1].e;
  2672.         } break;
  2673. case 255:
  2674. # line 1359 "yacc2.y"
  2675. {
  2676.             yyval.e = ExprFloatCreate(yypvt[-0].d, FALSE);
  2677.         } break;
  2678. case 256:
  2679. # line 1363 "yacc2.y"
  2680. {
  2681.             yyval.e = ExprFloatSymtabFind(yypvt[-0].c);
  2682.         } break;
  2683. case 257:
  2684. # line 1367 "yacc2.y"
  2685. {
  2686.             yyval.e = ExprResolve1(yypvt[-1].e, yypvt[-3].sym->value.fp, yypvt[-3].sym->timevary);
  2687.         } break;
  2688. case 258:
  2689. # line 1371 "yacc2.y"
  2690. {
  2691.             yyval.e = ExprResolve2(yypvt[-3].e, yypvt[-1].e,
  2692.                     yypvt[-5].sym->value.fp,
  2693.                     yypvt[-5].sym->timevary);
  2694.         } break;
  2695. case 259:
  2696. # line 1377 "yacc2.y"
  2697. {
  2698.             yyval.e = ExprResolve3(yypvt[-5].e, yypvt[-3].e, yypvt[-1].e, 
  2699.                     yypvt[-7].sym->value.fp,
  2700.                     yypvt[-7].sym->timevary);
  2701.         } break;
  2702. case 260:
  2703. # line 1383 "yacc2.y"
  2704. {
  2705.             yyval.e = ExprResolve4(yypvt[-7].e, yypvt[-5].e, yypvt[-3].e, yypvt[-1].e, 
  2706.                     yypvt[-9].sym->value.fp,
  2707.                     yypvt[-9].sym->timevary);
  2708.         } break;
  2709. case 261:
  2710. # line 1390 "yacc2.y"
  2711. {
  2712.             yyval.e = ExprResolve5(yypvt[-9].e, yypvt[-7].e, yypvt[-5].e, yypvt[-3].e, yypvt[-1].e,
  2713.                     yypvt[-11].sym->value.fp,
  2714.                     yypvt[-11].sym->timevary);
  2715.         } break;
  2716. case 262:
  2717. # line 1396 "yacc2.y"
  2718. {
  2719.             yyval.e = yypvt[-1].e;
  2720.         } break;
  2721. case 263:
  2722. # line 1400 "yacc2.y"
  2723. {
  2724.             yyval.e = ExprResolve2(yypvt[-2].e, yypvt[-0].e, SumExpr, FALSE);
  2725.         } break;
  2726. case 264:
  2727. # line 1404 "yacc2.y"
  2728. {
  2729.             yyval.e = ExprResolve2(yypvt[-2].e, yypvt[-0].e, DiffExpr, FALSE);
  2730.         } break;
  2731. case 265:
  2732. # line 1408 "yacc2.y"
  2733. {
  2734.             yyval.e = ExprResolve2(yypvt[-2].e, yypvt[-0].e, MultExpr, FALSE);
  2735.         } break;
  2736. case 266:
  2737. # line 1412 "yacc2.y"
  2738. {
  2739.             yyval.e = ExprResolve2(yypvt[-2].e, yypvt[-0].e, DivideExpr, FALSE);
  2740.         } break;
  2741. case 267:
  2742. # line 1416 "yacc2.y"
  2743. {
  2744.             yyval.e = ExprResolve2(yypvt[-2].e, yypvt[-0].e, ModExpr, FALSE);
  2745.         } break;
  2746. case 268:
  2747. # line 1420 "yacc2.y"
  2748. {
  2749.             yyval.e = ExprResolve1(yypvt[-0].e, NegateExpr, FALSE);
  2750.         } break;
  2751. case 269:
  2752. # line 1424 "yacc2.y"
  2753. {
  2754.             yyval.e = yypvt[-0].e;
  2755.         } break;
  2756. case 270:
  2757. # line 1428 "yacc2.y"
  2758. {
  2759.             yyval.e = ExprResolve2(yypvt[-2].e, yypvt[-0].e, pow, FALSE);
  2760.         } break;
  2761. case 272:
  2762. # line 1433 "yacc2.y"
  2763. { yyval.d = -yypvt[-0].d; } break;
  2764. case 273:
  2765. # line 1435 "yacc2.y"
  2766. { yyval.d = yypvt[-0].d; } break;
  2767. case 276:
  2768. # line 1440 "yacc2.y"
  2769. {
  2770.             yyval.sym = SymtabBuiltinFind(yypvt[-0].c);
  2771.         } break;
  2772.     }
  2773.     goto yystack;        /* reset registers in driver code */
  2774. }
  2775.