Subversion Repositories planix.SVN

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 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
58
 
59
#line	17	"/sys/src/cmd/eqn/eqn.y"
60
#include "e.h"
61
 
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
74
 
75
#line	140	"/sys/src/cmd/eqn/eqn.y"
76
 
77
short	yyexca[] =
78
{-1, 0,
79
	1, 3,
80
	-2, 0,
81
-1, 1,
82
	1, -1,
83
	-2, 0,
84
};
85
#define	YYNPROD	90
86
#define	YYPRIVATE 57344
87
#define	YYLAST	469
88
short	yyact[] =
89
{
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
137
};
138
short	yypact[] =
139
{
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
154
};
155
short	yypgo[] =
156
{
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
160
};
161
short	yyr1[] =
162
{
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
172
};
173
short	yyr2[] =
174
{
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
184
};
185
short	yychk[] =
186
{
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,
200
  62
201
};
202
short	yydef[] =
203
{
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,
217
  76
218
};
219
short	yytok1[] =
220
{
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
234
};
235
short	yytok2[] =
236
{
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
243
};
244
long	yytok3[] =
245
{
246
 
247
};
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
254
 
255
#ifdef	yydebug
256
#include	"y.debug"
257
#else
258
#define	yydebug		0
259
char*	yytoknames[1];		/* for debugging */
260
char*	yystates[1];		/* for debugging */
261
#endif
262
 
263
/*	parser for yacc output	*/
264
 
265
int	yynerrs = 0;		/* number of errors */
266
int	yyerrflag = 0;		/* error recovery flag */
267
 
268
char*
269
yytokname(int yyc)
270
{
271
	static char x[16];
272
 
273
	if(yyc > 0 && yyc <= sizeof(yytoknames)/sizeof(yytoknames[0]))
274
	if(yytoknames[yyc-1])
275
		return yytoknames[yyc-1];
276
	sprintf(x, "<%d>", yyc);
277
	return x;
278
}
279
 
280
char*
281
yystatname(int yys)
282
{
283
	static char x[16];
284
 
285
	if(yys >= 0 && yys < sizeof(yystates)/sizeof(yystates[0]))
286
	if(yystates[yys])
287
		return yystates[yys];
288
	sprintf(x, "<%d>\n", yys);
289
	return x;
290
}
291
 
292
long
293
yylex1(void)
294
{
295
	long yychar;
296
	long *t3p;
297
	int c;
298
 
299
	yychar = yylex();
300
	if(yychar <= 0) {
301
		c = yytok1[0];
302
		goto out;
303
	}
304
	if(yychar < sizeof(yytok1)/sizeof(yytok1[0])) {
305
		c = yytok1[yychar];
306
		goto out;
307
	}
308
	if(yychar >= YYPRIVATE)
309
		if(yychar < YYPRIVATE+sizeof(yytok2)/sizeof(yytok2[0])) {
310
			c = yytok2[yychar-YYPRIVATE];
311
			goto out;
312
		}
313
	for(t3p=yytok3;; t3p+=2) {
314
		c = t3p[0];
315
		if(c == yychar) {
316
			c = t3p[1];
317
			goto out;
318
		}
319
		if(c == 0)
320
			break;
321
	}
322
	c = 0;
323
 
324
out:
325
	if(c == 0)
326
		c = yytok2[1];	/* unknown char */
327
	if(yydebug >= 3)
328
		printf("lex %.4lX %s\n", yychar, yytokname(c));
329
	return c;
330
}
331
 
332
int
333
yyparse(void)
334
{
335
	struct
336
	{
337
		YYSTYPE	yyv;
338
		int	yys;
339
	} yys[YYMAXDEPTH], *yyp, *yypt;
340
	short *yyxi;
341
	int yyj, yym, yystate, yyn, yyg;
342
	YYSTYPE save1, save2;
343
	int save3, save4;
344
	long yychar;
345
 
346
	save1 = yylval;
347
	save2 = yyval;
348
	save3 = yynerrs;
349
	save4 = yyerrflag;
350
 
351
	yystate = 0;
352
	yychar = -1;
353
	yynerrs = 0;
354
	yyerrflag = 0;
355
	yyp = &yys[-1];
356
	goto yystack;
357
 
358
ret0:
359
	yyn = 0;
360
	goto ret;
361
 
362
ret1:
363
	yyn = 1;
364
	goto ret;
365
 
366
ret:
367
	yylval = save1;
368
	yyval = save2;
369
	yynerrs = save3;
370
	yyerrflag = save4;
371
	return yyn;
372
 
373
yystack:
374
	/* put a state and value onto the stack */
375
	if(yydebug >= 4)
376
		printf("char %s in %s", yytokname(yychar), yystatname(yystate));
377
 
378
	yyp++;
379
	if(yyp >= &yys[YYMAXDEPTH]) {
380
		yyerror("yacc stack overflow");
381
		goto ret1;
382
	}
383
	yyp->yys = yystate;
384
	yyp->yyv = yyval;
385
 
386
yynewstate:
387
	yyn = yypact[yystate];
388
	if(yyn <= YYFLAG)
389
		goto yydefault; /* simple state */
390
	if(yychar < 0)
391
		yychar = yylex1();
392
	yyn += yychar;
393
	if(yyn < 0 || yyn >= YYLAST)
394
		goto yydefault;
395
	yyn = yyact[yyn];
396
	if(yychk[yyn] == yychar) { /* valid shift */
397
		yychar = -1;
398
		yyval = yylval;
399
		yystate = yyn;
400
		if(yyerrflag > 0)
401
			yyerrflag--;
402
		goto yystack;
403
	}
404
 
405
yydefault:
406
	/* default state action */
407
	yyn = yydef[yystate];
408
	if(yyn == -2) {
409
		if(yychar < 0)
410
			yychar = yylex1();
411
 
412
		/* look through exception table */
413
		for(yyxi=yyexca;; yyxi+=2)
414
			if(yyxi[0] == -1 && yyxi[1] == yystate)
415
				break;
416
		for(yyxi += 2;; yyxi += 2) {
417
			yyn = yyxi[0];
418
			if(yyn < 0 || yyn == yychar)
419
				break;
420
		}
421
		yyn = yyxi[1];
422
		if(yyn < 0)
423
			goto ret0;
424
	}
425
	if(yyn == 0) {
426
		/* error ... attempt to resume parsing */
427
		switch(yyerrflag) {
428
		case 0:   /* brand new error */
429
			yyerror("syntax error");
430
			if(yydebug >= 1) {
431
				printf("%s", yystatname(yystate));
432
				printf("saw %s\n", yytokname(yychar));
433
			}
434
yyerrlab:
435
			yynerrs++;
436
 
437
		case 1:
438
		case 2: /* incompletely recovered error ... try again */
439
			yyerrflag = 3;
440
 
441
			/* find a state where "error" is a legal shift action */
442
			while(yyp >= yys) {
443
				yyn = yypact[yyp->yys] + YYERRCODE;
444
				if(yyn >= 0 && yyn < YYLAST) {
445
					yystate = yyact[yyn];  /* simulate a shift of "error" */
446
					if(yychk[yystate] == YYERRCODE)
447
						goto yystack;
448
				}
449
 
450
				/* the current yyp has no shift onn "error", pop stack */
451
				if(yydebug >= 2)
452
					printf("error recovery pops state %d, uncovers %d\n",
453
						yyp->yys, (yyp-1)->yys );
454
				yyp--;
455
			}
456
			/* there is no state on the stack with an error shift ... abort */
457
			goto ret1;
458
 
459
		case 3:  /* no shift yet; clobber input char */
460
			if(yydebug >= YYEOFCODE)
461
				printf("error recovery discards %s\n", yytokname(yychar));
462
			if(yychar == YYEOFCODE)
463
				goto ret1;
464
			yychar = -1;
465
			goto yynewstate;   /* try again in the same state */
466
		}
467
	}
468
 
469
	/* reduction by production yyn */
470
	if(yydebug >= 2)
471
		printf("reduce %d in:\n\t%s", yyn, yystatname(yystate));
472
 
473
	yypt = yyp;
474
	yyp -= yyr2[yyn];
475
	yyval = (yyp+1)->yyv;
476
	yym = yyn;
477
 
478
	/* consult goto table to find next state */
479
	yyn = yyr1[yyn];
480
	yyg = yypgo[yyn];
481
	yyj = yyg + yyp->yys + 1;
482
 
483
	if(yyj >= YYLAST || yychk[yystate=yyact[yyj]] != -yyn)
484
		yystate = yyact[yyg];
485
	switch(yym) {
486
 
487
case 1:
488
#line	24	"/sys/src/cmd/eqn/eqn.y"
489
{ putout(yypt[-0].yyv); } break;
490
case 2:
491
#line	25	"/sys/src/cmd/eqn/eqn.y"
492
{ ERROR "syntax error" WARNING; } break;
493
case 3:
494
#line	26	"/sys/src/cmd/eqn/eqn.y"
495
{ eqnreg = 0; } break;
496
case 5:
497
#line	30	"/sys/src/cmd/eqn/eqn.y"
498
{ eqnbox(yypt[-1].yyv, yypt[-0].yyv, 0); } break;
499
case 6:
500
#line	31	"/sys/src/cmd/eqn/eqn.y"
501
{ eqnbox(yypt[-1].yyv, yypt[-0].yyv, 1); } break;
502
case 7:
503
#line	32	"/sys/src/cmd/eqn/eqn.y"
504
{ lineup(0); } break;
505
case 8:
506
#line	35	"/sys/src/cmd/eqn/eqn.y"
507
{ yyval = yypt[-0].yyv; lineup(1); } break;
508
case 9:
509
#line	38	"/sys/src/cmd/eqn/eqn.y"
510
{ yyval = yypt[-0].yyv; } break;
511
case 10:
512
#line	39	"/sys/src/cmd/eqn/eqn.y"
513
{ yyval = 0; } break;
514
case 11:
515
#line	42	"/sys/src/cmd/eqn/eqn.y"
516
{ yyval = yypt[-0].yyv; } break;
517
case 12:
518
#line	43	"/sys/src/cmd/eqn/eqn.y"
519
{ yyval = 0; } break;
520
case 13:
521
#line	46	"/sys/src/cmd/eqn/eqn.y"
522
{ yyval = yypt[-1].yyv; } break;
523
case 14:
524
#line	47	"/sys/src/cmd/eqn/eqn.y"
525
{ text(QTEXT, (char *) yypt[-0].yyv); } break;
526
case 15:
527
#line	48	"/sys/src/cmd/eqn/eqn.y"
528
{ text(CONTIG, (char *) yypt[-0].yyv); } break;
529
case 16:
530
#line	49	"/sys/src/cmd/eqn/eqn.y"
531
{ text(SPACE, (char *) 0); } break;
532
case 17:
533
#line	50	"/sys/src/cmd/eqn/eqn.y"
534
{ text(THIN, (char *) 0); } break;
535
case 18:
536
#line	51	"/sys/src/cmd/eqn/eqn.y"
537
{ text(TAB, (char *) 0); } break;
538
case 19:
539
#line	52	"/sys/src/cmd/eqn/eqn.y"
540
{ funny(SUM); } break;
541
case 20:
542
#line	53	"/sys/src/cmd/eqn/eqn.y"
543
{ funny(PROD); } break;
544
case 21:
545
#line	54	"/sys/src/cmd/eqn/eqn.y"
546
{ funny(UNION); } break;
547
case 22:
548
#line	55	"/sys/src/cmd/eqn/eqn.y"
549
{ funny(INTER); } break;
550
case 23:
551
#line	56	"/sys/src/cmd/eqn/eqn.y"
552
{ boverb(yypt[-2].yyv, yypt[-0].yyv); } break;
553
case 24:
554
#line	57	"/sys/src/cmd/eqn/eqn.y"
555
{ mark(yypt[-0].yyv); } break;
556
case 25:
557
#line	58	"/sys/src/cmd/eqn/eqn.y"
558
{ size(yypt[-1].yyv, yypt[-0].yyv); } break;
559
case 26:
560
#line	59	"/sys/src/cmd/eqn/eqn.y"
561
{ font(yypt[-1].yyv, yypt[-0].yyv); } break;
562
case 27:
563
#line	60	"/sys/src/cmd/eqn/eqn.y"
564
{ fatbox(yypt[-0].yyv); } break;
565
case 28:
566
#line	61	"/sys/src/cmd/eqn/eqn.y"
567
{ sqrt(yypt[-0].yyv); } break;
568
case 29:
569
#line	62	"/sys/src/cmd/eqn/eqn.y"
570
{ps -= deltaps;} break;
571
case 30:
572
#line	62	"/sys/src/cmd/eqn/eqn.y"
573
{ subsup(yypt[-4].yyv, yypt[-1].yyv, yypt[-0].yyv); } break;
574
case 31:
575
#line	63	"/sys/src/cmd/eqn/eqn.y"
576
{ps -= deltaps;} break;
577
case 32:
578
#line	63	"/sys/src/cmd/eqn/eqn.y"
579
{ subsup(yypt[-3].yyv, 0, yypt[-0].yyv); } break;
580
case 33:
581
#line	64	"/sys/src/cmd/eqn/eqn.y"
582
{ps -= deltaps;} break;
583
case 34:
584
#line	64	"/sys/src/cmd/eqn/eqn.y"
585
{ integral(yypt[-4].yyv, yypt[-1].yyv, yypt[-0].yyv); } break;
586
case 35:
587
#line	65	"/sys/src/cmd/eqn/eqn.y"
588
{ps -= deltaps;} break;
589
case 36:
590
#line	65	"/sys/src/cmd/eqn/eqn.y"
591
{ integral(yypt[-3].yyv, 0, yypt[-0].yyv); } break;
592
case 37:
593
#line	66	"/sys/src/cmd/eqn/eqn.y"
594
{ integral(yypt[-0].yyv, 0, 0); } break;
595
case 38:
596
#line	67	"/sys/src/cmd/eqn/eqn.y"
597
{ps -= deltaps;} break;
598
case 39:
599
#line	67	"/sys/src/cmd/eqn/eqn.y"
600
{ fromto(yypt[-4].yyv, yypt[-1].yyv, yypt[-0].yyv); } break;
601
case 40:
602
#line	68	"/sys/src/cmd/eqn/eqn.y"
603
{ps -= deltaps;} break;
604
case 41:
605
#line	68	"/sys/src/cmd/eqn/eqn.y"
606
{ fromto(yypt[-3].yyv, 0, yypt[-0].yyv); } break;
607
case 42:
608
#line	69	"/sys/src/cmd/eqn/eqn.y"
609
{ paren(yypt[-2].yyv, yypt[-1].yyv, yypt[-0].yyv); } break;
610
case 43:
611
#line	70	"/sys/src/cmd/eqn/eqn.y"
612
{ paren(yypt[-1].yyv, yypt[-0].yyv, 0); } break;
613
case 44:
614
#line	71	"/sys/src/cmd/eqn/eqn.y"
615
{ diacrit(yypt[-1].yyv, yypt[-0].yyv); } break;
616
case 45:
617
#line	72	"/sys/src/cmd/eqn/eqn.y"
618
{ move(FWD, yypt[-1].yyv, yypt[-0].yyv); } break;
619
case 46:
620
#line	73	"/sys/src/cmd/eqn/eqn.y"
621
{ move(UP, yypt[-1].yyv, yypt[-0].yyv); } break;
622
case 47:
623
#line	74	"/sys/src/cmd/eqn/eqn.y"
624
{ move(BACK, yypt[-1].yyv, yypt[-0].yyv); } break;
625
case 48:
626
#line	75	"/sys/src/cmd/eqn/eqn.y"
627
{ move(DOWN, yypt[-1].yyv, yypt[-0].yyv); } break;
628
case 49:
629
#line	76	"/sys/src/cmd/eqn/eqn.y"
630
{ pile(yypt[-0].yyv); ct = yypt[-0].yyv; } break;
631
case 50:
632
#line	77	"/sys/src/cmd/eqn/eqn.y"
633
{yyval=ct;} break;
634
case 51:
635
#line	77	"/sys/src/cmd/eqn/eqn.y"
636
{ matrix(yypt[-3].yyv); ct = yypt[-3].yyv; } break;
637
case 52:
638
#line	80	"/sys/src/cmd/eqn/eqn.y"
639
{ setintegral(); } break;
640
case 53:
641
#line	83	"/sys/src/cmd/eqn/eqn.y"
642
{ yyval = atoi((char *) yypt[-1].yyv); } break;
643
case 54:
644
#line	84	"/sys/src/cmd/eqn/eqn.y"
645
{ yyval = atoi((char *) yypt[-1].yyv); } break;
646
case 55:
647
#line	85	"/sys/src/cmd/eqn/eqn.y"
648
{ yyval = atoi((char *) yypt[-1].yyv); } break;
649
case 56:
650
#line	86	"/sys/src/cmd/eqn/eqn.y"
651
{ yyval = atoi((char *) yypt[-1].yyv); } break;
652
case 57:
653
#line	88	"/sys/src/cmd/eqn/eqn.y"
654
{ yyval = HAT; } break;
655
case 58:
656
#line	89	"/sys/src/cmd/eqn/eqn.y"
657
{ yyval = VEC; } break;
658
case 59:
659
#line	90	"/sys/src/cmd/eqn/eqn.y"
660
{ yyval = DYAD; } break;
661
case 60:
662
#line	91	"/sys/src/cmd/eqn/eqn.y"
663
{ yyval = BAR; } break;
664
case 61:
665
#line	92	"/sys/src/cmd/eqn/eqn.y"
666
{ yyval = LOWBAR; } break;
667
case 62:
668
#line	93	"/sys/src/cmd/eqn/eqn.y"
669
{ yyval = HIGHBAR; } break;
670
case 63:
671
#line	94	"/sys/src/cmd/eqn/eqn.y"
672
{ yyval = UNDER; } break;
673
case 64:
674
#line	95	"/sys/src/cmd/eqn/eqn.y"
675
{ yyval = DOT; } break;
676
case 65:
677
#line	96	"/sys/src/cmd/eqn/eqn.y"
678
{ yyval = TILDE; } break;
679
case 66:
680
#line	97	"/sys/src/cmd/eqn/eqn.y"
681
{ yyval = UTILDE; } break;
682
case 67:
683
#line	98	"/sys/src/cmd/eqn/eqn.y"
684
{ yyval = DOTDOT; } break;
685
case 68:
686
#line	101	"/sys/src/cmd/eqn/eqn.y"
687
{ yyval = ((char *)yypt[-0].yyv)[0]; } break;
688
case 69:
689
#line	102	"/sys/src/cmd/eqn/eqn.y"
690
{ yyval = '{'; } break;
691
case 70:
692
#line	105	"/sys/src/cmd/eqn/eqn.y"
693
{ yyval = ((char *)yypt[-0].yyv)[0]; } break;
694
case 71:
695
#line	106	"/sys/src/cmd/eqn/eqn.y"
696
{ yyval = '}'; } break;
697
case 74:
698
#line	113	"/sys/src/cmd/eqn/eqn.y"
699
{ column(yypt[-3].yyv, DEFGAP); } break;
700
case 75:
701
#line	114	"/sys/src/cmd/eqn/eqn.y"
702
{yyval=atoi((char*)yypt[-0].yyv);} break;
703
case 76:
704
#line	114	"/sys/src/cmd/eqn/eqn.y"
705
{ column(yypt[-5].yyv, yypt[-3].yyv); } break;
706
case 77:
707
#line	117	"/sys/src/cmd/eqn/eqn.y"
708
{ yyval = startcol(LCOL); } break;
709
case 78:
710
#line	118	"/sys/src/cmd/eqn/eqn.y"
711
{ yyval = startcol(CCOL); } break;
712
case 79:
713
#line	119	"/sys/src/cmd/eqn/eqn.y"
714
{ yyval = startcol(RCOL); } break;
715
case 80:
716
#line	120	"/sys/src/cmd/eqn/eqn.y"
717
{ yyval = startcol(COL); } break;
718
case 81:
719
#line	123	"/sys/src/cmd/eqn/eqn.y"
720
{ lp[ct++] = yypt[-0].yyv; } break;
721
case 82:
722
#line	124	"/sys/src/cmd/eqn/eqn.y"
723
{ lp[ct++] = yypt[-0].yyv; } break;
724
case 83:
725
#line	127	"/sys/src/cmd/eqn/eqn.y"
726
{ yyval = ps; setsize((char *) yypt[-0].yyv); } break;
727
case 84:
728
#line	130	"/sys/src/cmd/eqn/eqn.y"
729
{ static char R[]="R"; setfont(R); } break;
730
case 85:
731
#line	131	"/sys/src/cmd/eqn/eqn.y"
732
{ static char I[]="I"; setfont(I); } break;
733
case 86:
734
#line	132	"/sys/src/cmd/eqn/eqn.y"
735
{ static char B[]="B"; setfont(B); } break;
736
case 87:
737
#line	133	"/sys/src/cmd/eqn/eqn.y"
738
{ setfont((char *)yypt[-0].yyv); } break;
739
	}
740
	goto yystack;  /* stack new state and value */
741
}