refer: read the input even if no bib file is given
[troff.git] / pic / picy.c
blob2031009ef5af16e345aabf0d933afc2154b267b1
1 #include <stdio.h>
2 #include "pic.h"
3 #include <math.h>
4 #include <stdlib.h>
5 #include <string.h>
7 YYSTYPE y;
9 extern void yyerror(char *);
10 extern int yylex(void);
11 extern int yyerrflag;
12 #ifndef YYMAXDEPTH
13 #define YYMAXDEPTH 150
14 #endif
15 YYSTYPE yylval;
16 YYSTYPE yyval;
17 #define BOX 1
18 #define LINE 2
19 #define ARROW 3
20 #define CIRCLE 4
21 #define ELLIPSE 5
22 #define ARC 6
23 #define SPLINE 7
24 #define BLOCK 8
25 #define TEXT 9
26 #define TROFF 10
27 #define MOVE 11
28 #define BLOCKEND 12
29 #define PLACE 13
30 #define PRINT 57359
31 #define RESET 57360
32 #define THRU 57361
33 #define UNTIL 57362
34 #define FOR 57363
35 #define IF 57364
36 #define COPY 57365
37 #define THENSTR 57366
38 #define ELSESTR 57367
39 #define DOSTR 57368
40 #define PLACENAME 57369
41 #define VARNAME 57370
42 #define SPRINTF 57371
43 #define DEFNAME 57372
44 #define ATTR 57373
45 #define TEXTATTR 57374
46 #define LEFT 57375
47 #define RIGHT 57376
48 #define UP 57377
49 #define DOWN 57378
50 #define FROM 57379
51 #define TO 57380
52 #define AT 57381
53 #define BY 57382
54 #define WITH 57383
55 #define HEAD 57384
56 #define CW 57385
57 #define CCW 57386
58 #define THEN 57387
59 #define HEIGHT 57388
60 #define WIDTH 57389
61 #define RADIUS 57390
62 #define DIAMETER 57391
63 #define LENGTH 57392
64 #define SIZE 57393
65 #define CORNER 57394
66 #define HERE 57395
67 #define LAST 57396
68 #define NTH 57397
69 #define SAME 57398
70 #define BETWEEN 57399
71 #define AND 57400
72 #define EAST 57401
73 #define WEST 57402
74 #define NORTH 57403
75 #define SOUTH 57404
76 #define NE 57405
77 #define NW 57406
78 #define SE 57407
79 #define SW 57408
80 #define START 57409
81 #define END 57410
82 #define DOTX 57411
83 #define DOTY 57412
84 #define DOTHT 57413
85 #define DOTWID 57414
86 #define DOTRAD 57415
87 #define NUMBER 57416
88 #define LOG 57417
89 #define EXP 57418
90 #define SIN 57419
91 #define COS 57420
92 #define ATAN2 57421
93 #define SQRT 57422
94 #define RAND 57423
95 #define MIN 57424
96 #define MAX 57425
97 #define INT 57426
98 #define DIR 57427
99 #define DOT 57428
100 #define DASH 57429
101 #define CHOP 57430
102 #define FILL 57431
103 #define NOEDGE 57432
104 #define ST 57433
105 #define OROR 57434
106 #define ANDAND 57435
107 #define GT 57436
108 #define LT 57437
109 #define LE 57438
110 #define GE 57439
111 #define EQ 57440
112 #define NEQ 57441
113 #define UMINUS 57442
114 #define NOT 57443
115 #define YYEOFCODE 1
116 #define YYERRCODE 2
117 short yyexca[] =
118 {-1, 0,
119 1, 2,
120 -2, 0,
121 -1, 1,
122 1, -1,
123 -2, 0,
124 -1, 206,
125 95, 0,
126 96, 0,
127 97, 0,
128 98, 0,
129 99, 0,
130 100, 0,
131 -2, 159,
132 -1, 213,
133 95, 0,
134 96, 0,
135 97, 0,
136 98, 0,
137 99, 0,
138 100, 0,
139 -2, 158,
140 -1, 214,
141 95, 0,
142 96, 0,
143 97, 0,
144 98, 0,
145 99, 0,
146 100, 0,
147 -2, 160,
148 -1, 215,
149 95, 0,
150 96, 0,
151 97, 0,
152 98, 0,
153 99, 0,
154 100, 0,
155 -2, 161,
156 -1, 216,
157 95, 0,
158 96, 0,
159 97, 0,
160 98, 0,
161 99, 0,
162 100, 0,
163 -2, 162,
164 -1, 217,
165 95, 0,
166 96, 0,
167 97, 0,
168 98, 0,
169 99, 0,
170 100, 0,
171 -2, 163,
172 -1, 264,
173 69, 112,
174 70, 112,
175 71, 112,
176 72, 112,
177 73, 112,
178 -2, 85,
179 -1, 270,
180 95, 0,
181 96, 0,
182 97, 0,
183 98, 0,
184 99, 0,
185 100, 0,
186 -2, 159,
188 #define YYNPROD 178
189 #define YYPRIVATE 57344
190 #define YYLAST 1654
191 short yyact[] =
193 173, 334, 139, 32, 53, 68, 312, 242, 124, 125,
194 137, 42, 115, 197, 116, 117, 118, 119, 110, 111,
195 112, 113, 114, 95, 227, 122, 162, 320, 81, 43,
196 274, 137, 92, 319, 51, 299, 273, 161, 137, 160,
197 159, 105, 158, 157, 156, 155, 154, 153, 98, 127,
198 128, 131, 109, 298, 246, 235, 152, 149, 233, 40,
199 112, 113, 114, 122, 51, 122, 41, 72, 40, 194,
200 102, 164, 166, 138, 130, 110, 111, 112, 113, 114,
201 129, 83, 122, 169, 190, 73, 74, 75, 76, 77,
202 78, 79, 80, 276, 246, 200, 110, 111, 112, 113,
203 114, 138, 126, 122, 124, 125, 107, 38, 204, 206,
204 105, 208, 209, 210, 211, 212, 213, 214, 215, 216,
205 217, 218, 219, 220, 195, 221, 224, 132, 133, 134,
206 135, 136, 51, 51, 124, 125, 124, 125, 205, 207,
207 198, 199, 34, 316, 275, 321, 168, 85, 223, 226,
208 234, 124, 125, 44, 236, 237, 238, 239, 240, 241,
209 203, 243, 244, 245, 232, 167, 170, 247, 249, 228,
210 124, 125, 86, 252, 93, 253, 105, 105, 105, 105,
211 105, 96, 97, 123, 261, 262, 263, 265, 335, 336,
212 337, 338, 81, 124, 125, 267, 268, 192, 270, 51,
213 51, 51, 51, 51, 251, 254, 255, 256, 257, 260,
214 121, 120, 115, 197, 116, 117, 118, 119, 110, 111,
215 112, 113, 114, 278, 90, 122, 280, 86, 311, 282,
216 287, 193, 191, 283, 229, 132, 133, 134, 135, 136,
217 71, 201, 142, 146, 147, 143, 144, 145, 148, 250,
218 285, 35, 281, 300, 66, 67, 69, 284, 87, 88,
219 287, 288, 35, 164, 166, 269, 2, 4, 36, 230,
220 37, 285, 286, 39, 163, 305, 105, 105, 308, 36,
221 310, 196, 188, 24, 171, 24, 266, 149, 84, 24,
222 230, 231, 151, 82, 313, 70, 314, 315, 1, 51,
223 51, 69, 165, 317, 318, 306, 307, 37, 100, 24,
224 322, 5, 323, 142, 146, 147, 143, 144, 145, 148,
225 248, 331, 24, 24, 26, 6, 12, 13, 14, 304,
226 89, 339, 91, 0, 301, 340, 0, 0, 0, 0,
227 341, 271, 272, 16, 20, 21, 17, 18, 19, 22,
228 37, 35, 25, 23, 52, 46, 10, 11, 0, 0,
229 30, 31, 29, 141, 0, 24, 103, 46, 36, 202,
230 0, 0, 0, 0, 0, 0, 0, 0, 0, 66,
231 67, 69, 54, 0, 24, 0, 0, 0, 0, 0,
232 0, 66, 67, 69, 54, 0, 0, 0, 0, 0,
233 0, 45, 56, 57, 58, 59, 60, 61, 62, 64,
234 63, 65, 0, 45, 56, 57, 58, 59, 60, 61,
235 62, 64, 63, 65, 9, 0, 0, 0, 49, 48,
236 101, 0, 303, 0, 55, 0, 0, 0, 0, 0,
237 49, 48, 35, 94, 0, 0, 55, 0, 0, 0,
238 0, 27, 0, 33, 0, 50, 0, 52, 46, 36,
239 0, 172, 181, 0, 0, 0, 0, 175, 176, 177,
240 178, 179, 182, 0, 142, 146, 147, 143, 144, 145,
241 148, 150, 66, 67, 69, 54, 180, 121, 120, 115,
242 197, 116, 117, 118, 119, 110, 111, 112, 113, 114,
243 0, 0, 122, 0, 45, 56, 57, 58, 59, 60,
244 61, 62, 64, 63, 65, 174, 183, 184, 185, 186,
245 187, 0, 0, 35, 151, 0, 0, 0, 0, 0,
246 0, 49, 48, 0, 35, 0, 0, 55, 52, 46,
247 36, 0, 0, 0, 0, 0, 94, 0, 0, 52,
248 46, 36, 0, 0, 0, 0, 0, 0, 0, 0,
249 0, 0, 0, 66, 67, 69, 54, 0, 0, 0,
250 0, 0, 0, 0, 66, 67, 69, 54, 0, 0,
251 0, 0, 0, 0, 0, 45, 56, 57, 58, 59,
252 60, 61, 62, 64, 63, 65, 45, 56, 57, 58,
253 59, 60, 61, 62, 64, 63, 65, 52, 46, 0,
254 0, 0, 49, 48, 0, 0, 0, 0, 55, 52,
255 46, 0, 0, 49, 48, 0, 0, 94, 0, 55,
256 0, 0, 258, 67, 69, 54, 0, 0, 50, 0,
257 0, 0, 0, 0, 66, 67, 69, 54, 0, 0,
258 0, 0, 0, 0, 45, 56, 57, 58, 59, 60,
259 61, 62, 64, 63, 65, 0, 45, 56, 57, 58,
260 59, 60, 61, 62, 64, 63, 65, 264, 46, 0,
261 0, 49, 48, 0, 0, 0, 0, 55, 52, 46,
262 0, 0, 0, 49, 48, 259, 50, 0, 0, 55,
263 0, 0, 66, 67, 69, 54, 0, 0, 50, 0,
264 0, 0, 0, 66, 67, 69, 54, 0, 0, 0,
265 0, 0, 0, 0, 45, 56, 57, 58, 59, 60,
266 61, 62, 64, 63, 65, 45, 56, 57, 58, 59,
267 60, 61, 62, 64, 63, 65, 52, 46, 0, 0,
268 0, 49, 48, 0, 0, 0, 0, 55, 0, 0,
269 0, 0, 49, 48, 0, 0, 94, 0, 55, 0,
270 0, 66, 67, 69, 54, 0, 0, 225, 120, 115,
271 197, 116, 117, 118, 119, 110, 111, 112, 113, 114,
272 0, 0, 122, 45, 56, 57, 58, 59, 60, 61,
273 62, 64, 63, 65, 0, 16, 20, 21, 17, 18,
274 19, 22, 0, 35, 25, 23, 0, 0, 10, 11,
275 49, 48, 30, 31, 29, 0, 55, 0, 7, 28,
276 36, 0, 0, 0, 0, 222, 16, 20, 21, 17,
277 18, 19, 22, 0, 35, 25, 23, 0, 0, 10,
278 11, 0, 0, 30, 31, 29, 0, 0, 0, 7,
279 28, 36, 3, 0, 16, 20, 21, 17, 18, 19,
280 22, 0, 35, 25, 23, 0, 0, 10, 11, 0,
281 0, 30, 31, 29, 0, 0, 9, 7, 28, 36,
282 0, 0, 15, 0, 0, 121, 120, 115, 197, 116,
283 117, 118, 119, 110, 111, 112, 113, 114, 0, 0,
284 122, 0, 0, 27, 189, 33, 0, 9, 0, 333,
285 0, 0, 0, 15, 121, 120, 115, 197, 116, 117,
286 118, 119, 110, 111, 112, 113, 114, 0, 0, 122,
287 0, 99, 109, 0, 27, 9, 33, 0, 332, 0,
288 0, 15, 16, 20, 21, 17, 18, 19, 22, 0,
289 35, 25, 23, 0, 0, 10, 11, 0, 0, 30,
290 31, 29, 27, 0, 33, 7, 28, 36, 121, 120,
291 115, 108, 116, 117, 118, 119, 110, 111, 112, 113,
292 114, 0, 0, 122, 0, 0, 107, 0, 0, 0,
293 0, 0, 229, 121, 120, 115, 197, 116, 117, 118,
294 119, 110, 111, 112, 113, 114, 0, 0, 122, 0,
295 0, 309, 0, 0, 0, 0, 0, 229, 0, 0,
296 0, 0, 0, 9, 0, 0, 0, 0, 0, 15,
297 121, 120, 115, 197, 116, 117, 118, 119, 110, 111,
298 112, 113, 114, 0, 0, 122, 0, 0, 0, 0,
299 27, 0, 33, 0, 326, 121, 120, 115, 197, 116,
300 117, 118, 119, 110, 111, 112, 113, 114, 0, 0,
301 122, 142, 146, 147, 143, 144, 145, 148, 140, 325,
302 121, 120, 115, 197, 116, 117, 118, 119, 110, 111,
303 112, 113, 114, 0, 0, 122, 0, 0, 0, 0,
304 0, 0, 0, 0, 324, 121, 120, 115, 197, 116,
305 117, 118, 119, 110, 111, 112, 113, 114, 0, 0,
306 122, 141, 0, 0, 0, 0, 0, 0, 0, 297,
307 121, 120, 115, 197, 116, 117, 118, 119, 110, 111,
308 112, 113, 114, 0, 0, 122, 0, 0, 0, 0,
309 0, 0, 0, 0, 294, 121, 120, 115, 197, 116,
310 117, 118, 119, 110, 111, 112, 113, 114, 0, 0,
311 122, 0, 0, 0, 0, 0, 0, 0, 0, 292,
312 121, 120, 115, 197, 116, 117, 118, 119, 110, 111,
313 112, 113, 114, 0, 0, 122, 0, 0, 0, 0,
314 0, 0, 0, 0, 291, 121, 120, 115, 197, 116,
315 117, 118, 119, 110, 111, 112, 113, 114, 0, 0,
316 122, 0, 0, 0, 0, 0, 0, 0, 0, 290,
317 121, 120, 115, 197, 116, 117, 118, 119, 110, 111,
318 112, 113, 114, 0, 109, 122, 0, 0, 0, 0,
319 0, 0, 0, 0, 289, 121, 120, 115, 197, 116,
320 117, 118, 119, 110, 111, 112, 113, 114, 109, 0,
321 122, 0, 0, 0, 0, 0, 0, 0, 106, 229,
322 121, 120, 115, 108, 116, 117, 118, 119, 110, 111,
323 112, 113, 114, 0, 0, 122, 0, 0, 107, 0,
324 0, 0, 0, 0, 121, 120, 115, 108, 116, 117,
325 118, 119, 110, 111, 112, 113, 114, 0, 0, 122,
326 0, 0, 107, 121, 120, 115, 197, 116, 117, 118,
327 119, 110, 111, 112, 113, 114, 0, 0, 122, 0,
328 0, 296, 121, 120, 115, 197, 116, 117, 118, 119,
329 110, 111, 112, 113, 114, 0, 0, 122, 0, 0,
330 295, 121, 120, 115, 197, 116, 117, 118, 119, 110,
331 111, 112, 113, 114, 0, 0, 122, 343, 0, 293,
332 121, 120, 115, 197, 116, 117, 118, 119, 110, 111,
333 112, 113, 114, 342, 0, 122, 0, 0, 279, 121,
334 120, 115, 197, 116, 117, 118, 119, 110, 111, 112,
335 113, 114, 330, 0, 122, 0, 0, 277, 0, 0,
336 0, 0, 0, 0, 0, 0, 329, 0, 328, 0,
337 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
338 0, 0, 327, 0, 121, 120, 115, 197, 116, 117,
339 118, 119, 110, 111, 112, 113, 114, 302, 0, 122,
340 121, 120, 115, 197, 116, 117, 118, 119, 110, 111,
341 112, 113, 114, 0, 0, 122, 0, 0, 0, 121,
342 120, 115, 197, 116, 117, 118, 119, 110, 111, 112,
343 113, 114, 0, 0, 122, 121, 120, 115, 197, 116,
344 117, 118, 119, 110, 111, 112, 113, 114, 0, 0,
345 122, 0, 121, 120, 115, 197, 116, 117, 118, 119,
346 110, 111, 112, 113, 114, 0, 0, 122, 121, 120,
347 115, 197, 116, 117, 118, 119, 110, 111, 112, 113,
348 114, 47, 8, 122, 8, 0, 0, 0, 8, 0,
349 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
350 0, 0, 0, 0, 0, 0, 0, 0, 8, 0,
351 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
352 0, 8, 104, 0, 0, 0, 0, 0, 0, 0,
353 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
354 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
355 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
356 0, 0, 0, 0, 8, 0, 0, 0, 0, 0,
357 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
358 0, 0, 0, 8
360 short yypact[] =
362 860,-1000, 948,-1000,-1000, 16, 948, -51, -25,-1000,
363 522, 212,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,
364 -1000,-1000,-1000,-1000, 250,-1000, 948,-1000, -11, 239,
365 196, 511, 149,-1000, 150,-1000, -68,-1000,-1000, 832,
366 339,-1000,1197, 92, 11,-1000, -11,-1000, 327, 327,
367 592, 166, -14,1077, 470, 327, -69, -70, -71, -72,
368 -73, -74, -76, -77, -79, -90, 247,-1000, 113,-1000,
369 55,-1000, 430, 430, 430, 430, 430, 430, 430, 430,
370 430, 149, 801, 327, 239,-1000,-1000, 167, 250, 32,
371 -1000, 257,1445, 41, 327, 166,-1000,-1000, 250,-1000,
372 -1000, 948, 69, -42, -25,1221,-1000, 327, 592, 592,
373 327, 327, 327, 327, 327, 327, 327, 327, 327, 327,
374 327, 327, 327,-1000, 719, 661,-1000, -45, -45, -93,
375 58, 885,-1000,-1000,-1000,-1000,-1000,-1000, 263, 112,
376 -57,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000, 98,
377 -60,-1000, -45, 327, 327, 327, 327, 327, 327,-110,
378 327, 327, 327, -61, 309, 238,-1000,-1000,-1000,-1000,
379 176,-1000, 327,1445, 327, 592, 592, 592, 592, 580,
380 -1000,-1000,-1000, 327, 327, 650, 327,-1000, 250,-1000,
381 1445,-1000,-1000,-1000, 327, 327, 240, 327, 250, 250,
382 1172, -81,-1000,-1000,1445, 33, -5, 35, -43, -43,
383 -45, -45, -45, -26, -26, -26, -26, -26, -83, 684,
384 -45,1316, 327, 166,1297, 327, 166,-1000, 202,-1000,
385 -1000,-1000,-1000, 244,-1000, 233,1147,1122,1097,1072,
386 1278,1047,-1000,1259,1240,1022, 242,-1000, -62,-1000,
387 -80,-1000,1445,1445, 3, 3, 3, 3, 247, 226,
388 3,1445,1445,1445, -14,1445,-1000,1429, 394,-1000,
389 -26,-1000,-1000,-1000, 327, 592, 592, 327, 910, 327,
390 117,-111, -21, 309, 238,-1000,-1000,-1000,-1000,-1000,
391 -1000,-1000,-1000, 327,-1000, 327, 327,-1000, 223, 203,
392 91, 430, 327, 327, -84,1445, 50, 3,1445, 327,
393 1445, 327,-1000, 997, 972, 947,-1000,1412,1396,-1000,
394 327,-1000, 831, 802,-1000,-1000,-1000, 87,-1000, 87,
395 -1000,1445,-1000,-1000, 327,-1000,-1000,-1000,-1000, 327,
396 1377,1361,-1000,-1000
398 short yypgo[] =
400 0, 0, 332,1551, 330, 142, 1, 329, 328, 327,
401 326, 325, 267, 266, 29, 324, 311, 23, 5, 282,
402 3, 4, 2, 298, 295, 288, 147, 67, 286, 284
404 short yyr1[] =
406 0, 23, 23, 23, 13, 13, 12, 12, 12, 12,
407 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
408 12, 24, 24, 24, 24, 3, 10, 25, 25, 26,
409 26, 26, 9, 9, 9, 9, 8, 8, 2, 2,
410 2, 4, 6, 6, 6, 6, 6, 11, 16, 16,
411 16, 16, 16, 16, 16, 16, 16, 16, 28, 16,
412 15, 27, 27, 29, 29, 29, 29, 29, 29, 29,
413 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
414 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
415 19, 19, 20, 20, 20, 5, 5, 5, 7, 7,
416 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
417 14, 14, 17, 17, 17, 17, 17, 17, 17, 17,
418 17, 17, 17, 17, 17, 18, 18, 18, 21, 21,
419 21, 22, 22, 22, 22, 22, 22, 22, 22, 1,
420 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
421 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
422 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
423 1, 1, 1, 1, 1, 1, 1, 1
425 short yyr2[] =
427 0, 1, 0, 1, 1, 2, 2, 3, 3, 4,
428 4, 2, 1, 3, 3, 3, 3, 1, 1, 1,
429 1, 0, 1, 2, 3, 3, 2, 1, 2, 1,
430 2, 2, 10, 7, 10, 7, 4, 3, 1, 3,
431 3, 1, 1, 1, 1, 1, 0, 1, 2, 2,
432 2, 2, 2, 2, 2, 2, 2, 1, 0, 5,
433 1, 2, 0, 2, 1, 1, 2, 1, 2, 2,
434 2, 2, 2, 3, 4, 2, 1, 1, 1, 2,
435 1, 2, 1, 2, 1, 2, 2, 1, 1, 1,
436 1, 2, 1, 2, 2, 1, 4, 6, 1, 3,
437 1, 3, 3, 5, 5, 7, 7, 3, 3, 5,
438 6, 5, 1, 2, 2, 1, 2, 3, 3, 2,
439 3, 3, 1, 2, 2, 4, 4, 3, 2, 2,
440 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
441 1, 1, 3, 3, 3, 3, 3, 2, 2, 3,
442 2, 2, 2, 2, 2, 3, 4, 4, 3, 3,
443 3, 3, 3, 3, 3, 3, 2, 4, 4, 3,
444 4, 4, 6, 4, 3, 6, 6, 4
446 short yychk[] =
448 -1000, -23, -13, 2, -12, -16, -11, 27, -3, 85,
449 17, 18, -10, -9, -8, 91, 4, 7, 8, 9,
450 5, 6, 10, 14, -19, 13, -15, 112, 28, 23,
451 21, 22, -20, 114, -5, 12, 29, -12, 91, -13,
452 110, 91, -1, -14, -5, 74, 28, -3, 102, 101,
453 116, -17, 27, -21, 55, 107, 75, 76, 77, 78,
454 79, 80, 81, 83, 82, 84, 52, 53, -18, 54,
455 -24, 28, -27, -27, -27, -27, -27, -27, -27, -27,
456 -27, -20, -13, 92, -25, -26, -5, 19, 20, -4,
457 28, -2, -1, -5, 116, -17, 32, 32, 116, 109,
458 -12, 91, -14, 27, -3, -1, 91, 111, 96, 57,
459 101, 102, 103, 104, 105, 95, 97, 98, 99, 100,
460 94, 93, 108, 91, 101, 102, 91, -1, -1, -14,
461 -17, -1, 69, 70, 71, 72, 73, 52, 115, -22,
462 11, 54, 4, 7, 8, 9, 5, 6, 10, -22,
463 11, 54, -1, 116, 116, 116, 116, 116, 116, 116,
464 116, 116, 116, 27, -21, 55, -18, 52, 91, 28,
465 111, -29, 31, -1, 85, 37, 38, 39, 40, 41,
466 56, 32, 42, 86, 87, 88, 89, 90, -19, 113,
467 -1, -26, 30, -5, 37, 92, 24, 96, 99, 100,
468 -1, -5, -12, 91, -1, -14, -1, -14, -1, -1,
469 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
470 -1, -1, 116, -17, -1, 116, -17, 117, 111, 117,
471 27, 28, 52, 115, 52, 115, -1, -1, -1, -1,
472 -1, -1, 117, -1, -1, -1, 115, -22, 11, -22,
473 11, 28, -1, -1, -14, -14, -14, -14, 52, 115,
474 -14, -1, -1, -1, 27, -1, -28, -1, -1, 25,
475 -1, -5, -5, 117, 111, 111, 58, 111, -1, 111,
476 -1, -17, 27, -21, 55, 27, 28, 27, 28, 117,
477 117, 117, 117, 111, 117, 111, 111, 117, 115, 115,
478 27, -27, 38, 38, -7, -1, -14, -14, -1, 111,
479 -1, 111, 117, -1, -1, -1, 52, -1, -1, 117,
480 111, 95, -1, -1, 117, 117, 117, 40, 26, 40,
481 26, -1, 117, 117, -6, 101, 102, 103, 104, -6,
482 -1, -1, 26, 26
484 short yydef[] =
486 -2, -2, 1, 3, 4, 0, 0, 0, 0, 12,
487 0, 21, 17, 18, 19, 20, 62, 62, 62, 62,
488 62, 62, 62, 62, 62, 57, 0, 47, 0, 0,
489 0, 0, 90, 60, 92, 95, 0, 5, 6, 0,
490 0, 11, 0, 0, 0, 139, 140, 141, 0, 0,
491 0, 100, 112, 0, 0, 0, 0, 0, 0, 0,
492 0, 0, 0, 0, 0, 0, 0, 115, 122, 130,
493 0, 22, 48, 49, 50, 51, 52, 53, 54, 55,
494 56, 91, 0, 0, 26, 27, 29, 0, 0, 0,
495 41, 0, 38, 0, 0, 0, 94, 93, 0, 7,
496 8, 20, 0, 112, 141, 0, 13, 0, 0, 0,
497 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
498 0, 0, 0, 14, 0, 0, 15, 147, 148, 0,
499 100, 0, 150, 151, 152, 153, 154, 113, 0, 116,
500 138, 128, 131, 132, 133, 134, 135, 136, 137, 119,
501 138, 129, 166, 0, 0, 0, 0, 0, 0, 0,
502 0, 0, 0, 114, 0, 0, 124, 123, 16, 23,
503 0, 61, 64, 65, 67, 0, 0, 0, 0, 0,
504 76, 77, 78, 80, 82, 84, 87, 88, 89, 58,
505 25, 28, 30, 31, 0, 0, 37, 0, 0, 0,
506 0, 0, 9, 10, 102, 0, -2, 0, 142, 143,
507 144, 145, 146, -2, -2, -2, -2, -2, 164, 165,
508 169, 0, 0, 107, 0, 0, 108, 101, 0, 149,
509 127, 155, 117, 0, 120, 0, 0, 0, 0, 0,
510 0, 0, 174, 0, 0, 0, 0, 118, 138, 121,
511 138, 24, 63, 66, 68, 69, 70, 71, 72, 0,
512 75, 79, 81, 83, -2, 86, 62, 0, 0, 36,
513 -2, 39, 40, 96, 0, 0, 0, 0, 0, 0,
514 0, 0, 112, 0, 0, 125, 156, 126, 157, 167,
515 168, 170, 171, 0, 173, 0, 0, 177, 0, 0,
516 73, 59, 0, 0, 0, 98, 0, 111, 103, 0,
517 104, 0, 109, 0, 0, 0, 74, 0, 0, 97,
518 0, 110, 0, 0, 172, 175, 176, 46, 33, 46,
519 35, 99, 105, 106, 0, 42, 43, 44, 45, 0,
520 0, 0, 32, 34
522 short yytok1[] =
524 1, 4, 5, 6, 7, 8, 9, 10, 11, 12,
525 13, 14, 15, 16, 0, 0, 0, 0, 0, 0,
526 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
527 0, 0, 0, 0, 0, 0, 0, 105, 0, 0,
528 116, 117, 103, 101, 111, 102, 115, 104, 0, 0,
529 0, 0, 0, 0, 0, 0, 0, 0, 110, 0,
530 0, 92, 0, 0, 0, 0, 0, 0, 0, 0,
531 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
532 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
533 0, 114, 0, 113, 108, 0, 0, 0, 0, 0,
534 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
535 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
536 0, 0, 0, 112, 0, 109
538 short yytok2[] =
540 2, 3, 0, 0, 0, 0, 0, 0, 0, 0,
541 0, 0, 0, 0, 0, 17, 18, 19, 20, 21,
542 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
543 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
544 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
545 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
546 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
547 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
548 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
549 93, 94, 95, 96, 97, 98, 99, 100, 106, 107
551 long yytok3[] =
555 #define YYFLAG -1000
556 #define YYERROR goto yyerrlab
557 #define YYACCEPT return(0)
558 #define YYABORT return(1)
559 #define yyclearin yychar = -1
560 #define yyerrok yyerrflag = 0
562 #ifdef yydebug
563 #include "y.debug"
564 #else
565 #define yydebug 0
566 char* yytoknames[1]; /* for debugging */
567 char* yystates[1]; /* for debugging */
568 #endif
570 /* parser for yacc output */
572 int yynerrs = 0; /* number of errors */
573 int yyerrflag = 0; /* error recovery flag */
575 char*
576 yytokname(int yyc)
578 static char x[16];
580 if(yyc > 0 && yyc <= sizeof(yytoknames)/sizeof(yytoknames[0]))
581 if(yytoknames[yyc-1])
582 return yytoknames[yyc-1];
583 sprintf(x, "<%d>", yyc);
584 return x;
587 char*
588 yystatname(int yys)
590 static char x[16];
592 if(yys >= 0 && yys < sizeof(yystates)/sizeof(yystates[0]))
593 if(yystates[yys])
594 return yystates[yys];
595 sprintf(x, "<%d>\n", yys);
596 return x;
599 long
600 yylex1(void)
602 long yychar;
603 long *t3p;
604 int c;
606 yychar = yylex();
607 if(yychar <= 0) {
608 c = yytok1[0];
609 goto out;
611 if(yychar < sizeof(yytok1)/sizeof(yytok1[0])) {
612 c = yytok1[yychar];
613 goto out;
615 if(yychar >= YYPRIVATE)
616 if(yychar < YYPRIVATE+sizeof(yytok2)/sizeof(yytok2[0])) {
617 c = yytok2[yychar-YYPRIVATE];
618 goto out;
620 for(t3p=yytok3;; t3p+=2) {
621 c = t3p[0];
622 if(c == yychar) {
623 c = t3p[1];
624 goto out;
626 if(c == 0)
627 break;
629 c = 0;
631 out:
632 if(c == 0)
633 c = yytok2[1]; /* unknown char */
634 if(yydebug >= 3)
635 printf("lex %.4lX %s\n", yychar, yytokname(c));
636 return c;
640 yyparse(void)
642 struct
644 YYSTYPE yyv;
645 int yys;
646 } yys[YYMAXDEPTH], *yyp, *yypt;
647 short *yyxi;
648 int yyj, yym, yystate, yyn, yyg;
649 YYSTYPE save1, save2;
650 int save3, save4;
651 long yychar;
653 save1 = yylval;
654 save2 = yyval;
655 save3 = yynerrs;
656 save4 = yyerrflag;
658 yystate = 0;
659 yychar = -1;
660 yynerrs = 0;
661 yyerrflag = 0;
662 yyp = &yys[-1];
663 goto yystack;
665 ret0:
666 yyn = 0;
667 goto ret;
669 ret1:
670 yyn = 1;
671 goto ret;
673 ret:
674 yylval = save1;
675 yyval = save2;
676 yynerrs = save3;
677 yyerrflag = save4;
678 return yyn;
680 yystack:
681 /* put a state and value onto the stack */
682 if(yydebug >= 4)
683 printf("char %s in %s", yytokname(yychar), yystatname(yystate));
685 yyp++;
686 if(yyp >= &yys[YYMAXDEPTH]) {
687 yyerror("yacc stack overflow");
688 goto ret1;
690 yyp->yys = yystate;
691 yyp->yyv = yyval;
693 yynewstate:
694 yyn = yypact[yystate];
695 if(yyn <= YYFLAG)
696 goto yydefault; /* simple state */
697 if(yychar < 0)
698 yychar = yylex1();
699 yyn += yychar;
700 if(yyn < 0 || yyn >= YYLAST)
701 goto yydefault;
702 yyn = yyact[yyn];
703 if(yychk[yyn] == yychar) { /* valid shift */
704 yychar = -1;
705 yyval = yylval;
706 yystate = yyn;
707 if(yyerrflag > 0)
708 yyerrflag--;
709 goto yystack;
712 yydefault:
713 /* default state action */
714 yyn = yydef[yystate];
715 if(yyn == -2) {
716 if(yychar < 0)
717 yychar = yylex1();
719 /* look through exception table */
720 for(yyxi=yyexca;; yyxi+=2)
721 if(yyxi[0] == -1 && yyxi[1] == yystate)
722 break;
723 for(yyxi += 2;; yyxi += 2) {
724 yyn = yyxi[0];
725 if(yyn < 0 || yyn == yychar)
726 break;
728 yyn = yyxi[1];
729 if(yyn < 0)
730 goto ret0;
732 if(yyn == 0) {
733 /* error ... attempt to resume parsing */
734 switch(yyerrflag) {
735 case 0: /* brand new error */
736 yyerror("syntax error");
737 if(yydebug >= 1) {
738 printf("%s", yystatname(yystate));
739 printf("saw %s\n", yytokname(yychar));
741 yyerrlab:
742 yynerrs++;
744 case 1:
745 case 2: /* incompletely recovered error ... try again */
746 yyerrflag = 3;
748 /* find a state where "error" is a legal shift action */
749 while(yyp >= yys) {
750 yyn = yypact[yyp->yys] + YYERRCODE;
751 if(yyn >= 0 && yyn < YYLAST) {
752 yystate = yyact[yyn]; /* simulate a shift of "error" */
753 if(yychk[yystate] == YYERRCODE)
754 goto yystack;
757 /* the current yyp has no shift onn "error", pop stack */
758 if(yydebug >= 2)
759 printf("error recovery pops state %d, uncovers %d\n",
760 yyp->yys, (yyp-1)->yys );
761 yyp--;
763 /* there is no state on the stack with an error shift ... abort */
764 goto ret1;
766 case 3: /* no shift yet; clobber input char */
767 if(yydebug >= YYEOFCODE)
768 printf("error recovery discards %s\n", yytokname(yychar));
769 if(yychar == YYEOFCODE)
770 goto ret1;
771 yychar = -1;
772 goto yynewstate; /* try again in the same state */
776 /* reduction by production yyn */
777 if(yydebug >= 2)
778 printf("reduce %d in:\n\t%s", yyn, yystatname(yystate));
780 yypt = yyp;
781 yyp -= yyr2[yyn];
782 yyval = (yyp+1)->yyv;
783 yym = yyn;
785 /* consult goto table to find next state */
786 yyn = yyr1[yyn];
787 yyg = yypgo[yyn];
788 yyj = yyg + yyp->yys + 1;
790 if(yyj >= YYLAST || yychk[yystate=yyact[yyj]] != -yyn)
791 yystate = yyact[yyg];
792 switch(yym) {
794 case 3:
795 { ERROR "syntax error" WARNING; } break;
796 case 6:
797 { codegen = 1; makeiattr(0, 0); } break;
798 case 7:
799 { rightthing(yypt[-2].yyv.o, '}'); yyval.o = yypt[-1].yyv.o; } break;
800 case 8:
801 { y.o=yypt[-0].yyv.o; makevar(yypt[-2].yyv.p,PLACENAME,y); yyval.o = yypt[-0].yyv.o; } break;
802 case 9:
803 { y.o=yypt[-0].yyv.o; makevar(yypt[-3].yyv.p,PLACENAME,y); yyval.o = yypt[-0].yyv.o; } break;
804 case 10:
805 { y.o=yypt[-1].yyv.o; makevar(yypt[-3].yyv.p,PLACENAME,y); yyval.o = yypt[-1].yyv.o; } break;
806 case 11:
807 { y.f = yypt[-1].yyv.f; yyval.o = y.o; yyval.o = makenode(PLACE, 0); } break;
808 case 12:
809 { setdir(yypt[-0].yyv.i); yyval.o = makenode(PLACE, 0); } break;
810 case 13:
811 { printexpr(yypt[-1].yyv.f); yyval.o = makenode(PLACE, 0); } break;
812 case 14:
813 { printpos(yypt[-1].yyv.o); yyval.o = makenode(PLACE, 0); } break;
814 case 15:
815 { printf("%s\n", yypt[-1].yyv.p); free(yypt[-1].yyv.p); yyval.o = makenode(PLACE, 0); } break;
816 case 16:
817 { resetvar(); makeiattr(0, 0); yyval.o = makenode(PLACE, 0); } break;
818 case 22:
819 { makevattr(yypt[-0].yyv.p); } break;
820 case 23:
821 { makevattr(yypt[-0].yyv.p); } break;
822 case 24:
823 { makevattr(yypt[-0].yyv.p); } break;
824 case 25:
825 { yyval.f=y.f=yypt[-0].yyv.f; makevar(yypt[-2].yyv.p,VARNAME,y); checkscale(yypt[-2].yyv.p); } break;
826 case 26:
827 { copy(); } break;
828 case 29:
829 { copyfile(yypt[-0].yyv.p); } break;
830 case 30:
831 { copydef(yypt[-0].yyv.st); } break;
832 case 31:
833 { copyuntil(yypt[-0].yyv.p); } break;
834 case 32:
835 { forloop(yypt[-8].yyv.p, yypt[-6].yyv.f, yypt[-4].yyv.f, yypt[-2].yyv.i, yypt[-1].yyv.f, yypt[-0].yyv.p); } break;
836 case 33:
837 { forloop(yypt[-5].yyv.p, yypt[-3].yyv.f, yypt[-1].yyv.f, '+', 1.0, yypt[-0].yyv.p); } break;
838 case 34:
839 { forloop(yypt[-8].yyv.p, yypt[-6].yyv.f, yypt[-4].yyv.f, yypt[-2].yyv.i, yypt[-1].yyv.f, yypt[-0].yyv.p); } break;
840 case 35:
841 { forloop(yypt[-5].yyv.p, yypt[-3].yyv.f, yypt[-1].yyv.f, '+', 1.0, yypt[-0].yyv.p); } break;
842 case 36:
843 { ifstat(yypt[-2].yyv.f, yypt[-1].yyv.p, yypt[-0].yyv.p); } break;
844 case 37:
845 { ifstat(yypt[-1].yyv.f, yypt[-0].yyv.p, (char *) 0); } break;
846 case 39:
847 { yyval.f = strcmp(yypt[-2].yyv.p,yypt[-0].yyv.p) == 0; free(yypt[-2].yyv.p); free(yypt[-0].yyv.p); } break;
848 case 40:
849 { yyval.f = strcmp(yypt[-2].yyv.p,yypt[-0].yyv.p) != 0; free(yypt[-2].yyv.p); free(yypt[-0].yyv.p); } break;
850 case 41:
851 { y.f = 0; makevar(yypt[-0].yyv.p, VARNAME, y); } break;
852 case 42:
853 { yyval.i = '+'; } break;
854 case 43:
855 { yyval.i = '-'; } break;
856 case 44:
857 { yyval.i = '*'; } break;
858 case 45:
859 { yyval.i = '/'; } break;
860 case 46:
861 { yyval.i = ' '; } break;
862 case 47:
863 { yyval.o = leftthing('{'); } break;
864 case 48:
865 { yyval.o = boxgen(); } break;
866 case 49:
867 { yyval.o = circgen(yypt[-1].yyv.i); } break;
868 case 50:
869 { yyval.o = circgen(yypt[-1].yyv.i); } break;
870 case 51:
871 { yyval.o = arcgen(yypt[-1].yyv.i); } break;
872 case 52:
873 { yyval.o = linegen(yypt[-1].yyv.i); } break;
874 case 53:
875 { yyval.o = linegen(yypt[-1].yyv.i); } break;
876 case 54:
877 { yyval.o = linegen(yypt[-1].yyv.i); } break;
878 case 55:
879 { yyval.o = movegen(); } break;
880 case 56:
881 { yyval.o = textgen(); } break;
882 case 57:
883 { yyval.o = troffgen(yypt[-0].yyv.p); } break;
884 case 58:
885 { yyval.o=rightthing(yypt[-2].yyv.o,']'); } break;
886 case 59:
887 { yyval.o = blockgen(yypt[-4].yyv.o, yypt[-1].yyv.o); } break;
888 case 60:
889 { yyval.o = leftthing('['); } break;
890 case 63:
891 { makefattr(yypt[-1].yyv.i, !DEFAULT, yypt[-0].yyv.f); } break;
892 case 64:
893 { makefattr(yypt[-0].yyv.i, DEFAULT, 0.0); } break;
894 case 65:
895 { makefattr(curdir(), !DEFAULT, yypt[-0].yyv.f); } break;
896 case 66:
897 { makefattr(yypt[-1].yyv.i, !DEFAULT, yypt[-0].yyv.f); } break;
898 case 67:
899 { makefattr(yypt[-0].yyv.i, DEFAULT, 0.0); } break;
900 case 68:
901 { makeoattr(yypt[-1].yyv.i, yypt[-0].yyv.o); } break;
902 case 69:
903 { makeoattr(yypt[-1].yyv.i, yypt[-0].yyv.o); } break;
904 case 70:
905 { makeoattr(yypt[-1].yyv.i, yypt[-0].yyv.o); } break;
906 case 71:
907 { makeoattr(yypt[-1].yyv.i, yypt[-0].yyv.o); } break;
908 case 72:
909 { makeiattr(WITH, yypt[-0].yyv.i); } break;
910 case 73:
911 { makeoattr(PLACE, getblock(getlast(1,BLOCK), yypt[-0].yyv.p)); } break;
912 case 74:
913 { makeoattr(PLACE, getpos(getblock(getlast(1,BLOCK), yypt[-1].yyv.p), yypt[-0].yyv.i)); } break;
914 case 75:
915 { makeoattr(PLACE, yypt[-0].yyv.o); } break;
916 case 76:
917 { makeiattr(SAME, yypt[-0].yyv.i); } break;
918 case 77:
919 { maketattr(yypt[-0].yyv.i, (char *) 0); } break;
920 case 78:
921 { makeiattr(HEAD, yypt[-0].yyv.i); } break;
922 case 79:
923 { makefattr(DOT, !DEFAULT, yypt[-0].yyv.f); } break;
924 case 80:
925 { makefattr(DOT, DEFAULT, 0.0); } break;
926 case 81:
927 { makefattr(DASH, !DEFAULT, yypt[-0].yyv.f); } break;
928 case 82:
929 { makefattr(DASH, DEFAULT, 0.0); } break;
930 case 83:
931 { makefattr(CHOP, !DEFAULT, yypt[-0].yyv.f); } break;
932 case 84:
933 { makefattr(CHOP, DEFAULT, 0.0); } break;
934 case 85:
935 { makeattr(CHOP, PLACENAME, getvar(yypt[-0].yyv.p)); } break;
936 case 86:
937 { makefattr(FILL, !DEFAULT, yypt[-0].yyv.f); } break;
938 case 87:
939 { makefattr(FILL, DEFAULT, 0.0); } break;
940 case 88:
941 { makeiattr(NOEDGE, 0); } break;
942 case 92:
943 { maketattr(CENTER, yypt[-0].yyv.p); } break;
944 case 93:
945 { maketattr(yypt[-0].yyv.i, yypt[-1].yyv.p); } break;
946 case 94:
947 { addtattr(yypt[-0].yyv.i); } break;
948 case 96:
949 { yyval.p = sprintgen(yypt[-1].yyv.p); } break;
950 case 97:
951 { yyval.p = sprintgen(yypt[-3].yyv.p); } break;
952 case 98:
953 { exprsave(yypt[-0].yyv.f); yyval.i = 0; } break;
954 case 99:
955 { exprsave(yypt[-0].yyv.f); } break;
956 case 101:
957 { yyval.o = yypt[-1].yyv.o; } break;
958 case 102:
959 { yyval.o = makepos(yypt[-2].yyv.f, yypt[-0].yyv.f); } break;
960 case 103:
961 { yyval.o = fixpos(yypt[-4].yyv.o, yypt[-2].yyv.f, yypt[-0].yyv.f); } break;
962 case 104:
963 { yyval.o = fixpos(yypt[-4].yyv.o, -yypt[-2].yyv.f, -yypt[-0].yyv.f); } break;
964 case 105:
965 { yyval.o = fixpos(yypt[-6].yyv.o, yypt[-3].yyv.f, yypt[-1].yyv.f); } break;
966 case 106:
967 { yyval.o = fixpos(yypt[-6].yyv.o, -yypt[-3].yyv.f, -yypt[-1].yyv.f); } break;
968 case 107:
969 { yyval.o = addpos(yypt[-2].yyv.o, yypt[-0].yyv.o); } break;
970 case 108:
971 { yyval.o = subpos(yypt[-2].yyv.o, yypt[-0].yyv.o); } break;
972 case 109:
973 { yyval.o = makepos(getcomp(yypt[-3].yyv.o,DOTX), getcomp(yypt[-1].yyv.o,DOTY)); } break;
974 case 110:
975 { yyval.o = makebetween(yypt[-5].yyv.f, yypt[-3].yyv.o, yypt[-1].yyv.o); } break;
976 case 111:
977 { yyval.o = makebetween(yypt[-4].yyv.f, yypt[-2].yyv.o, yypt[-0].yyv.o); } break;
978 case 112:
979 { y = getvar(yypt[-0].yyv.p); yyval.o = y.o; } break;
980 case 113:
981 { y = getvar(yypt[-1].yyv.p); yyval.o = getpos(y.o, yypt[-0].yyv.i); } break;
982 case 114:
983 { y = getvar(yypt[-0].yyv.p); yyval.o = getpos(y.o, yypt[-1].yyv.i); } break;
984 case 115:
985 { yyval.o = gethere(); } break;
986 case 116:
987 { yyval.o = getlast(yypt[-1].yyv.i, yypt[-0].yyv.i); } break;
988 case 117:
989 { yyval.o = getpos(getlast(yypt[-2].yyv.i, yypt[-1].yyv.i), yypt[-0].yyv.i); } break;
990 case 118:
991 { yyval.o = getpos(getlast(yypt[-1].yyv.i, yypt[-0].yyv.i), yypt[-2].yyv.i); } break;
992 case 119:
993 { yyval.o = getfirst(yypt[-1].yyv.i, yypt[-0].yyv.i); } break;
994 case 120:
995 { yyval.o = getpos(getfirst(yypt[-2].yyv.i, yypt[-1].yyv.i), yypt[-0].yyv.i); } break;
996 case 121:
997 { yyval.o = getpos(getfirst(yypt[-1].yyv.i, yypt[-0].yyv.i), yypt[-2].yyv.i); } break;
998 case 123:
999 { yyval.o = getpos(yypt[-1].yyv.o, yypt[-0].yyv.i); } break;
1000 case 124:
1001 { yyval.o = getpos(yypt[-0].yyv.o, yypt[-1].yyv.i); } break;
1002 case 125:
1003 { yyval.o = getblock(getlast(yypt[-3].yyv.i,yypt[-2].yyv.i), yypt[-0].yyv.p); } break;
1004 case 126:
1005 { yyval.o = getblock(getfirst(yypt[-3].yyv.i,yypt[-2].yyv.i), yypt[-0].yyv.p); } break;
1006 case 127:
1007 { y = getvar(yypt[-2].yyv.p); yyval.o = getblock(y.o, yypt[-0].yyv.p); } break;
1008 case 128:
1009 { yyval.i = yypt[-1].yyv.i + 1; } break;
1010 case 129:
1011 { yyval.i = yypt[-1].yyv.i; } break;
1012 case 130:
1013 { yyval.i = 1; } break;
1014 case 140:
1015 { yyval.f = getfval(yypt[-0].yyv.p); } break;
1016 case 142:
1017 { yyval.f = yypt[-2].yyv.f + yypt[-0].yyv.f; } break;
1018 case 143:
1019 { yyval.f = yypt[-2].yyv.f - yypt[-0].yyv.f; } break;
1020 case 144:
1021 { yyval.f = yypt[-2].yyv.f * yypt[-0].yyv.f; } break;
1022 case 145:
1023 { if (yypt[-0].yyv.f == 0.0) {
1024 ERROR "division by 0" WARNING; yypt[-0].yyv.f = 1; }
1025 yyval.f = yypt[-2].yyv.f / yypt[-0].yyv.f; } break;
1026 case 146:
1027 { if ((long)yypt[-0].yyv.f == 0) {
1028 ERROR "mod division by 0" WARNING; yypt[-0].yyv.f = 1; }
1029 yyval.f = (long)yypt[-2].yyv.f % (long)yypt[-0].yyv.f; } break;
1030 case 147:
1031 { yyval.f = -yypt[-0].yyv.f; } break;
1032 case 148:
1033 { yyval.f = yypt[-0].yyv.f; } break;
1034 case 149:
1035 { yyval.f = yypt[-1].yyv.f; } break;
1036 case 150:
1037 { yyval.f = getcomp(yypt[-1].yyv.o, yypt[-0].yyv.i); } break;
1038 case 151:
1039 { yyval.f = getcomp(yypt[-1].yyv.o, yypt[-0].yyv.i); } break;
1040 case 152:
1041 { yyval.f = getcomp(yypt[-1].yyv.o, yypt[-0].yyv.i); } break;
1042 case 153:
1043 { yyval.f = getcomp(yypt[-1].yyv.o, yypt[-0].yyv.i); } break;
1044 case 154:
1045 { yyval.f = getcomp(yypt[-1].yyv.o, yypt[-0].yyv.i); } break;
1046 case 155:
1047 { y = getvar(yypt[-2].yyv.p); yyval.f = getblkvar(y.o, yypt[-0].yyv.p); } break;
1048 case 156:
1049 { yyval.f = getblkvar(getlast(yypt[-3].yyv.i,yypt[-2].yyv.i), yypt[-0].yyv.p); } break;
1050 case 157:
1051 { yyval.f = getblkvar(getfirst(yypt[-3].yyv.i,yypt[-2].yyv.i), yypt[-0].yyv.p); } break;
1052 case 158:
1053 { yyval.f = yypt[-2].yyv.f > yypt[-0].yyv.f; } break;
1054 case 159:
1055 { yyval.f = yypt[-2].yyv.f < yypt[-0].yyv.f; } break;
1056 case 160:
1057 { yyval.f = yypt[-2].yyv.f <= yypt[-0].yyv.f; } break;
1058 case 161:
1059 { yyval.f = yypt[-2].yyv.f >= yypt[-0].yyv.f; } break;
1060 case 162:
1061 { yyval.f = yypt[-2].yyv.f == yypt[-0].yyv.f; } break;
1062 case 163:
1063 { yyval.f = yypt[-2].yyv.f != yypt[-0].yyv.f; } break;
1064 case 164:
1065 { yyval.f = yypt[-2].yyv.f && yypt[-0].yyv.f; } break;
1066 case 165:
1067 { yyval.f = yypt[-2].yyv.f || yypt[-0].yyv.f; } break;
1068 case 166:
1069 { yyval.f = !(yypt[-0].yyv.f); } break;
1070 case 167:
1071 { yyval.f = Log10(yypt[-1].yyv.f); } break;
1072 case 168:
1073 { yyval.f = Exp(yypt[-1].yyv.f * log(10.0)); } break;
1074 case 169:
1075 { yyval.f = pow(yypt[-2].yyv.f, yypt[-0].yyv.f); } break;
1076 case 170:
1077 { yyval.f = sin(yypt[-1].yyv.f); } break;
1078 case 171:
1079 { yyval.f = cos(yypt[-1].yyv.f); } break;
1080 case 172:
1081 { yyval.f = atan2(yypt[-3].yyv.f, yypt[-1].yyv.f); } break;
1082 case 173:
1083 { yyval.f = Sqrt(yypt[-1].yyv.f); } break;
1084 case 174:
1085 { yyval.f = (float)rand() / 32767.0; /* might be 2^31-1 */ } break;
1086 case 175:
1087 { yyval.f = yypt[-3].yyv.f >= yypt[-1].yyv.f ? yypt[-3].yyv.f : yypt[-1].yyv.f; } break;
1088 case 176:
1089 { yyval.f = yypt[-3].yyv.f <= yypt[-1].yyv.f ? yypt[-3].yyv.f : yypt[-1].yyv.f; } break;
1090 case 177:
1091 { yyval.f = (long) yypt[-1].yyv.f; } break;
1093 goto yystack; /* stack new state and value */