Changeset 254a326 in git for Singular/grammar.cc


Ignore:
Timestamp:
Nov 12, 2008, 1:51:53 PM (15 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
6bd405f611d9e3d1ccbd34fdf122aa98e8474bc6
Parents:
f13d949e655e53400261250ef5a9a2c2f11e2585
Message:
*hannes: matrix m[i]


git-svn-id: file:///usr/local/Singular/svn/trunk@11191 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/grammar.cc

    rf13d949 r254a326  
    473473   738,   742,   759,   765,   777,   785,   793,   798,   802,   806,
    474474   810,   814,   818,   822,   826,   830,   834,   838,   842,   849,
    475    855,   857,   869,   871,   882,   883,   887,   897,   906,   910,
    476    914,   930,   934,   954,   972,   997,  1008,  1012,  1014,  1027,
    477   1035,  1045,  1089,  1091,  1099,  1101,  1107,  1118,  1123,  1126,
    478   1132,  1138,  1146,  1160,  1181,  1203,  1208,  1212,  1217,  1221,
    479   1225,  1229,  1233,  1237,  1242,  1251,  1260,  1269,  1278,  1287,
    480   1296,  1305,  1323,  1329,  1333,  1376,  1385,  1399,  1399,  1401,
    481   1477,  1484,  1513,  1526,  1543,  1552,  1557,  1564,  1576,  1595,
    482   1607,  1627,  1650,  1657,  1668,  1676
     475   855,   857,   875,   877,   888,   889,   893,   903,   912,   916,
     476   920,   936,   940,   960,   978,  1003,  1014,  1018,  1020,  1033,
     477  1041,  1051,  1095,  1097,  1105,  1107,  1113,  1124,  1129,  1132,
     478  1138,  1144,  1152,  1166,  1187,  1209,  1214,  1218,  1223,  1227,
     479  1231,  1235,  1239,  1243,  1248,  1257,  1266,  1275,  1284,  1293,
     480  1302,  1311,  1329,  1335,  1339,  1382,  1391,  1405,  1405,  1407,
     481  1483,  1490,  1519,  1532,  1549,  1558,  1563,  1570,  1582,  1601,
     482  1613,  1633,  1656,  1663,  1674,  1682
    483483};
    484484#endif
     
    21812181              YYERROR;
    21822182            }
     2183            else if ((yyvsp[-1].lv.rtyp==MODUL_CMD)
     2184            // matrix m; m[2]=...
     2185            && (yyvsp[-1].lv.e!=NULL) && (yyvsp[-1].lv.e->next==NULL))
     2186            {
     2187              MYYERROR("matrix must have 2 indices");
     2188            }
    21832189            yyval.lv = yyvsp[-1].lv;
    21842190          ;
    21852191    break;}
    21862192case 94:
    2187 #line 872 "grammar.y"
     2193#line 878 "grammar.y"
    21882194{
    21892195            if (yyvsp[-1].lv.Typ()!=STRING_CMD)
     
    21962202    break;}
    21972203case 97:
    2198 #line 889 "grammar.y"
     2204#line 895 "grammar.y"
    21992205{
    22002206            #ifdef HAVE_NS
     
    22072213    break;}
    22082214case 98:
    2209 #line 898 "grammar.y"
     2215#line 904 "grammar.y"
    22102216{
    22112217            #ifdef HAVE_NS
     
    22182224    break;}
    22192225case 99:
    2220 #line 907 "grammar.y"
     2226#line 913 "grammar.y"
    22212227{
    22222228            if (iiDeclCommand(&yyval.lv,&yyvsp[0].lv,myynest,yyvsp[-1].i,&(currRing->idroot), TRUE)) YYERROR;
     
    22242230    break;}
    22252231case 100:
    2226 #line 911 "grammar.y"
     2232#line 917 "grammar.y"
    22272233{
    22282234            if (iiDeclCommand(&yyval.lv,&yyvsp[0].lv,myynest,yyvsp[-1].i,&(currRing->idroot), TRUE)) YYERROR;
     
    22302236    break;}
    22312237case 101:
    2232 #line 915 "grammar.y"
     2238#line 921 "grammar.y"
    22332239{
    22342240            if (iiDeclCommand(&yyval.lv,&yyvsp[-6].lv,myynest,yyvsp[-7].i,&(currRing->idroot), TRUE)) YYERROR;
     
    22482254    break;}
    22492255case 102:
    2250 #line 931 "grammar.y"
     2256#line 937 "grammar.y"
    22512257{
    22522258            if (iiDeclCommand(&yyval.lv,&yyvsp[0].lv,myynest,yyvsp[-1].i,&(currRing->idroot), TRUE)) YYERROR;
     
    22542260    break;}
    22552261case 103:
    2256 #line 935 "grammar.y"
     2262#line 941 "grammar.y"
    22572263{
    22582264            int r; TESTSETINT(yyvsp[-4].lv,r);
     
    22762282    break;}
    22772283case 104:
    2278 #line 955 "grammar.y"
     2284#line 961 "grammar.y"
    22792285{
    22802286            #ifdef HAVE_NS
     
    22962302    break;}
    22972303case 105:
    2298 #line 973 "grammar.y"
     2304#line 979 "grammar.y"
    22992305{
    23002306            int t=yyvsp[-2].lv.Typ();
     
    23232329    break;}
    23242330case 106:
    2325 #line 998 "grammar.y"
     2331#line 1004 "grammar.y"
    23262332{
    23272333            #ifdef HAVE_NS
     
    23342340    break;}
    23352341case 109:
    2336 #line 1015 "grammar.y"
     2342#line 1021 "grammar.y"
    23372343{
    23382344            leftv v = &yyvsp[-3].lv;
     
    23472353    break;}
    23482354case 110:
    2349 #line 1029 "grammar.y"
     2355#line 1035 "grammar.y"
    23502356{
    23512357          // let rInit take care of any errors
     
    23542360    break;}
    23552361case 111:
    2356 #line 1037 "grammar.y"
     2362#line 1043 "grammar.y"
    23572363{
    23582364            memset(&yyval.lv,0,sizeof(yyval.lv));
     
    23652371    break;}
    23662372case 112:
    2367 #line 1046 "grammar.y"
     2373#line 1052 "grammar.y"
    23682374{
    23692375            memset(&yyval.lv,0,sizeof(yyval.lv));
     
    24092415    break;}
    24102416case 114:
    2411 #line 1092 "grammar.y"
     2417#line 1098 "grammar.y"
    24122418{
    24132419            yyval.lv = yyvsp[-2].lv;
     
    24172423    break;}
    24182424case 116:
    2419 #line 1102 "grammar.y"
     2425#line 1108 "grammar.y"
    24202426{
    24212427            yyval.lv = yyvsp[-1].lv;
     
    24232429    break;}
    24242430case 117:
    2425 #line 1108 "grammar.y"
     2431#line 1114 "grammar.y"
    24262432{
    24272433            expected_parms = TRUE;
     
    24292435    break;}
    24302436case 118:
    2431 #line 1120 "grammar.y"
     2437#line 1126 "grammar.y"
    24322438{ if (yyvsp[-1].i != '<') YYERROR;
    24332439            if((feFilePending=feFopen(yyvsp[0].name,"r",NULL,TRUE))==NULL) YYERROR; ;
    24342440    break;}
    24352441case 119:
    2436 #line 1123 "grammar.y"
     2442#line 1129 "grammar.y"
    24372443{ newFile(yyvsp[-2].name,feFilePending); ;
    24382444    break;}
    24392445case 120:
    2440 #line 1128 "grammar.y"
     2446#line 1134 "grammar.y"
    24412447{
    24422448            feHelp(yyvsp[-1].name);
     
    24452451    break;}
    24462452case 121:
    2447 #line 1133 "grammar.y"
     2453#line 1139 "grammar.y"
    24482454{
    24492455            feHelp(NULL);
     
    24512457    break;}
    24522458case 122:
    2453 #line 1140 "grammar.y"
     2459#line 1146 "grammar.y"
    24542460{
    24552461            singular_example(yyvsp[-1].name);
     
    24582464    break;}
    24592465case 123:
    2460 #line 1148 "grammar.y"
     2466#line 1154 "grammar.y"
    24612467{
    24622468#ifdef HAVE_NS
     
    24712477    break;}
    24722478case 124:
    2473 #line 1162 "grammar.y"
     2479#line 1168 "grammar.y"
    24742480{
    24752481          leftv v=&yyvsp[0].lv;
     
    24932499    break;}
    24942500case 125:
    2495 #line 1182 "grammar.y"
     2501#line 1188 "grammar.y"
    24962502{
    24972503          leftv v=&yyvsp[0].lv;
     
    25152521    break;}
    25162522case 126:
    2517 #line 1205 "grammar.y"
     2523#line 1211 "grammar.y"
    25182524{
    25192525            list_cmd(yyvsp[-1].i,NULL,"// ",TRUE);
     
    25212527    break;}
    25222528case 127:
    2523 #line 1209 "grammar.y"
     2529#line 1215 "grammar.y"
    25242530{
    25252531            list_cmd(yyvsp[-1].i,NULL,"// ",TRUE);
     
    25272533    break;}
    25282534case 128:
    2529 #line 1213 "grammar.y"
     2535#line 1219 "grammar.y"
    25302536{
    25312537            if (yyvsp[-1].i==QRING_CMD) yyvsp[-1].i=RING_CMD;
     
    25342540    break;}
    25352541case 129:
    2536 #line 1218 "grammar.y"
     2542#line 1224 "grammar.y"
    25372543{
    25382544            list_cmd(yyvsp[-1].i,NULL,"// ",TRUE);
     
    25402546    break;}
    25412547case 130:
    2542 #line 1222 "grammar.y"
     2548#line 1228 "grammar.y"
    25432549{
    25442550            list_cmd(RING_CMD,NULL,"// ",TRUE);
     
    25462552    break;}
    25472553case 131:
    2548 #line 1226 "grammar.y"
     2554#line 1232 "grammar.y"
    25492555{
    25502556            list_cmd(MATRIX_CMD,NULL,"// ",TRUE);
     
    25522558    break;}
    25532559case 132:
    2554 #line 1230 "grammar.y"
     2560#line 1236 "grammar.y"
    25552561{
    25562562            list_cmd(INTMAT_CMD,NULL,"// ",TRUE);
     
    25582564    break;}
    25592565case 133:
    2560 #line 1234 "grammar.y"
     2566#line 1240 "grammar.y"
    25612567{
    25622568            list_cmd(PROC_CMD,NULL,"// ",TRUE);
     
    25642570    break;}
    25652571case 134:
    2566 #line 1238 "grammar.y"
     2572#line 1244 "grammar.y"
    25672573{
    25682574            list_cmd(0,yyvsp[-1].lv.Fullname(),"// ",TRUE);
     
    25712577    break;}
    25722578case 135:
    2573 #line 1243 "grammar.y"
     2579#line 1249 "grammar.y"
    25742580{
    25752581#ifdef HAVE_NS
     
    25822588    break;}
    25832589case 136:
    2584 #line 1252 "grammar.y"
     2590#line 1258 "grammar.y"
    25852591{
    25862592#ifdef HAVE_NS
     
    25932599    break;}
    25942600case 137:
    2595 #line 1261 "grammar.y"
     2601#line 1267 "grammar.y"
    25962602{
    25972603#ifdef HAVE_NS
     
    26042610    break;}
    26052611case 138:
    2606 #line 1270 "grammar.y"
     2612#line 1276 "grammar.y"
    26072613{
    26082614#ifdef HAVE_NS
     
    26152621    break;}
    26162622case 139:
    2617 #line 1279 "grammar.y"
     2623#line 1285 "grammar.y"
    26182624{
    26192625#ifdef HAVE_NS
     
    26262632    break;}
    26272633case 140:
    2628 #line 1288 "grammar.y"
     2634#line 1294 "grammar.y"
    26292635{
    26302636#ifdef HAVE_NS
     
    26372643    break;}
    26382644case 141:
    2639 #line 1297 "grammar.y"
     2645#line 1303 "grammar.y"
    26402646{
    26412647#ifdef HAVE_NS
     
    26482654    break;}
    26492655case 142:
    2650 #line 1306 "grammar.y"
     2656#line 1312 "grammar.y"
    26512657{
    26522658#ifdef HAVE_NS
     
    26592665    break;}
    26602666case 143:
    2661 #line 1324 "grammar.y"
     2667#line 1330 "grammar.y"
    26622668{
    26632669            list_cmd(-1,NULL,"// ",TRUE);
     
    26652671    break;}
    26662672case 144:
    2667 #line 1330 "grammar.y"
     2673#line 1336 "grammar.y"
    26682674{ yyInRingConstruction = TRUE; ;
    26692675    break;}
    26702676case 145:
    2671 #line 1339 "grammar.y"
     2677#line 1345 "grammar.y"
    26722678{
    26732679            const char *ring_name = yyvsp[-6].lv.name;
     
    26812687            {
    26822688              #ifdef HAVE_NS
    2683                 newRingHdl=enterid(ring_name, myynest, RING_CMD, 
     2689                newRingHdl=enterid(ring_name, myynest, RING_CMD,
    26842690                                   &(yyvsp[-6].lv.req_packhdl->idroot));
    26852691              #else
     
    27092715    break;}
    27102716case 146:
    2711 #line 1377 "grammar.y"
     2717#line 1383 "grammar.y"
    27122718{
    27132719            const char *ring_name = yyvsp[0].lv.name;
     
    27182724    break;}
    27192725case 147:
    2720 #line 1387 "grammar.y"
     2726#line 1393 "grammar.y"
    27212727{
    27222728            if ((yyvsp[-1].i!=LIB_CMD)||(iiLibCmd(yyvsp[0].name,TRUE,TRUE,TRUE)))
     
    27312737    break;}
    27322738case 150:
    2733 #line 1403 "grammar.y"
     2739#line 1409 "grammar.y"
    27342740{
    27352741            if ((yyvsp[-1].i==KEEPRING_CMD) && (myynest==0))
     
    28062812    break;}
    28072813case 151:
    2808 #line 1479 "grammar.y"
     2814#line 1485 "grammar.y"
    28092815{
    28102816            if (yyvsp[0].lv.rtyp!=IDHDL) MYYERROR("identifier expected");
     
    28142820    break;}
    28152821case 152:
    2816 #line 1485 "grammar.y"
     2822#line 1491 "grammar.y"
    28172823{
    28182824            //Print("typ is %d, rtyp:%d\n",$1.Typ(),$1.rtyp);
     
    28392845    break;}
    28402846case 153:
    2841 #line 1514 "grammar.y"
     2847#line 1520 "grammar.y"
    28422848{
    28432849            int i; TESTSETINT(yyvsp[-2].lv,i);
     
    28542860    break;}
    28552861case 154:
    2856 #line 1527 "grammar.y"
     2862#line 1533 "grammar.y"
    28572863{
    28582864            if (currentVoice->ifsw==1)
     
    28732879    break;}
    28742880case 155:
    2875 #line 1544 "grammar.y"
     2881#line 1550 "grammar.y"
    28762882{
    28772883            int i; TESTSETINT(yyvsp[-2].lv,i);
     
    28842890    break;}
    28852891case 156:
    2886 #line 1553 "grammar.y"
     2892#line 1559 "grammar.y"
    28872893{
    28882894            if (exitBuffer(BT_break)) YYERROR;
     
    28912897    break;}
    28922898case 157:
    2893 #line 1558 "grammar.y"
     2899#line 1564 "grammar.y"
    28942900{
    28952901            if (contBuffer(BT_break)) YYERROR;
     
    28982904    break;}
    28992905case 158:
    2900 #line 1566 "grammar.y"
     2906#line 1572 "grammar.y"
    29012907{
    29022908            /* -> if(!$2) break; $3; continue;*/
     
    29092915    break;}
    29102916case 159:
    2911 #line 1578 "grammar.y"
     2917#line 1584 "grammar.y"
    29122918{
    29132919            /* $2 */
     
    29272933    break;}
    29282934case 160:
    2929 #line 1597 "grammar.y"
     2935#line 1603 "grammar.y"
    29302936{
    29312937            procinfov pi;
     
    29402946    break;}
    29412947case 161:
    2942 #line 1608 "grammar.y"
     2948#line 1614 "grammar.y"
    29432949{
    29442950            idhdl h = enterid(yyvsp[-2].name,myynest,PROC_CMD,&IDROOT,TRUE);
     
    29622968    break;}
    29632969case 162:
    2964 #line 1628 "grammar.y"
     2970#line 1634 "grammar.y"
    29652971{
    29662972            omFree((ADDRESS)yyvsp[-1].name);
     
    29852991    break;}
    29862992case 163:
    2987 #line 1652 "grammar.y"
     2993#line 1658 "grammar.y"
    29882994{
    29892995            //Print("par:%s, %d\n",$2.Name(),$2.Typ());
     
    29932999    break;}
    29943000case 164:
    2995 #line 1658 "grammar.y"
     3001#line 1664 "grammar.y"
    29963002{
    29973003            //Print("par:%s, %d\n",$2.Name(),$2.Typ());
     
    30043010    break;}
    30053011case 165:
    3006 #line 1670 "grammar.y"
     3012#line 1676 "grammar.y"
    30073013{
    30083014            if(iiRETURNEXPR==NULL) YYERROR;
     
    30133019    break;}
    30143020case 166:
    3015 #line 1677 "grammar.y"
     3021#line 1683 "grammar.y"
    30163022{
    30173023            if (yyvsp[-2].i==RETURN)
     
    32473253  return 1;
    32483254}
    3249 #line 1687 "grammar.y"
     3255#line 1693 "grammar.y"
Note: See TracChangeset for help on using the changeset viewer.