USG_PG3/usr/source/dc/bc.c

Compare this file to the similar file:
Show the results in this format:

#
# define UMINUS 257
# define LETTER 258
# define DIGIT 259
# define SQRT 260
# define LENGTH 261
# define _IF 262
# define FFF 263
# define EQ 264
# define _WHILE 265
# define _FOR 266
# define NE 267
# define LE 268
# define GE 269
# define INCR 270
# define DECR 271
# define _RETURN 272
# define _BREAK 273
# define _DEFINE 274
# define BASE 275
# define OBASE 276
# define SCALE 277
# define EQPL 278
# define EQMI 279
# define EQMUL 280
# define EQDIV 281
# define EQREM 282
# define EQEXP 283
# define _AUTO 284
# define DOT 285
# define QSTR 286
char cary[1000], *cp { cary };
char string[1000], *str {string};
int crs '0';
int rcrs '0';  /* reset crs */
int bindx 0;
int lev 0;
int ln;
char *ss;
int bstack[10] { 0 };
char *numb[15] {
  " 0", " 1", " 2", " 3", " 4", " 5",
  " 6", " 7", " 8", " 9", " 10", " 11",
  " 12", " 13", " 14" };
int *pre, *post;
#define yyclearin yychar = -1
#define yyerrok yyerrflag = 0
extern int yychar, yyerrflag;

int yyval 0;
int *yypv;
int yylval 0;
yyactr(__np__){

switch(__np__){

case 2: output( yypv[2] ); break;
case 3:{	bundle( pre, yypv[7], post ,"0",numb[lev],"Q");
			conout( yyval, yypv[2] );
			rcrs = crs;
			output( "" );
			lev = bindx = 0;
			} break;
case 6:{ bundle( yypv[1], "ps." ); } break;
case 7:{ bundle( "" ); } break;
case 8:{ bundle("[",yypv[1],"]P");} break;
case 9:{ bundle( yypv[3], "s", yypv[1] ); } break;
case 10:{ bundle( yypv[6], yypv[3], ":", geta(yypv[1])); } break;
case 11:{ bundle( "l", yypv[1], yypv[3], yypv[2], "s", yypv[1] ); } break;
case 12:{ bundle(yypv[3], ";", geta(yypv[1]), yypv[6], yypv[5], yypv[3], ":", geta(yypv[1]));} break;
case 13:{ bundle( numb[lev-bstack[bindx-1]], "Q" ); } break;
case 14: bundle( yypv[3], post, numb[lev], "Q" ); break;
case 15: bundle( "0", post, numb[lev], "Q" ); break;
case 16: bundle("0",post,numb[lev],"Q"); break;
case 17: bundle( yypv[3], "k"); break;
case 18: bundle("K",yypv[3],yypv[2],"k"); break;
case 19: bundle(yypv[3], "i"); break;
case 20: bundle("I",yypv[3],yypv[2],"i"); break;
case 21: bundle(yypv[3],"o"); break;
case 22: bundle("O",yypv[3],yypv[2],"o"); break;
case 23:{ yyval = yypv[2]; } break;
case 24:{ bundle("f"); } break;
case 25:{ bundle("c"); } break;
case 26:{	conout( yypv[7], yypv[2] );
			bundle( yypv[5], yypv[2], " " );
			} break;
case 27:{	bundle( yypv[6], yypv[4], yypv[2] );
			conout( yyval, yypv[2] );
			bundle( yypv[4], yypv[2], " " );
			} break;
case 28:{	bundle( yypv[7], yypv[5], "s.", yypv[3], yypv[2] );
			conout( yyval, yypv[2] );
			bundle( yypv[1], "s.", yypv[3], yypv[2], " " );
			} break;
case 29:{	bundle(yypv[4],"S",yypv[2]); } break;
case 30:{ yyval = "+"; } break;
case 31:{ yyval = "-"; } break;
case 32:{ yyval = "*"; } break;
case 33:{ yyval = "/"; } break;
case 34:{ yyval = "%%"; } break;
case 35:{ yyval = "^"; } break;
case 36:{ yyval = yypv[3]; } break;
case 37:{ --bindx; } break;
case 39:{ bundle( yypv[1], yypv[3] ); } break;
case 40:{ln++;} break;
case 42: bundle( yypv[1], yypv[3], "=" ); break;
case 43: bundle( yypv[1], yypv[3], ">" ); break;
case 44: bundle( yypv[1], yypv[3], "<" ); break;
case 45: bundle( yypv[1], yypv[3], "!=" ); break;
case 46: bundle( yypv[1], yypv[3], "!>" ); break;
case 47: bundle( yypv[1], yypv[3], "!<" ); break;
case 48: bundle( yypv[1], " 0!=" ); break;
case 49: bundle( yypv[1], yypv[3], "+" ); break;
case 50: bundle( yypv[1], yypv[3], "-" ); break;
case 51: bundle( " 0", yypv[2], "-" ); break;
case 52: bundle( yypv[1], yypv[3], "*" ); break;
case 53: bundle( yypv[1], yypv[3], "/" ); break;
case 54: bundle( yypv[1], yypv[3], "%%" ); break;
case 55: bundle( yypv[1], yypv[3], "^" ); break;
case 56:{ bundle(yypv[3], ";", geta(yypv[1])); } break;
case 57: bundle( "l", yypv[1], "d1+s", yypv[1] ); break;
case 58: bundle( "l", yypv[2], "1+ds", yypv[2] ); break;
case 59: bundle( "l", yypv[2], "1-ds", yypv[2] ); break;
case 60: bundle( "l", yypv[1], "d1-s", yypv[1] ); break;
case 61: bundle(yypv[3],";",geta(yypv[1]),"d1+",yypv[3],":",geta(yypv[1])); break;
case 62: bundle(yypv[4],";",geta(yypv[2]),"1+d",yypv[4],":",geta(yypv[2])); break;
case 63: bundle(yypv[3],";",geta(yypv[1]),"d1-",yypv[3],":",geta(yypv[1])); break;
case 64: bundle(yypv[4],";",geta(yypv[2]),"1-d",yypv[4],":",geta(yypv[2])); break;
case 65: bundle("Kd1+k"); break;
case 66: bundle("K1+dk"); break;
case 67: bundle("Kd1-k"); break;
case 68: bundle("K1-dk"); break;
case 69: bundle("Id1+i"); break;
case 70: bundle("I1+di"); break;
case 71: bundle("Id1-i"); break;
case 72: bundle("I1-di"); break;
case 73: bundle("Od1+o"); break;
case 74: bundle("O1+do"); break;
case 75: bundle("Od1-o"); break;
case 76: bundle("O1-do"); break;
case 77: bundle( yypv[3], "l", getf(yypv[1]), "x" ); break;
case 78: bundle( "l", getf(yypv[1]), "x" ); break;
case 79:{ bundle( " ", yypv[1] ); } break;
case 80:{ bundle( " .", yypv[2] ); } break;
case 81:{ bundle( " ", yypv[1], ".", yypv[3] ); } break;
case 82:{ bundle( " ", yypv[1], "." ); } break;
case 83:{ yyval = "l."; } break;
case 84: { bundle( "l", yypv[1] ); } break;
case 85:{ bundle( yypv[3], "ds", yypv[1] ); } break;
case 86:{ bundle( "l", yypv[1], yypv[3], yypv[2], "ds", yypv[1] ); } break;
case 87: { bundle(yypv[6],"d",yypv[3],":",geta(yypv[1])); } break;
case 88: { bundle(yypv[3],";",geta(yypv[1]),yypv[6],yypv[5],"d",yypv[3],":",geta(yypv[1])); } break;
case 89: bundle(yypv[3],"Z"); break;
case 90: bundle(yypv[3],"X"); break;
case 91: { yyval = yypv[2]; } break;
case 92:{ bundle( "?" ); } break;
case 93:{ bundle( yypv[3], "v" ); } break;
case 94:{ bundle("L",yypv[2]); } break;
case 95: bundle(yypv[3],"dk"); break;
case 96: bundle("K",yypv[3],yypv[2],"dk"); break;
case 97: bundle(yypv[3],"di"); break;
case 98: bundle("I",yypv[3],yypv[2],"di"); break;
case 99: bundle(yypv[3],"do"); break;
case 100: bundle("O",yypv[3],yypv[2],"do"); break;
case 101: bundle("K"); break;
case 102: bundle("I"); break;
case 103: bundle("O"); break;
case 105: bundle( yypv[1], yypv[3] ); break;
case 107:bundle("l",geta(yypv[1])); break;
case 108:{ *cp++ = '\0'; } break;
case 109:{ yyval = cp; *cp++ = '_'; } break;
case 110:{ yyval = cp; *cp++ = yypv[1]; } break;
case 111:{ *cp++ = yypv[2]; } break;
case 112:{ yyval = cp; *cp++ = crs++; *cp++ = '\0';
			if(crs == '[')crs=+3;
			if(crs == 'a')crs='{';
			if(crs == 0241){yyerror("program too big");
				getout();
			}
			bstack[bindx++] = lev++; } break;
case 113:{	yyval = getf(yypv[2]);
			pre = "";
			post = "";
			lev = 1;
			bstack[bindx=0] = 0;
			} break;
case 115:{ pp( yypv[1] ); } break;
case 116:{ pp( yypv[3] ); } break;
case 117:{ tp(yypv[1]); } break;
case 118:{ tp(yypv[3]); } break;
case 120:{ yyval = geta(yypv[1]); } break;
}
}
int yyerrval 256;

# define error 256

int peekc -1;
int sargc;
int ifile;
char **sargv;
extern int fin;
extern int fout;

char *funtab[26]{
	01,02,03,04,05,06,07,010,011,012,013,014,015,016,017,
	020,021,022,023,024,025,026,027,030,031,032 };
char *atab[26]{
	0241,0242,0243,0244,0245,0246,0247,0250,0251,0252,0253,
	0254,0255,0256,0257,0260,0261,0262,0263,0264,0265,0266,
	0267,0270,0271,0272};
char *letr[26] {
  "a","b","c","d","e","f","g","h","i","j",
  "k","l","m","n","o","p","q","r","s","t",
  "u","v","w","x","y","z" } ;
char *dot { "." };
yylex(){
  int c,ch;
restart:
  c = getc();
  peekc = -1;
  while( c == ' ' || c == '\t' ) c = getc();
  if( c<= 'z' && c >= 'a' ) {
    /* look ahead to look for reserved words */
    peekc = getc();
    if( peekc >= 'a' && peekc <= 'z' ){ /* must be reserved word */
      if( c=='i' && peekc=='f' ){ c=_IF; goto skip; }
      if( c=='w' && peekc=='h' ){ c=_WHILE; goto skip; }
      if( c=='f' && peekc=='o' ){ c=_FOR; goto skip; }
      if( c=='s' && peekc=='q' ){ c=SQRT; goto skip; }
      if( c=='r' && peekc=='e' ){ c=_RETURN; goto skip; }
      if( c=='b' && peekc=='r' ){ c=_BREAK; goto skip; }
      if( c=='d' && peekc=='e' ){ c=_DEFINE; goto skip; }
      if( c=='s' && peekc=='c' ){ c= SCALE; goto skip; }
      if( c=='b' && peekc=='a' ){ c=BASE; goto skip; }
      if( c=='i' && peekc == 'b'){ c=BASE; goto skip; }
      if( c=='o' && peekc=='b' ){ c=OBASE; goto skip; }
      if( c=='d' && peekc=='i' ){ c=FFF; goto skip; }
      if( c=='a' && peekc=='u' ){ c=_AUTO; goto skip; }
      if( c == 'l' && peekc=='e'){ c=LENGTH; goto skip; }
      if( c == 'q' && peekc == 'u'){getout();}
      /* could not be found */
      return( error );
    skip:  /* skip over rest of word */
	peekc = -1;
      while( (ch = getc()) >= 'a' && ch <= 'z' );
	peekc = ch;
      return( c );
      }

    /* usual case; just one single letter */

    yylval = letr[c-'a'];
    return( LETTER );
    }
  if( c>= '0' && c <= '9' || c>= 'A' && c<= 'F' ){
    yylval = c;
    return( DIGIT );
    }
  switch( c ){
    case '.':  return( DOT );
    case '=':
      switch( peekc = getc() ){
        case '=': c=EQ; goto gotit;
        case '+': c=EQPL; goto gotit;
        case '-': c=EQMI; goto gotit;
        case '*': c=EQMUL; goto gotit;
        case '/': c=EQDIV; goto gotit;
        case '%': c=EQREM; goto gotit;
        case '^': c=EQEXP; goto gotit;
        default:   return( '=' );
        gotit:     peekc = -1; return(c);
        }
    case '+':  return( cpeek( '+', INCR, '+' ) );
    case '-':  return( cpeek( '-', DECR, '-' ) );
    case '<':  return( cpeek( '=', LE, '<' ) );
    case '>':  return( cpeek( '=', GE, '>' ) );
    case '!':  return( cpeek( '=', NE, '!' ) );
    case '/':
	if((peekc = getc()) == '*'){
		peekc = -1;
		while((getc() != '*') || ((peekc = getc()) != '/'));
		peekc = -1;
		goto restart;
	}
	else return(c);
    case '"':  
	       yylval = str;
	       while((c=getc()) != '"'){*str++ = c;
			if(str >= &string[999]){yyerror("string space exceeded");
				getout();
				}
			}
	       *str++ = '\0';
	       return(QSTR);
    default:   return( c );
    }
  }

cpeek( c, yes, no ){
  if( (peekc=getc()) != c ) return( no );
  else {
    peekc = -1;
    return( yes );
    }
  }

getc(){
  int ch;
loop:
  ch = (peekc < 0) ? getchar() : peekc;
  peekc = -1;
  if(ch != '\0')return(ch);
  if(++ifile > sargc){
	if(ifile >= sargc+2)getout();
	fin = dup(0);
	ln = 0;
	goto loop;
  }
close(fin);
  if((fin = open(sargv[ifile],0)) >= 0){
		ln = 0;
		ss = sargv[ifile];
		goto loop;
		}
  yyerror("cannot open input file");
}
# define b_sp_max 3000
int b_space [ b_sp_max ];
int * b_sp_nxt { b_space };

bdebug 0;
bundle(a){
  int i, *p, *q;

  i = nargs();
  q = b_sp_nxt;

  if( bdebug ) printf("bundle %d elements at %o\n", i, q );

  for( p = &a; i-->0; ++p ){

    if( b_sp_nxt >= & b_space[b_sp_max] ) yyerror( "bundling space exceeded" );

    * b_sp_nxt++ = *p;
    }
  * b_sp_nxt++ = 0;
  yyval = q;
  return( q );
  }

routput(p) int *p; {
  if( bdebug ) printf("routput(%o)\n", p );
  if( p >= &b_space[0] && p < &b_space[b_sp_max]){
    /* part of a bundle */
    while( *p != 0 ) routput( *p++ );
    }
  else printf( p );   /* character string */
  }

output( p ) int *p; {
  routput( p );
  b_sp_nxt = & b_space[0];
  printf( "\n" );
  flush(fout);
  cp = cary;
  crs = rcrs;
  }

conout( p, s ) int *p; char *s; {
  printf("[");
  routput( p );
  printf("]s%s\n", s );
flush(fout);
  lev--;
  }

yyerror( s ) char *s; {
   if(ifile > sargc)ss="teletype";
  printf("c[%s on line %d, %s]pc\n", s ,ln+1,ss);
flush(fout);
  cp = cary;
  crs = rcrs;
  bindx = 0;
  lev = 0;
  b_sp_nxt = &b_space[0];
  }

pp( s ) char *s; {
  /* puts the relevant stuff on pre and post for the letter s */

  bundle( "S", s, pre );
  pre = yyval;
  bundle( post, "L", s, "s." );
  post = yyval;
  }

tp( s ) char *s; { /* same as pp, but for temps */
  bundle( "0S", s, pre );
  pre = yyval;
  bundle( post, "L", s, "s." );
  post = yyval;
  }

yyinit(argc,argv) int argc; char *argv[];{
  signal( 2, &getout );  /* ignore all interrupts */
   fout = dup(1);
  sargv=argv;
  sargc= -- argc;
  if(sargc == 0)fin=dup(0);
   else if((fin = open(sargv[1],0)) < 0)
	yyerror("cannot open input file");
  ifile = 1;
   ln = 0;
   ss = sargv[1];
  }
getout(){
printf("q");
flush(fout);
exit();
}

getf(p) char *p;{
return(&funtab[*p -0141]);
}
geta(p) char *p;{
	return(&atab[*p - 0141]);
}

main(argc, argv)
char **argv;
{
	int p[2];


	if (argc > 1 && *argv[1] == '-') {
		if((argv[1][1] == 'd')||(argv[1][1] == 'c')){
			yyinit(--argc, ++argv);
			yyparse();
			exit();
		}
		if(argv[1][1] != 'l'){
			printf("unrecognizable argument\n");
			flush(fout);
			exit();
		}
		argv[1] = "/usr/lib/lib.b";
	}
	pipe(p);
	if (fork()==0) {
		close(1);
		dup(p[1]);
		close(p[0]);
		close(p[1]);
		yyinit(argc, argv);
		yyparse();
		exit();
	}
	close(0);
	dup(p[0]);
	close(p[0]);
	close(p[1]);
	execl("/bin/dc", "dc", "-", 0);
	execl("/usr/bin/dc", "dc", "-", 0);
}

int yyact[] {0,12289,4096,16384,4352,8206,4141,8212,4354,8198
,4355,8224,4356,8220,4357,8217,4358,8207,4359,8205
,4361,8208,4362,8221,4366,8213,4367,8214,4368,8200
,4369,8199,4370,8211,4371,8202,4372,8203,4373,8201
,4381,8216,4382,8197,4219,8204,4136,8218,4222,8210
,4159,8219,4191,8223,12295,4155,8227,4106,8226,0
,4354,8230,12402,4139,8231,4141,8232,4138,8233,4143
,8234,4133,8235,4190,8236,12294,12296,4157,8237,4366
,8240,4367,8241,4374,8243,4375,8244,4376,8245,4377
,8246,4378,8247,4379,8248,4187,8238,4136,8242,12372
,12301,4136,8249,12304,4157,8250,4366,8252,4367,8253
,4374,8243,4375,8244,4376,8245,4377,8246,4378,8247
,4379,8248,4136,8254,12389,4157,8255,4366,8257,4367
,8258,4374,8243,4375,8244,4376,8245,4377,8246,4378
,8247,4379,8248,12390,4157,8259,4366,8261,4367,8262
,4374,8243,4375,8244,4376,8245,4377,8246,4378,8247
,4379,8248,12391,4352,8206,4141,8212,4354,8198,4355
,8224,4356,8220,4357,8217,4358,8207,4359,8205,4361
,8208,4362,8221,4366,8213,4367,8214,4368,8200,4369
,8199,4371,8202,4372,8203,4373,8201,4381,8216,4382
,8197,4219,8204,4136,8218,4222,8210,4159,8219,4191
,8223,12295,12312,12313,12400,4354,8268,0,4354,8269
,0,4141,8212,4354,8271,4355,8224,4356,8220,4357
,8217,4366,8213,4367,8214,4371,8273,4372,8274,4373
,8272,4381,8216,4136,8218,4222,8275,4159,8219,4191
,8223,0,4354,8276,4371,8278,4372,8279,4373,8277
,0,4354,8280,4371,8282,4372,8283,4373,8281,0
,4381,8284,12367,4355,8224,4191,8223,12371,4136,8286
,0,12380,4136,8288,0,4136,8289,0,4355,8290
,12396,12397,12398,12290,12328,12329,4137,8291,4140,8292
,0,12403,4187,8293,12407,12345,12348,4141,8212,4354
,8307,4355,8224,4356,8220,4357,8217,4366,8213,4367
,8214,4371,8273,4372,8274,4373,8272,4381,8216,4137
,8304,4136,8218,4222,8275,4159,8219,4191,8223,0
,12318,12319,12320,12321,12322,12323,4141,8212,4354,8271
,4355,8224,4356,8220,4357,8217,4366,8213,4367,8214
,4371,8273,4372,8274,4373,8272,4381,8216,4137,8309
,4136,8218,4222,8275,4159,8219,4191,8223,0,12353
,12355,12357,12359,12361,12363,4221,8317,4155,8227,4106
,8226,0,12326,12325,4136,8320,0,4141,8212,4354
,8271,4355,8224,4356,8220,4357,8217,4366,8213,4367
,8214,4371,8273,4372,8274,4373,8272,4381,8216,4136
,8218,4222,8275,4159,8219,4191,8223,0,4157,8323
,12382,4136,8324,0,12339,4157,8326,4366,8240,4367
,8241,4374,8243,4375,8244,4376,8245,4377,8246,4378
,8247,4379,8248,4187,8325,4136,8242,12372,4157,8328
,4366,8252,4367,8253,4374,8243,4375,8244,4376,8245
,4377,8246,4378,8247,4379,8248,4136,8254,12389,4157
,8330,4366,8257,4367,8258,4374,8243,4375,8244,4376
,8245,4377,8246,4378,8247,4379,8248,12390,4157,8332
,4366,8261,4367,8262,4374,8243,4375,8244,4376,8245
,4377,8246,4378,8247,4379,8248,12391,4354,8334,0
,4187,8335,12346,12354,12358,12362,4187,8336,12347,12356
,12360,12364,4355,8224,4191,8223,12370,12368,4139,8231
,4141,8232,4138,8233,4143,8234,4133,8235,4190,8236
,4137,8339,0,12399,4219,8342,0,4354,8230,0
,4189,8344,0,4138,8233,4143,8234,4133,8235,4190
,8236,12337,4138,8233,4143,8234,4133,8235,4190,8236
,12338,4190,8236,12340,4190,8236,12341,4190,8236,12342
,4190,8236,12343,4139,8231,4141,8232,4138,8233,4143
,8234,4133,8235,4190,8236,12297,4139,8231,4141,8232
,4138,8233,4143,8234,4133,8235,4190,8236,4189,8345
,0,4139,8231,4141,8232,4138,8233,4143,8234,4133
,8235,4190,8236,12299,4137,8346,4140,8347,0,12366
,12392,4139,8231,4141,8232,4138,8233,4143,8234,4133
,8235,4190,8236,12394,4157,8326,4366,8240,4367,8241
,4374,8243,4375,8244,4376,8245,4377,8246,4378,8247
,4379,8248,4187,8348,4136,8242,12372,4139,8231,4141
,8232,4138,8233,4143,8234,4133,8235,4190,8236,4137
,8349,0,12303,4139,8231,4141,8232,4138,8233,4143
,8234,4133,8235,4190,8236,12305,4139,8231,4141,8232
,4138,8233,4143,8234,4133,8235,4190,8236,12306,4139
,8231,4141,8232,4138,8233,4143,8234,4133,8235,4190
,8236,4137,8350,0,4139,8231,4141,8232,4138,8233
,4143,8234,4133,8235,4190,8236,12307,4139,8231,4141
,8232,4138,8233,4143,8234,4133,8235,4190,8236,12308
,4139,8231,4141,8232,4138,8233,4143,8234,4133,8235
,4190,8236,12309,4139,8231,4141,8232,4138,8233,4143
,8234,4133,8235,4190,8236,12310,12311,4352,8206,4141
,8212,4354,8198,4355,8224,4356,8220,4357,8217,4358
,8207,4359,8205,4361,8208,4362,8221,4366,8213,4367
,8214,4368,8200,4369,8199,4371,8202,4372,8203,4373
,8201,4381,8216,4382,8197,4219,8204,4136,8218,4222
,8210,4159,8219,4191,8223,12295,4136,8352,0,4155
,8354,0,4139,8231,4141,8232,4138,8233,4143,8234
,4133,8235,4190,8236,4360,8355,4363,8358,4364,8360
,4365,8359,4156,8356,4158,8357,12336,12401,12382,12369
,4139,8231,4141,8232,4138,8233,4143,8234,4133,8235
,4190,8236,4137,8373,0,12379,4139,8231,4141,8232
,4138,8233,4143,8234,4133,8235,4190,8236,4137,8374
,0,4139,8231,4141,8232,4138,8233,4143,8234,4133
,8235,4190,8236,4155,8375,0,4155,8227,4106,8226
,0,12404,12408,4157,8378,4366,8380,4367,8381,4374
,8243,4375,8244,4376,8245,4377,8246,4378,8247,4379
,8248,12344,12365,4141,8212,4354,8307,4355,8224,4356
,8220,4357,8217,4366,8213,4367,8214,4371,8273,4372
,8274,4373,8272,4381,8216,4136,8218,4222,8275,4159
,8219,4191,8223,0,4141,8212,4354,8271,4355,8224
,4356,8220,4357,8217,4366,8213,4367,8214,4371,8273
,4372,8274,4373,8272,4381,8216,4189,8383,4136,8218
,4222,8275,4159,8219,4191,8223,0,12302,12378,12327
,4137,8385,0,4139,8231,4141,8232,4138,8233,4143
,8234,4133,8235,4190,8236,12317,4139,8231,4141,8232
,4138,8233,4143,8234,4133,8235,4190,8236,4189,8393
,0,4139,8231,4141,8232,4138,8233,4143,8234,4133
,8235,4190,8236,12373,4139,8231,4141,8232,4138,8233
,4143,8234,4133,8235,4190,8236,12374,4139,8231,4141
,8232,4138,8233,4143,8234,4133,8235,4190,8236,12383
,4139,8231,4141,8232,4138,8233,4143,8234,4133,8235
,4190,8236,12384,4139,8231,4141,8232,4138,8233,4143
,8234,4133,8235,4190,8236,12385,4139,8231,4141,8232
,4138,8233,4143,8234,4133,8235,4190,8236,12386,4139
,8231,4141,8232,4138,8233,4143,8234,4133,8235,4190
,8236,12387,4139,8231,4141,8232,4138,8233,4143,8234
,4133,8235,4190,8236,12388,4139,8231,4141,8232,4138
,8233,4143,8234,4133,8235,4190,8236,4189,8394,0
,4139,8231,4141,8232,4138,8233,4143,8234,4133,8235
,4190,8236,4189,8395,0,12377,12381,12324,4352,8206
,4141,8212,4354,8198,4355,8224,4356,8220,4357,8217
,4358,8207,4359,8205,4361,8208,4362,8221,4366,8213
,4367,8214,4368,8200,4369,8199,4371,8202,4372,8203
,4373,8201,4380,8397,4381,8216,4382,8197,4219,8204
,4136,8218,4222,8210,4159,8219,4191,8223,12295,12292
,12349,12351,12393,12395,4137,8400,0,4139,8231,4141
,8232,4138,8233,4143,8234,4133,8235,4190,8236,4137
,8402,0,4139,8231,4141,8232,4138,8233,4143,8234
,4133,8235,4190,8236,12330,4139,8231,4141,8232,4138
,8233,4143,8234,4133,8235,4190,8236,12331,4139,8231
,4141,8232,4138,8233,4143,8234,4133,8235,4190,8236
,12332,4139,8231,4141,8232,4138,8233,4143,8234,4133
,8235,4190,8236,12333,4139,8231,4141,8232,4138,8233
,4143,8234,4133,8235,4190,8236,12334,4139,8231,4141
,8232,4138,8233,4143,8234,4133,8235,4190,8236,12335
,4157,8403,4366,8380,4367,8381,4374,8243,4375,8244
,4376,8245,4377,8246,4378,8247,4379,8248,12344,12350
,12352,4221,8405,4155,8227,4106,8226,0,4354,8230
,0,4139,8231,4141,8232,4138,8233,4143,8234,4133
,8235,4190,8236,12298,4139,8231,4141,8232,4138,8233
,4143,8234,4133,8235,4190,8236,12300,12291,4155,8227
,4106,8226,4140,8414,0,12405,12314,12315,4139,8231
,4141,8232,4138,8233,4143,8234,4133,8235,4190,8236
,12375,4139,8231,4141,8232,4138,8233,4143,8234,4133
,8235,4190,8236,12376,12293,12316,12406,-1};

int yypact[] {0,1,2,55,60,63,76,77,100,101
,104,125,144,163,212,213,214,214,214,215
,218,221,252,261,270,273,278,221,281,282
,285,288,291,292,293,294,295,296,301,302
,221,221,221,221,221,221,221,221,221,305
,306,307,340,341,342,343,344,345,346,221
,221,379,380,221,221,221,381,382,221,221
,383,384,385,392,393,394,397,428,431,434
,435,458,479,498,517,520,523,524,525,526
,529,530,531,532,537,221,538,221,221,553
,554,557,560,563,572,581,584,587,590,593
,606,621,634,639,640,641,654,677,692,693
,706,719,734,747,760,773,786,787,836,397
,839,842,221,867,221,221,221,221,221,221
,221,221,221,868,221,221,869,870,885,886
,901,916,921,922,923,942,943,974,1007,1008
,1009,397,1010,221,221,221,221,221,221,221
,1013,1026,1041,1054,1067,1080,1093,1106,1119,1132
,1145,1160,1175,1176,1177,1178,1229,221,221,1230
,1231,1232,1233,1234,787,1237,1252,1265,1278,1291
,1304,1317,1330,1349,1350,1351,1358,1361,1374,787
,393,787,221,221,1387,1388,1395,1396,1397,393
,1398,1411,1424,557,1425,1426,-1};

int yyr1[] {0,1,1,1,6,6,2,2,2,2
,2,2,2,2,2,2,2,2,2,2
,2,2,2,2,2,2,2,2,2,2
,10,10,10,10,10,10,14,12,7,7
,3,3,13,13,13,13,13,13,13,9
,9,9,9,9,9,9,9,9,9,9
,9,9,9,9,9,9,9,9,9,9
,9,9,9,9,9,9,9,9,9,9
,9,9,9,9,9,9,9,9,9,9
,9,9,9,9,9,9,9,9,9,9
,9,9,9,9,15,15,17,17,16,18
,18,18,11,4,5,5,5,8,8,19
,19,-1};

int yyr2[] {0,0,3,8,1,4,1,0,1,3
,6,3,6,1,4,3,1,3,3,3
,3,3,3,3,1,1,7,7,8,4
,1,1,1,1,1,1,4,0,1,3
,1,1,3,3,3,3,3,3,1,3
,3,2,3,3,3,3,4,2,2,2
,2,5,5,5,5,2,2,2,2,2
,2,2,2,2,2,2,2,4,3,1
,2,3,2,1,1,3,3,6,6,4
,4,3,1,4,2,3,3,3,3,3
,3,1,1,1,1,3,1,3,1,1
,1,2,0,3,0,1,3,1,3,1
,3,-1};

int yygo[] {0,-1,1,1,2,126,159,193,209,208
,216,210,218,-1,72,2,33,150,185,214
,221,-1,126,-1,3,-1,36,-1,184,184
,204,-1,71,-1,214,20,78,26,95,39
,102,40,103,41,104,42,105,43,106,44
,107,45,108,46,109,47,110,50,114,57
,116,58,118,59,119,62,120,63,121,64
,122,67,123,68,124,75,130,94,146,96
,148,97,149,128,130,131,169,133,170,134
,171,135,172,136,173,137,174,138,175,139
,176,140,177,141,178,143,179,144,180,155
,114,156,170,160,130,162,194,163,195,164
,196,165,197,166,198,167,199,168,200,186
,206,187,207,211,219,212,220,-1,4,6
,47,9,59,10,64,11,68,80,137,81
,139,82,141,153,187,201,212,-1,135,16
,74,17,75,-1,73,209,217,218,223,-1
,127,128,161,160,192,-1,129,-1,17,-1
,111,24,93,92,145,-1,23,155,190,-1
,113,-1,30,100,151,205,215,222,224,-1
,37,-1};

int yypgo[] {0,1,3,15,23,25,27,29,33,35
,139,159,165,171,177,179,181,187,191,193
,-1};

int nterms 53;
int nnonter 19;
int nstate 225;
char *yysterm[] {
"error",
"UMINUS",
"LETTER",
"DIGIT",
"SQRT",
"LENGTH",
"_IF",
"FFF",
"EQ",
"_WHILE",
"_FOR",
"NE",
"LE",
"GE",
"INCR",
"DECR",
"_RETURN",
"_BREAK",
"_DEFINE",
"BASE",
"OBASE",
"SCALE",
"EQPL",
"EQMI",
"EQMUL",
"EQDIV",
"EQREM",
"EQEXP",
"_AUTO",
"DOT",
"QSTR",
0 };

char *yysnter[] {
"$accept",
"start",
"stat",
"tail",
"def",
"dargs",
"dlist",
"slist",
"dlets",
"e",
"EQOP",
"CRS",
"BLEV",
"re",
"fprefix",
"cargs",
"cons",
"eora",
"constant",
"lora" };