📄 gram.c
字号:
case 47:# line 514 "gram.in"{ yyval.ival = dblflag ? TYDREAL : TYREAL; } break;case 48:# line 515 "gram.in"{ yyval.ival = dblflag ? TYDCOMPLEX : TYCOMPLEX; } break;case 49:# line 516 "gram.in"{ yyval.ival = TYDREAL; } break;case 50:# line 517 "gram.in"{ NOEXT("DOUBLE COMPLEX statement"); yyval.ival = TYDCOMPLEX; } break;case 51:# line 518 "gram.in"{ yyval.ival = TYLOGICAL; } break;case 52:# line 519 "gram.in"{ NO66("CHARACTER statement"); yyval.ival = TYCHAR; } break;case 53:# line 520 "gram.in"{ yyval.ival = TYUNKNOWN; } break;case 54:# line 521 "gram.in"{ yyval.ival = TYUNKNOWN; } break;case 55:# line 522 "gram.in"{ NOEXT("AUTOMATIC statement"); yyval.ival = - STGAUTO; } break;case 56:# line 523 "gram.in"{ NOEXT("STATIC statement"); yyval.ival = - STGBSS; } break;case 57:# line 527 "gram.in"{ yyval.ival = varleng; } break;case 58:# line 529 "gram.in"{ expptr p; int typlen; p = yypvt[-1].expval; NO66("length specification *n"); if( ! ISICON(p) || p->constblock.const.ci<0 ) { yyval.ival = 0; dclerr("- length must be a positive integer value", PNULL); } else if( dblflag ) { typlen = p->constblock.const.ci; if( vartype == TYDREAL && typlen == 4 ) yyval.ival = 8; else if( vartype == TYDCOMPLEX && typlen == 8 ) yyval.ival = 16; else yyval.ival = typlen; } else yyval.ival = p->constblock.const.ci; } break;case 59:# line 552 "gram.in"{ NO66("length specification *(*)"); yyval.ival = -1; } break;case 60:# line 556 "gram.in"{ incomm( yyval.extval = comblock(0, CNULL) , yypvt[-0].namval ); } break;case 61:# line 558 "gram.in"{ yyval.extval = yypvt[-1].extval; incomm(yypvt[-1].extval, yypvt[-0].namval); } break;case 62:# line 560 "gram.in"{ yyval.extval = yypvt[-2].extval; incomm(yypvt[-2].extval, yypvt[-0].namval); } break;case 63:# line 562 "gram.in"{ incomm(yypvt[-2].extval, yypvt[-0].namval); } break;case 64:# line 566 "gram.in"{ yyval.extval = comblock(0, CNULL); } break;case 65:# line 568 "gram.in"{ yyval.extval = comblock(toklen, token); } break;case 66:# line 572 "gram.in"{ setext(yypvt[-0].namval); } break;case 67:# line 574 "gram.in"{ setext(yypvt[-0].namval); } break;case 68:# line 578 "gram.in"{ NO66("INTRINSIC statement"); setintr(yypvt[-0].namval); } break;case 69:# line 580 "gram.in"{ setintr(yypvt[-0].namval); } break;case 72:# line 588 "gram.in"{ struct Equivblock *p; if(nequiv >= maxequiv) many("equivalences", 'q'); if( !equivlisterr ) { p = & eqvclass[nequiv++]; p->eqvinit = NO; p->eqvbottom = 0; p->eqvtop = 0; p->equivs = yypvt[-1].eqvval; p->init = NO; p->initoffset = 0; } } break;case 73:# line 605 "gram.in"{ yyval.eqvval=ALLOC(Eqvchain); equivlisterr = 0; if( yypvt[-0].expval->tag == TCONST ) { equivlisterr = 1; dclerr( "- constant in equivalence", NULL ); } yyval.eqvval->eqvitem.eqvlhs = (struct Primblock *)yypvt[-0].expval; } break;case 74:# line 614 "gram.in"{ yyval.eqvval=ALLOC(Eqvchain); if( yypvt[-0].expval->tag == TCONST ) { equivlisterr = 1; dclerr( "constant in equivalence", NULL ); } yyval.eqvval->eqvitem.eqvlhs = (struct Primblock *) yypvt[-0].expval; yyval.eqvval->eqvnextp = yypvt[-2].eqvval; } break;case 77:# line 630 "gram.in"{ int k; yypvt[-0].namval->vsave = YES; k = yypvt[-0].namval->vstg; if( ! ONEOF(k, M(STGUNKNOWN)|M(STGBSS)|M(STGINIT)) || (yypvt[-0].namval->vclass == CLPARAM) ) dclerr("can only save static variables", yypvt[-0].namval); } break;case 78:# line 638 "gram.in"{ yypvt[-0].extval->extsave = 1; } break;case 81:# line 646 "gram.in"{ paramset( yypvt[-2].namval, yypvt[-0].expval ); } break;case 82:# line 650 "gram.in"{ if(ndim>0) setbound(yypvt[-1].namval, ndim, dims); } break;case 83:# line 655 "gram.in"{ ndim = 0; } break;case 85:# line 659 "gram.in"{ ndim = 0; } break;case 88:# line 664 "gram.in"{ if(ndim == maxdim) err("too many dimensions"); else if(ndim < maxdim) { dims[ndim].lb = 0; dims[ndim].ub = yypvt[-0].expval; } ++ndim; } break;case 89:# line 673 "gram.in"{ if(ndim == maxdim) err("too many dimensions"); else if(ndim < maxdim) { dims[ndim].lb = yypvt[-2].expval; dims[ndim].ub = yypvt[-0].expval; } ++ndim; } break;case 90:# line 684 "gram.in"{ yyval.expval = 0; } break;case 92:# line 689 "gram.in"{ nstars = 1; labarray[0] = yypvt[-0].labval; } break;case 93:# line 691 "gram.in"{ if(nstars < MAXLABLIST) labarray[nstars++] = yypvt[-0].labval; } break;case 94:# line 695 "gram.in"{ yyval.labval = execlab( convci(toklen, token) ); } break;case 95:# line 699 "gram.in"{ NO66("IMPLICIT statement"); } break;case 98:# line 706 "gram.in"{ needkwd = 1; } break;case 99:# line 707 "gram.in"{ vartype = yypvt[-0].ival; } break;case 102:# line 715 "gram.in"{ setimpl(vartype, varleng, yypvt[-0].ival, yypvt[-0].ival); } break;case 103:# line 717 "gram.in"{ setimpl(vartype, varleng, yypvt[-2].ival, yypvt[-0].ival); } break;case 104:# line 721 "gram.in"{ if(toklen!=1 || token[0]<'a' || token[0]>'z') { dclerr("implicit item must be single letter", PNULL); yyval.ival = 0; } else yyval.ival = token[0]; } break;case 107:# line 735 "gram.in"{ if(yypvt[-2].namval->vclass == CLUNKNOWN) { yypvt[-2].namval->vclass = CLNAMELIST; yypvt[-2].namval->vtype = TYINT; yypvt[-2].namval->vstg = STGINIT; yypvt[-2].namval->varxptr.namelist = yypvt[-0].chval; yypvt[-2].namval->vardesc.varno = ++lastvarno; } else dclerr("cannot be a namelist name", yypvt[-2].namval); } break;case 108:# line 749 "gram.in"{ yyval.chval = mkchain(yypvt[-0].namval, CHNULL); } break;case 109:# line 751 "gram.in"{ yyval.chval = hookup(yypvt[-2].chval, mkchain(yypvt[-0].namval, CHNULL)); } break;case 110:# line 755 "gram.in"{ switch(parstate) { case OUTSIDE: newproc(); startproc(PNULL, CLMAIN); case INSIDE: parstate = INDCL; case INDCL: break; default: dclerr("declaration among executables", PNULL); } } break;case 111:# line 769 "gram.in"{ if (overlapflag == YES) warn("overlapping initializations"); } break;case 114:# line 779 "gram.in"{ if(parstate == OUTSIDE) { newproc(); startproc(PNULL, CLMAIN); } if(parstate < INDATA) { enddcl(); parstate = INDATA; } overlapflag = NO; } break;case 115:# line 794 "gram.in"{ savedata(yypvt[-3].elistp, yypvt[-1].drvals); } break;case 116:# line 798 "gram.in"{ yyval.elistp = preplval(NULL, yypvt[-0].deltp); } break;case 117:# line 800 "gram.in"{ yyval.elistp = preplval(yypvt[-2].elistp, yypvt[-0].deltp); } break;case 119:# line 805 "gram.in"{ yypvt[-0].drvals->next = yypvt[-2].drvals; yyval.drvals = yypvt[-0].drvals; } break;case 120:# line 812 "gram.in"{ yyval.deltp = mkdlval(yypvt[-0].vexpval, NULL, NULL); } break;case 121:# line 814 "gram.in"{ yyval.deltp = mkdlval(yypvt[-1].vexpval, yypvt[-0].dvals, NULL); } break;case 122:# line 816 "gram.in"{ yyval.deltp = mkdlval(yypvt[-1].vexpval, NULL, yypvt[-0].rpairp); } break;case 123:# line 818 "gram.in"{ yyval.deltp = mkdlval(yypvt[-2].vexpval, yypvt[-1].dvals, yypvt[-0].rpairp); } break;case 125:# line 822 "gram.in"{ yyval.vexpval = mkdname(toklen, token); } break;case 126:# line 826 "gram.in"{ yyval.dvals = revvlist(yypvt[-1].dvals); } break;case 127:# line 830 "gram.in"{ yyval.rpairp = mkdrange(yypvt[-3].vexpval, yypvt[-1].vexpval); } break;case 128:# line 834 "gram.in"{ yyval.dvals = prepvexpr(NULL, yypvt[-0].vexpval); } break;case 129:# line 838 "gram.in"{ yyval.dvals = prepvexpr(yypvt[-2].dvals, yypvt[-0].vexpval); } break;case 130:# line 843 "gram.in"{ yyval.vexpval = NULL; } break;case 131:# line 844 "gram.in"{ yyval.vexpval = yypvt[-0].vexpval; } break;case 132:# line 848 "gram.in"{ yyval.deltp = mkdatado(yypvt[-5].elistp, yypvt[-3].vexpval, yypvt[-1].dvals); } break;case 133:# line 852 "gram.in"{ yyval.elistp = preplval(NULL, yypvt[-0].deltp); } break;case 134:# line 854 "gram.in"{ yyval.elistp = preplval(yypvt[-2].elistp, yypvt[-0].deltp); } break;case 135:# line 858 "gram.in"{ yyval.deltp = mkdlval(yypvt[-1].vexpval, yypvt[-0].dvals, NULL); } break;case 136:# line 860 "gram.in"{ yyval.deltp = mkdlval(yypvt[-1].vexpval, NULL, yypvt[-0].rpairp); } break;case 137:# line 862 "gram.in"{ yyval.deltp = mkdlval(yypvt[-2].vexpval, yypvt[-1].dvals, yypvt[-0].rpairp); } break;case 139:# line 867 "gram.in"{ static dvalue one = { DVALUE, NORMAL, 1 }; yyval.drvals = mkdrval(&one, yypvt[-0].expval); } break;case 140:# line 873 "gram.in"{ yyval.drvals = mkdrval(yypvt[-2].vexpval, yypvt[-0].expval); frvexpr(yypvt[-2].vexpval); } break;case 141:# line 878 "gram.in"{ yyval.drvals = mkdrval(yypvt[-2].vexpval, yypvt[-0].expval); frvexpr(yypvt[-2].vexpval); } break;case 142:# line 885 "gram.in"{ yyval.expval = evparam(yypvt[-0].vexpval); free((char *) yypvt[-0].vexpval); } break;case 143:# line 890 "gram.in"{ yyval.expval = ivaltoicon(yypvt[-0].vexpval); frvexpr(yypvt[-0].vexpval); } break;case 146:# line 897 "gram.in"{ yyval.expval = mklogcon(1); } break;case 147:# line 898 "gram.in"{ yyval.expval = mklogcon(0); } break;case 148:# line 899 "gram.in"{ yyval.expval = mkstrcon(toklen, token); } break;case 149:# line 900 "gram.in"{ yyval.expval = mkstrcon(toklen, token); } break;case 152:# line 906 "gram.in"{ yyval.vexpval = yypvt[-0].vexpval; } break;case 153:# line 908 "gram.in"{ yyval.vexpval = negival(yypvt[-0].vexpval); frvexpr(yypvt[-0].vexpval); } break;case 154:# line 915 "gram.in"{ yyval.vexpval = evicon(toklen, token); } break;case 156:# line 920 "gram.in"{ yyval.expval = yypvt[-0].expval; } break;case 157:# line 922 "gram.in"{ consnegop(yypvt[-0].expval); yyval.expval = yypvt[-0].expval; } break;case 158:# line 928 "gram.in"{ yyval.expval = mkrealcon(TYREAL, convcd(toklen, token)); } break;case 159:# line 929 "gram.in"{ yyval.expval = mkrealcon(TYDREAL, convcd(toklen, token)); } break;case 160:# line 932 "gram.in"{ yyval.expval = mkbitcon(4, toklen, token); } break;case 161:# line 933 "gram.in"{ yyval.expval = mkbitcon(3, toklen, token); } break;case 162:# line 934 "gram.in"{ yyval.expval = mkbitcon(1, toklen, token); } break;case 164:# line 939 "gram.in"{ yyval.vexpval = yypvt[-0].vexpval; } break;case 165:# line 941 "gram.in"{ yyval.vexpval = mkdexpr(OPNEG, NULL, yypvt[-0].vexpval); } break;case 166:# line 943 "gram.in"{ yyval.vexpval = mkdexpr(OPPLUS, yypvt[-2].vexpval, yypvt[-0].vexpval); } break;case 167:# line 945 "gram.in"{ yyval.vexpval = mkdexpr(OPMINUS, yypvt[-2].vexpval, yypvt[-0].vexpval); } break;case 169:# line 950 "gram.in"{ yyval.vexpval = mkdexpr(OPSTAR, yypvt[-2].vexpval, yypvt[-0].vexpval); } break;case 170:# line 952 "gram.in"{ yyval.vexpval = mkdexpr(OPSLASH, yypvt[-2].vexpval, yypvt[-0].vexpval); } break;case 172:# line 957 "gram.in"{ yyval.vexpval = mkdexpr(OPPOWER, yypvt[-2].vexpval, yypvt[-0].vexpval); } break;case 173:# line 961 "gram.in"{ yyval.vexpval = evicon(toklen, token); } break;case 175:# line 964 "gram.in"{ yyval.vexpval = yypvt[-1].vexpval; } break;case 176:# line 1033 "gram.in"{ yyval.chval = 0; } break;case 178:# line 1038 "gram.in"{ yyval.chval = mkchain(yypvt[-0].expval, CHNULL); } break;case 179:# line 1040 "gram.in"{ yyval.chval = hookup(yypvt[-2].chval, mkchain(yypvt[-0].expval,CHNULL) ); } break;case 181:# line 1046 "gram.in"{ if (parstate != INDCL) yyval.expval = mkexpr(OPPAREN, yypvt[-1].expval, ENULL); else yyval.expval = yypvt[-1].expval; } break;case 185:# line 1056 "gram.in"{ yyval.expval = mkexpr(yypvt[-1].ival, yypvt[-2].expval, yypvt[-0].expval); } break;case 186:# line 1058 "gram.in"{ yyval.expval = mkexpr(OPSTAR, yypvt[-2].expval, yypvt[-0].expval); } break;case 187:# line 1060 "gram.in"{ yyval.expval = mkexpr(OPSLASH, yypvt[-2].expval, yypvt[-0].expval); } break;case 188:# line 1062 "gram.in"{ yyval.expval = mkexpr(OPPOWER, yypvt[-2].expval, yypvt[-0].expval); } break;case 189:# line 1064 "gram.in"{ if(yypvt[-1].ival == OPMINUS) yyval.expval = mkexpr(OPNEG, yypvt[-0].expval, ENULL); else yyval.expval = yypvt[-0].expval; } break;case 190:# line 1069 "gram.in"{ yyval.expval = mkexpr(yypvt[-1].ival, yypvt[-2].expval, yypvt[-0].expval); } break;case 191:# line 1071 "gram.in"{ NO66(".EQV. operator"); yyval.expval = mkexpr(OPEQV, yypvt[-2].expval,yypvt[-0].expval); } break;case 192:# line 1074 "gram.in"{ NO66(".NEQV. operator"); yyval.expval = mkexpr(OPNEQV, yypvt[-2].expval, yypvt[-0].expval); } break;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -