te: prevent tbl from dropping the last character of a file
[troff.git] / eqn / eqn.c
blobff2defed9ede8c192141f516c9e09d5166718928
1 #define CONTIG 57346
2 #define QTEXT 57347
3 #define SPACE 57348
4 #define THIN 57349
5 #define TAB 57350
6 #define MATRIX 57351
7 #define LCOL 57352
8 #define CCOL 57353
9 #define RCOL 57354
10 #define COL 57355
11 #define ABOVE 57356
12 #define MARK 57357
13 #define LINEUP 57358
14 #define SUM 57359
15 #define INT 57360
16 #define PROD 57361
17 #define UNION 57362
18 #define INTER 57363
19 #define DEFINE 57364
20 #define TDEFINE 57365
21 #define NDEFINE 57366
22 #define DELIM 57367
23 #define GSIZE 57368
24 #define GFONT 57369
25 #define INCLUDE 57370
26 #define IFDEF 57371
27 #define DOTEQ 57372
28 #define DOTEN 57373
29 #define FROM 57374
30 #define TO 57375
31 #define OVER 57376
32 #define SQRT 57377
33 #define SUP 57378
34 #define SUB 57379
35 #define SIZE 57380
36 #define FONT 57381
37 #define ROMAN 57382
38 #define ITALIC 57383
39 #define BOLD 57384
40 #define FAT 57385
41 #define UP 57386
42 #define DOWN 57387
43 #define BACK 57388
44 #define FWD 57389
45 #define LEFT 57390
46 #define RIGHT 57391
47 #define DOT 57392
48 #define DOTDOT 57393
49 #define HAT 57394
50 #define TILDE 57395
51 #define BAR 57396
52 #define LOWBAR 57397
53 #define HIGHBAR 57398
54 #define UNDER 57399
55 #define VEC 57400
56 #define DYAD 57401
57 #define UTILDE 57402
59 #line 17 "eqn.y"
60 #include "e.h"
62 int yylex(void);
63 extern int yyerrflag;
64 #ifndef YYMAXDEPTH
65 #define YYMAXDEPTH 150
66 #endif
67 #ifndef YYSTYPE
68 #define YYSTYPE int
69 #endif
70 YYSTYPE yylval;
71 YYSTYPE yyval;
72 #define YYEOFCODE 1
73 #define YYERRCODE 2
75 #line 140 "eqn.y"
77 static const short yyexca[] =
78 {-1, 0,
79 1, 3,
80 -2, 0,
81 -1, 1,
82 1, -1,
83 -2, 0,
85 #define YYNPROD 90
86 #define YYPRIVATE 57344
87 #define YYLAST 469
88 static const short yyact[] =
90 4, 103, 119, 45, 27, 118, 104, 2, 102, 41,
91 42, 43, 44, 65, 80, 81, 79, 66, 67, 68,
92 69, 70, 50, 49, 74, 75, 76, 77, 105, 73,
93 40, 80, 81, 80, 81, 114, 61, 64, 54, 62,
94 57, 58, 59, 60, 55, 56, 63, 78, 91, 92,
95 82, 26, 83, 85, 86, 87, 88, 90, 51, 52,
96 48, 124, 50, 49, 117, 25, 45, 117, 72, 71,
97 80, 81, 113, 24, 45, 23, 61, 64, 54, 62,
98 57, 58, 59, 60, 55, 56, 63, 53, 89, 100,
99 84, 22, 96, 95, 106, 107, 108, 109, 99, 110,
100 111, 41, 42, 43, 44, 45, 98, 115, 21, 94,
101 93, 18, 130, 123, 17, 116, 121, 46, 112, 125,
102 127, 128, 1, 129, 126, 0, 0, 45, 8, 7,
103 9, 10, 11, 28, 41, 42, 43, 44, 0, 16,
104 47, 12, 34, 13, 14, 15, 61, 64, 54, 62,
105 57, 58, 59, 60, 55, 56, 63, 0, 0, 20,
106 0, 0, 29, 33, 30, 31, 32, 19, 37, 39,
107 38, 36, 35, 0, 0, 0, 0, 0, 0, 0,
108 0, 0, 0, 0, 0, 6, 97, 8, 7, 9,
109 10, 11, 28, 41, 42, 43, 44, 0, 16, 47,
110 12, 34, 13, 14, 15, 0, 0, 0, 0, 0,
111 0, 0, 0, 0, 0, 0, 0, 0, 20, 0,
112 0, 29, 33, 30, 31, 32, 19, 37, 39, 38,
113 36, 35, 101, 0, 0, 0, 0, 0, 0, 0,
114 0, 0, 0, 3, 6, 8, 7, 9, 10, 11,
115 28, 41, 42, 43, 44, 0, 16, 5, 12, 34,
116 13, 14, 15, 0, 0, 0, 0, 0, 0, 0,
117 0, 0, 0, 0, 0, 0, 20, 0, 0, 29,
118 33, 30, 31, 32, 19, 37, 39, 38, 36, 35,
119 0, 0, 8, 7, 9, 10, 11, 28, 41, 42,
120 43, 44, 6, 16, 47, 12, 34, 13, 14, 15,
121 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
122 0, 0, 0, 20, 0, 0, 29, 33, 30, 31,
123 32, 19, 37, 39, 38, 36, 35, 0, 0, 8,
124 7, 9, 10, 11, 28, 41, 42, 43, 44, 6,
125 16, 5, 12, 34, 13, 14, 15, 0, 0, 0,
126 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
127 20, 0, 0, 29, 33, 30, 31, 32, 19, 37,
128 39, 38, 36, 35, 8, 7, 9, 10, 11, 28,
129 41, 42, 43, 44, 0, 16, 6, 12, 34, 13,
130 14, 15, 0, 0, 0, 0, 0, 0, 0, 0,
131 0, 0, 0, 0, 0, 20, 0, 0, 29, 33,
132 30, 31, 32, 19, 37, 39, 38, 36, 35, 51,
133 122, 48, 0, 50, 49, 0, 0, 0, 0, 0,
134 0, 6, 0, 0, 120, 49, 0, 61, 64, 54,
135 62, 57, 58, 59, 60, 55, 56, 63, 61, 64,
136 54, 62, 57, 58, 59, 60, 55, 56, 63
138 static const short yypact[] =
140 241,-1000, 288,-1000, 26,-1000, 335,-1000,-1000,-1000,
141 -1000,-1000,-1000,-1000,-1000,-1000, 380, 380, 380, 380,
142 380, 32, 335, 380, 380, 380, 380,-1000,-1000, 66,
143 -1000,-1000,-1000, 66,-1000, 29, 66, 66, 66, 66,
144 27,-1000,-1000,-1000,-1000, 26,-1000, 380, 380,-1000,
145 -1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,
146 -1000,-1000,-1000,-1000,-1000, 124, 26, 96, 96, 96,
147 -14,-1000,-1000, 183, 96, 96, 96, 96, -53,-1000,
148 -1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000, 335,
149 -1000, 26, -14, 380, 380, 380, 380,-1000, 380, 380,
150 -1000, 10, 91, 53, 288, -56, 408, -14, 397, 26,
151 408, -14,-1000,-1000, -1,-1000,-1000, 335, 335,-1000,
152 380,-1000, 380,-1000,-1000,-1000, 288, 50, -14, 26,
153 -1000
155 static const short yypgo[] =
157 0, 122, 6, 0, 117, 2, 116, 114, 111, 110,
158 109, 108, 106, 98, 93, 92, 91, 89, 87, 75,
159 73, 65, 51, 4, 47, 35, 16, 30, 1, 28
161 static const short yyr1[] =
163 0, 1, 1, 1, 2, 2, 2, 2, 4, 5,
164 5, 6, 6, 3, 3, 3, 3, 3, 3, 3,
165 3, 3, 3, 3, 3, 3, 3, 3, 3, 9,
166 3, 10, 3, 12, 3, 13, 3, 3, 14, 3,
167 15, 3, 3, 3, 3, 3, 3, 3, 3, 3,
168 24, 3, 11, 19, 20, 21, 22, 18, 18, 18,
169 18, 18, 18, 18, 18, 18, 18, 18, 16, 16,
170 17, 17, 25, 25, 23, 29, 23, 27, 27, 27,
171 27, 28, 28, 7, 8, 8, 8, 8, 26, 26
173 static const short yyr2[] =
175 0, 1, 1, 0, 1, 2, 2, 1, 2, 2,
176 0, 2, 0, 3, 1, 1, 1, 1, 1, 1,
177 1, 1, 1, 3, 2, 2, 2, 2, 2, 0,
178 5, 0, 4, 0, 5, 0, 4, 1, 0, 5,
179 0, 4, 3, 2, 2, 2, 2, 2, 2, 1,
180 0, 5, 1, 2, 2, 2, 2, 1, 1, 1,
181 1, 1, 1, 1, 1, 1, 1, 1, 2, 2,
182 2, 2, 1, 2, 4, 0, 6, 1, 1, 1,
183 1, 1, 3, 2, 1, 1, 1, 2, 1, 1
185 static const short yychk[] =
187 -1000, -1, -2, 2, -3, 16, 61, 5, 4, 6,
188 7, 8, 17, 19, 20, 21, 15, -7, -8, 43,
189 35, -11, -16, -19, -20, -21, -22, -23, 9, 38,
190 40, 41, 42, 39, 18, 48, 47, 44, 46, 45,
191 -27, 10, 11, 12, 13, -3, -4, 16, 34, 37,
192 36, 32, 33, -18, 52, 58, 59, 54, 55, 56,
193 57, 50, 53, 60, 51, -2, -3, -3, -3, -3,
194 -3, 37, 36, -2, -3, -3, -3, -3, -24, -26,
195 4, 5, -26, -26, 61, -26, -26, -26, -26, 61,
196 -26, -3, -3, -9, -10, -14, -15, 62, -12, -13,
197 -17, 49, 61, -28, -2, -29, -3, -3, -3, -3,
198 -3, -3, -26, 62, -25, -23, 62, 14, 61, -5,
199 36, -6, 33, -5, 62, -23, -2, -28, -3, -3,
202 static const short yydef[] =
204 -2, -2, 1, 2, 4, 7, 0, 14, 15, 16,
205 17, 18, 19, 20, 21, 22, 0, 0, 0, 0,
206 0, 37, 0, 0, 0, 0, 0, 49, 50, 0,
207 84, 85, 86, 0, 52, 0, 0, 0, 0, 0,
208 0, 77, 78, 79, 80, 5, 6, 0, 0, 29,
209 31, 38, 40, 44, 57, 58, 59, 60, 61, 62,
210 63, 64, 65, 66, 67, 0, 24, 25, 26, 27,
211 28, 33, 35, 43, 45, 46, 47, 48, 0, 83,
212 88, 89, 87, 68, 69, 53, 54, 55, 56, 0,
213 75, 8, 23, 0, 0, 0, 0, 13, 0, 0,
214 42, 0, 0, 0, 81, 0, 10, 32, 12, 41,
215 10, 36, 70, 71, 0, 72, 74, 0, 0, 30,
216 0, 39, 0, 34, 51, 73, 82, 0, 9, 11,
219 static const short yytok1[] =
221 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
222 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
223 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
224 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
225 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
226 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
227 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
228 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
229 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
230 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
231 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
232 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
233 0, 0, 0, 61, 0, 62
235 static const short yytok2[] =
237 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
238 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
239 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
240 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
241 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
242 52, 53, 54, 55, 56, 57, 58, 59, 60
244 static const long yytok3[] =
248 #define YYFLAG -1000
249 #define YYERROR goto yyerrlab
250 #define YYACCEPT return(0)
251 #define YYABORT return(1)
252 #define yyclearin yychar = -1
253 #define yyerrok yyerrflag = 0
255 #ifdef yydebug
256 #include "y.debug"
257 #else
258 #define yydebug 0
259 static const char* yytoknames[1]; /* for debugging */
260 static const char* yystates[1]; /* for debugging */
261 #endif
263 /* parser for yacc output */
264 #ifdef YYARG
265 #define yynerrs yyarg->yynerrs
266 #define yyerrflag yyarg->yyerrflag
267 #define yyval yyarg->yyval
268 #define yylval yyarg->yylval
269 #else
270 int yynerrs = 0; /* number of errors */
271 int yyerrflag = 0; /* error recovery flag */
272 #endif
274 static const char*
275 yytokname(int yyc)
277 static char x[10];
279 if(yyc > 0 && yyc <= sizeof(yytoknames)/sizeof(yytoknames[0]))
280 if(yytoknames[yyc-1])
281 return yytoknames[yyc-1];
282 sprintf(x, "<%d>", yyc);
283 return x;
286 static const char*
287 yystatname(int yys)
289 static char x[10];
291 if(yys >= 0 && yys < sizeof(yystates)/sizeof(yystates[0]))
292 if(yystates[yys])
293 return yystates[yys];
294 sprintf(x, "<%d>\n", yys);
295 return x;
298 static long
299 #ifdef YYARG
300 yylex1(struct Yyarg *yyarg)
301 #else
302 yylex1(void)
303 #endif
305 long yychar;
306 const long *t3p;
307 int c;
309 #ifdef YYARG
310 yychar = yylex(yyarg);
311 #else
312 yychar = yylex();
313 #endif
314 if(yychar <= 0) {
315 c = yytok1[0];
316 goto out;
318 if(yychar < sizeof(yytok1)/sizeof(yytok1[0])) {
319 c = yytok1[yychar];
320 goto out;
322 if(yychar >= YYPRIVATE)
323 if(yychar < YYPRIVATE+sizeof(yytok2)/sizeof(yytok2[0])) {
324 c = yytok2[yychar-YYPRIVATE];
325 goto out;
327 for(t3p=yytok3;; t3p+=2) {
328 c = t3p[0];
329 if(c == yychar) {
330 c = t3p[1];
331 goto out;
333 if(c == 0)
334 break;
336 c = 0;
338 out:
339 if(c == 0)
340 c = yytok2[1]; /* unknown char */
341 if(yydebug >= 3)
342 fprintf(stderr, "lex %.4lux %s\n", yychar, yytokname(c));
343 return c;
347 #ifdef YYARG
348 yyparse(struct Yyarg *yyarg)
349 #else
350 yyparse(void)
351 #endif
353 struct
355 YYSTYPE yyv;
356 int yys;
357 } yys[YYMAXDEPTH], *yyp, *yypt;
358 const short *yyxi;
359 int yyj, yym, yystate, yyn, yyg;
360 long yychar;
361 #ifndef YYARG
362 YYSTYPE save1, save2;
363 int save3, save4;
365 save1 = yylval;
366 save2 = yyval;
367 save3 = yynerrs;
368 save4 = yyerrflag;
369 #endif
371 yystate = 0;
372 yychar = -1;
373 yynerrs = 0;
374 yyerrflag = 0;
375 yyp = &yys[-1];
376 goto yystack;
378 ret0:
379 yyn = 0;
380 goto ret;
382 ret1:
383 yyn = 1;
384 goto ret;
386 ret:
387 #ifndef YYARG
388 yylval = save1;
389 yyval = save2;
390 yynerrs = save3;
391 yyerrflag = save4;
392 #endif
393 return yyn;
395 yystack:
396 /* put a state and value onto the stack */
397 if(yydebug >= 4)
398 fprintf(stderr, "char %s in %s", yytokname(yychar), yystatname(yystate));
400 yyp++;
401 if(yyp >= &yys[YYMAXDEPTH]) {
402 yyerror("yacc stack overflow");
403 goto ret1;
405 yyp->yys = yystate;
406 yyp->yyv = yyval;
408 yynewstate:
409 yyn = yypact[yystate];
410 if(yyn <= YYFLAG)
411 goto yydefault; /* simple state */
412 if(yychar < 0)
413 #ifdef YYARG
414 yychar = yylex1(yyarg);
415 #else
416 yychar = yylex1();
417 #endif
418 yyn += yychar;
419 if(yyn < 0 || yyn >= YYLAST)
420 goto yydefault;
421 yyn = yyact[yyn];
422 if(yychk[yyn] == yychar) { /* valid shift */
423 yychar = -1;
424 yyval = yylval;
425 yystate = yyn;
426 if(yyerrflag > 0)
427 yyerrflag--;
428 goto yystack;
431 yydefault:
432 /* default state action */
433 yyn = yydef[yystate];
434 if(yyn == -2) {
435 if(yychar < 0)
436 #ifdef YYARG
437 yychar = yylex1(yyarg);
438 #else
439 yychar = yylex1();
440 #endif
442 /* look through exception table */
443 for(yyxi=yyexca;; yyxi+=2)
444 if(yyxi[0] == -1 && yyxi[1] == yystate)
445 break;
446 for(yyxi += 2;; yyxi += 2) {
447 yyn = yyxi[0];
448 if(yyn < 0 || yyn == yychar)
449 break;
451 yyn = yyxi[1];
452 if(yyn < 0)
453 goto ret0;
455 if(yyn == 0) {
456 /* error ... attempt to resume parsing */
457 switch(yyerrflag) {
458 case 0: /* brand new error */
459 yyerror("syntax error");
460 if(yydebug >= 1) {
461 fprintf(stderr, "%s", yystatname(yystate));
462 fprintf(stderr, "saw %s\n", yytokname(yychar));
464 goto yyerrlab;
465 yyerrlab:
466 yynerrs++;
468 case 1:
469 case 2: /* incompletely recovered error ... try again */
470 yyerrflag = 3;
472 /* find a state where "error" is a legal shift action */
473 while(yyp >= yys) {
474 yyn = yypact[yyp->yys] + YYERRCODE;
475 if(yyn >= 0 && yyn < YYLAST) {
476 yystate = yyact[yyn]; /* simulate a shift of "error" */
477 if(yychk[yystate] == YYERRCODE)
478 goto yystack;
481 /* the current yyp has no shift onn "error", pop stack */
482 if(yydebug >= 2)
483 fprintf(stderr, "error recovery pops state %d, uncovers %d\n",
484 yyp->yys, (yyp-1)->yys );
485 yyp--;
487 /* there is no state on the stack with an error shift ... abort */
488 goto ret1;
490 case 3: /* no shift yet; clobber input char */
491 if(yydebug >= 2)
492 fprintf(stderr, "error recovery discards %s\n", yytokname(yychar));
493 if(yychar == YYEOFCODE)
494 goto ret1;
495 yychar = -1;
496 goto yynewstate; /* try again in the same state */
500 /* reduction by production yyn */
501 if(yydebug >= 2)
502 fprintf(stderr, "reduce %d in:\n\t%s", yyn, yystatname(yystate));
504 yypt = yyp;
505 yyp -= yyr2[yyn];
506 yyval = (yyp+1)->yyv;
507 yym = yyn;
509 /* consult goto table to find next state */
510 yyn = yyr1[yyn];
511 yyg = yypgo[yyn];
512 yyj = yyg + yyp->yys + 1;
514 if(yyj >= YYLAST || yychk[yystate=yyact[yyj]] != -yyn)
515 yystate = yyact[yyg];
516 switch(yym) {
518 case 1:
519 #line 24 "eqn.y"
520 { putout(yypt[-0].yyv); } break;
521 case 2:
522 #line 25 "eqn.y"
523 { ERROR "syntax error" WARNING; } break;
524 case 3:
525 #line 26 "eqn.y"
526 { eqnreg = 0; } break;
527 case 5:
528 #line 30 "eqn.y"
529 { eqnbox(yypt[-1].yyv, yypt[-0].yyv, 0); } break;
530 case 6:
531 #line 31 "eqn.y"
532 { eqnbox(yypt[-1].yyv, yypt[-0].yyv, 1); } break;
533 case 7:
534 #line 32 "eqn.y"
535 { lineup(0); } break;
536 case 8:
537 #line 35 "eqn.y"
538 { yyval = yypt[-0].yyv; lineup(1); } break;
539 case 9:
540 #line 38 "eqn.y"
541 { yyval = yypt[-0].yyv; } break;
542 case 10:
543 #line 39 "eqn.y"
544 { yyval = 0; } break;
545 case 11:
546 #line 42 "eqn.y"
547 { yyval = yypt[-0].yyv; } break;
548 case 12:
549 #line 43 "eqn.y"
550 { yyval = 0; } break;
551 case 13:
552 #line 46 "eqn.y"
553 { yyval = yypt[-1].yyv; } break;
554 case 14:
555 #line 47 "eqn.y"
556 { text(QTEXT, (char *) yypt[-0].yyv); } break;
557 case 15:
558 #line 48 "eqn.y"
559 { text(CONTIG, (char *) yypt[-0].yyv); } break;
560 case 16:
561 #line 49 "eqn.y"
562 { text(SPACE, (char *) 0); } break;
563 case 17:
564 #line 50 "eqn.y"
565 { text(THIN, (char *) 0); } break;
566 case 18:
567 #line 51 "eqn.y"
568 { text(TAB, (char *) 0); } break;
569 case 19:
570 #line 52 "eqn.y"
571 { funny(SUM); } break;
572 case 20:
573 #line 53 "eqn.y"
574 { funny(PROD); } break;
575 case 21:
576 #line 54 "eqn.y"
577 { funny(UNION); } break;
578 case 22:
579 #line 55 "eqn.y"
580 { funny(INTER); } break;
581 case 23:
582 #line 56 "eqn.y"
583 { boverb(yypt[-2].yyv, yypt[-0].yyv); } break;
584 case 24:
585 #line 57 "eqn.y"
586 { mark(yypt[-0].yyv); } break;
587 case 25:
588 #line 58 "eqn.y"
589 { size(yypt[-1].yyv, yypt[-0].yyv); } break;
590 case 26:
591 #line 59 "eqn.y"
592 { font(yypt[-1].yyv, yypt[-0].yyv); } break;
593 case 27:
594 #line 60 "eqn.y"
595 { fatbox(yypt[-0].yyv); } break;
596 case 28:
597 #line 61 "eqn.y"
598 { sqrt(yypt[-0].yyv); } break;
599 case 29:
600 #line 62 "eqn.y"
601 {ps -= deltaps;} break;
602 case 30:
603 #line 62 "eqn.y"
604 { subsup(yypt[-4].yyv, yypt[-1].yyv, yypt[-0].yyv); } break;
605 case 31:
606 #line 63 "eqn.y"
607 {ps -= deltaps;} break;
608 case 32:
609 #line 63 "eqn.y"
610 { subsup(yypt[-3].yyv, 0, yypt[-0].yyv); } break;
611 case 33:
612 #line 64 "eqn.y"
613 {ps -= deltaps;} break;
614 case 34:
615 #line 64 "eqn.y"
616 { integral(yypt[-4].yyv, yypt[-1].yyv, yypt[-0].yyv); } break;
617 case 35:
618 #line 65 "eqn.y"
619 {ps -= deltaps;} break;
620 case 36:
621 #line 65 "eqn.y"
622 { integral(yypt[-3].yyv, 0, yypt[-0].yyv); } break;
623 case 37:
624 #line 66 "eqn.y"
625 { integral(yypt[-0].yyv, 0, 0); } break;
626 case 38:
627 #line 67 "eqn.y"
628 {ps -= deltaps;} break;
629 case 39:
630 #line 67 "eqn.y"
631 { fromto(yypt[-4].yyv, yypt[-1].yyv, yypt[-0].yyv); } break;
632 case 40:
633 #line 68 "eqn.y"
634 {ps -= deltaps;} break;
635 case 41:
636 #line 68 "eqn.y"
637 { fromto(yypt[-3].yyv, 0, yypt[-0].yyv); } break;
638 case 42:
639 #line 69 "eqn.y"
640 { paren(yypt[-2].yyv, yypt[-1].yyv, yypt[-0].yyv); } break;
641 case 43:
642 #line 70 "eqn.y"
643 { paren(yypt[-1].yyv, yypt[-0].yyv, 0); } break;
644 case 44:
645 #line 71 "eqn.y"
646 { diacrit(yypt[-1].yyv, yypt[-0].yyv); } break;
647 case 45:
648 #line 72 "eqn.y"
649 { move(FWD, yypt[-1].yyv, yypt[-0].yyv); } break;
650 case 46:
651 #line 73 "eqn.y"
652 { move(UP, yypt[-1].yyv, yypt[-0].yyv); } break;
653 case 47:
654 #line 74 "eqn.y"
655 { move(BACK, yypt[-1].yyv, yypt[-0].yyv); } break;
656 case 48:
657 #line 75 "eqn.y"
658 { move(DOWN, yypt[-1].yyv, yypt[-0].yyv); } break;
659 case 49:
660 #line 76 "eqn.y"
661 { pile(yypt[-0].yyv); ct = yypt[-0].yyv; } break;
662 case 50:
663 #line 77 "eqn.y"
664 {yyval=ct;} break;
665 case 51:
666 #line 77 "eqn.y"
667 { matrix(yypt[-3].yyv); ct = yypt[-3].yyv; } break;
668 case 52:
669 #line 80 "eqn.y"
670 { setintegral(); } break;
671 case 53:
672 #line 83 "eqn.y"
673 { yyval = atoi((char *) yypt[-1].yyv); } break;
674 case 54:
675 #line 84 "eqn.y"
676 { yyval = atoi((char *) yypt[-1].yyv); } break;
677 case 55:
678 #line 85 "eqn.y"
679 { yyval = atoi((char *) yypt[-1].yyv); } break;
680 case 56:
681 #line 86 "eqn.y"
682 { yyval = atoi((char *) yypt[-1].yyv); } break;
683 case 57:
684 #line 88 "eqn.y"
685 { yyval = HAT; } break;
686 case 58:
687 #line 89 "eqn.y"
688 { yyval = VEC; } break;
689 case 59:
690 #line 90 "eqn.y"
691 { yyval = DYAD; } break;
692 case 60:
693 #line 91 "eqn.y"
694 { yyval = BAR; } break;
695 case 61:
696 #line 92 "eqn.y"
697 { yyval = LOWBAR; } break;
698 case 62:
699 #line 93 "eqn.y"
700 { yyval = HIGHBAR; } break;
701 case 63:
702 #line 94 "eqn.y"
703 { yyval = UNDER; } break;
704 case 64:
705 #line 95 "eqn.y"
706 { yyval = DOT; } break;
707 case 65:
708 #line 96 "eqn.y"
709 { yyval = TILDE; } break;
710 case 66:
711 #line 97 "eqn.y"
712 { yyval = UTILDE; } break;
713 case 67:
714 #line 98 "eqn.y"
715 { yyval = DOTDOT; } break;
716 case 68:
717 #line 101 "eqn.y"
718 { yyval = ((char *)yypt[-0].yyv)[0]; } break;
719 case 69:
720 #line 102 "eqn.y"
721 { yyval = '{'; } break;
722 case 70:
723 #line 105 "eqn.y"
724 { yyval = ((char *)yypt[-0].yyv)[0]; } break;
725 case 71:
726 #line 106 "eqn.y"
727 { yyval = '}'; } break;
728 case 74:
729 #line 113 "eqn.y"
730 { column(yypt[-3].yyv, DEFGAP); } break;
731 case 75:
732 #line 114 "eqn.y"
733 {yyval=atoi((char*)yypt[-0].yyv);} break;
734 case 76:
735 #line 114 "eqn.y"
736 { column(yypt[-5].yyv, yypt[-3].yyv); } break;
737 case 77:
738 #line 117 "eqn.y"
739 { yyval = startcol(LCOL); } break;
740 case 78:
741 #line 118 "eqn.y"
742 { yyval = startcol(CCOL); } break;
743 case 79:
744 #line 119 "eqn.y"
745 { yyval = startcol(RCOL); } break;
746 case 80:
747 #line 120 "eqn.y"
748 { yyval = startcol(COL); } break;
749 case 81:
750 #line 123 "eqn.y"
751 { lp[ct++] = yypt[-0].yyv; } break;
752 case 82:
753 #line 124 "eqn.y"
754 { lp[ct++] = yypt[-0].yyv; } break;
755 case 83:
756 #line 127 "eqn.y"
757 { yyval = ps; setsize((char *) yypt[-0].yyv); } break;
758 case 84:
759 #line 130 "eqn.y"
760 { static char R[]="R"; setfont(R); } break;
761 case 85:
762 #line 131 "eqn.y"
763 { static char I[]="I"; setfont(I); } break;
764 case 86:
765 #line 132 "eqn.y"
766 { static char B[]="B"; setfont(B); } break;
767 case 87:
768 #line 133 "eqn.y"
769 { setfont((char *)yypt[-0].yyv); } break;
771 goto yystack; /* stack new state and value */