MiniUnix/usr/source/s1/bc.c
#
# define UMINUS 257
# define LETTER 258
# define DIGIT 259
# define SQRT 260
# define _IF 261
# define FFF 262
# define EQ 263
# define _WHILE 264
# define _FOR 265
# define NE 266
# define LE 267
# define GE 268
# define INCR 269
# define DECR 270
# define _RETURN 271
# define _BREAK 272
# define _DEFINE 273
# define BASE 274
# define OBASE 275
# define SCALE 276
# define EQPL 277
# define EQMI 278
# define EQMUL 279
# define EQDIV 280
# define EQREM 281
# define EQEXP 282
# define _AUTO 283
# define DOT 284
# define QSTR 285
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 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 );
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( yypv[2], "k" ); break;
case 17: bundle( yypv[3], "k"); break;
case 18: bundle("K",yypv[3],yypv[2],"k"); break;
case 19: bundle( yypv[2], "i" ); break;
case 20: bundle(yypv[3], "i"); break;
case 21: bundle("I",yypv[3],yypv[2],"i"); break;
case 22: bundle( yypv[2], "o" ); break;
case 23: bundle(yypv[3],"o"); break;
case 24: bundle("O",yypv[3],yypv[2],"o"); break;
case 25:{ yyval = yypv[2]; } break;
case 26:{ bundle("f"); } break;
case 27:{ bundle("c"); } break;
case 28:{ conout( yypv[7], yypv[2] );
bundle( yypv[5], yypv[2], " " );
} break;
case 29:{ bundle( yypv[6], yypv[4], yypv[2] );
conout( yyval, yypv[2] );
bundle( yypv[4], yypv[2], " " );
} break;
case 30:{ bundle( yypv[7], yypv[5], "s.", yypv[3], yypv[2] );
conout( yyval, yypv[2] );
bundle( yypv[1], "s.", yypv[3], yypv[2], " " );
} break;
case 31:{ bundle(yypv[4],"S",yypv[2]); } break;
case 32:{ yyval = "+"; } break;
case 33:{ yyval = "-"; } break;
case 34:{ yyval = "*"; } break;
case 35:{ yyval = "/"; } break;
case 36:{ yyval = "%%"; } break;
case 37:{ yyval = "^"; } break;
case 38:{ yyval = yypv[3]; } break;
case 39:{ --bindx; } break;
case 41:{ 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], yypv[3], "!>" ); break;
case 49: bundle( yypv[1], yypv[3], "!<" ); break;
case 50: bundle( yypv[1], " 0!=" ); break;
case 51: bundle( yypv[1], yypv[3], "+" ); break;
case 52: bundle( yypv[1], yypv[3], "-" ); break;
case 53: bundle( " 0", yypv[2], "-" ); break;
case 54: bundle( yypv[1], yypv[3], "*" ); break;
case 55: bundle( yypv[1], yypv[3], "/" ); break;
case 56: bundle( yypv[1], yypv[3], "%%" ); break;
case 57: bundle( yypv[1], yypv[3], "^" ); break;
case 58:{ bundle(yypv[3], ";", geta(yypv[1])); } break;
case 59: bundle( "l", yypv[1], "d1+s", yypv[1] ); break;
case 60: bundle( "l", yypv[2], "1+ds", yypv[2] ); break;
case 61: bundle( "l", yypv[2], "1-ds", yypv[2] ); break;
case 62: bundle( "l", yypv[1], "d1-s", yypv[1] ); 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(yypv[3],";",geta(yypv[1]),"d1-",yypv[3],":",geta(yypv[1])); break;
case 66: bundle(yypv[4],";",geta(yypv[2]),"1-d",yypv[4],":",geta(yypv[2])); break;
case 67: bundle("Kd1+k"); break;
case 68: bundle("K1+dk"); break;
case 69: bundle("Kd1-k"); break;
case 70: bundle("K1-dk"); break;
case 71: bundle("Id1+i"); break;
case 72: bundle("I1+di"); break;
case 73: bundle("Id1-i"); break;
case 74: bundle("I1-di"); break;
case 75: bundle("Od1+o"); break;
case 76: bundle("O1+do"); break;
case 77: bundle("Od1-o"); break;
case 78: bundle("O1-do"); break;
case 79: bundle( yypv[3], "l", getf(yypv[1]), "x" ); break;
case 80: bundle( "l", getf(yypv[1]), "x" ); break;
case 81:{ bundle( " ", yypv[1] ); } break;
case 82:{ bundle( " .", yypv[2] ); } break;
case 83:{ bundle( " ", yypv[1], ".", yypv[3] ); } break;
case 84:{ bundle( " ", yypv[1], "." ); } break;
case 85:{ yyval = "l."; } break;
case 86: { bundle( "l", yypv[1] ); } break;
case 87:{ bundle( yypv[3], "ds", yypv[1] ); } break;
case 88:{ bundle( "l", yypv[1], yypv[3], yypv[2], "ds", yypv[1] ); } break;
case 89: { yyval = yypv[2]; } break;
case 90:{ bundle( "?" ); } break;
case 91:{ bundle( yypv[3], "v" ); } break;
case 92:{ bundle("L",yypv[2]); } break;
case 93: bundle(yypv[2],"dk"); break;
case 94: bundle(yypv[3],"dk"); break;
case 95: bundle("K",yypv[3],yypv[2],"dk"); break;
case 96: bundle(yypv[2],"di"); break;
case 97: bundle(yypv[3],"di"); break;
case 98: bundle("I",yypv[3],yypv[2],"di"); break;
case 99: bundle(yypv[2],"do"); break;
case 100: bundle(yypv[3],"do"); break;
case 101: bundle("O",yypv[3],yypv[2],"do"); break;
case 102: bundle("K"); break;
case 103: bundle("I"); break;
case 104: bundle("O"); break;
case 106: bundle( yypv[1], yypv[3] ); break;
case 108:bundle("l",geta(yypv[1])); break;
case 109:{ *cp++ = '\0'; } break;
case 110:{ yyval = cp; *cp++ = '_'; } break;
case 111:{ yyval = cp; *cp++ = yypv[1]; } break;
case 112:{ *cp++ = yypv[2]; } break;
case 113:{ yyval = cp; *cp++ = crs++; *cp++ = '\0'; bstack[bindx++] = lev++; } break;
case 114:{ yyval = getf(yypv[2]);
pre = "";
post = "";
lev = 1;
bstack[bindx=0] = 0;
} break;
case 116:{ pp( yypv[1] ); } break;
case 117:{ pp( yypv[3] ); } break;
case 118:{ tp(yypv[1]); } break;
case 119:{ tp(yypv[3]); } break;
case 121:{ yyval = geta(yypv[1]); } break;
}
}
int yyerrval 256;
# define error 256
int peekc -1;
int sargc;
int ifile;
char **sargv;
extern int fin;
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=='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 == '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;
*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);
goto loop;
}
close(fin);
if((fin = open(sargv[ifile],0)) >= 0)goto loop;
yyerror("cannot open input file");
}
# define b_sp_max 1500
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" );
cp = cary;
str = string;
crs = rcrs;
}
conout( p, s ) int *p; char *s; {
printf("[");
routput( p );
printf("]s%s\n", s );
lev--;
str = string;
}
yyerror( s ) char *s; {
printf("c[%s]pc\n", s );
cp = cary;
crs = rcrs;
bindx = 0;
lev = 0;
b_sp_nxt = &b_space[0];
str = string;
}
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[];{
int (*getout)();
signal( 2, getout ); /* ignore all interrupts */
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;
}
getout(){
printf("q");
exit();
}
getf(p) char *p;{
return(&funtab[*p -0141]);
}
geta(p) char *p;{
return(&atab[*p - 0141]);
}
char *pipe "..pipe";
main(argc, argv)
char **argv;
{
int p[2];
int stat;
if (argc > 1 && *argv[1] == '-') {
if(argv[1][1] == 'd'){
yyinit(--argc, ++argv);
yyparse();
exit();
}
if(argv[1][1] != 'l'){
printf("unrecognizable argument\n");
exit();
}
argv[1] = "/usr/lib/lib.b";
}
close(creat(pipe, 0666));
p[0] = open(pipe, 0);
p[1] = open(pipe, 1);
unlink(pipe);
if (fork()==0) {
close(1);
dup(p[1]);
close(p[0]);
close(p[1]);
yyinit(argc, argv);
yyparse();
exit();
}
wait(&stat);
close(0);
dup(p[0]);
close(p[0]);
close(p[1]);
execl("/bin/dc", "dc", "-", 0);
}
int yyact[] {0,12289,4096,16384,4352,8206,4141,8212,4354,8198
,4355,8223,4356,8219,4357,8207,4358,8205,4360,8208
,4361,8220,4365,8213,4366,8214,4367,8200,4368,8199
,4369,8211,4370,8202,4371,8203,4372,8201,4380,8216
,4381,8197,4219,8204,4136,8217,4222,8210,4159,8218
,4191,8222,12295,4155,8226,4106,8225,0,4354,8229
,12403,4139,8230,4141,8231,4138,8232,4143,8233,4133
,8234,4190,8235,12294,12296,4157,8236,4365,8239,4366
,8240,4373,8242,4374,8243,4375,8244,4376,8245,4377
,8246,4378,8247,4187,8237,4136,8241,12374,12301,4136
,8248,0,4157,8250,4141,8212,4354,8254,4355,8223
,4356,8219,4365,8252,4366,8253,4370,8256,4371,8257
,4372,8255,4373,8242,4374,8243,4375,8244,4376,8245
,4377,8246,4378,8247,4380,8216,4136,8217,4222,8258
,4159,8218,4191,8222,12390,4157,8260,4141,8212,4354
,8254,4355,8223,4356,8219,4365,8262,4366,8263,4370
,8256,4371,8257,4372,8255,4373,8242,4374,8243,4375
,8244,4376,8245,4377,8246,4378,8247,4380,8216,4136
,8217,4222,8258,4159,8218,4191,8222,12391,4157,8265
,4141,8212,4354,8254,4355,8223,4356,8219,4365,8267
,4366,8268,4370,8256,4371,8257,4372,8255,4373,8242
,4374,8243,4375,8244,4376,8245,4377,8246,4378,8247
,4380,8216,4136,8217,4222,8258,4159,8218,4191,8222
,12392,4352,8206,4141,8212,4354,8198,4355,8223,4356
,8219,4357,8207,4358,8205,4360,8208,4361,8220,4365
,8213,4366,8214,4367,8200,4368,8199,4370,8202,4371
,8203,4372,8201,4380,8216,4381,8197,4219,8204,4136
,8217,4222,8210,4159,8218,4191,8222,12295,12314,12315
,12401,4354,8274,0,4354,8275,0,4141,8212,4354
,8254,4355,8223,4356,8219,4365,8213,4366,8214,4370
,8256,4371,8257,4372,8255,4380,8216,4136,8217,4222
,8258,4159,8218,4191,8222,0,4354,8277,4370,8279
,4371,8280,4372,8278,0,4354,8281,4370,8283,4371
,8284,4372,8282,0,4380,8285,12369,4355,8223,4191
,8222,12373,12378,4136,8288,0,4136,8289,0,4355
,8290,12397,12398,12399,12290,12330,12331,4137,8291,4140
,8292,0,12404,4187,8293,12408,12347,12350,4141,8212
,4354,8307,4355,8223,4356,8219,4365,8213,4366,8214
,4370,8256,4371,8257,4372,8255,4380,8216,4137,8304
,4136,8217,4222,8258,4159,8218,4191,8222,0,12320
,12321,12322,12323,12324,12325,4141,8212,4354,8254,4355
,8223,4356,8219,4365,8213,4366,8214,4370,8256,4371
,8257,4372,8255,4380,8216,4137,8309,4136,8217,4222
,8258,4159,8218,4191,8222,0,4139,8230,4141,8231
,4138,8232,4143,8233,4133,8234,4190,8235,12304,4354
,8277,4370,8279,4371,8280,4372,8278,12355,4354,8281
,4370,8283,4371,8284,4372,8282,12357,4157,8313,4365
,8239,4366,8240,4373,8242,4374,8243,4375,8244,4376
,8245,4377,8246,4378,8247,4187,8312,4136,8241,12374
,4157,8316,4141,8212,4354,8254,4355,8223,4356,8219
,4365,8252,4366,8253,4370,8256,4371,8257,4372,8255
,4373,8242,4374,8243,4375,8244,4376,8245,4377,8246
,4378,8247,4380,8216,4136,8217,4222,8258,4159,8218
,4191,8222,12390,4157,8319,4141,8212,4354,8254,4355
,8223,4356,8219,4365,8262,4366,8263,4370,8256,4371
,8257,4372,8255,4373,8242,4374,8243,4375,8244,4376
,8245,4377,8246,4378,8247,4380,8216,4136,8217,4222
,8258,4159,8218,4191,8222,12391,4157,8322,4141,8212
,4354,8254,4355,8223,4356,8219,4365,8267,4366,8268
,4370,8256,4371,8257,4372,8255,4373,8242,4374,8243
,4375,8244,4376,8245,4377,8246,4378,8247,4380,8216
,4136,8217,4222,8258,4159,8218,4191,8222,12392,4354
,8324,0,4139,8230,4141,8231,4138,8232,4143,8233
,4133,8234,4190,8235,12307,4354,8277,4370,8279,4371
,8280,4372,8278,12359,4354,8281,4370,8283,4371,8284
,4372,8282,12361,4139,8230,4141,8231,4138,8232,4143
,8233,4133,8234,4190,8235,12310,4354,8277,4370,8279
,4371,8280,4372,8278,12363,4354,8281,4370,8283,4371
,8284,4372,8282,12365,4221,8329,4155,8226,4106,8225
,0,12328,12327,4136,8332,0,4141,8212,4354,8254
,4355,8223,4356,8219,4365,8213,4366,8214,4370,8256
,4371,8257,4372,8255,4380,8216,4136,8217,4222,8258
,4159,8218,4191,8222,0,4157,8335,12380,4136,8336
,0,12341,4187,8337,12348,12356,12360,12364,4187,8338
,12349,12358,12362,12366,4355,8223,4191,8222,12372,12370
,4139,8230,4141,8231,4138,8232,4143,8233,4133,8234
,4190,8235,4137,8340,0,12400,4219,8343,0,4354
,8229,0,4189,8345,0,4138,8232,4143,8233,4133
,8234,4190,8235,12339,4138,8232,4143,8233,4133,8234
,4190,8235,12340,4190,8235,12342,4190,8235,12343,4190
,8235,12344,4190,8235,12345,4139,8230,4141,8231,4138
,8232,4143,8233,4133,8234,4190,8235,12297,4139,8230
,4141,8231,4138,8232,4143,8233,4133,8234,4190,8235
,4189,8346,0,4139,8230,4141,8231,4138,8232,4143
,8233,4133,8234,4190,8235,12299,4137,8347,4140,8348
,0,12368,12393,4139,8230,4141,8231,4138,8232,4143
,8233,4133,8234,4190,8235,12395,4157,8313,4365,8239
,4366,8240,4373,8242,4374,8243,4375,8244,4376,8245
,4377,8246,4378,8247,4187,8349,4136,8241,12374,4139
,8230,4141,8231,4138,8232,4143,8233,4133,8234,4190
,8235,4137,8350,0,12303,4139,8230,4141,8231,4138
,8232,4143,8233,4133,8234,4190,8235,12305,4139,8230
,4141,8231,4138,8232,4143,8233,4133,8234,4190,8235
,12306,4139,8230,4141,8231,4138,8232,4143,8233,4133
,8234,4190,8235,12381,4139,8230,4141,8231,4138,8232
,4143,8233,4133,8234,4190,8235,12384,4139,8230,4141
,8231,4138,8232,4143,8233,4133,8234,4190,8235,12387
,12380,4139,8230,4141,8231,4138,8232,4143,8233,4133
,8234,4190,8235,12308,4139,8230,4141,8231,4138,8232
,4143,8233,4133,8234,4190,8235,12309,4139,8230,4141
,8231,4138,8232,4143,8233,4133,8234,4190,8235,12311
,4139,8230,4141,8231,4138,8232,4143,8233,4133,8234
,4190,8235,12312,12313,4352,8206,4141,8212,4354,8198
,4355,8223,4356,8219,4357,8207,4358,8205,4360,8208
,4361,8220,4365,8213,4366,8214,4367,8200,4368,8199
,4370,8202,4371,8203,4372,8201,4380,8216,4381,8197
,4219,8204,4136,8217,4222,8210,4159,8218,4191,8222
,12295,4136,8361,0,4155,8363,0,4139,8230,4141
,8231,4138,8232,4143,8233,4133,8234,4190,8235,4359
,8364,4362,8367,4363,8369,4364,8368,4156,8365,4158
,8366,12338,12402,12371,12377,4139,8230,4141,8231,4138
,8232,4143,8233,4133,8234,4190,8235,4137,8373,0
,4139,8230,4141,8231,4138,8232,4143,8233,4133,8234
,4190,8235,4155,8374,0,4155,8226,4106,8225,0
,12405,12409,4157,8377,4365,8379,4366,8380,4373,8242
,4374,8243,4375,8244,4376,8245,4377,8246,4378,8247
,12346,12367,4141,8212,4354,8307,4355,8223,4356,8219
,4365,8213,4366,8214,4370,8256,4371,8257,4372,8255
,4380,8216,4136,8217,4222,8258,4159,8218,4191,8222
,0,4141,8212,4354,8254,4355,8223,4356,8219,4365
,8213,4366,8214,4370,8256,4371,8257,4372,8255,4380
,8216,4189,8382,4136,8217,4222,8258,4159,8218,4191
,8222,0,12302,4139,8230,4141,8231,4138,8232,4143
,8233,4133,8234,4190,8235,4189,8383,0,4139,8230
,4141,8231,4138,8232,4143,8233,4133,8234,4190,8235
,12375,4139,8230,4141,8231,4138,8232,4143,8233,4133
,8234,4190,8235,12376,4139,8230,4141,8231,4138,8232
,4143,8233,4133,8234,4190,8235,12382,4139,8230,4141
,8231,4138,8232,4143,8233,4133,8234,4190,8235,12383
,4139,8230,4141,8231,4138,8232,4143,8233,4133,8234
,4190,8235,12385,4139,8230,4141,8231,4138,8232,4143
,8233,4133,8234,4190,8235,12386,4139,8230,4141,8231
,4138,8232,4143,8233,4133,8234,4190,8235,12388,4139
,8230,4141,8231,4138,8232,4143,8233,4133,8234,4190
,8235,12389,12329,4137,8385,0,4139,8230,4141,8231
,4138,8232,4143,8233,4133,8234,4190,8235,12319,4139
,8230,4141,8231,4138,8232,4143,8233,4133,8234,4190
,8235,4189,8393,0,4139,8230,4141,8231,4138,8232
,4143,8233,4133,8234,4190,8235,4189,8394,0,12379
,12326,4352,8206,4141,8212,4354,8198,4355,8223,4356
,8219,4357,8207,4358,8205,4360,8208,4361,8220,4365
,8213,4366,8214,4367,8200,4368,8199,4370,8202,4371
,8203,4372,8201,4379,8396,4380,8216,4381,8197,4219
,8204,4136,8217,4222,8210,4159,8218,4191,8222,12295
,12292,12351,12353,12394,12396,4365,8379,4366,8380,12346
,4137,8399,0,4139,8230,4141,8231,4138,8232,4143
,8233,4133,8234,4190,8235,4137,8401,0,4139,8230
,4141,8231,4138,8232,4143,8233,4133,8234,4190,8235
,12332,4139,8230,4141,8231,4138,8232,4143,8233,4133
,8234,4190,8235,12333,4139,8230,4141,8231,4138,8232
,4143,8233,4133,8234,4190,8235,12334,4139,8230,4141
,8231,4138,8232,4143,8233,4133,8234,4190,8235,12335
,4139,8230,4141,8231,4138,8232,4143,8233,4133,8234
,4190,8235,12336,4139,8230,4141,8231,4138,8232,4143
,8233,4133,8234,4190,8235,12337,12352,12354,4221,8402
,4155,8226,4106,8225,0,4354,8229,0,4139,8230
,4141,8231,4138,8232,4143,8233,4133,8234,4190,8235
,12298,4139,8230,4141,8231,4138,8232,4143,8233,4133
,8234,4190,8235,12300,12291,4155,8226,4106,8225,4140
,8409,0,12406,12316,12317,12293,12318,12407,-1};
int yypact[] {0,1,2,53,58,61,74,75,98,99
,102,145,188,231,278,279,280,280,280,281
,284,287,316,325,334,337,287,342,343,346
,349,352,353,354,355,356,357,362,363,287
,287,287,287,287,287,287,287,287,366,367
,368,399,400,401,402,403,404,405,436,287
,287,449,458,467,490,533,576,619,622,287
,287,635,644,653,287,287,666,675,684,691
,692,693,696,725,728,731,732,735,736,737
,738,741,742,743,744,749,750,287,287,765
,766,769,772,775,784,793,796,799,802,805
,818,833,846,851,852,853,866,889,904,905
,918,287,287,287,931,287,287,944,287,287
,957,287,287,970,971,984,997,1010,1023,1024
,1071,696,1074,1077,287,1102,287,287,1103,1104
,1105,1120,1135,1140,1141,1142,1161,1162,1191,1222
,1223,1238,1251,1264,1277,1290,1303,1316,1329,1342
,696,1343,287,287,287,287,287,287,287,1346
,1359,1374,1389,1390,1391,1440,287,287,1441,1442
,1443,1444,1445,1450,1024,1453,1468,1481,1494,1507
,1520,1533,1546,1547,1548,1555,1558,1571,1024,692
,1024,1584,1585,1592,1593,1594,692,1595,769,1596
,1597,-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
,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,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,2,3,3,2
,3,3,2,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,3
,1,4,2,2,3,3,2,3,3,2
,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,138,168,193,208,207
,213,209,215,-1,78,2,32,151,184,211
,216,-1,138,-1,3,-1,35,-1,183,183
,203,-1,77,-1,211,9,57,10,67,11
,72,20,84,25,95,38,102,39,103,40
,104,41,105,42,106,43,107,44,108,45
,109,46,110,49,114,56,116,58,118,59
,119,63,123,64,126,65,129,68,133,69
,134,73,135,74,136,81,142,96,149,97
,150,120,159,121,160,122,161,124,162,125
,163,127,164,128,165,130,166,131,167,140
,142,143,178,145,179,146,180,156,114,157
,159,169,142,171,194,172,195,173,196,174
,197,175,198,176,199,177,200,185,205,186
,206,-1,4,6,46,9,59,10,69,11
,74,63,125,64,128,65,131,154,186,-1
,122,16,80,17,81,-1,79,208,214,215
,218,-1,139,140,170,169,192,-1,141,-1
,17,-1,111,24,94,93,147,-1,23,156
,189,-1,113,-1,29,100,152,204,212,217
,219,-1,36,-1};
int yypgo[] {0,1,3,15,23,25,27,29,33,35
,143,161,167,173,179,181,183,189,193,195
,-1};
int nterms 52;
int nnonter 19;
int nstate 220;
char *yysterm[] {
"error",
"UMINUS",
"LETTER",
"DIGIT",
"SQRT",
"_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" };