Changeset 2522 in webkit for trunk/JavaScriptCore/kjs/grammar.cpp


Ignore:
Timestamp:
Oct 31, 2002, 11:12:39 AM (23 years ago)
Author:
darin
Message:
  • kjs/grammar.y: Fix the APPLE_CHANGES thing here too.
  • kjs/grammar.cpp: Regenerated this file.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/grammar.cpp

    r2519 r2522  
    112112#define YYDEBUG 0
    113113#define YYMAXDEPTH 0
    114 #ifdef APPLE_CHANGES
    115 #else
     114#if !APPLE_CHANGES
    116115#define YYERROR_VERBOSE
    117116#endif
     
    125124
    126125
    127 #line 53 "grammar.y"
     126#line 52 "grammar.y"
    128127typedef union {
    129128  int                 ival;
     
    315314#if YYDEBUG != 0
    316315static const short yyrline[] = { 0,
    317    160,   162,   163,   164,   165,   166,   169,   175,   177,   179,
    318    180,   181,   182,   183,   186,   188,   189,   192,   194,   198,
    319    200,   203,   205,   208,   210,   214,   217,   218,   221,   223,
    320    224,   225,   227,   230,   232,   235,   237,   238,   239,   243,
    321    245,   248,   250,   253,   255,   258,   260,   261,   264,   266,
    322    267,   268,   269,   270,   271,   272,   273,   274,   275,   276,
    323    279,   281,   282,   283,   286,   288,   289,   292,   294,   295,
    324    296,   299,   301,   303,   305,   307,   309,   311,   315,   317,
    325    318,   319,   320,   323,   325,   328,   330,   333,   335,   338,
    326    340,   344,   346,   350,   352,   356,   358,   362,   364,   365,
    327    366,   367,   368,   369,   370,   371,   372,   373,   374,   377,
    328    379,   382,   384,   385,   386,   387,   388,   389,   390,   391,
    329    392,   393,   394,   395,   396,   399,   401,   404,   406,   409,
    330    412,   421,   423,   427,   429,   432,   436,   440,   443,   450,
    331    452,   456,   458,   459,   462,   465,   468,   472,   478,   480,
    332    483,   485,   489,   491,   498,   500,   504,   506,   514,   516,
    333    520,   521,   527,   532,   537,   539,   543,   545,   548,   550,
    334    553,   555,   558,   560,   563,   569,   573,   575,   576,   579,
    335    583,   587,   590,   594,   596,   601,   603,   607,   610,   614,
    336    617,   621,   624,   630,   632
     316   159,   161,   162,   163,   164,   165,   168,   174,   176,   178,
     317   179,   180,   181,   182,   185,   187,   188,   191,   193,   197,
     318   199,   202,   204,   207,   209,   213,   216,   217,   220,   222,
     319   223,   224,   226,   229,   231,   234,   236,   237,   238,   242,
     320   244,   247,   249,   252,   254,   257,   259,   260,   263,   265,
     321   266,   267,   268,   269,   270,   271,   272,   273,   274,   275,
     322   278,   280,   281,   282,   285,   287,   288,   291,   293,   294,
     323   295,   298,   300,   302,   304,   306,   308,   310,   314,   316,
     324   317,   318,   319,   322,   324,   327,   329,   332,   334,   337,
     325   339,   343,   345,   349,   351,   355,   357,   361,   363,   364,
     326   365,   366,   367,   368,   369,   370,   371,   372,   373,   376,
     327   378,   381,   383,   384,   385,   386,   387,   388,   389,   390,
     328   391,   392,   393,   394,   395,   398,   400,   403,   405,   408,
     329   411,   420,   422,   426,   428,   431,   435,   439,   442,   449,
     330   451,   455,   457,   458,   461,   464,   467,   471,   477,   479,
     331   482,   484,   488,   490,   497,   499,   503,   505,   513,   515,
     332   519,   520,   526,   531,   536,   538,   542,   544,   547,   549,
     333   552,   554,   557,   559,   562,   568,   572,   574,   575,   578,
     334   582,   586,   589,   593,   595,   600,   602,   606,   609,   613,
     335   616,   620,   623,   629,   631
    337336};
    338337#endif
     
    12931292
    12941293case 1:
     1294#line 160 "grammar.y"
     1295{ yyval.node = new NullNode(); ;
     1296    break;}
     1297case 2:
    12951298#line 161 "grammar.y"
    1296 { yyval.node = new NullNode(); ;
    1297     break;}
    1298 case 2:
     1299{ yyval.node = new BooleanNode(true); ;
     1300    break;}
     1301case 3:
    12991302#line 162 "grammar.y"
    1300 { yyval.node = new BooleanNode(true); ;
    1301     break;}
    1302 case 3:
     1303{ yyval.node = new BooleanNode(false); ;
     1304    break;}
     1305case 4:
    13031306#line 163 "grammar.y"
    1304 { yyval.node = new BooleanNode(false); ;
    1305     break;}
    1306 case 4:
     1307{ yyval.node = new NumberNode(yyvsp[0].dval); ;
     1308    break;}
     1309case 5:
    13071310#line 164 "grammar.y"
    1308 { yyval.node = new NumberNode(yyvsp[0].dval); ;
    1309     break;}
    1310 case 5:
     1311{ yyval.node = new StringNode(yyvsp[0].ustr); delete yyvsp[0].ustr; ;
     1312    break;}
     1313case 6:
    13111314#line 165 "grammar.y"
    1312 { yyval.node = new StringNode(yyvsp[0].ustr); delete yyvsp[0].ustr; ;
    1313     break;}
    1314 case 6:
    1315 #line 166 "grammar.y"
    13161315{ Lexer *l = Lexer::curr();
    13171316                                     if (!l->scanRegExp()) YYABORT;
     
    13191318    break;}
    13201319case 7:
    1321 #line 170 "grammar.y"
     1320#line 169 "grammar.y"
    13221321{ Lexer *l = Lexer::curr();
    13231322                                     if (!l->scanRegExp()) YYABORT;
     
    13251324    break;}
    13261325case 8:
     1326#line 175 "grammar.y"
     1327{ yyval.node = new ThisNode(); ;
     1328    break;}
     1329case 9:
    13271330#line 176 "grammar.y"
    1328 { yyval.node = new ThisNode(); ;
    1329     break;}
    1330 case 9:
    1331 #line 177 "grammar.y"
    13321331{ yyval.node = new ResolveNode(yyvsp[0].ustr);
    13331332                                     delete yyvsp[0].ustr; ;
    13341333    break;}
    13351334case 12:
     1335#line 180 "grammar.y"
     1336{ yyval.node = new GroupNode(yyvsp[-1].node); ;
     1337    break;}
     1338case 13:
    13361339#line 181 "grammar.y"
    1337 { yyval.node = new GroupNode(yyvsp[-1].node); ;
    1338     break;}
    1339 case 13:
     1340{ yyval.node = new ObjectLiteralNode(0L); ;
     1341    break;}
     1342case 14:
    13401343#line 182 "grammar.y"
    1341 { yyval.node = new ObjectLiteralNode(0L); ;
    1342     break;}
    1343 case 14:
    1344 #line 183 "grammar.y"
    13451344{ yyval.node = new ObjectLiteralNode(yyvsp[-1].node); ;
    13461345    break;}
    13471346case 15:
     1347#line 186 "grammar.y"
     1348{ yyval.node = new ArrayNode(yyvsp[-1].eli); ;
     1349    break;}
     1350case 16:
    13481351#line 187 "grammar.y"
    1349 { yyval.node = new ArrayNode(yyvsp[-1].eli); ;
    1350     break;}
    1351 case 16:
     1352{ yyval.node = new ArrayNode(yyvsp[-1].elm); ;
     1353    break;}
     1354case 17:
    13521355#line 188 "grammar.y"
    1353 { yyval.node = new ArrayNode(yyvsp[-1].elm); ;
    1354     break;}
    1355 case 17:
    1356 #line 189 "grammar.y"
    13571356{ yyval.node = new ArrayNode(yyvsp[-1].eli, yyvsp[-3].elm); ;
    13581357    break;}
    13591358case 18:
    1360 #line 193 "grammar.y"
     1359#line 192 "grammar.y"
    13611360{ yyval.elm = new ElementNode(yyvsp[-1].eli, yyvsp[0].node); ;
    13621361    break;}
    13631362case 19:
    1364 #line 195 "grammar.y"
     1363#line 194 "grammar.y"
    13651364{ yyval.elm = new ElementNode(yyvsp[-3].elm, yyvsp[-1].eli, yyvsp[0].node); ;
    13661365    break;}
    13671366case 20:
    1368 #line 199 "grammar.y"
     1367#line 198 "grammar.y"
    13691368{ yyval.eli = 0L; ;
    13701369    break;}
    13711370case 22:
     1371#line 203 "grammar.y"
     1372{ yyval.eli = new ElisionNode(0L); ;
     1373    break;}
     1374case 23:
    13721375#line 204 "grammar.y"
    1373 { yyval.eli = new ElisionNode(0L); ;
    1374     break;}
    1375 case 23:
    1376 #line 205 "grammar.y"
    13771376{ yyval.eli = new ElisionNode(yyvsp[-1].eli); ;
    13781377    break;}
    13791378case 24:
    1380 #line 209 "grammar.y"
     1379#line 208 "grammar.y"
    13811380{ yyval.node = new PropertyValueNode(yyvsp[-2].node, yyvsp[0].node); ;
    13821381    break;}
    13831382case 25:
    1384 #line 211 "grammar.y"
     1383#line 210 "grammar.y"
    13851384{ yyval.node = new PropertyValueNode(yyvsp[-2].node, yyvsp[0].node, yyvsp[-4].node); ;
    13861385    break;}
    13871386case 26:
    1388 #line 215 "grammar.y"
     1387#line 214 "grammar.y"
    13891388{ yyval.node = new PropertyNode(yyvsp[0].ustr);
    13901389                                     delete yyvsp[0].ustr; ;
    13911390    break;}
    13921391case 27:
     1392#line 216 "grammar.y"
     1393{ yyval.node = new PropertyNode(yyvsp[0].ustr); delete yyvsp[0].ustr; ;
     1394    break;}
     1395case 28:
    13931396#line 217 "grammar.y"
    1394 { yyval.node = new PropertyNode(yyvsp[0].ustr); delete yyvsp[0].ustr; ;
    1395     break;}
    1396 case 28:
    1397 #line 218 "grammar.y"
    13981397{ yyval.node = new PropertyNode(yyvsp[0].dval); ;
    13991398    break;}
    14001399case 31:
     1400#line 223 "grammar.y"
     1401{ yyval.node = new AccessorNode1(yyvsp[-3].node, yyvsp[-1].node); ;
     1402    break;}
     1403case 32:
    14011404#line 224 "grammar.y"
    1402 { yyval.node = new AccessorNode1(yyvsp[-3].node, yyvsp[-1].node); ;
    1403     break;}
    1404 case 32:
    1405 #line 225 "grammar.y"
    14061405{ yyval.node = new AccessorNode2(yyvsp[-2].node, yyvsp[0].ustr);
    14071406                                     delete yyvsp[0].ustr; ;
    14081407    break;}
    14091408case 33:
    1410 #line 227 "grammar.y"
     1409#line 226 "grammar.y"
    14111410{ yyval.node = new NewExprNode(yyvsp[-1].node, yyvsp[0].args); ;
    14121411    break;}
    14131412case 35:
    1414 #line 232 "grammar.y"
     1413#line 231 "grammar.y"
    14151414{ yyval.node = new NewExprNode(yyvsp[0].node); ;
    14161415    break;}
    14171416case 36:
     1417#line 235 "grammar.y"
     1418{ yyval.node = new FunctionCallNode(yyvsp[-1].node, yyvsp[0].args); ;
     1419    break;}
     1420case 37:
    14181421#line 236 "grammar.y"
    14191422{ yyval.node = new FunctionCallNode(yyvsp[-1].node, yyvsp[0].args); ;
    14201423    break;}
    1421 case 37:
     1424case 38:
    14221425#line 237 "grammar.y"
    1423 { yyval.node = new FunctionCallNode(yyvsp[-1].node, yyvsp[0].args); ;
    1424     break;}
    1425 case 38:
     1426{ yyval.node = new AccessorNode1(yyvsp[-3].node, yyvsp[-1].node); ;
     1427    break;}
     1428case 39:
    14261429#line 238 "grammar.y"
    1427 { yyval.node = new AccessorNode1(yyvsp[-3].node, yyvsp[-1].node); ;
    1428     break;}
    1429 case 39:
    1430 #line 239 "grammar.y"
    14311430{ yyval.node = new AccessorNode2(yyvsp[-2].node, yyvsp[0].ustr);
    14321431                                     delete yyvsp[0].ustr; ;
    14331432    break;}
    14341433case 40:
     1434#line 243 "grammar.y"
     1435{ yyval.args = new ArgumentsNode(0L); ;
     1436    break;}
     1437case 41:
    14351438#line 244 "grammar.y"
    1436 { yyval.args = new ArgumentsNode(0L); ;
    1437     break;}
    1438 case 41:
    1439 #line 245 "grammar.y"
    14401439{ yyval.args = new ArgumentsNode(yyvsp[-1].alist); ;
    14411440    break;}
    14421441case 42:
     1442#line 248 "grammar.y"
     1443{ yyval.alist = new ArgumentListNode(yyvsp[0].node); ;
     1444    break;}
     1445case 43:
    14431446#line 249 "grammar.y"
    1444 { yyval.alist = new ArgumentListNode(yyvsp[0].node); ;
    1445     break;}
    1446 case 43:
    1447 #line 250 "grammar.y"
    14481447{ yyval.alist = new ArgumentListNode(yyvsp[-2].alist, yyvsp[0].node); ;
    14491448    break;}
    14501449case 47:
     1450#line 259 "grammar.y"
     1451{ yyval.node = new PostfixNode(yyvsp[-1].node, OpPlusPlus); ;
     1452    break;}
     1453case 48:
    14511454#line 260 "grammar.y"
    1452 { yyval.node = new PostfixNode(yyvsp[-1].node, OpPlusPlus); ;
    1453     break;}
    1454 case 48:
    1455 #line 261 "grammar.y"
    14561455{ yyval.node = new PostfixNode(yyvsp[-1].node, OpMinusMinus); ;
    14571456    break;}
    14581457case 50:
     1458#line 265 "grammar.y"
     1459{ yyval.node = new DeleteNode(yyvsp[0].node); ;
     1460    break;}
     1461case 51:
    14591462#line 266 "grammar.y"
    1460 { yyval.node = new DeleteNode(yyvsp[0].node); ;
    1461     break;}
    1462 case 51:
     1463{ yyval.node = new VoidNode(yyvsp[0].node); ;
     1464    break;}
     1465case 52:
    14631466#line 267 "grammar.y"
    1464 { yyval.node = new VoidNode(yyvsp[0].node); ;
    1465     break;}
    1466 case 52:
     1467{ yyval.node = new TypeOfNode(yyvsp[0].node); ;
     1468    break;}
     1469case 53:
    14671470#line 268 "grammar.y"
    1468 { yyval.node = new TypeOfNode(yyvsp[0].node); ;
    1469     break;}
    1470 case 53:
     1471{ yyval.node = new PrefixNode(OpPlusPlus, yyvsp[0].node); ;
     1472    break;}
     1473case 54:
    14711474#line 269 "grammar.y"
    14721475{ yyval.node = new PrefixNode(OpPlusPlus, yyvsp[0].node); ;
    14731476    break;}
    1474 case 54:
     1477case 55:
    14751478#line 270 "grammar.y"
    1476 { yyval.node = new PrefixNode(OpPlusPlus, yyvsp[0].node); ;
    1477     break;}
    1478 case 55:
     1479{ yyval.node = new PrefixNode(OpMinusMinus, yyvsp[0].node); ;
     1480    break;}
     1481case 56:
    14791482#line 271 "grammar.y"
    14801483{ yyval.node = new PrefixNode(OpMinusMinus, yyvsp[0].node); ;
    14811484    break;}
    1482 case 56:
     1485case 57:
    14831486#line 272 "grammar.y"
    1484 { yyval.node = new PrefixNode(OpMinusMinus, yyvsp[0].node); ;
    1485     break;}
    1486 case 57:
     1487{ yyval.node = new UnaryPlusNode(yyvsp[0].node); ;
     1488    break;}
     1489case 58:
    14871490#line 273 "grammar.y"
    1488 { yyval.node = new UnaryPlusNode(yyvsp[0].node); ;
    1489     break;}
    1490 case 58:
     1491{ yyval.node = new NegateNode(yyvsp[0].node); ;
     1492    break;}
     1493case 59:
    14911494#line 274 "grammar.y"
    1492 { yyval.node = new NegateNode(yyvsp[0].node); ;
    1493     break;}
    1494 case 59:
     1495{ yyval.node = new BitwiseNotNode(yyvsp[0].node); ;
     1496    break;}
     1497case 60:
    14951498#line 275 "grammar.y"
    1496 { yyval.node = new BitwiseNotNode(yyvsp[0].node); ;
    1497     break;}
    1498 case 60:
    1499 #line 276 "grammar.y"
    15001499{ yyval.node = new LogicalNotNode(yyvsp[0].node); ;
    15011500    break;}
    15021501case 62:
     1502#line 280 "grammar.y"
     1503{ yyval.node = new MultNode(yyvsp[-2].node, yyvsp[0].node, '*'); ;
     1504    break;}
     1505case 63:
    15031506#line 281 "grammar.y"
    1504 { yyval.node = new MultNode(yyvsp[-2].node, yyvsp[0].node, '*'); ;
    1505     break;}
    1506 case 63:
     1507{ yyval.node = new MultNode(yyvsp[-2].node, yyvsp[0].node, '/'); ;
     1508    break;}
     1509case 64:
    15071510#line 282 "grammar.y"
    1508 { yyval.node = new MultNode(yyvsp[-2].node, yyvsp[0].node, '/'); ;
    1509     break;}
    1510 case 64:
    1511 #line 283 "grammar.y"
    15121511{ yyval.node = new MultNode(yyvsp[-2].node,yyvsp[0].node,'%'); ;
    15131512    break;}
    15141513case 66:
     1514#line 287 "grammar.y"
     1515{ yyval.node = new AddNode(yyvsp[-2].node, yyvsp[0].node, '+'); ;
     1516    break;}
     1517case 67:
    15151518#line 288 "grammar.y"
    1516 { yyval.node = new AddNode(yyvsp[-2].node, yyvsp[0].node, '+'); ;
    1517     break;}
    1518 case 67:
    1519 #line 289 "grammar.y"
    15201519{ yyval.node = new AddNode(yyvsp[-2].node, yyvsp[0].node, '-'); ;
    15211520    break;}
    15221521case 69:
     1522#line 293 "grammar.y"
     1523{ yyval.node = new ShiftNode(yyvsp[-2].node, OpLShift, yyvsp[0].node); ;
     1524    break;}
     1525case 70:
    15231526#line 294 "grammar.y"
    1524 { yyval.node = new ShiftNode(yyvsp[-2].node, OpLShift, yyvsp[0].node); ;
    1525     break;}
    1526 case 70:
     1527{ yyval.node = new ShiftNode(yyvsp[-2].node, OpRShift, yyvsp[0].node); ;
     1528    break;}
     1529case 71:
    15271530#line 295 "grammar.y"
    1528 { yyval.node = new ShiftNode(yyvsp[-2].node, OpRShift, yyvsp[0].node); ;
    1529     break;}
    1530 case 71:
    1531 #line 296 "grammar.y"
    15321531{ yyval.node = new ShiftNode(yyvsp[-2].node, OpURShift, yyvsp[0].node); ;
    15331532    break;}
    15341533case 73:
    1535 #line 302 "grammar.y"
     1534#line 301 "grammar.y"
    15361535{ yyval.node = new RelationalNode(yyvsp[-2].node, OpLess, yyvsp[0].node); ;
    15371536    break;}
    15381537case 74:
    1539 #line 304 "grammar.y"
     1538#line 303 "grammar.y"
    15401539{ yyval.node = new RelationalNode(yyvsp[-2].node, OpGreater, yyvsp[0].node); ;
    15411540    break;}
    15421541case 75:
    1543 #line 306 "grammar.y"
     1542#line 305 "grammar.y"
    15441543{ yyval.node = new RelationalNode(yyvsp[-2].node, OpLessEq, yyvsp[0].node); ;
    15451544    break;}
    15461545case 76:
    1547 #line 308 "grammar.y"
     1546#line 307 "grammar.y"
    15481547{ yyval.node = new RelationalNode(yyvsp[-2].node, OpGreaterEq, yyvsp[0].node); ;
    15491548    break;}
    15501549case 77:
    1551 #line 310 "grammar.y"
     1550#line 309 "grammar.y"
    15521551{ yyval.node = new RelationalNode(yyvsp[-2].node, OpInstanceOf, yyvsp[0].node); ;
    15531552    break;}
    15541553case 78:
    1555 #line 312 "grammar.y"
     1554#line 311 "grammar.y"
    15561555{ yyval.node = new RelationalNode(yyvsp[-2].node, OpIn, yyvsp[0].node); ;
    15571556    break;}
    15581557case 80:
     1558#line 316 "grammar.y"
     1559{ yyval.node = new EqualNode(yyvsp[-2].node, OpEqEq, yyvsp[0].node); ;
     1560    break;}
     1561case 81:
    15591562#line 317 "grammar.y"
    1560 { yyval.node = new EqualNode(yyvsp[-2].node, OpEqEq, yyvsp[0].node); ;
    1561     break;}
    1562 case 81:
     1563{ yyval.node = new EqualNode(yyvsp[-2].node, OpNotEq, yyvsp[0].node); ;
     1564    break;}
     1565case 82:
    15631566#line 318 "grammar.y"
    1564 { yyval.node = new EqualNode(yyvsp[-2].node, OpNotEq, yyvsp[0].node); ;
    1565     break;}
    1566 case 82:
     1567{ yyval.node = new EqualNode(yyvsp[-2].node, OpStrEq, yyvsp[0].node); ;
     1568    break;}
     1569case 83:
    15671570#line 319 "grammar.y"
    1568 { yyval.node = new EqualNode(yyvsp[-2].node, OpStrEq, yyvsp[0].node); ;
    1569     break;}
    1570 case 83:
    1571 #line 320 "grammar.y"
    15721571{ yyval.node = new EqualNode(yyvsp[-2].node, OpStrNEq, yyvsp[0].node);;
    15731572    break;}
    15741573case 85:
    1575 #line 325 "grammar.y"
     1574#line 324 "grammar.y"
    15761575{ yyval.node = new BitOperNode(yyvsp[-2].node, OpBitAnd, yyvsp[0].node); ;
    15771576    break;}
    15781577case 87:
    1579 #line 330 "grammar.y"
     1578#line 329 "grammar.y"
    15801579{ yyval.node = new BitOperNode(yyvsp[-2].node, OpBitXOr, yyvsp[0].node); ;
    15811580    break;}
    15821581case 89:
    1583 #line 335 "grammar.y"
     1582#line 334 "grammar.y"
    15841583{ yyval.node = new BitOperNode(yyvsp[-2].node, OpBitOr, yyvsp[0].node); ;
    15851584    break;}
    15861585case 91:
    1587 #line 341 "grammar.y"
     1586#line 340 "grammar.y"
    15881587{ yyval.node = new BinaryLogicalNode(yyvsp[-2].node, OpAnd, yyvsp[0].node); ;
    15891588    break;}
    15901589case 93:
    1591 #line 347 "grammar.y"
     1590#line 346 "grammar.y"
    15921591{ yyval.node = new BinaryLogicalNode(yyvsp[-2].node, OpOr, yyvsp[0].node); ;
    15931592    break;}
    15941593case 95:
    1595 #line 353 "grammar.y"
     1594#line 352 "grammar.y"
    15961595{ yyval.node = new ConditionalNode(yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].node); ;
    15971596    break;}
    15981597case 97:
    1599 #line 359 "grammar.y"
     1598#line 358 "grammar.y"
    16001599{ yyval.node = new AssignNode(yyvsp[-2].node, yyvsp[-1].op, yyvsp[0].node);;
    16011600    break;}
    16021601case 98:
     1602#line 362 "grammar.y"
     1603{ yyval.op = OpEqual; ;
     1604    break;}
     1605case 99:
    16031606#line 363 "grammar.y"
    1604 { yyval.op = OpEqual; ;
    1605     break;}
    1606 case 99:
     1607{ yyval.op = OpPlusEq; ;
     1608    break;}
     1609case 100:
    16071610#line 364 "grammar.y"
    1608 { yyval.op = OpPlusEq; ;
    1609     break;}
    1610 case 100:
     1611{ yyval.op = OpMinusEq; ;
     1612    break;}
     1613case 101:
    16111614#line 365 "grammar.y"
    1612 { yyval.op = OpMinusEq; ;
    1613     break;}
    1614 case 101:
     1615{ yyval.op = OpMultEq; ;
     1616    break;}
     1617case 102:
    16151618#line 366 "grammar.y"
    1616 { yyval.op = OpMultEq; ;
    1617     break;}
    1618 case 102:
     1619{ yyval.op = OpDivEq; ;
     1620    break;}
     1621case 103:
    16191622#line 367 "grammar.y"
    1620 { yyval.op = OpDivEq; ;
    1621     break;}
    1622 case 103:
     1623{ yyval.op = OpLShift; ;
     1624    break;}
     1625case 104:
    16231626#line 368 "grammar.y"
    1624 { yyval.op = OpLShift; ;
    1625     break;}
    1626 case 104:
     1627{ yyval.op = OpRShift; ;
     1628    break;}
     1629case 105:
    16271630#line 369 "grammar.y"
    1628 { yyval.op = OpRShift; ;
    1629     break;}
    1630 case 105:
     1631{ yyval.op = OpURShift; ;
     1632    break;}
     1633case 106:
    16311634#line 370 "grammar.y"
    1632 { yyval.op = OpURShift; ;
    1633     break;}
    1634 case 106:
     1635{ yyval.op = OpAndEq; ;
     1636    break;}
     1637case 107:
    16351638#line 371 "grammar.y"
    1636 { yyval.op = OpAndEq; ;
    1637     break;}
    1638 case 107:
     1639{ yyval.op = OpXOrEq; ;
     1640    break;}
     1641case 108:
    16391642#line 372 "grammar.y"
    1640 { yyval.op = OpXOrEq; ;
    1641     break;}
    1642 case 108:
     1643{ yyval.op = OpOrEq; ;
     1644    break;}
     1645case 109:
    16431646#line 373 "grammar.y"
    1644 { yyval.op = OpOrEq; ;
    1645     break;}
    1646 case 109:
    1647 #line 374 "grammar.y"
    16481647{ yyval.op = OpModEq; ;
    16491648    break;}
    16501649case 111:
    1651 #line 379 "grammar.y"
     1650#line 378 "grammar.y"
    16521651{ yyval.node = new CommaNode(yyvsp[-2].node, yyvsp[0].node); ;
    16531652    break;}
    16541653case 126:
     1654#line 399 "grammar.y"
     1655{ yyval.stat = new BlockNode(0L); DBG(yyval.stat, yylsp[0], yylsp[0]); ;
     1656    break;}
     1657case 127:
    16551658#line 400 "grammar.y"
    1656 { yyval.stat = new BlockNode(0L); DBG(yyval.stat, yylsp[0], yylsp[0]); ;
    1657     break;}
    1658 case 127:
    1659 #line 401 "grammar.y"
    16601659{ yyval.stat = new BlockNode(yyvsp[-1].srcs); DBG(yyval.stat, yylsp[0], yylsp[0]); ;
    16611660    break;}
    16621661case 128:
     1662#line 404 "grammar.y"
     1663{ yyval.slist = new StatListNode(yyvsp[0].stat); ;
     1664    break;}
     1665case 129:
    16631666#line 405 "grammar.y"
    1664 { yyval.slist = new StatListNode(yyvsp[0].stat); ;
    1665     break;}
    1666 case 129:
    1667 #line 406 "grammar.y"
    16681667{ yyval.slist = new StatListNode(yyvsp[-1].slist, yyvsp[0].stat); ;
    16691668    break;}
    16701669case 130:
    1671 #line 410 "grammar.y"
     1670#line 409 "grammar.y"
    16721671{ yyval.stat = new VarStatementNode(yyvsp[-1].vlist);
    16731672                                      DBG(yyval.stat, yylsp[-2], yylsp[0]); ;
    16741673    break;}
    16751674case 131:
    1676 #line 412 "grammar.y"
     1675#line 411 "grammar.y"
    16771676{ if (automatic()) {
    16781677                                          yyval.stat = new VarStatementNode(yyvsp[-1].vlist);
     
    16841683    break;}
    16851684case 132:
    1686 #line 422 "grammar.y"
     1685#line 421 "grammar.y"
    16871686{ yyval.vlist = new VarDeclListNode(yyvsp[0].decl); ;
    16881687    break;}
    16891688case 133:
    1690 #line 424 "grammar.y"
     1689#line 423 "grammar.y"
    16911690{ yyval.vlist = new VarDeclListNode(yyvsp[-2].vlist, yyvsp[0].decl); ;
    16921691    break;}
    16931692case 134:
     1693#line 427 "grammar.y"
     1694{ yyval.decl = new VarDeclNode(yyvsp[0].ustr, 0); delete yyvsp[0].ustr; ;
     1695    break;}
     1696case 135:
    16941697#line 428 "grammar.y"
    1695 { yyval.decl = new VarDeclNode(yyvsp[0].ustr, 0); delete yyvsp[0].ustr; ;
    1696     break;}
    1697 case 135:
    1698 #line 429 "grammar.y"
    16991698{ yyval.decl = new VarDeclNode(yyvsp[-1].ustr, yyvsp[0].init); delete yyvsp[-1].ustr; ;
    17001699    break;}
    17011700case 136:
    1702 #line 433 "grammar.y"
     1701#line 432 "grammar.y"
    17031702{ yyval.init = new AssignExprNode(yyvsp[0].node); ;
    17041703    break;}
    17051704case 137:
    1706 #line 437 "grammar.y"
     1705#line 436 "grammar.y"
    17071706{ yyval.stat = new EmptyStatementNode(); ;
    17081707    break;}
    17091708case 138:
    1710 #line 441 "grammar.y"
     1709#line 440 "grammar.y"
    17111710{ yyval.stat = new ExprStatementNode(yyvsp[-1].node);
    17121711                                     DBG(yyval.stat, yylsp[-1], yylsp[0]); ;
    17131712    break;}
    17141713case 139:
    1715 #line 443 "grammar.y"
     1714#line 442 "grammar.y"
    17161715{ if (automatic()) {
    17171716                                       yyval.stat = new ExprStatementNode(yyvsp[-1].node);
     
    17211720    break;}
    17221721case 140:
    1723 #line 451 "grammar.y"
     1722#line 450 "grammar.y"
    17241723{ yyval.stat = new IfNode(yyvsp[-2].node,yyvsp[0].stat,0L);DBG(yyval.stat,yylsp[-4],yylsp[-1]); ;
    17251724    break;}
    17261725case 141:
    1727 #line 453 "grammar.y"
     1726#line 452 "grammar.y"
    17281727{ yyval.stat = new IfNode(yyvsp[-4].node,yyvsp[-2].stat,yyvsp[0].stat);DBG(yyval.stat,yylsp[-6],yylsp[-3]); ;
    17291728    break;}
    17301729case 142:
     1730#line 456 "grammar.y"
     1731{ yyval.stat=new DoWhileNode(yyvsp[-4].stat,yyvsp[-1].node);DBG(yyval.stat,yylsp[-5],yylsp[-3]);;
     1732    break;}
     1733case 143:
    17311734#line 457 "grammar.y"
    1732 { yyval.stat=new DoWhileNode(yyvsp[-4].stat,yyvsp[-1].node);DBG(yyval.stat,yylsp[-5],yylsp[-3]);;
    1733     break;}
    1734 case 143:
    1735 #line 458 "grammar.y"
    17361735{ yyval.stat = new WhileNode(yyvsp[-2].node,yyvsp[0].stat);DBG(yyval.stat,yylsp[-4],yylsp[-1]); ;
    17371736    break;}
    17381737case 144:
    1739 #line 460 "grammar.y"
     1738#line 459 "grammar.y"
    17401739{ yyval.stat = new ForNode(yyvsp[-6].node,yyvsp[-4].node,yyvsp[-2].node,yyvsp[0].stat);
    17411740                                     DBG(yyval.stat,yylsp[-8],yylsp[-1]); ;
    17421741    break;}
    17431742case 145:
    1744 #line 463 "grammar.y"
     1743#line 462 "grammar.y"
    17451744{ yyval.stat = new ForNode(yyvsp[-6].vlist,yyvsp[-4].node,yyvsp[-2].node,yyvsp[0].stat);
    17461745                                     DBG(yyval.stat,yylsp[-9],yylsp[-1]); ;
    17471746    break;}
    17481747case 146:
    1749 #line 466 "grammar.y"
     1748#line 465 "grammar.y"
    17501749{ yyval.stat = new ForInNode(yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].stat);
    17511750                                     DBG(yyval.stat,yylsp[-6],yylsp[-1]); ;
    17521751    break;}
    17531752case 147:
    1754 #line 469 "grammar.y"
     1753#line 468 "grammar.y"
    17551754{ yyval.stat = new ForInNode(yyvsp[-4].ustr,0L,yyvsp[-2].node,yyvsp[0].stat);
    17561755                                     DBG(yyval.stat,yylsp[-7],yylsp[-1]);
     
    17581757    break;}
    17591758case 148:
    1760 #line 473 "grammar.y"
     1759#line 472 "grammar.y"
    17611760{ yyval.stat = new ForInNode(yyvsp[-5].ustr,yyvsp[-4].init,yyvsp[-2].node,yyvsp[0].stat);
    17621761                                     DBG(yyval.stat,yylsp[-8],yylsp[-1]);
     
    17641763    break;}
    17651764case 149:
    1766 #line 479 "grammar.y"
     1765#line 478 "grammar.y"
    17671766{ yyval.node = 0L; ;
    17681767    break;}
    17691768case 151:
     1769#line 483 "grammar.y"
     1770{ yyval.stat = new ContinueNode(); DBG(yyval.stat,yylsp[-1],yylsp[0]); ;
     1771    break;}
     1772case 152:
    17701773#line 484 "grammar.y"
    1771 { yyval.stat = new ContinueNode(); DBG(yyval.stat,yylsp[-1],yylsp[0]); ;
    1772     break;}
    1773 case 152:
    1774 #line 485 "grammar.y"
    17751774{ if (automatic()) {
    17761775                                       yyval.stat = new ContinueNode(); DBG(yyval.stat,yylsp[-1],yylsp[0]);
     
    17791778    break;}
    17801779case 153:
    1781 #line 489 "grammar.y"
     1780#line 488 "grammar.y"
    17821781{ yyval.stat = new ContinueNode(yyvsp[-1].ustr); DBG(yyval.stat,yylsp[-2],yylsp[0]);
    17831782                                     delete yyvsp[-1].ustr; ;
    17841783    break;}
    17851784case 154:
    1786 #line 491 "grammar.y"
     1785#line 490 "grammar.y"
    17871786{ if (automatic()) {
    17881787                                       yyval.stat = new ContinueNode(yyvsp[-1].ustr);DBG(yyval.stat,yylsp[-2],yylsp[-1]);
     
    17921791    break;}
    17931792case 155:
     1793#line 498 "grammar.y"
     1794{ yyval.stat = new BreakNode();DBG(yyval.stat,yylsp[-1],yylsp[0]); ;
     1795    break;}
     1796case 156:
    17941797#line 499 "grammar.y"
    1795 { yyval.stat = new BreakNode();DBG(yyval.stat,yylsp[-1],yylsp[0]); ;
    1796     break;}
    1797 case 156:
    1798 #line 500 "grammar.y"
    17991798{ if (automatic()) {
    18001799                                       yyval.stat = new BreakNode(); DBG(yyval.stat,yylsp[-1],yylsp[-1]);
     
    18031802    break;}
    18041803case 157:
    1805 #line 504 "grammar.y"
     1804#line 503 "grammar.y"
    18061805{ yyval.stat = new BreakNode(yyvsp[-1].ustr); DBG(yyval.stat,yylsp[-2],yylsp[0]);
    18071806                                     delete yyvsp[-1].ustr; ;
    18081807    break;}
    18091808case 158:
    1810 #line 506 "grammar.y"
     1809#line 505 "grammar.y"
    18111810{ if (automatic()) {
    18121811                                       yyval.stat = new BreakNode(yyvsp[-1].ustr); DBG(yyval.stat,yylsp[-2],yylsp[-1]);
     
    18171816    break;}
    18181817case 159:
     1818#line 514 "grammar.y"
     1819{ yyval.stat = new ReturnNode(0L); DBG(yyval.stat,yylsp[-1],yylsp[0]); ;
     1820    break;}
     1821case 160:
    18191822#line 515 "grammar.y"
    1820 { yyval.stat = new ReturnNode(0L); DBG(yyval.stat,yylsp[-1],yylsp[0]); ;
    1821     break;}
    1822 case 160:
    1823 #line 516 "grammar.y"
    18241823{ if (automatic()) {
    18251824                                       yyval.stat = new ReturnNode(0L); DBG(yyval.stat,yylsp[-1],yylsp[-1]);
     
    18281827    break;}
    18291828case 161:
     1829#line 519 "grammar.y"
     1830{ yyval.stat = new ReturnNode(yyvsp[-1].node); ;
     1831    break;}
     1832case 162:
    18301833#line 520 "grammar.y"
    1831 { yyval.stat = new ReturnNode(yyvsp[-1].node); ;
    1832     break;}
    1833 case 162:
    1834 #line 521 "grammar.y"
    18351834{ if (automatic())
    18361835                                       yyval.stat = new ReturnNode(yyvsp[-1].node);
     
    18391838    break;}
    18401839case 163:
    1841 #line 528 "grammar.y"
     1840#line 527 "grammar.y"
    18421841{ yyval.stat = new WithNode(yyvsp[-2].node,yyvsp[0].stat);
    18431842                                     DBG(yyval.stat, yylsp[-4], yylsp[-1]); ;
    18441843    break;}
    18451844case 164:
    1846 #line 533 "grammar.y"
     1845#line 532 "grammar.y"
    18471846{ yyval.stat = new SwitchNode(yyvsp[-2].node, yyvsp[0].cblk);
    18481847                                     DBG(yyval.stat, yylsp[-4], yylsp[-1]); ;
    18491848    break;}
    18501849case 165:
    1851 #line 538 "grammar.y"
     1850#line 537 "grammar.y"
    18521851{ yyval.cblk = new CaseBlockNode(yyvsp[-1].clist, 0L, 0L); ;
    18531852    break;}
    18541853case 166:
    1855 #line 540 "grammar.y"
     1854#line 539 "grammar.y"
    18561855{ yyval.cblk = new CaseBlockNode(yyvsp[-3].clist, yyvsp[-2].ccl, yyvsp[-1].clist); ;
    18571856    break;}
    18581857case 167:
    1859 #line 544 "grammar.y"
     1858#line 543 "grammar.y"
    18601859{ yyval.clist = 0L; ;
    18611860    break;}
    18621861case 169:
     1862#line 548 "grammar.y"
     1863{ yyval.clist = new ClauseListNode(yyvsp[0].ccl); ;
     1864    break;}
     1865case 170:
    18631866#line 549 "grammar.y"
    1864 { yyval.clist = new ClauseListNode(yyvsp[0].ccl); ;
    1865     break;}
    1866 case 170:
    1867 #line 550 "grammar.y"
    18681867{ yyval.clist = yyvsp[-1].clist->append(yyvsp[0].ccl); ;
    18691868    break;}
    18701869case 171:
     1870#line 553 "grammar.y"
     1871{ yyval.ccl = new CaseClauseNode(yyvsp[-1].node, 0L); ;
     1872    break;}
     1873case 172:
    18711874#line 554 "grammar.y"
    1872 { yyval.ccl = new CaseClauseNode(yyvsp[-1].node, 0L); ;
    1873     break;}
    1874 case 172:
    1875 #line 555 "grammar.y"
    18761875{ yyval.ccl = new CaseClauseNode(yyvsp[-2].node, yyvsp[0].slist); ;
    18771876    break;}
    18781877case 173:
     1878#line 558 "grammar.y"
     1879{ yyval.ccl = new CaseClauseNode(0L, 0L);; ;
     1880    break;}
     1881case 174:
    18791882#line 559 "grammar.y"
    1880 { yyval.ccl = new CaseClauseNode(0L, 0L);; ;
    1881     break;}
    1882 case 174:
    1883 #line 560 "grammar.y"
    18841883{ yyval.ccl = new CaseClauseNode(0L, yyvsp[0].slist); ;
    18851884    break;}
    18861885case 175:
    1887 #line 564 "grammar.y"
     1886#line 563 "grammar.y"
    18881887{ yyvsp[0].stat->pushLabel(yyvsp[-2].ustr);
    18891888                                     yyval.stat = new LabelNode(yyvsp[-2].ustr, yyvsp[0].stat);
     
    18911890    break;}
    18921891case 176:
    1893 #line 570 "grammar.y"
     1892#line 569 "grammar.y"
    18941893{ yyval.stat = new ThrowNode(yyvsp[-1].node); ;
    18951894    break;}
    18961895case 177:
     1896#line 573 "grammar.y"
     1897{ yyval.stat = new TryNode(yyvsp[-1].stat, yyvsp[0].node); ;
     1898    break;}
     1899case 178:
    18971900#line 574 "grammar.y"
    1898 { yyval.stat = new TryNode(yyvsp[-1].stat, yyvsp[0].node); ;
    1899     break;}
    1900 case 178:
     1901{ yyval.stat = new TryNode(yyvsp[-1].stat, 0L, yyvsp[0].node); ;
     1902    break;}
     1903case 179:
    19011904#line 575 "grammar.y"
    1902 { yyval.stat = new TryNode(yyvsp[-1].stat, 0L, yyvsp[0].node); ;
    1903     break;}
    1904 case 179:
    1905 #line 576 "grammar.y"
    19061905{ yyval.stat = new TryNode(yyvsp[-2].stat, yyvsp[-1].node, yyvsp[0].node); ;
    19071906    break;}
    19081907case 180:
    1909 #line 580 "grammar.y"
     1908#line 579 "grammar.y"
    19101909{ yyval.node = new CatchNode(yyvsp[-2].ustr, yyvsp[0].stat); delete yyvsp[-2].ustr; ;
    19111910    break;}
    19121911case 181:
    1913 #line 584 "grammar.y"
     1912#line 583 "grammar.y"
    19141913{ yyval.node = new FinallyNode(yyvsp[0].stat); ;
    19151914    break;}
    19161915case 182:
    1917 #line 588 "grammar.y"
     1916#line 587 "grammar.y"
    19181917{ yyval.func = new FuncDeclNode(yyvsp[-3].ustr, 0L, yyvsp[0].body);
    19191918                                             delete yyvsp[-3].ustr; ;
    19201919    break;}
    19211920case 183:
    1922 #line 591 "grammar.y"
     1921#line 590 "grammar.y"
    19231922{ yyval.func = new FuncDeclNode(yyvsp[-4].ustr, yyvsp[-2].param, yyvsp[0].body);
    19241923                                     delete yyvsp[-4].ustr; ;
    19251924    break;}
    19261925case 184:
    1927 #line 595 "grammar.y"
     1926#line 594 "grammar.y"
    19281927{ yyval.node = new FuncExprNode(0L, yyvsp[0].body); ;
    19291928    break;}
    19301929case 185:
    1931 #line 597 "grammar.y"
     1930#line 596 "grammar.y"
    19321931{ yyval.node = new FuncExprNode(yyvsp[-2].param, yyvsp[0].body); ;
    19331932    break;}
    19341933case 186:
     1934#line 601 "grammar.y"
     1935{ yyval.param = new ParameterNode(yyvsp[0].ustr); delete yyvsp[0].ustr; ;
     1936    break;}
     1937case 187:
    19351938#line 602 "grammar.y"
    1936 { yyval.param = new ParameterNode(yyvsp[0].ustr); delete yyvsp[0].ustr; ;
    1937     break;}
    1938 case 187:
    1939 #line 603 "grammar.y"
    19401939{ yyval.param = yyvsp[-2].param->append(yyvsp[0].ustr);
    19411940                                     delete yyvsp[0].ustr; ;
    19421941    break;}
    19431942case 188:
    1944 #line 608 "grammar.y"
     1943#line 607 "grammar.y"
    19451944{ yyval.body = new FunctionBodyNode(0L);
    19461945                                     DBG(yyval.body, yylsp[-1], yylsp[0]);;
    19471946    break;}
    19481947case 189:
    1949 #line 610 "grammar.y"
     1948#line 609 "grammar.y"
    19501949{ yyval.body = new FunctionBodyNode(yyvsp[-1].srcs);
    19511950                                     DBG(yyval.body, yylsp[-2], yylsp[0]);;
    19521951    break;}
    19531952case 190:
    1954 #line 615 "grammar.y"
     1953#line 614 "grammar.y"
    19551954{ yyval.prog = new ProgramNode(0L);
    19561955                                     Parser::progNode = yyval.prog; ;
    19571956    break;}
    19581957case 191:
    1959 #line 617 "grammar.y"
     1958#line 616 "grammar.y"
    19601959{ yyval.prog = new ProgramNode(yyvsp[0].srcs);
    19611960                                     Parser::progNode = yyval.prog; ;
    19621961    break;}
    19631962case 192:
    1964 #line 622 "grammar.y"
     1963#line 621 "grammar.y"
    19651964{ yyval.srcs = new SourceElementsNode(yyvsp[0].src); ;
    19661965    break;}
    19671966case 193:
    1968 #line 624 "grammar.y"
     1967#line 623 "grammar.y"
    19691968{ yyval.srcs = new SourceElementsNode(yyvsp[0].srcs, yyvsp[-1].src); ;
    19701969    break;}
    19711970case 194:
     1971#line 630 "grammar.y"
     1972{ yyval.src = new SourceElementNode(yyvsp[0].stat); ;
     1973    break;}
     1974case 195:
    19721975#line 631 "grammar.y"
    1973 { yyval.src = new SourceElementNode(yyvsp[0].stat); ;
    1974     break;}
    1975 case 195:
    1976 #line 632 "grammar.y"
    19771976{ yyval.src = new SourceElementNode(yyvsp[0].func); ;
    19781977    break;}
     
    22002199  return 1;
    22012200}
    2202 #line 635 "grammar.y"
     2201#line 634 "grammar.y"
    22032202
    22042203
Note: See TracChangeset for help on using the changeset viewer.