-#include <stdio.h>
-/*#include "config.h" manifest.h*/
-/*#include "macdefs.h" manifest.h*/
-/*#include "manifest.h" pass1.h*/
-/*#include "ndu.h" manifest.h*/
-#include "pass1.h"
-/*#include "pcclocal.h" macdefs.h*/
-
-# define TOKENS 0
-# define ERROR 1
-# define FREE 2
-# define STRING 3
-# define ICON 4
-# define FCON 5
-# define DCON 6
-# define NAME 7
-# define REG 8
-# define OREG 9
-# define CCODES 10
-# define FLD 11
-# define PLUS 12
-# define PLUSEQ 13
-# define UPLUS 14
-# define MINUS 15
-# define MINUSEQ 16
-# define UMINUS 17
-# define MUL 18
-# define MULEQ 19
-# define DIV 21
-# define DIVEQ 22
-# define MOD 23
-# define MODEQ 24
-# define INCR 25
-# define DECR 26
-# define ASSIGN 27
-# define AND 28
-# define ANDEQ 29
-# define OR 31
-# define OREQ 32
-# define ER 33
-# define EREQ 34
-# define LS 35
-# define LSEQ 36
-# define RS 37
-# define RSEQ 38
-# define COMPL 39
-# define EQ 40
-# define NE 41
-# define LE 42
-# define LT 43
-# define GE 44
-# define GT 45
-# define ULE 46
-# define ULT 47
-# define UGE 48
-# define UGT 49
-# define QUEST 50
-# define COLON 51
-# define ANDAND 52
-# define OROR 53
-# define NOT 54
-# define CALL 55
-# define UCALL 57
-# define FORTCALL 58
-# define UFORTCALL 60
-# define INLINE 61
-# define UINLINE 63
-# define DEREF 20
-# define ADDROF 30
-# define DOT 64
-# define STREF 65
-# define STASG 66
-# define STARG 67
-# define STCALL 68
-# define USTCALL 70
-# define SCONV 71
-# define PCONV 72
-# define PMCONV 73
-# define PVCONV 74
-# define CAST 75
-# define LB 76
-# define RB 77
-# define COMOP 78
-# define CM 79
-# define FORCE 80
-# define GOTO 81
-# define CBRANCH 82
-# define RETURN 83
-# define INIT 84
-# define TYPE 85
-# define CLASS 86
-# define MAXOP 86
-# define LOCALTOKENS 100
-# define ASOP 100
-# define RELOP 101
-# define EQUOP 102
-# define DIVOP 103
-# define SHIFTOP 104
-# define INCOP 105
-# define UNOP 106
-# define STROP 107
-# define LP 108
-# define RP 109
-# define LC 110
-# define RC 111
-# define STRUCT 112
-# define IF 113
-# define ELSE 114
-# define SWITCH 115
-# define BREAK 116
-# define CONTINUE 117
-# define WHILE 118
-# define DO 119
-# define FOR 120
-# define DEFAULT 121
-# define CASE 122
-# define SIZEOF 123
-# define ENUM 124
-# define SM 125
-
-# line 146 "cgram.y"
-/*# include "pass1.h"*/
-#define yyclearin yychar = -1
-#define yyerrok yyerrflag = 0
-extern int yychar;
-extern short yyerrflag;
-#ifndef YYMAXDEPTH
-#define YYMAXDEPTH 150
-#endif
-YYSTYPE yylval, yyval;
-
-# line 165 "cgram.y"
- static int fake = 0;
-#ifndef FLEXNAMES
- static char fakename[NCHNAM+1];
-#else
- static char fakename[24];
-#endif
-# define YYERRCODE 256
-
-# line 899 "cgram.y"
-
-NODE *mkty(t, d, s) unsigned t; int d; int s; {
- return( block( TYPE, NIL, NIL, t, d, s ) );
- }
-
-NODE *bdty(op, p, v) int op; NODE *p; int v; {
- register NODE *q;
-
- q = block( op, p, NIL, INT, 0, INT );
-
- switch( op ){
-
- case UNARY MUL:
- case UNARY CALL:
- break;
-
- case LB:
- q->in.right = bcon(v);
- break;
-
- case NAME:
- q->tn.rval = v;
- break;
-
- default:
- cerror( "bad bdty" );
- }
-
- return( q );
- }
-
-int dstash(n) int n; { /* put n into the dimension table */
- if( curdim >= DIMTABSZ-1 ){
- cerror( "dimension table overflow");
- }
- dimtab[ curdim++ ] = n;
- }
-
-int savebc() {
- if( psavbc > & asavbc[BCSZ-4 ] ){
- cerror( "whiles, fors, etc. too deeply nested");
- }
- *psavbc++ = brklab;
- *psavbc++ = contlab;
- *psavbc++ = flostat;
- *psavbc++ = swx;
- flostat = 0;
- }
-
-int resetbc(mask) int mask; {
-
- swx = *--psavbc;
- flostat = *--psavbc | (flostat&mask);
- contlab = *--psavbc;
- brklab = *--psavbc;
-
- }
-
-int addcase(p) NODE *p; { /* add case to switch */
-
- p = optim( p ); /* change enum to ints */
- if( p->in.op != ICON ){
- uerror( "non-constant case expression");
- return;
- }
- if( swp == swtab ){
- uerror( "case not in switch");
- return;
- }
- if( swp >= &swtab[SWITSZ] ){
- cerror( "switch table overflow");
- }
- swp->sval = p->tn.lval;
- deflab( swp->slab = getlab() );
- ++swp;
- tfree(p);
- }
-
-int adddef() { /* add default case to switch */
- if( swtab[swx].slab >= 0 ){
- uerror( "duplicate default in switch");
- return;
- }
- if( swp == swtab ){
- uerror( "default not inside switch");
- return;
- }
- deflab( swtab[swx].slab = getlab() );
- }
-
-int swstart() {
- /* begin a switch block */
- if( swp >= &swtab[SWITSZ] ){
- cerror( "switch table overflow");
- }
- swx = swp - swtab;
- swp->slab = -1;
- ++swp;
- }
-
-int swend() { /* end a switch block */
-
- register struct sw *swbeg, *p, *q, *r, *r1;
- CONSZ temp;
- int tempi;
-
- swbeg = &swtab[swx+1];
-
- /* sort */
-
- r1 = swbeg;
- r = swp-1;
-
- while( swbeg < r ){
- /* bubble largest to end */
- for( q=swbeg; q<r; ++q ){
- if( q->sval > (q+1)->sval ){
- /* swap */
- r1 = q+1;
- temp = q->sval;
- q->sval = r1->sval;
- r1->sval = temp;
- tempi = q->slab;
- q->slab = r1->slab;
- r1->slab = tempi;
- }
- }
- r = r1;
- r1 = swbeg;
- }
-
- /* it is now sorted */
-
- for( p = swbeg+1; p<swp; ++p ){
- if( p->sval == (p-1)->sval ){
- uerror( "duplicate case in switch, %d", tempi=p->sval );
- return;
- }
- }
-
- genswitch( swbeg-1, swp-swbeg );
- swp = swbeg-1;
- }
-short yyexca[] ={
--1, 1,
- 0, -1,
- 7, 23,
- 18, 23,
- 108, 23,
- 125, 23,
- -2, 0,
--1, 19,
- 79, 82,
- 125, 82,
- -2, 7,
--1, 24,
- 79, 81,
- 125, 81,
- -2, 79,
--1, 26,
- 79, 85,
- 125, 85,
- -2, 80,
--1, 32,
- 110, 46,
- -2, 44,
--1, 34,
- 110, 38,
- -2, 36,
--1, 110,
- 85, 18,
- 86, 18,
- 112, 18,
- 124, 18,
- -2, 13,
--1, 281,
- 85, 16,
- 86, 16,
- 112, 16,
- 124, 16,
- -2, 14,
--1, 298,
- 85, 17,
- 86, 17,
- 112, 17,
- 124, 17,
- -2, 15,
- };
-# define YYNPROD 188
-# define YYLAST 1291
-short yyact[]={
-
- 212, 27, 263, 10, 9, 27, 46, 10, 9, 210,
- 77, 66, 21, 94, 201, 27, 21, 95, 133, 99,
- 18, 148, 167, 19, 6, 132, 21, 36, 111, 312,
- 14, 311, 157, 27, 14, 10, 27, 36, 272, 41,
- 43, 24, 16, 289, 21, 97, 16, 21, 10, 9,
- 8, 75, 271, 305, 292, 267, 266, 165, 28, 97,
- 92, 74, 14, 40, 42, 288, 138, 284, 113, 203,
- 245, 160, 155, 298, 16, 14, 203, 134, 208, 103,
- 53, 251, 57, 35, 33, 149, 153, 16, 108, 141,
- 142, 143, 144, 145, 146, 137, 31, 139, 140, 96,
- 27, 307, 22, 59, 290, 249, 22, 122, 45, 159,
- 204, 21, 71, 162, 287, 278, 22, 169, 170, 171,
- 173, 175, 177, 179, 181, 182, 184, 186, 188, 189,
- 190, 191, 192, 164, 22, 150, 134, 22, 93, 196,
- 205, 119, 70, 57, 120, 199, 72, 122, 149, 64,
- 96, 281, 193, 39, 17, 158, 301, 124, 39, 202,
- 125, 195, 126, 300, 49, 277, 202, 252, 276, 198,
- 207, 275, 154, 236, 109, 237, 49, 238, 4, 239,
- 49, 240, 274, 154, 241, 38, 242, 52, 243, 209,
- 38, 69, 118, 235, 9, 134, 48, 68, 150, 54,
- 119, 22, 56, 120, 161, 255, 122, 30, 48, 194,
- 250, 157, 48, 246, 100, 247, 124, 253, 254, 264,
- 256, 126, 299, 269, 259, 260, 261, 262, 285, 265,
- 116, 123, 118, 121, 279, 115, 273, 90, 87, 88,
- 89, 232, 112, 73, 65, 283, 251, 163, 96, 80,
- 98, 280, 78, 103, 26, 47, 282, 101, 51, 213,
- 250, 270, 79, 286, 98, 20, 197, 60, 90, 87,
- 88, 89, 232, 114, 34, 293, 294, 264, 296, 295,
- 80, 119, 26, 78, 120, 26, 32, 122, 7, 116,
- 123, 118, 121, 79, 67, 156, 226, 29, 110, 107,
- 302, 119, 308, 106, 120, 135, 264, 122, 309, 90,
- 87, 88, 89, 86, 50, 223, 25, 222, 90, 87,
- 88, 89, 232, 104, 61, 44, 206, 102, 91, 55,
- 80, 58, 168, 78, 166, 105, 63, 62, 37, 82,
- 81, 3, 84, 79, 111, 257, 223, 227, 222, 231,
- 220, 221, 228, 229, 230, 234, 233, 83, 119, 224,
- 2, 120, 152, 85, 122, 11, 12, 5, 23, 13,
- 82, 81, 118, 84, 124, 111, 211, 15, 227, 219,
- 231, 220, 221, 228, 229, 230, 234, 233, 83, 217,
- 224, 218, 118, 121, 216, 214, 223, 215, 222, 1,
- 0, 0, 0, 119, 0, 0, 120, 0, 0, 122,
- 0, 82, 81, 0, 84, 0, 0, 0, 131, 124,
- 82, 81, 125, 84, 126, 111, 0, 0, 227, 83,
- 231, 220, 221, 228, 229, 230, 234, 233, 83, 119,
- 224, 129, 120, 127, 128, 122, 0, 116, 123, 118,
- 121, 0, 0, 0, 131, 124, 0, 0, 125, 0,
- 126, 90, 87, 88, 89, 86, 0, 0, 0, 119,
- 117, 0, 120, 80, 0, 122, 78, 129, 0, 127,
- 128, 0, 0, 0, 0, 0, 79, 0, 0, 0,
- 225, 130, 116, 123, 118, 121, 0, 90, 87, 88,
- 89, 86, 0, 0, 0, 0, 117, 0, 0, 80,
- 0, 0, 78, 0, 0, 0, 291, 0, 0, 0,
- 119, 225, 79, 120, 0, 0, 122, 130, 116, 123,
- 118, 121, 90, 87, 88, 89, 86, 0, 0, 0,
- 0, 0, 0, 10, 80, 0, 0, 78, 0, 0,
- 0, 0, 258, 0, 0, 0, 0, 79, 116, 123,
- 118, 121, 0, 82, 81, 0, 84, 0, 0, 0,
- 14, 225, 90, 87, 88, 89, 86, 0, 0, 0,
- 0, 83, 16, 0, 80, 0, 0, 78, 0, 0,
- 0, 90, 87, 88, 89, 86, 187, 79, 0, 82,
- 81, 0, 84, 80, 0, 0, 78, 0, 0, 116,
- 0, 118, 121, 0, 0, 185, 79, 83, 0, 268,
- 0, 90, 87, 88, 89, 86, 90, 87, 88, 89,
- 86, 0, 0, 80, 82, 81, 78, 84, 80, 136,
- 0, 78, 0, 0, 0, 183, 79, 0, 0, 0,
- 180, 79, 83, 0, 90, 87, 88, 89, 86, 0,
- 0, 90, 87, 88, 89, 86, 80, 0, 0, 78,
- 0, 0, 0, 80, 82, 81, 78, 84, 178, 79,
- 0, 0, 0, 0, 0, 176, 79, 0, 0, 0,
- 0, 0, 83, 82, 81, 0, 84, 90, 87, 88,
- 89, 86, 90, 87, 88, 89, 86, 0, 0, 80,
- 0, 83, 78, 0, 80, 0, 0, 78, 0, 0,
- 0, 174, 79, 82, 81, 0, 84, 79, 82, 81,
- 0, 84, 0, 0, 0, 0, 90, 87, 88, 89,
- 86, 83, 0, 0, 0, 0, 83, 0, 80, 0,
- 0, 78, 0, 0, 0, 0, 82, 81, 0, 84,
- 172, 79, 0, 82, 81, 0, 84, 90, 87, 88,
- 89, 86, 0, 0, 83, 0, 0, 0, 0, 80,
- 0, 83, 78, 0, 0, 0, 90, 87, 88, 89,
- 86, 0, 79, 0, 0, 0, 0, 0, 80, 82,
- 81, 78, 84, 0, 82, 81, 0, 84, 151, 0,
- 0, 79, 90, 87, 88, 89, 86, 83, 0, 0,
- 0, 0, 83, 0, 80, 0, 0, 78, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 79, 82, 81,
- 0, 84, 0, 0, 0, 119, 0, 0, 120, 0,
- 0, 122, 0, 0, 0, 0, 83, 0, 0, 0,
- 131, 124, 0, 0, 125, 0, 126, 0, 0, 82,
- 81, 0, 84, 0, 76, 0, 0, 0, 119, 0,
- 0, 120, 0, 129, 122, 127, 128, 83, 82, 81,
- 0, 84, 0, 131, 124, 0, 0, 125, 0, 126,
- 0, 0, 0, 0, 0, 0, 83, 0, 0, 0,
- 0, 0, 117, 0, 82, 81, 129, 147, 127, 128,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 83, 130, 116, 123, 118, 121, 119, 0,
- 0, 120, 310, 0, 122, 117, 0, 0, 0, 0,
- 0, 0, 0, 131, 124, 0, 0, 125, 0, 126,
- 0, 0, 0, 0, 0, 0, 130, 116, 123, 118,
- 121, 119, 0, 0, 120, 306, 129, 122, 127, 128,
- 0, 0, 119, 0, 0, 120, 131, 124, 122, 0,
- 125, 0, 126, 0, 0, 0, 0, 131, 124, 0,
- 0, 125, 0, 126, 0, 117, 0, 0, 0, 129,
- 0, 127, 128, 0, 0, 0, 0, 0, 0, 0,
- 129, 0, 127, 128, 0, 0, 130, 116, 123, 118,
- 121, 0, 0, 0, 0, 304, 0, 119, 117, 0,
- 120, 0, 0, 122, 0, 0, 0, 0, 0, 117,
- 0, 0, 131, 124, 0, 0, 125, 0, 126, 130,
- 116, 123, 118, 121, 0, 0, 0, 0, 303, 0,
- 130, 116, 123, 118, 121, 129, 297, 127, 128, 200,
- 119, 0, 0, 120, 0, 0, 122, 0, 0, 0,
- 0, 0, 0, 0, 119, 131, 124, 120, 0, 125,
- 122, 126, 0, 0, 117, 0, 0, 0, 0, 131,
- 124, 0, 0, 125, 0, 126, 0, 0, 129, 0,
- 127, 128, 0, 0, 0, 130, 116, 123, 118, 121,
- 0, 0, 129, 244, 127, 128, 119, 0, 0, 120,
- 0, 0, 122, 0, 0, 248, 0, 117, 0, 0,
- 0, 131, 124, 0, 0, 125, 0, 126, 0, 0,
- 0, 117, 0, 0, 0, 0, 0, 0, 130, 116,
- 123, 118, 121, 0, 129, 119, 127, 128, 120, 0,
- 0, 122, 130, 116, 123, 118, 121, 0, 0, 119,
- 131, 124, 120, 0, 125, 122, 126, 0, 119, 0,
- 0, 120, 0, 117, 122, 124, 0, 0, 125, 0,
- 126, 0, 0, 129, 124, 127, 128, 125, 0, 126,
- 0, 0, 0, 0, 130, 116, 123, 118, 121, 127,
- 0, 0, 0, 0, 0, 0, 129, 0, 127, 128,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 130, 116, 123, 118, 121, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 116, 123,
- 118, 121, 0, 0, 0, 0, 0, 116, 123, 118,
- 121 };
-short yypact[]={
-
--1000, -78,-1000,-1000,-1000, 29,-1000, -50, 108,-1000,
- 122,-1000,-1000, -14, 279, -26, 267,-1000, -42, 77,
--1000, 93, 93, -1, 100, 231,-1000, 79,-1000, -50,
- 114, -50,-1000, 260,-1000,-1000,-1000,-1000, 40, 167,
- 100, 77, 88, 82, 33,-1000,-1000,-1000, 37, 166,
- 764,-1000,-1000,-1000,-1000, -65,-1000, -6, 135,-1000,
- 230, -2,-1000, -82,-1000,-1000, 165, 783,-1000,-1000,
--1000, 266,-1000,-1000, 158,1163, 529, -10, 783, 783,
- 783, 783, 783, 809, 458, 699, 75,-1000,-1000,-1000,
--1000, -39, -50, 132,-1000, 77, 104,-1000,-1000, -40,
- 260,-1000,-1000, 77,-1000,-1000,-1000,-1000, 8, -68,
--1000,-1000,-1000,1163,-1000,-1000, 783, 783, 733, 694,
- 658, 651, 623, 783, 618, 588, 569, 783, 783, 783,
- 783, 783, 130,-1000,1163, 529,-1000,-1000, 783, 259,
--1000, -10, -10, -10, -10, -10, -10, 458, 36, 970,
- 51,-1000, 31,1163,-1000,-1000,-1000,-1000,-1000,-1000,
--1000,-1000,-1000, -47,-1000,-1000,-1000, 265, -37, 289,
-1163,-1000, 783, 89, 783, 89, 783, 269, 783,-1000,
- 783, 508, 457, 783, 188, 783, 346, 783, 129,1177,
-1082,1163,1163, -41, 529, 130,1068,-1000, -4, 783,
--1000, 170, 58, 51, 783,-1000, -6,-1000,-1000, 234,
--1000,-1000, 427,-1000, 315, 315, 315, 315, 783, 315,
- -69, -70, 494, 254,-1000, -73, 315, 74, 63,-1000,
- 60, 57, 64, 783, 200, 26,1163,1163,1163,1163,
-1163,1163,1163,1163, 783,-1000,-1000, -44,-1000, 306,
- -10, 151,-1000, 5, 170,1163,-1000,-1000,-1000, -49,
--1000,-1000, -75, -5,1124,-1000,-1000,-1000,-1000, 391,
- -71,-1000,-1000,-1000, 783, 783, 783, 783,-1000,1025,
--1000,-1000, -52,1186,-1000,-1000, 145, 55,-1000, 48,
- 315,-1000,-1000, 959, 926, -72, 866,-1000,-1000,-1000,
- -8, 783,-1000,-1000,-1000, 783,-1000,-1000, 833, -94,
- -96,-1000,-1000 };
-short yypgo[]={
-
- 0, 399, 11, 397, 395, 394, 391, 389, 379, 377,
- 369, 368, 0, 2, 10, 24, 367, 50, 366, 365,
- 21, 14, 363, 13, 17, 41, 362, 360, 341, 20,
- 338, 337, 336, 259, 335, 22, 9, 334, 332, 138,
- 288, 331, 19, 103, 329, 328, 202, 326, 325, 265,
- 324, 316, 314, 25, 18, 305, 303, 299, 298, 296,
- 294 };
-short yyr1[]={
-
- 0, 1, 1, 27, 27, 28, 28, 30, 28, 31,
- 32, 32, 35, 35, 37, 37, 38, 38, 38, 34,
- 34, 34, 16, 16, 15, 15, 15, 15, 15, 40,
- 17, 17, 17, 17, 17, 18, 18, 9, 9, 41,
- 41, 43, 43, 19, 19, 10, 10, 44, 44, 46,
- 46, 39, 47, 39, 23, 23, 23, 23, 23, 25,
- 25, 25, 25, 25, 25, 24, 24, 24, 24, 24,
- 24, 24, 11, 48, 48, 48, 29, 50, 29, 51,
- 51, 49, 49, 49, 49, 49, 53, 53, 54, 54,
- 42, 42, 45, 45, 52, 52, 55, 33, 33, 56,
- 57, 58, 36, 36, 36, 36, 36, 36, 36, 36,
- 36, 36, 36, 36, 36, 36, 36, 36, 36, 59,
- 59, 59, 7, 4, 3, 5, 6, 8, 60, 2,
- 13, 13, 26, 26, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
- 12, 12, 12, 12, 12, 12, 12, 12, 12, 14,
- 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 14, 20, 21,
- 21, 21, 21, 21, 21, 21, 22, 22 };
-short yyr2[]={
-
- 0, 2, 0, 1, 1, 2, 3, 0, 4, 2,
- 2, 0, 2, 0, 3, 4, 3, 4, 0, 3,
- 2, 2, 1, 0, 2, 2, 1, 1, 3, 1,
- 1, 2, 3, 1, 1, 5, 2, 1, 2, 1,
- 3, 1, 3, 5, 2, 1, 2, 1, 3, 2,
- 1, 1, 0, 4, 1, 1, 3, 2, 1, 2,
- 3, 3, 4, 1, 3, 2, 3, 3, 4, 3,
- 3, 2, 2, 1, 3, 1, 1, 0, 4, 1,
- 1, 1, 1, 3, 6, 1, 1, 3, 1, 4,
- 0, 1, 0, 1, 0, 1, 1, 1, 1, 4,
- 3, 1, 2, 1, 2, 2, 2, 7, 4, 2,
- 2, 2, 2, 3, 3, 1, 2, 2, 2, 2,
- 3, 2, 1, 4, 3, 4, 6, 4, 0, 2,
- 1, 0, 1, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 4, 4, 4,
- 4, 4, 4, 4, 4, 5, 3, 3, 1, 2,
- 2, 2, 2, 2, 2, 2, 4, 4, 4, 2,
- 3, 3, 1, 1, 1, 1, 1, 3, 2, 0,
- 2, 5, 2, 3, 4, 3, 2, 2 };
-short yychk[]={
-
--1000, -1, -27, -28, 256, -16, -15, -40, -17, 86,
- 85, -19, -18, -10, 112, -9, 124, 125, -29, -24,
- -49, 18, 108, -11, -25, -51, 256, 7, -17, -40,
- 85, 110, 7, 110, 7, 125, 79, -30, 108, 76,
- -25, -24, -25, -24, -48, 109, 7, 256, 108, 76,
- -52, 27, 108, -17, 85, -44, -46, -17, -41, -43,
- 7, -50, -31, -32, 109, 77, -2, -60, 109, 109,
- 109, 79, 109, 77, -2, -12, 110, -14, 18, 28,
- 15, 106, 105, 123, 108, -22, 7, 4, 5, 6,
- 3, -45, 125, -39, -23, -24, -25, 51, 256, -42,
- 79, 27, -49, -24, -33, -34, -56, -57, -15, 256,
- -58, 110, 77, -12, 7, 77, 101, 79, 103, 12,
- 15, 104, 18, 102, 28, 31, 33, 52, 53, 50,
- 100, 27, -53, -54, -12, -55, 110, 105, 76, 107,
- 108, -14, -14, -14, -14, -14, -14, 108, -20, -12,
- -17, 109, -26, -12, 108, 111, -46, 79, 51, -2,
- 111, -43, -2, -39, 125, 125, -37, -35, -38, -12,
- -12, -12, 27, -12, 27, -12, 27, -12, 27, -12,
- 27, -12, -12, 27, -12, 27, -12, 27, -12, -12,
- -12, -12, -12, -42, 79, -53, -12, 7, -20, 109,
- 109, -21, 108, 18, 79, 109, -47, -2, 125, -35,
- -36, 111, -12, -33, -4, -3, -5, -7, -6, -8,
- 116, 117, 83, 81, 125, 256, -59, 113, 118, 119,
- 120, 115, 7, 122, 121, -15, -12, -12, -12, -12,
- -12, -12, -12, -12, 51, 111, -54, -42, 77, 109,
- -14, 76, 109, -21, -21, -12, -23, 111, 125, -36,
- -36, -36, -36, -13, -12, -36, 125, 125, 125, -12,
- 7, 125, 111, -36, 108, 108, 108, 108, 51, -12,
- 51, 125, -29, -12, 111, 77, -2, 109, 114, 118,
- 109, 125, 125, -12, -12, -13, -12, 51, 125, 77,
- 108, 108, -36, 109, 109, 125, 109, 109, -12, -13,
- 109, 125, 125 };
-short yydef[]={
-
- 2, -2, 1, 3, 4, 0, 22, 26, 27, 29,
- 30, 33, 34, 0, 45, 0, 37, 5, 0, -2,
- 76, 0, 0, 0, -2, 94, -2, 63, 24, 25,
- 31, 0, -2, 0, -2, 6, 77, 11, 0, 128,
- 59, 65, 0, 0, 0, 71, 73, 75, 0, 128,
- 0, 95, 72, 28, 32, 92, 47, 50, 90, 39,
- 41, 0, 8, 0, 66, 67, 0, 0, 64, 69,
- 70, 0, 60, 61, 0, 83, 0, 158, 0, 0,
- 0, 0, 0, 0, 0, 0, 172, 173, 174, 175,
- 176, 0, 93, 49, 51, 54, 55, 128, 58, 0,
- 91, 128, 78, 82, 9, 10, 97, 98, 0, 0,
- -2, 101, 68, 129, 74, 62, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 90, 86, 88, 0, 96, 159, 0, 0,
- 187, 160, 161, 162, 163, 164, 165, 0, 0, 0,
- 179, 169, 0, 132, 186, 43, 48, 52, 128, 57,
- 35, 40, 42, 0, 20, 21, 13, 0, 0, 134,
- 135, 136, 0, 137, 0, 138, 0, 139, 0, 140,
- 0, 141, 142, 0, 143, 0, 144, 0, 145, 146,
- 0, 156, 157, 0, 91, 90, 0, 171, 0, 0,
- 177, 178, 179, 179, 0, 170, 0, 56, 19, 0,
- 12, 100, 0, 103, 0, 0, 0, 0, 131, 0,
- 0, 0, 0, 0, 115, 0, 0, 0, 0, 122,
- 0, 0, 172, 0, 0, 0, 148, 149, 150, 151,
- 147, 152, 153, 154, 0, 84, 87, 0, 168, 167,
- 166, 128, 180, 0, 182, 133, 53, 99, 102, 104,
- 105, 106, 0, 0, 130, 109, 110, 111, 112, 0,
- 0, 116, 117, 118, 0, 0, 131, 0, 119, 0,
- 121, -2, 0, 155, 89, 183, 0, 185, 124, 0,
- 0, 113, 114, 0, 0, 0, 0, 120, -2, 184,
- 0, 0, 108, 123, 125, 131, 127, 181, 0, 0,
- 0, 126, 107 };
-#pragma ifdef __GNUC__
-#pragma pragma GCC diagnostic ignored "-Wunused-label"
-#pragma endif
-#if defined(DOSCCS) && !defined(lint)
-static char yaccpar_sccsid[] = "@(#)yaccpar 4.1 (Berkeley) 2/11/83";
-#endif
-
-#
-# define YYFLAG -1000
-# define YYERROR goto yyerrlab
-# define YYACCEPT return(0)
-# define YYABORT return(1)
-
-/* parser for yacc output */
-
-#ifdef YYDEBUG
-int yydebug = 0; /* 1 for debugging */
-#endif
-YYSTYPE yyv[YYMAXDEPTH]; /* where the values are stored */
-int yychar = -1; /* current input token number */
-int yynerrs = 0; /* number of errors */
-short yyerrflag = 0; /* error recovery flag */
-
-int yyparse() {
-
- short yys[YYMAXDEPTH];
- short yyj, yym;
- register YYSTYPE *yypvt;
- register short yystate, *yyps, yyn;
- register YYSTYPE *yypv;
- register short *yyxi;
-
- yystate = 0;
- yychar = -1;
- yynerrs = 0;
- yyerrflag = 0;
- yyps= &yys[-1];
- yypv= &yyv[-1];
-
- yystack: /* put a state and value onto the stack */
-
-#ifdef YYDEBUG
- if( yydebug ) printf( "state %d, char 0%o\n", yystate, yychar );
-#endif
- if( ++yyps> &yys[YYMAXDEPTH] ) { yyerror( "yacc stack overflow" ); return(1); }
- *yyps = yystate;
- ++yypv;
- *yypv = yyval;
-
- yynewstate:
-
- yyn = yypact[yystate];
-
- if( yyn<= YYFLAG ) goto yydefault; /* simple state */
-
- if( yychar<0 ) if( (yychar=yylex())<0 ) yychar=0;
- if( (yyn += yychar)<0 || yyn >= YYLAST ) goto yydefault;
-
- if( yychk[ yyn=yyact[ yyn ] ] == yychar ){ /* valid shift */
- yychar = -1;
- yyval = yylval;
- yystate = yyn;
- if( yyerrflag > 0 ) --yyerrflag;
- goto yystack;
- }
-
- yydefault:
- /* default state action */
-
- if( (yyn=yydef[yystate]) == -2 ) {
- if( yychar<0 ) if( (yychar=yylex())<0 ) yychar = 0;
- /* look through exception table */
-
- for( yyxi=yyexca; (*yyxi!= (-1)) || (yyxi[1]!=yystate) ; yyxi += 2 ) ; /* VOID */
-
- while( *(yyxi+=2) >= 0 ){
- if( *yyxi == yychar ) break;
- }
- if( (yyn = yyxi[1]) < 0 ) return(0); /* accept */
- }
-
- if( yyn == 0 ){ /* error */
- /* error ... attempt to resume parsing */
-
- switch( yyerrflag ){
-
- case 0: /* brand new error */
-
- yyerror( "syntax error" );
- yyerrlab:
- ++yynerrs;
-
- case 1:
- case 2: /* incompletely recovered error ... try again */
-
- yyerrflag = 3;
-
- /* find a state where "error" is a legal shift action */
-
- while ( yyps >= yys ) {
- yyn = yypact[*yyps] + YYERRCODE;
- if( yyn>= 0 && yyn < YYLAST && yychk[yyact[yyn]] == YYERRCODE ){
- yystate = yyact[yyn]; /* simulate a shift of "error" */
- goto yystack;
- }
- yyn = yypact[*yyps];
-
- /* the current yyps has no shift onn "error", pop stack */
-
-#ifdef YYDEBUG
- if( yydebug ) printf( "error recovery pops state %d, uncovers %d\n", *yyps, yyps[-1] );
-#endif
- --yyps;
- --yypv;
- }
-
- /* there is no state on the stack with an error shift ... abort */
-
- yyabort:
- return(1);
-
- case 3: /* no shift yet; clobber input char */
-
-#ifdef YYDEBUG
- if( yydebug ) printf( "error recovery discards char %d\n", yychar );
-#endif
-
- if( yychar == 0 ) goto yyabort; /* don't discard EOF, quit */
- yychar = -1;
- goto yynewstate; /* try again in the same state */
-
- }
-
- }
-
- /* reduction by production yyn */
-
-#ifdef YYDEBUG
- if( yydebug ) printf("reduce %d\n",yyn);
-#endif
- yyps -= yyr2[yyn];
- yypvt = yypv;
- yypv -= yyr2[yyn];
- yyval = yypv[1];
- yym=yyn;
- /* consult goto table to find next state */
- yyn = yyr1[yyn];
- yyj = yypgo[yyn] + *yyps + 1;
- if( yyj>=YYLAST || yychk[ yystate = yyact[yyj] ] != -yyn ) yystate = yyact[yypgo[yyn]];
- switch(yym){
-
-case 2:
-# line 175 "cgram.y"
-ftnend(); break;
-case 3:
-# line 178 "cgram.y"
-{ curclass = SNULL; blevel = 0; } break;
-case 4:
-# line 180 "cgram.y"
-{ curclass = SNULL; blevel = 0; } break;
-case 5:
-# line 184 "cgram.y"
-{ yypvt[-1].nodep->in.op = FREE; } break;
-case 6:
-# line 186 "cgram.y"
-{ yypvt[-2].nodep->in.op = FREE; } break;
-case 7:
-# line 187 "cgram.y"
-{
- defid( tymerge(yypvt[-1].nodep,yypvt[-0].nodep), curclass==STATIC?STATIC:EXTDEF );
-#ifndef LINT
- pfstab(stab[yypvt[-0].nodep->tn.rval].sname);
-#endif
- } break;
-case 8:
-# line 193 "cgram.y"
-{
- if( blevel ) cerror( "function level error" );
- if( reached ) retstat |= NRETVAL;
- yypvt[-3].nodep->in.op = FREE;
- ftnend();
- } break;
-case 11:
-# line 204 "cgram.y"
-{ blevel = 1; } break;
-case 13:
-# line 209 "cgram.y"
-{ bccode();
- locctr(PROG);
- } break;
-case 14:
-# line 215 "cgram.y"
-{ yypvt[-1].nodep->in.op = FREE;
-#ifndef LINT
- plcstab(blevel);
-#endif
- } break;
-case 15:
-# line 221 "cgram.y"
-{ yypvt[-2].nodep->in.op = FREE;
-#ifndef LINT
- plcstab(blevel);
-#endif
- } break;
-case 16:
-# line 229 "cgram.y"
-{ yypvt[-1].nodep->in.op = FREE; } break;
-case 17:
-# line 231 "cgram.y"
-{ yypvt[-2].nodep->in.op = FREE; } break;
-case 19:
-# line 235 "cgram.y"
-{ curclass = SNULL; yypvt[-2].nodep->in.op = FREE; } break;
-case 20:
-# line 237 "cgram.y"
-{ curclass = SNULL; yypvt[-1].nodep->in.op = FREE; } break;
-case 21:
-# line 239 "cgram.y"
-{ curclass = SNULL; } break;
-case 23:
-# line 243 "cgram.y"
-{ yyval.nodep = mkty(INT,0,INT); curclass = SNULL; } break;
-case 24:
-# line 246 "cgram.y"
-{ yyval.nodep = yypvt[-0].nodep; } break;
-case 26:
-# line 249 "cgram.y"
-{ yyval.nodep = mkty(INT,0,INT); } break;
-case 27:
-# line 251 "cgram.y"
-{ curclass = SNULL ; } break;
-case 28:
-# line 253 "cgram.y"
-{ yypvt[-2].nodep->in.type = types( yypvt[-2].nodep->in.type, yypvt[-0].nodep->in.type, UNDEF );
- yypvt[-0].nodep->in.op = FREE;
- } break;
-case 29:
-# line 260 "cgram.y"
-{ curclass = yypvt[-0].intval; } break;
-case 31:
-# line 265 "cgram.y"
-{ yypvt[-1].nodep->in.type = types( yypvt[-1].nodep->in.type, yypvt[-0].nodep->in.type, UNDEF );
- yypvt[-0].nodep->in.op = FREE;
- } break;
-case 32:
-# line 269 "cgram.y"
-{ yypvt[-2].nodep->in.type = types( yypvt[-2].nodep->in.type, yypvt[-1].nodep->in.type, yypvt[-0].nodep->in.type );
- yypvt[-1].nodep->in.op = yypvt[-0].nodep->in.op = FREE;
- } break;
-case 35:
-# line 277 "cgram.y"
-{ yyval.nodep = dclstruct(yypvt[-4].intval); } break;
-case 36:
-# line 279 "cgram.y"
-{ yyval.nodep = rstruct(yypvt[-0].intval,0); stwart = instruct; } break;
-case 37:
-# line 283 "cgram.y"
-{ yyval.intval = bstruct(-1,0); stwart = SEENAME; } break;
-case 38:
-# line 285 "cgram.y"
-{ yyval.intval = bstruct(yypvt[-0].intval,0); stwart = SEENAME; } break;
-case 41:
-# line 293 "cgram.y"
-{ moedef( yypvt[-0].intval ); } break;
-case 42:
-# line 295 "cgram.y"
-{ strucoff = yypvt[-0].intval; moedef( yypvt[-2].intval ); } break;
-case 43:
-# line 299 "cgram.y"
-{ yyval.nodep = dclstruct(yypvt[-4].intval); } break;
-case 44:
-# line 301 "cgram.y"
-{ yyval.nodep = rstruct(yypvt[-0].intval,yypvt[-1].intval); } break;
-case 45:
-# line 305 "cgram.y"
-{ yyval.intval = bstruct(-1,yypvt[-0].intval); stwart=0; } break;
-case 46:
-# line 307 "cgram.y"
-{ yyval.intval = bstruct(yypvt[-0].intval,yypvt[-1].intval); stwart=0; } break;
-case 49:
-# line 315 "cgram.y"
-{ curclass = SNULL; stwart=0; yypvt[-1].nodep->in.op = FREE; } break;
-case 50:
-# line 317 "cgram.y"
-{ if( curclass != MOU ){
- curclass = SNULL;
- }
- else {
- sprintf( fakename, "$%dFAKE", fake++ );
-#ifdef FLEXNAMES
- /* No need to hash this, we won't look it up */
- defid( tymerge(yypvt[-0].nodep, bdty(NAME,NIL,lookup( savestr(fakename), SMOS ))), curclass );
-#else
- defid( tymerge(yypvt[-0].nodep, bdty(NAME,NIL,lookup( fakename, SMOS ))), curclass );
-#endif
- werror("structure typed union member must be named");
- }
- stwart = 0;
- yypvt[-0].nodep->in.op = FREE;
- } break;
-case 51:
-# line 337 "cgram.y"
-{ defid( tymerge(yypvt[-1].nodep,yypvt[-0].nodep), curclass); stwart = instruct; } break;
-case 52:
-# line 338 "cgram.y"
-{yyval.nodep=yypvt[-2].nodep;} break;
-case 53:
-# line 339 "cgram.y"
-{ defid( tymerge(yypvt[-4].nodep,yypvt[-0].nodep), curclass); stwart = instruct; } break;
-case 56:
-# line 345 "cgram.y"
-{ if( !(instruct&INSTRUCT) ) uerror( "field outside of structure" );
- if( yypvt[-0].intval<0 || yypvt[-0].intval >= FIELD ){
- uerror( "illegal field size" );
- yypvt[-0].intval = 1;
- }
- defid( tymerge(yypvt[-3].nodep,yypvt[-2].nodep), FIELD|yypvt[-0].intval );
- yyval.nodep = NIL;
- } break;
-case 57:
-# line 355 "cgram.y"
-{ if( !(instruct&INSTRUCT) ) uerror( "field outside of structure" );
- falloc( stab, yypvt[-0].intval, -1, yypvt[-2].nodep ); /* alignment or hole */
- yyval.nodep = NIL;
- } break;
-case 58:
-# line 360 "cgram.y"
-{ yyval.nodep = NIL; } break;
-case 59:
-# line 365 "cgram.y"
-{ umul:
- yyval.nodep = bdty( UNARY MUL, yypvt[-0].nodep, 0 ); } break;
-case 60:
-# line 368 "cgram.y"
-{ uftn:
- yyval.nodep = bdty( UNARY CALL, yypvt[-2].nodep, 0 ); } break;
-case 61:
-# line 371 "cgram.y"
-{ uary:
- yyval.nodep = bdty( LB, yypvt[-2].nodep, 0 ); } break;
-case 62:
-# line 374 "cgram.y"
-{ bary:
- if( (int)yypvt[-1].intval <= 0 ) werror( "zero or negative subscript" );
- yyval.nodep = bdty( LB, yypvt[-3].nodep, yypvt[-1].intval ); } break;
-case 63:
-# line 378 "cgram.y"
-{ yyval.nodep = bdty( NAME, NIL, yypvt[-0].intval ); } break;
-case 64:
-# line 380 "cgram.y"
-{ yyval.nodep=yypvt[-1].nodep; } break;
-case 65:
-# line 383 "cgram.y"
-{ goto umul; } break;
-case 66:
-# line 385 "cgram.y"
-{ goto uftn; } break;
-case 67:
-# line 387 "cgram.y"
-{ goto uary; } break;
-case 68:
-# line 389 "cgram.y"
-{ goto bary; } break;
-case 69:
-# line 391 "cgram.y"
-{ yyval.nodep = yypvt[-1].nodep; } break;
-case 70:
-# line 393 "cgram.y"
-{
- if( blevel!=0 ) uerror("function declaration in bad context");
- yyval.nodep = bdty( UNARY CALL, bdty(NAME,NIL,yypvt[-2].intval), 0 );
- stwart = 0;
- } break;
-case 71:
-# line 399 "cgram.y"
-{
- yyval.nodep = bdty( UNARY CALL, bdty(NAME,NIL,yypvt[-1].intval), 0 );
- stwart = 0;
- } break;
-case 72:
-# line 406 "cgram.y"
-{
- /* turn off typedefs for argument names */
- stwart = SEENAME;
- if( stab[yypvt[-1].intval].sclass == SNULL )
- stab[yypvt[-1].intval].stype = FTN;
- } break;
-case 73:
-# line 415 "cgram.y"
-{ ftnarg( yypvt[-0].intval ); stwart = SEENAME; } break;
-case 74:
-# line 417 "cgram.y"
-{ ftnarg( yypvt[-0].intval ); stwart = SEENAME; } break;
-case 77:
-# line 423 "cgram.y"
-{yyval.nodep=yypvt[-2].nodep;} break;
-case 79:
-# line 427 "cgram.y"
-{ defid( yypvt[-0].nodep = tymerge(yypvt[-1].nodep,yypvt[-0].nodep), curclass);
- beginit(yypvt[-0].nodep->tn.rval);
- } break;
-case 81:
-# line 434 "cgram.y"
-{ nidcl( tymerge(yypvt[-1].nodep,yypvt[-0].nodep) ); } break;
-case 82:
-# line 436 "cgram.y"
-{ defid( tymerge(yypvt[-1].nodep,yypvt[-0].nodep), uclass(curclass) );
- if( paramno > 0 ){
- uerror( "illegal argument" );
- paramno = 0;
- }
- } break;
-case 83:
-# line 444 "cgram.y"
-{ doinit( yypvt[-0].nodep );
- endinit(); } break;
-case 84:
-# line 447 "cgram.y"
-{ endinit(); } break;
-case 88:
-# line 457 "cgram.y"
-{ doinit( yypvt[-0].nodep ); } break;
-case 89:
-# line 459 "cgram.y"
-{ irbrace(); } break;
-case 94:
-# line 471 "cgram.y"
-{ werror( "old-fashioned initialization: use =" ); } break;
-case 96:
-# line 476 "cgram.y"
-{ ilbrace(); } break;
-case 99:
-# line 486 "cgram.y"
-{
-#ifndef LINT
- prcstab(blevel);
-#endif
- --blevel;
- if( blevel == 1 ) blevel = 0;
- clearst( blevel );
- checkst( blevel );
- autooff = *--psavbc;
- regvar = *--psavbc;
- } break;
-case 100:
-# line 500 "cgram.y"
-{ --blevel;
- if( blevel == 1 ) blevel = 0;
- clearst( blevel );
- checkst( blevel );
- autooff = *--psavbc;
- regvar = *--psavbc;
- } break;
-case 101:
-# line 510 "cgram.y"
-{ if( blevel == 1 ) dclargs();
- ++blevel;
- if( psavbc > &asavbc[BCSZ-2] ) cerror( "nesting too deep" );
- *psavbc++ = regvar;
- *psavbc++ = autooff;
- } break;
-case 102:
-# line 519 "cgram.y"
-{ ecomp( yypvt[-1].nodep ); } break;
-case 104:
-# line 522 "cgram.y"
-{ deflab(yypvt[-1].intval);
- reached = 1;
- } break;
-case 105:
-# line 526 "cgram.y"
-{ if( yypvt[-1].intval != NOLAB ){
- deflab( yypvt[-1].intval );
- reached = 1;
- }
- } break;
-case 106:
-# line 532 "cgram.y"
-{ branch( contlab );
- deflab( brklab );
- if( (flostat&FBRK) || !(flostat&FLOOP)) reached = 1;
- else reached = 0;
- resetbc(0);
- } break;
-case 107:
-# line 539 "cgram.y"
-{ deflab( contlab );
- if( flostat & FCONT ) reached = 1;
- ecomp( buildtree( CBRANCH, buildtree( NOT, yypvt[-2].nodep, NIL ), bcon( yypvt[-6].intval ) ) );
- deflab( brklab );
- reached = 1;
- resetbc(0);
- } break;
-case 108:
-# line 547 "cgram.y"
-{ deflab( contlab );
- if( flostat&FCONT ) reached = 1;
- if( yypvt[-2].nodep ) ecomp( yypvt[-2].nodep );
- branch( yypvt[-3].intval );
- deflab( brklab );
- if( (flostat&FBRK) || !(flostat&FLOOP) ) reached = 1;
- else reached = 0;
- resetbc(0);
- } break;
-case 109:
-# line 557 "cgram.y"
-{ if( reached ) branch( brklab );
- deflab( yypvt[-1].intval );
- swend();
- deflab(brklab);
- if( (flostat&FBRK) || !(flostat&FDEF) ) reached = 1;
- resetbc(FCONT);
- } break;
-case 110:
-# line 565 "cgram.y"
-{ if( brklab == NOLAB ) uerror( "illegal break");
- else if(reached) branch( brklab );
- flostat |= FBRK;
- if( brkflag ) goto rch;
- reached = 0;
- } break;
-case 111:
-# line 572 "cgram.y"
-{ if( contlab == NOLAB ) uerror( "illegal continue");
- else branch( contlab );
- flostat |= FCONT;
- goto rch;
- } break;
-case 112:
-# line 578 "cgram.y"
-{ retstat |= NRETVAL;
- branch( retlab );
- rch:
- if( !reached ) werror( "statement not reached");
- reached = 0;
- } break;
-case 113:
-# line 585 "cgram.y"
-{ register NODE *temp;
- idname = curftn;
- temp = buildtree( NAME, NIL, NIL );
- if(temp->in.type == TVOID)
- uerror("void function %s cannot return value",
- stab[idname].sname);
- temp->in.type = DECREF( temp->in.type );
- temp = buildtree( RETURN, temp, yypvt[-1].nodep );
- /* now, we have the type of the RHS correct */
- temp->in.left->in.op = FREE;
- temp->in.op = FREE;
- ecomp( buildtree( FORCE, temp->in.right, NIL ) );
- retstat |= RETVAL;
- branch( retlab );
- reached = 0;
- } break;
-case 114:
-# line 602 "cgram.y"
-{ register NODE *q;
- q = block( FREE, NIL, NIL, INT|ARY, 0, INT );
- q->tn.rval = idname = yypvt[-1].intval;
- defid( q, ULABEL );
- stab[idname].suse = -lineno;
- branch( stab[idname].offset );
- goto rch;
- } break;
-case 119:
-# line 616 "cgram.y"
-{ register NODE *q;
- q = block( FREE, NIL, NIL, INT|ARY, 0, LABEL );
- q->tn.rval = yypvt[-1].intval;
- defid( q, LABEL );
- reached = 1;
- } break;
-case 120:
-# line 623 "cgram.y"
-{ addcase(yypvt[-1].nodep);
- reached = 1;
- } break;
-case 121:
-# line 627 "cgram.y"
-{ reached = 1;
- adddef();
- flostat |= FDEF;
- } break;
-case 122:
-# line 633 "cgram.y"
-{ savebc();
- if( !reached ) werror( "loop not entered at top");
- brklab = getlab();
- contlab = getlab();
- deflab( yyval.intval = getlab() );
- reached = 1;
- } break;
-case 123:
-# line 642 "cgram.y"
-{ ecomp( buildtree( CBRANCH, yypvt[-1].nodep, bcon( yyval.intval=getlab()) ) ) ;
- reached = 1;
- } break;
-case 124:
-# line 647 "cgram.y"
-{ if( reached ) branch( yyval.intval = getlab() );
- else yyval.intval = NOLAB;
- deflab( yypvt[-2].intval );
- reached = 1;
- } break;
-case 125:
-# line 655 "cgram.y"
-{ savebc();
- if( !reached ) werror( "loop not entered at top");
- if( yypvt[-1].nodep->in.op == ICON && yypvt[-1].nodep->tn.lval != 0 ) flostat = FLOOP;
- deflab( contlab = getlab() );
- reached = 1;
- brklab = getlab();
- if( flostat == FLOOP ) tfree( yypvt[-1].nodep );
- else ecomp( buildtree( CBRANCH, yypvt[-1].nodep, bcon( brklab) ) );
- } break;
-case 126:
-# line 666 "cgram.y"
-{ if( yypvt[-3].nodep ) ecomp( yypvt[-3].nodep );
- else if( !reached ) werror( "loop not entered at top");
- savebc();
- contlab = getlab();
- brklab = getlab();
- deflab( yyval.intval = getlab() );
- reached = 1;
- if( yypvt[-1].nodep ) ecomp( buildtree( CBRANCH, yypvt[-1].nodep, bcon( brklab) ) );
- else flostat |= FLOOP;
- } break;
-case 127:
-# line 678 "cgram.y"
-{ register NODE *q;
-
- savebc();
- brklab = getlab();
- q = yypvt[-1].nodep;
- switch( q->in.type ) {
- case CHAR: case UCHAR:
- case SHORT: case USHORT:
- case INT: case UNSIGNED:
- case MOE: case ENUMTY:
- break;
- default:
- werror("switch expression not type int");
- q = makety( q, INT, q->fn.cdim, q->fn.csiz );
- }
- ecomp( buildtree( FORCE, q, NIL ) );
- branch( yyval.intval = getlab() );
- swstart();
- reached = 0;
- } break;
-case 128:
-# line 700 "cgram.y"
-{ yyval.intval=instruct; stwart=instruct=0; } break;
-case 129:
-# line 702 "cgram.y"
-{ yyval.intval = icons( yypvt[-0].nodep ); instruct=yypvt[-1].intval; } break;
-case 131:
-# line 706 "cgram.y"
-{ yyval.nodep=0; } break;
-case 133:
-# line 711 "cgram.y"
-{ goto bop; } break;
-case 134:
-# line 715 "cgram.y"
-{
- preconf:
- if( yychar==RELOP||yychar==EQUOP||yychar==AND||yychar==OR||yychar==ER ){
- precplaint:
- if( hflag ) werror( "precedence confusion possible: parenthesize!" );
- }
- bop:
- yyval.nodep = buildtree( yypvt[-1].intval, yypvt[-2].nodep, yypvt[-0].nodep );
- } break;
-case 135:
-# line 725 "cgram.y"
-{ yypvt[-1].intval = COMOP;
- goto bop;
- } break;
-case 136:
-# line 729 "cgram.y"
-{ goto bop; } break;
-case 137:
-# line 731 "cgram.y"
-{ if(yychar==SHIFTOP) goto precplaint; else goto bop; } break;
-case 138:
-# line 733 "cgram.y"
-{ if(yychar==SHIFTOP ) goto precplaint; else goto bop; } break;
-case 139:
-# line 735 "cgram.y"
-{ if(yychar==PLUS||yychar==MINUS) goto precplaint; else goto bop; } break;
-case 140:
-# line 737 "cgram.y"
-{ goto bop; } break;
-case 141:
-# line 739 "cgram.y"
-{ goto preconf; } break;
-case 142:
-# line 741 "cgram.y"
-{ if( yychar==RELOP||yychar==EQUOP ) goto preconf; else goto bop; } break;
-case 143:
-# line 743 "cgram.y"
-{ if(yychar==RELOP||yychar==EQUOP) goto preconf; else goto bop; } break;
-case 144:
-# line 745 "cgram.y"
-{ if(yychar==RELOP||yychar==EQUOP) goto preconf; else goto bop; } break;
-case 145:
-# line 747 "cgram.y"
-{ goto bop; } break;
-case 146:
-# line 749 "cgram.y"
-{ goto bop; } break;
-case 147:
-# line 751 "cgram.y"
-{ abop:
- yyval.nodep = buildtree( ASG yypvt[-2].intval, yypvt[-3].nodep, yypvt[-0].nodep );
- } break;
-case 148:
-# line 755 "cgram.y"
-{ goto abop; } break;
-case 149:
-# line 757 "cgram.y"
-{ goto abop; } break;
-case 150:
-# line 759 "cgram.y"
-{ goto abop; } break;
-case 151:
-# line 761 "cgram.y"
-{ goto abop; } break;
-case 152:
-# line 763 "cgram.y"
-{ goto abop; } break;
-case 153:
-# line 765 "cgram.y"
-{ goto abop; } break;
-case 154:
-# line 767 "cgram.y"
-{ goto abop; } break;
-case 155:
-# line 769 "cgram.y"
-{ yyval.nodep=buildtree(QUEST, yypvt[-4].nodep, buildtree( COLON, yypvt[-2].nodep, yypvt[-0].nodep ) );
- } break;
-case 156:
-# line 772 "cgram.y"
-{ werror( "old-fashioned assignment operator" ); goto bop; } break;
-case 157:
-# line 774 "cgram.y"
-{ goto bop; } break;
-case 159:
-# line 778 "cgram.y"
-{ yyval.nodep = buildtree( yypvt[-0].intval, yypvt[-1].nodep, bcon(1) ); } break;
-case 160:
-# line 780 "cgram.y"
-{ ubop:
- yyval.nodep = buildtree( UNARY yypvt[-1].intval, yypvt[-0].nodep, NIL );
- } break;
-case 161:
-# line 784 "cgram.y"
-{ if( ISFTN(yypvt[-0].nodep->in.type) || ISARY(yypvt[-0].nodep->in.type) ){
- werror( "& before array or function: ignored" );
- yyval.nodep = yypvt[-0].nodep;
- }
- else goto ubop;
- } break;
-case 162:
-# line 791 "cgram.y"
-{ goto ubop; } break;
-case 163:
-# line 793 "cgram.y"
-{
- yyval.nodep = buildtree( yypvt[-1].intval, yypvt[-0].nodep, NIL );
- } break;
-case 164:
-# line 797 "cgram.y"
-{ yyval.nodep = buildtree( yypvt[-1].intval==INCR ? ASG PLUS : ASG MINUS,
- yypvt[-0].nodep,
- bcon(1) );
- } break;
-case 165:
-# line 802 "cgram.y"
-{ yyval.nodep = doszof( yypvt[-0].nodep ); } break;
-case 166:
-# line 804 "cgram.y"
-{ yyval.nodep = buildtree( CAST, yypvt[-2].nodep, yypvt[-0].nodep );
- yyval.nodep->in.left->in.op = FREE;
- yyval.nodep->in.op = FREE;
- yyval.nodep = yyval.nodep->in.right;
- } break;
-case 167:
-# line 810 "cgram.y"
-{ yyval.nodep = doszof( yypvt[-1].nodep ); } break;
-case 168:
-# line 812 "cgram.y"
-{ yyval.nodep = buildtree( UNARY MUL, buildtree( PLUS, yypvt[-3].nodep, yypvt[-1].nodep ), NIL ); } break;
-case 169:
-# line 814 "cgram.y"
-{ yyval.nodep=buildtree(UNARY CALL,yypvt[-1].nodep,NIL); } break;
-case 170:
-# line 816 "cgram.y"
-{ yyval.nodep=buildtree(CALL,yypvt[-2].nodep,yypvt[-1].nodep); } break;
-case 171:
-# line 818 "cgram.y"
-{ if( yypvt[-1].intval == DOT ){
- if( notlval( yypvt[-2].nodep ) )uerror("structure reference must be addressable");
- yypvt[-2].nodep = buildtree( UNARY AND, yypvt[-2].nodep, NIL );
- }
- idname = yypvt[-0].intval;
- yyval.nodep = buildtree( STREF, yypvt[-2].nodep, buildtree( NAME, NIL, NIL ) );
- } break;
-case 172:
-# line 826 "cgram.y"
-{ idname = yypvt[-0].intval;
- /* recognize identifiers in initializations */
- if( blevel==0 && stab[idname].stype == UNDEF ) {
- register NODE *q;
-#ifndef FLEXNAMES
- werror( "undeclared initializer name %.8s", stab[idname].sname );
-#else
- werror( "undeclared initializer name %s", stab[idname].sname );
-#endif
- q = block( FREE, NIL, NIL, INT, 0, INT );
- q->tn.rval = idname;
- defid( q, EXTERN );
- }
- yyval.nodep=buildtree(NAME,NIL,NIL);
- stab[yypvt[-0].intval].suse = -lineno;
- } break;
-case 173:
-# line 843 "cgram.y"
-{ yyval.nodep=bcon(0);
- yyval.nodep->tn.lval = lastcon;
- yyval.nodep->tn.rval = NONAME;
- if( yypvt[-0].intval ) yyval.nodep->fn.csiz = yyval.nodep->in.type = ctype(LONG);
- } break;
-case 174:
-# line 849 "cgram.y"
-{ yyval.nodep=buildtree(FCON,NIL,NIL);
- yyval.nodep->fpn.fval = fcon;
- } break;
-case 175:
-# line 853 "cgram.y"
-{ yyval.nodep=buildtree(DCON,NIL,NIL);
- yyval.nodep->dpn.dval = dcon;
- } break;
-case 176:
-# line 857 "cgram.y"
-{ yyval.nodep = getstr(); /* get string contents */ } break;
-case 177:
-# line 859 "cgram.y"
-{ yyval.nodep=yypvt[-1].nodep; } break;
-case 178:
-# line 863 "cgram.y"
-{
- yyval.nodep = tymerge( yypvt[-1].nodep, yypvt[-0].nodep );
- yyval.nodep->in.op = NAME;
- yypvt[-1].nodep->in.op = FREE;
- } break;
-case 179:
-# line 871 "cgram.y"
-{ yyval.nodep = bdty( NAME, NIL, -1 ); } break;
-case 180:
-# line 873 "cgram.y"
-{ yyval.nodep = bdty( UNARY CALL, bdty(NAME,NIL,-1),0); } break;
-case 181:
-# line 875 "cgram.y"
-{ yyval.nodep = bdty( UNARY CALL, yypvt[-3].nodep, 0 ); } break;
-case 182:
-# line 877 "cgram.y"
-{ goto umul; } break;
-case 183:
-# line 879 "cgram.y"
-{ goto uary; } break;
-case 184:
-# line 881 "cgram.y"
-{ goto bary; } break;
-case 185:
-# line 883 "cgram.y"
-{ yyval.nodep = yypvt[-1].nodep; } break;
-case 186:
-# line 887 "cgram.y"
-{ if( stab[yypvt[-1].intval].stype == UNDEF ){
- register NODE *q;
- q = block( FREE, NIL, NIL, FTN|INT, 0, INT );
- q->tn.rval = yypvt[-1].intval;
- defid( q, EXTERN );
- }
- idname = yypvt[-1].intval;
- yyval.nodep=buildtree(NAME,NIL,NIL);
- stab[idname].suse = -lineno;
- } break;
- }
- goto yystack; /* stack new state and value */
-
- }