Changeset 903 in webkit for trunk/JavaScriptCore/kjs


Ignore:
Timestamp:
Mar 30, 2002, 11:17:15 AM (23 years ago)
Author:
darin
Message:
  • kjs/grammar.y: Took out Id tag so we won't constantly need to update grammar.cpp.
  • kjs/grammar.cpp: Regenerated without Id tag.
  • .cvsignore: Ignore some additional autogenerated files.
  • kjs/.cvsignore: Ignore some additional autogenerated files.
Location:
trunk/JavaScriptCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore

    • Property svn:ignore
      •  

        old new  
        22Makefile
        33JavaScriptCore-stamp
         4JavaScriptCore-install-stamp
         5libJavaScriptCore.dylib
  • trunk/JavaScriptCore/kjs

    • Property svn:ignore
      •  

        old new  
        77kjs-test.diff
        88kjs-test.out
         9.dirstamp
  • trunk/JavaScriptCore/kjs/.cvsignore

    r901 r903  
    77kjs-test.diff
    88kjs-test.out
     9.dirstamp
  • trunk/JavaScriptCore/kjs/grammar.cpp

    r901 r903  
    9494 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    9595 *
    96  *  $Id$
    9796 */
    9897
     
    126125
    127126
    128 #line 54 "grammar.y"
     127#line 53 "grammar.y"
    129128typedef union {
    130129  int                 ival;
     
    316315#if YYDEBUG != 0
    317316static const short yyrline[] = { 0,
    318    161,   163,   164,   165,   166,   167,   170,   176,   178,   180,
    319    181,   182,   183,   184,   187,   189,   190,   193,   195,   199,
    320    201,   204,   206,   209,   211,   215,   218,   219,   222,   224,
    321    225,   226,   228,   231,   233,   236,   238,   239,   240,   243,
    322    245,   248,   250,   253,   255,   258,   260,   261,   264,   266,
    323    267,   268,   269,   270,   271,   272,   273,   274,   275,   276,
    324    279,   281,   282,   283,   286,   288,   289,   292,   294,   295,
    325    296,   299,   301,   303,   305,   307,   309,   311,   315,   317,
    326    318,   319,   320,   323,   325,   328,   330,   333,   335,   338,
    327    340,   344,   346,   350,   352,   356,   358,   362,   364,   365,
    328    366,   367,   368,   369,   370,   371,   372,   373,   374,   377,
    329    379,   382,   384,   385,   386,   387,   388,   389,   390,   391,
    330    392,   393,   394,   395,   396,   399,   401,   404,   406,   409,
    331    412,   421,   423,   427,   429,   432,   436,   440,   443,   450,
    332    452,   456,   458,   459,   462,   465,   468,   472,   478,   480,
    333    483,   485,   489,   491,   498,   500,   504,   506,   514,   516,
    334    520,   521,   527,   532,   537,   539,   543,   545,   548,   550,
    335    553,   555,   558,   560,   563,   569,   573,   575,   576,   579,
    336    583,   587,   590,   594,   596,   601,   603,   607,   610,   614,
    337    617,   621,   623,   626,   628
     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,   242,
     321   244,   247,   249,   252,   254,   257,   259,   260,   263,   265,
     322   266,   267,   268,   269,   270,   271,   272,   273,   274,   275,
     323   278,   280,   281,   282,   285,   287,   288,   291,   293,   294,
     324   295,   298,   300,   302,   304,   306,   308,   310,   314,   316,
     325   317,   318,   319,   322,   324,   327,   329,   332,   334,   337,
     326   339,   343,   345,   349,   351,   355,   357,   361,   363,   364,
     327   365,   366,   367,   368,   369,   370,   371,   372,   373,   376,
     328   378,   381,   383,   384,   385,   386,   387,   388,   389,   390,
     329   391,   392,   393,   394,   395,   398,   400,   403,   405,   408,
     330   411,   420,   422,   426,   428,   431,   435,   439,   442,   449,
     331   451,   455,   457,   458,   461,   464,   467,   471,   477,   479,
     332   482,   484,   488,   490,   497,   499,   503,   505,   513,   515,
     333   519,   520,   526,   531,   536,   538,   542,   544,   547,   549,
     334   552,   554,   557,   559,   562,   568,   572,   574,   575,   578,
     335   582,   586,   589,   593,   595,   600,   602,   606,   609,   613,
     336   616,   620,   622,   625,   627
    338337};
    339338#endif
     
    13321331
    13331332case 1:
     1333#line 161 "grammar.y"
     1334{ yyval.node = new NullNode(); ;
     1335    break;}
     1336case 2:
    13341337#line 162 "grammar.y"
    1335 { yyval.node = new NullNode(); ;
    1336     break;}
    1337 case 2:
     1338{ yyval.node = new BooleanNode(true); ;
     1339    break;}
     1340case 3:
    13381341#line 163 "grammar.y"
    1339 { yyval.node = new BooleanNode(true); ;
    1340     break;}
    1341 case 3:
     1342{ yyval.node = new BooleanNode(false); ;
     1343    break;}
     1344case 4:
    13421345#line 164 "grammar.y"
    1343 { yyval.node = new BooleanNode(false); ;
    1344     break;}
    1345 case 4:
     1346{ yyval.node = new NumberNode(yyvsp[0].dval); ;
     1347    break;}
     1348case 5:
    13461349#line 165 "grammar.y"
    1347 { yyval.node = new NumberNode(yyvsp[0].dval); ;
    1348     break;}
    1349 case 5:
     1350{ yyval.node = new StringNode(yyvsp[0].ustr); delete yyvsp[0].ustr; ;
     1351    break;}
     1352case 6:
    13501353#line 166 "grammar.y"
    1351 { yyval.node = new StringNode(yyvsp[0].ustr); delete yyvsp[0].ustr; ;
    1352     break;}
    1353 case 6:
    1354 #line 167 "grammar.y"
    13551354{ Lexer *l = Lexer::curr();
    13561355                                     if (!l->scanRegExp()) YYABORT;
     
    13581357    break;}
    13591358case 7:
    1360 #line 171 "grammar.y"
     1359#line 170 "grammar.y"
    13611360{ Lexer *l = Lexer::curr();
    13621361                                     if (!l->scanRegExp()) YYABORT;
     
    13641363    break;}
    13651364case 8:
     1365#line 176 "grammar.y"
     1366{ yyval.node = new ThisNode(); ;
     1367    break;}
     1368case 9:
    13661369#line 177 "grammar.y"
    1367 { yyval.node = new ThisNode(); ;
    1368     break;}
    1369 case 9:
    1370 #line 178 "grammar.y"
    13711370{ yyval.node = new ResolveNode(yyvsp[0].ustr);
    13721371                                     delete yyvsp[0].ustr; ;
    13731372    break;}
    13741373case 12:
     1374#line 181 "grammar.y"
     1375{ yyval.node = new GroupNode(yyvsp[-1].node); ;
     1376    break;}
     1377case 13:
    13751378#line 182 "grammar.y"
    1376 { yyval.node = new GroupNode(yyvsp[-1].node); ;
    1377     break;}
    1378 case 13:
     1379{ yyval.node = new ObjectLiteralNode(0L); ;
     1380    break;}
     1381case 14:
    13791382#line 183 "grammar.y"
    1380 { yyval.node = new ObjectLiteralNode(0L); ;
    1381     break;}
    1382 case 14:
    1383 #line 184 "grammar.y"
    13841383{ yyval.node = new ObjectLiteralNode(yyvsp[-1].node); ;
    13851384    break;}
    13861385case 15:
     1386#line 187 "grammar.y"
     1387{ yyval.node = new ArrayNode(yyvsp[-1].eli); ;
     1388    break;}
     1389case 16:
    13871390#line 188 "grammar.y"
    1388 { yyval.node = new ArrayNode(yyvsp[-1].eli); ;
    1389     break;}
    1390 case 16:
     1391{ yyval.node = new ArrayNode(yyvsp[-1].elm); ;
     1392    break;}
     1393case 17:
    13911394#line 189 "grammar.y"
    1392 { yyval.node = new ArrayNode(yyvsp[-1].elm); ;
    1393     break;}
    1394 case 17:
    1395 #line 190 "grammar.y"
    13961395{ yyval.node = new ArrayNode(yyvsp[-1].eli, yyvsp[-3].elm); ;
    13971396    break;}
    13981397case 18:
    1399 #line 194 "grammar.y"
     1398#line 193 "grammar.y"
    14001399{ yyval.elm = new ElementNode(yyvsp[-1].eli, yyvsp[0].node); ;
    14011400    break;}
    14021401case 19:
    1403 #line 196 "grammar.y"
     1402#line 195 "grammar.y"
    14041403{ yyval.elm = new ElementNode(yyvsp[-3].elm, yyvsp[-1].eli, yyvsp[0].node); ;
    14051404    break;}
    14061405case 20:
    1407 #line 200 "grammar.y"
     1406#line 199 "grammar.y"
    14081407{ yyval.eli = 0L; ;
    14091408    break;}
    14101409case 22:
     1410#line 204 "grammar.y"
     1411{ yyval.eli = new ElisionNode(0L); ;
     1412    break;}
     1413case 23:
    14111414#line 205 "grammar.y"
    1412 { yyval.eli = new ElisionNode(0L); ;
    1413     break;}
    1414 case 23:
    1415 #line 206 "grammar.y"
    14161415{ yyval.eli = new ElisionNode(yyvsp[-1].eli); ;
    14171416    break;}
    14181417case 24:
    1419 #line 210 "grammar.y"
     1418#line 209 "grammar.y"
    14201419{ yyval.node = new PropertyValueNode(yyvsp[-2].node, yyvsp[0].node); ;
    14211420    break;}
    14221421case 25:
    1423 #line 212 "grammar.y"
     1422#line 211 "grammar.y"
    14241423{ yyval.node = new PropertyValueNode(yyvsp[-2].node, yyvsp[0].node, yyvsp[-4].node); ;
    14251424    break;}
    14261425case 26:
    1427 #line 216 "grammar.y"
     1426#line 215 "grammar.y"
    14281427{ yyval.node = new PropertyNode(yyvsp[0].ustr);
    14291428                                     delete yyvsp[0].ustr; ;
    14301429    break;}
    14311430case 27:
     1431#line 217 "grammar.y"
     1432{ yyval.node = new PropertyNode(yyvsp[0].ustr); delete yyvsp[0].ustr; ;
     1433    break;}
     1434case 28:
    14321435#line 218 "grammar.y"
    1433 { yyval.node = new PropertyNode(yyvsp[0].ustr); delete yyvsp[0].ustr; ;
    1434     break;}
    1435 case 28:
    1436 #line 219 "grammar.y"
    14371436{ yyval.node = new PropertyNode(yyvsp[0].dval); ;
    14381437    break;}
    14391438case 31:
     1439#line 224 "grammar.y"
     1440{ yyval.node = new AccessorNode1(yyvsp[-3].node, yyvsp[-1].node); ;
     1441    break;}
     1442case 32:
    14401443#line 225 "grammar.y"
    1441 { yyval.node = new AccessorNode1(yyvsp[-3].node, yyvsp[-1].node); ;
    1442     break;}
    1443 case 32:
    1444 #line 226 "grammar.y"
    14451444{ yyval.node = new AccessorNode2(yyvsp[-2].node, yyvsp[0].ustr);
    14461445                                     delete yyvsp[0].ustr; ;
    14471446    break;}
    14481447case 33:
    1449 #line 228 "grammar.y"
     1448#line 227 "grammar.y"
    14501449{ yyval.node = new NewExprNode(yyvsp[-1].node, yyvsp[0].args); ;
    14511450    break;}
    14521451case 35:
    1453 #line 233 "grammar.y"
     1452#line 232 "grammar.y"
    14541453{ yyval.node = new NewExprNode(yyvsp[0].node); ;
    14551454    break;}
    14561455case 36:
     1456#line 236 "grammar.y"
     1457{ yyval.node = new FunctionCallNode(yyvsp[-1].node, yyvsp[0].args); ;
     1458    break;}
     1459case 37:
    14571460#line 237 "grammar.y"
    14581461{ yyval.node = new FunctionCallNode(yyvsp[-1].node, yyvsp[0].args); ;
    14591462    break;}
    1460 case 37:
     1463case 38:
    14611464#line 238 "grammar.y"
    1462 { yyval.node = new FunctionCallNode(yyvsp[-1].node, yyvsp[0].args); ;
    1463     break;}
    1464 case 38:
     1465{ yyval.node = new AccessorNode1(yyvsp[-3].node, yyvsp[-1].node); ;
     1466    break;}
     1467case 39:
    14651468#line 239 "grammar.y"
    1466 { yyval.node = new AccessorNode1(yyvsp[-3].node, yyvsp[-1].node); ;
    1467     break;}
    1468 case 39:
    1469 #line 240 "grammar.y"
    14701469{ yyval.node = new AccessorNode2(yyvsp[-2].node, yyvsp[0].ustr); ;
    14711470    break;}
    14721471case 40:
     1472#line 243 "grammar.y"
     1473{ yyval.args = new ArgumentsNode(0L); ;
     1474    break;}
     1475case 41:
    14731476#line 244 "grammar.y"
    1474 { yyval.args = new ArgumentsNode(0L); ;
    1475     break;}
    1476 case 41:
    1477 #line 245 "grammar.y"
    14781477{ yyval.args = new ArgumentsNode(yyvsp[-1].alist); ;
    14791478    break;}
    14801479case 42:
     1480#line 248 "grammar.y"
     1481{ yyval.alist = new ArgumentListNode(yyvsp[0].node); ;
     1482    break;}
     1483case 43:
    14811484#line 249 "grammar.y"
    1482 { yyval.alist = new ArgumentListNode(yyvsp[0].node); ;
    1483     break;}
    1484 case 43:
    1485 #line 250 "grammar.y"
    14861485{ yyval.alist = new ArgumentListNode(yyvsp[-2].alist, yyvsp[0].node); ;
    14871486    break;}
    14881487case 47:
     1488#line 259 "grammar.y"
     1489{ yyval.node = new PostfixNode(yyvsp[-1].node, OpPlusPlus); ;
     1490    break;}
     1491case 48:
    14891492#line 260 "grammar.y"
    1490 { yyval.node = new PostfixNode(yyvsp[-1].node, OpPlusPlus); ;
    1491     break;}
    1492 case 48:
    1493 #line 261 "grammar.y"
    14941493{ yyval.node = new PostfixNode(yyvsp[-1].node, OpMinusMinus); ;
    14951494    break;}
    14961495case 50:
     1496#line 265 "grammar.y"
     1497{ yyval.node = new DeleteNode(yyvsp[0].node); ;
     1498    break;}
     1499case 51:
    14971500#line 266 "grammar.y"
    1498 { yyval.node = new DeleteNode(yyvsp[0].node); ;
    1499     break;}
    1500 case 51:
     1501{ yyval.node = new VoidNode(yyvsp[0].node); ;
     1502    break;}
     1503case 52:
    15011504#line 267 "grammar.y"
    1502 { yyval.node = new VoidNode(yyvsp[0].node); ;
    1503     break;}
    1504 case 52:
     1505{ yyval.node = new TypeOfNode(yyvsp[0].node); ;
     1506    break;}
     1507case 53:
    15051508#line 268 "grammar.y"
    1506 { yyval.node = new TypeOfNode(yyvsp[0].node); ;
    1507     break;}
    1508 case 53:
     1509{ yyval.node = new PrefixNode(OpPlusPlus, yyvsp[0].node); ;
     1510    break;}
     1511case 54:
    15091512#line 269 "grammar.y"
    15101513{ yyval.node = new PrefixNode(OpPlusPlus, yyvsp[0].node); ;
    15111514    break;}
    1512 case 54:
     1515case 55:
    15131516#line 270 "grammar.y"
    1514 { yyval.node = new PrefixNode(OpPlusPlus, yyvsp[0].node); ;
    1515     break;}
    1516 case 55:
     1517{ yyval.node = new PrefixNode(OpMinusMinus, yyvsp[0].node); ;
     1518    break;}
     1519case 56:
    15171520#line 271 "grammar.y"
    15181521{ yyval.node = new PrefixNode(OpMinusMinus, yyvsp[0].node); ;
    15191522    break;}
    1520 case 56:
     1523case 57:
    15211524#line 272 "grammar.y"
    1522 { yyval.node = new PrefixNode(OpMinusMinus, yyvsp[0].node); ;
    1523     break;}
    1524 case 57:
     1525{ yyval.node = new UnaryPlusNode(yyvsp[0].node); ;
     1526    break;}
     1527case 58:
    15251528#line 273 "grammar.y"
    1526 { yyval.node = new UnaryPlusNode(yyvsp[0].node); ;
    1527     break;}
    1528 case 58:
     1529{ yyval.node = new NegateNode(yyvsp[0].node); ;
     1530    break;}
     1531case 59:
    15291532#line 274 "grammar.y"
    1530 { yyval.node = new NegateNode(yyvsp[0].node); ;
    1531     break;}
    1532 case 59:
     1533{ yyval.node = new BitwiseNotNode(yyvsp[0].node); ;
     1534    break;}
     1535case 60:
    15331536#line 275 "grammar.y"
    1534 { yyval.node = new BitwiseNotNode(yyvsp[0].node); ;
    1535     break;}
    1536 case 60:
    1537 #line 276 "grammar.y"
    15381537{ yyval.node = new LogicalNotNode(yyvsp[0].node); ;
    15391538    break;}
    15401539case 62:
     1540#line 280 "grammar.y"
     1541{ yyval.node = new MultNode(yyvsp[-2].node, yyvsp[0].node, '*'); ;
     1542    break;}
     1543case 63:
    15411544#line 281 "grammar.y"
    1542 { yyval.node = new MultNode(yyvsp[-2].node, yyvsp[0].node, '*'); ;
    1543     break;}
    1544 case 63:
     1545{ yyval.node = new MultNode(yyvsp[-2].node, yyvsp[0].node, '/'); ;
     1546    break;}
     1547case 64:
    15451548#line 282 "grammar.y"
    1546 { yyval.node = new MultNode(yyvsp[-2].node, yyvsp[0].node, '/'); ;
    1547     break;}
    1548 case 64:
    1549 #line 283 "grammar.y"
    15501549{ yyval.node = new MultNode(yyvsp[-2].node,yyvsp[0].node,'%'); ;
    15511550    break;}
    15521551case 66:
     1552#line 287 "grammar.y"
     1553{ yyval.node = new AddNode(yyvsp[-2].node, yyvsp[0].node, '+'); ;
     1554    break;}
     1555case 67:
    15531556#line 288 "grammar.y"
    1554 { yyval.node = new AddNode(yyvsp[-2].node, yyvsp[0].node, '+'); ;
    1555     break;}
    1556 case 67:
    1557 #line 289 "grammar.y"
    15581557{ yyval.node = new AddNode(yyvsp[-2].node, yyvsp[0].node, '-'); ;
    15591558    break;}
    15601559case 69:
     1560#line 293 "grammar.y"
     1561{ yyval.node = new ShiftNode(yyvsp[-2].node, OpLShift, yyvsp[0].node); ;
     1562    break;}
     1563case 70:
    15611564#line 294 "grammar.y"
    1562 { yyval.node = new ShiftNode(yyvsp[-2].node, OpLShift, yyvsp[0].node); ;
    1563     break;}
    1564 case 70:
     1565{ yyval.node = new ShiftNode(yyvsp[-2].node, OpRShift, yyvsp[0].node); ;
     1566    break;}
     1567case 71:
    15651568#line 295 "grammar.y"
    1566 { yyval.node = new ShiftNode(yyvsp[-2].node, OpRShift, yyvsp[0].node); ;
    1567     break;}
    1568 case 71:
    1569 #line 296 "grammar.y"
    15701569{ yyval.node = new ShiftNode(yyvsp[-2].node, OpURShift, yyvsp[0].node); ;
    15711570    break;}
    15721571case 73:
    1573 #line 302 "grammar.y"
     1572#line 301 "grammar.y"
    15741573{ yyval.node = new RelationalNode(yyvsp[-2].node, OpLess, yyvsp[0].node); ;
    15751574    break;}
    15761575case 74:
    1577 #line 304 "grammar.y"
     1576#line 303 "grammar.y"
    15781577{ yyval.node = new RelationalNode(yyvsp[-2].node, OpGreater, yyvsp[0].node); ;
    15791578    break;}
    15801579case 75:
    1581 #line 306 "grammar.y"
     1580#line 305 "grammar.y"
    15821581{ yyval.node = new RelationalNode(yyvsp[-2].node, OpLessEq, yyvsp[0].node); ;
    15831582    break;}
    15841583case 76:
    1585 #line 308 "grammar.y"
     1584#line 307 "grammar.y"
    15861585{ yyval.node = new RelationalNode(yyvsp[-2].node, OpGreaterEq, yyvsp[0].node); ;
    15871586    break;}
    15881587case 77:
    1589 #line 310 "grammar.y"
     1588#line 309 "grammar.y"
    15901589{ yyval.node = new RelationalNode(yyvsp[-2].node, OpInstanceOf, yyvsp[0].node); ;
    15911590    break;}
    15921591case 78:
    1593 #line 312 "grammar.y"
     1592#line 311 "grammar.y"
    15941593{ yyval.node = new RelationalNode(yyvsp[-2].node, OpIn, yyvsp[0].node); ;
    15951594    break;}
    15961595case 80:
     1596#line 316 "grammar.y"
     1597{ yyval.node = new EqualNode(yyvsp[-2].node, OpEqEq, yyvsp[0].node); ;
     1598    break;}
     1599case 81:
    15971600#line 317 "grammar.y"
    1598 { yyval.node = new EqualNode(yyvsp[-2].node, OpEqEq, yyvsp[0].node); ;
    1599     break;}
    1600 case 81:
     1601{ yyval.node = new EqualNode(yyvsp[-2].node, OpNotEq, yyvsp[0].node); ;
     1602    break;}
     1603case 82:
    16011604#line 318 "grammar.y"
    1602 { yyval.node = new EqualNode(yyvsp[-2].node, OpNotEq, yyvsp[0].node); ;
    1603     break;}
    1604 case 82:
     1605{ yyval.node = new EqualNode(yyvsp[-2].node, OpStrEq, yyvsp[0].node); ;
     1606    break;}
     1607case 83:
    16051608#line 319 "grammar.y"
    1606 { yyval.node = new EqualNode(yyvsp[-2].node, OpStrEq, yyvsp[0].node); ;
    1607     break;}
    1608 case 83:
    1609 #line 320 "grammar.y"
    16101609{ yyval.node = new EqualNode(yyvsp[-2].node, OpStrNEq, yyvsp[0].node);;
    16111610    break;}
    16121611case 85:
    1613 #line 325 "grammar.y"
     1612#line 324 "grammar.y"
    16141613{ yyval.node = new BitOperNode(yyvsp[-2].node, OpBitAnd, yyvsp[0].node); ;
    16151614    break;}
    16161615case 87:
    1617 #line 330 "grammar.y"
     1616#line 329 "grammar.y"
    16181617{ yyval.node = new BitOperNode(yyvsp[-2].node, OpBitXOr, yyvsp[0].node); ;
    16191618    break;}
    16201619case 89:
    1621 #line 335 "grammar.y"
     1620#line 334 "grammar.y"
    16221621{ yyval.node = new BitOperNode(yyvsp[-2].node, OpBitOr, yyvsp[0].node); ;
    16231622    break;}
    16241623case 91:
    1625 #line 341 "grammar.y"
     1624#line 340 "grammar.y"
    16261625{ yyval.node = new BinaryLogicalNode(yyvsp[-2].node, OpAnd, yyvsp[0].node); ;
    16271626    break;}
    16281627case 93:
    1629 #line 347 "grammar.y"
     1628#line 346 "grammar.y"
    16301629{ yyval.node = new BinaryLogicalNode(yyvsp[-2].node, OpOr, yyvsp[0].node); ;
    16311630    break;}
    16321631case 95:
    1633 #line 353 "grammar.y"
     1632#line 352 "grammar.y"
    16341633{ yyval.node = new ConditionalNode(yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].node); ;
    16351634    break;}
    16361635case 97:
    1637 #line 359 "grammar.y"
     1636#line 358 "grammar.y"
    16381637{ yyval.node = new AssignNode(yyvsp[-2].node, yyvsp[-1].op, yyvsp[0].node);;
    16391638    break;}
    16401639case 98:
     1640#line 362 "grammar.y"
     1641{ yyval.op = OpEqual; ;
     1642    break;}
     1643case 99:
    16411644#line 363 "grammar.y"
    1642 { yyval.op = OpEqual; ;
    1643     break;}
    1644 case 99:
     1645{ yyval.op = OpPlusEq; ;
     1646    break;}
     1647case 100:
    16451648#line 364 "grammar.y"
    1646 { yyval.op = OpPlusEq; ;
    1647     break;}
    1648 case 100:
     1649{ yyval.op = OpMinusEq; ;
     1650    break;}
     1651case 101:
    16491652#line 365 "grammar.y"
    1650 { yyval.op = OpMinusEq; ;
    1651     break;}
    1652 case 101:
     1653{ yyval.op = OpMultEq; ;
     1654    break;}
     1655case 102:
    16531656#line 366 "grammar.y"
    1654 { yyval.op = OpMultEq; ;
    1655     break;}
    1656 case 102:
     1657{ yyval.op = OpDivEq; ;
     1658    break;}
     1659case 103:
    16571660#line 367 "grammar.y"
    1658 { yyval.op = OpDivEq; ;
    1659     break;}
    1660 case 103:
     1661{ yyval.op = OpLShift; ;
     1662    break;}
     1663case 104:
    16611664#line 368 "grammar.y"
    1662 { yyval.op = OpLShift; ;
    1663     break;}
    1664 case 104:
     1665{ yyval.op = OpRShift; ;
     1666    break;}
     1667case 105:
    16651668#line 369 "grammar.y"
    1666 { yyval.op = OpRShift; ;
    1667     break;}
    1668 case 105:
     1669{ yyval.op = OpURShift; ;
     1670    break;}
     1671case 106:
    16691672#line 370 "grammar.y"
    1670 { yyval.op = OpURShift; ;
    1671     break;}
    1672 case 106:
     1673{ yyval.op = OpAndEq; ;
     1674    break;}
     1675case 107:
    16731676#line 371 "grammar.y"
    1674 { yyval.op = OpAndEq; ;
    1675     break;}
    1676 case 107:
     1677{ yyval.op = OpXOrEq; ;
     1678    break;}
     1679case 108:
    16771680#line 372 "grammar.y"
    1678 { yyval.op = OpXOrEq; ;
    1679     break;}
    1680 case 108:
     1681{ yyval.op = OpOrEq; ;
     1682    break;}
     1683case 109:
    16811684#line 373 "grammar.y"
    1682 { yyval.op = OpOrEq; ;
    1683     break;}
    1684 case 109:
    1685 #line 374 "grammar.y"
    16861685{ yyval.op = OpModEq; ;
    16871686    break;}
    16881687case 111:
    1689 #line 379 "grammar.y"
     1688#line 378 "grammar.y"
    16901689{ yyval.node = new CommaNode(yyvsp[-2].node, yyvsp[0].node); ;
    16911690    break;}
    16921691case 126:
     1692#line 399 "grammar.y"
     1693{ yyval.stat = new BlockNode(0L); DBG(yyval.stat, yylsp[0], yylsp[0]); ;
     1694    break;}
     1695case 127:
    16931696#line 400 "grammar.y"
    1694 { yyval.stat = new BlockNode(0L); DBG(yyval.stat, yylsp[0], yylsp[0]); ;
    1695     break;}
    1696 case 127:
    1697 #line 401 "grammar.y"
    16981697{ yyval.stat = new BlockNode(yyvsp[-1].srcs); DBG(yyval.stat, yylsp[0], yylsp[0]); ;
    16991698    break;}
    17001699case 128:
     1700#line 404 "grammar.y"
     1701{ yyval.slist = new StatListNode(yyvsp[0].stat); ;
     1702    break;}
     1703case 129:
    17011704#line 405 "grammar.y"
    1702 { yyval.slist = new StatListNode(yyvsp[0].stat); ;
    1703     break;}
    1704 case 129:
    1705 #line 406 "grammar.y"
    17061705{ yyval.slist = new StatListNode(yyvsp[-1].slist, yyvsp[0].stat); ;
    17071706    break;}
    17081707case 130:
    1709 #line 410 "grammar.y"
     1708#line 409 "grammar.y"
    17101709{ yyval.stat = new VarStatementNode(yyvsp[-1].vlist);
    17111710                                      DBG(yyval.stat, yylsp[-2], yylsp[0]); ;
    17121711    break;}
    17131712case 131:
    1714 #line 412 "grammar.y"
     1713#line 411 "grammar.y"
    17151714{ if (automatic()) {
    17161715                                          yyval.stat = new VarStatementNode(yyvsp[-1].vlist);
     
    17221721    break;}
    17231722case 132:
    1724 #line 422 "grammar.y"
     1723#line 421 "grammar.y"
    17251724{ yyval.vlist = new VarDeclListNode(yyvsp[0].decl); ;
    17261725    break;}
    17271726case 133:
    1728 #line 424 "grammar.y"
     1727#line 423 "grammar.y"
    17291728{ yyval.vlist = new VarDeclListNode(yyvsp[-2].vlist, yyvsp[0].decl); ;
    17301729    break;}
    17311730case 134:
     1731#line 427 "grammar.y"
     1732{ yyval.decl = new VarDeclNode(yyvsp[0].ustr, 0); delete yyvsp[0].ustr; ;
     1733    break;}
     1734case 135:
    17321735#line 428 "grammar.y"
    1733 { yyval.decl = new VarDeclNode(yyvsp[0].ustr, 0); delete yyvsp[0].ustr; ;
    1734     break;}
    1735 case 135:
    1736 #line 429 "grammar.y"
    17371736{ yyval.decl = new VarDeclNode(yyvsp[-1].ustr, yyvsp[0].init); delete yyvsp[-1].ustr; ;
    17381737    break;}
    17391738case 136:
    1740 #line 433 "grammar.y"
     1739#line 432 "grammar.y"
    17411740{ yyval.init = new AssignExprNode(yyvsp[0].node); ;
    17421741    break;}
    17431742case 137:
    1744 #line 437 "grammar.y"
     1743#line 436 "grammar.y"
    17451744{ yyval.stat = new EmptyStatementNode(); ;
    17461745    break;}
    17471746case 138:
    1748 #line 441 "grammar.y"
     1747#line 440 "grammar.y"
    17491748{ yyval.stat = new ExprStatementNode(yyvsp[-1].node);
    17501749                                     DBG(yyval.stat, yylsp[-1], yylsp[0]); ;
    17511750    break;}
    17521751case 139:
    1753 #line 443 "grammar.y"
     1752#line 442 "grammar.y"
    17541753{ if (automatic()) {
    17551754                                       yyval.stat = new ExprStatementNode(yyvsp[-1].node);
     
    17591758    break;}
    17601759case 140:
    1761 #line 451 "grammar.y"
     1760#line 450 "grammar.y"
    17621761{ yyval.stat = new IfNode(yyvsp[-2].node,yyvsp[0].stat,0L);DBG(yyval.stat,yylsp[-4],yylsp[-1]); ;
    17631762    break;}
    17641763case 141:
    1765 #line 453 "grammar.y"
     1764#line 452 "grammar.y"
    17661765{ yyval.stat = new IfNode(yyvsp[-4].node,yyvsp[-2].stat,yyvsp[0].stat);DBG(yyval.stat,yylsp[-6],yylsp[-3]); ;
    17671766    break;}
    17681767case 142:
     1768#line 456 "grammar.y"
     1769{ yyval.stat=new DoWhileNode(yyvsp[-4].stat,yyvsp[-1].node);DBG(yyval.stat,yylsp[-5],yylsp[-3]);;
     1770    break;}
     1771case 143:
    17691772#line 457 "grammar.y"
    1770 { yyval.stat=new DoWhileNode(yyvsp[-4].stat,yyvsp[-1].node);DBG(yyval.stat,yylsp[-5],yylsp[-3]);;
    1771     break;}
    1772 case 143:
    1773 #line 458 "grammar.y"
    17741773{ yyval.stat = new WhileNode(yyvsp[-2].node,yyvsp[0].stat);DBG(yyval.stat,yylsp[-4],yylsp[-1]); ;
    17751774    break;}
    17761775case 144:
    1777 #line 460 "grammar.y"
     1776#line 459 "grammar.y"
    17781777{ yyval.stat = new ForNode(yyvsp[-6].node,yyvsp[-4].node,yyvsp[-2].node,yyvsp[0].stat);
    17791778                                     DBG(yyval.stat,yylsp[-8],yylsp[-1]); ;
    17801779    break;}
    17811780case 145:
    1782 #line 463 "grammar.y"
     1781#line 462 "grammar.y"
    17831782{ yyval.stat = new ForNode(yyvsp[-6].vlist,yyvsp[-4].node,yyvsp[-2].node,yyvsp[0].stat);
    17841783                                     DBG(yyval.stat,yylsp[-9],yylsp[-1]); ;
    17851784    break;}
    17861785case 146:
    1787 #line 466 "grammar.y"
     1786#line 465 "grammar.y"
    17881787{ yyval.stat = new ForInNode(yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].stat);
    17891788                                     DBG(yyval.stat,yylsp[-6],yylsp[-1]); ;
    17901789    break;}
    17911790case 147:
    1792 #line 469 "grammar.y"
     1791#line 468 "grammar.y"
    17931792{ yyval.stat = new ForInNode(yyvsp[-4].ustr,0L,yyvsp[-2].node,yyvsp[0].stat);
    17941793                                     DBG(yyval.stat,yylsp[-7],yylsp[-1]);
     
    17961795    break;}
    17971796case 148:
    1798 #line 473 "grammar.y"
     1797#line 472 "grammar.y"
    17991798{ yyval.stat = new ForInNode(yyvsp[-5].ustr,yyvsp[-4].init,yyvsp[-2].node,yyvsp[0].stat);
    18001799                                     DBG(yyval.stat,yylsp[-8],yylsp[-1]);
     
    18021801    break;}
    18031802case 149:
    1804 #line 479 "grammar.y"
     1803#line 478 "grammar.y"
    18051804{ yyval.node = 0L; ;
    18061805    break;}
    18071806case 151:
     1807#line 483 "grammar.y"
     1808{ yyval.stat = new ContinueNode(); DBG(yyval.stat,yylsp[-1],yylsp[0]); ;
     1809    break;}
     1810case 152:
    18081811#line 484 "grammar.y"
    1809 { yyval.stat = new ContinueNode(); DBG(yyval.stat,yylsp[-1],yylsp[0]); ;
    1810     break;}
    1811 case 152:
    1812 #line 485 "grammar.y"
    18131812{ if (automatic()) {
    18141813                                       yyval.stat = new ContinueNode(); DBG(yyval.stat,yylsp[-1],yylsp[0]);
     
    18171816    break;}
    18181817case 153:
    1819 #line 489 "grammar.y"
     1818#line 488 "grammar.y"
    18201819{ yyval.stat = new ContinueNode(yyvsp[-1].ustr); DBG(yyval.stat,yylsp[-2],yylsp[0]);
    18211820                                     delete yyvsp[-1].ustr; ;
    18221821    break;}
    18231822case 154:
    1824 #line 491 "grammar.y"
     1823#line 490 "grammar.y"
    18251824{ if (automatic()) {
    18261825                                       yyval.stat = new ContinueNode(yyvsp[-1].ustr);DBG(yyval.stat,yylsp[-2],yylsp[-1]);
     
    18301829    break;}
    18311830case 155:
     1831#line 498 "grammar.y"
     1832{ yyval.stat = new BreakNode();DBG(yyval.stat,yylsp[-1],yylsp[0]); ;
     1833    break;}
     1834case 156:
    18321835#line 499 "grammar.y"
    1833 { yyval.stat = new BreakNode();DBG(yyval.stat,yylsp[-1],yylsp[0]); ;
    1834     break;}
    1835 case 156:
    1836 #line 500 "grammar.y"
    18371836{ if (automatic()) {
    18381837                                       yyval.stat = new BreakNode(); DBG(yyval.stat,yylsp[-1],yylsp[-1]);
     
    18411840    break;}
    18421841case 157:
    1843 #line 504 "grammar.y"
     1842#line 503 "grammar.y"
    18441843{ yyval.stat = new BreakNode(yyvsp[-1].ustr); DBG(yyval.stat,yylsp[-2],yylsp[0]);
    18451844                                     delete yyvsp[-1].ustr; ;
    18461845    break;}
    18471846case 158:
    1848 #line 506 "grammar.y"
     1847#line 505 "grammar.y"
    18491848{ if (automatic()) {
    18501849                                       yyval.stat = new BreakNode(yyvsp[-1].ustr); DBG(yyval.stat,yylsp[-2],yylsp[-1]);
     
    18551854    break;}
    18561855case 159:
     1856#line 514 "grammar.y"
     1857{ yyval.stat = new ReturnNode(0L); DBG(yyval.stat,yylsp[-1],yylsp[0]); ;
     1858    break;}
     1859case 160:
    18571860#line 515 "grammar.y"
    1858 { yyval.stat = new ReturnNode(0L); DBG(yyval.stat,yylsp[-1],yylsp[0]); ;
    1859     break;}
    1860 case 160:
    1861 #line 516 "grammar.y"
    18621861{ if (automatic()) {
    18631862                                       yyval.stat = new ReturnNode(0L); DBG(yyval.stat,yylsp[-1],yylsp[-1]);
     
    18661865    break;}
    18671866case 161:
     1867#line 519 "grammar.y"
     1868{ yyval.stat = new ReturnNode(yyvsp[-1].node); ;
     1869    break;}
     1870case 162:
    18681871#line 520 "grammar.y"
    1869 { yyval.stat = new ReturnNode(yyvsp[-1].node); ;
    1870     break;}
    1871 case 162:
    1872 #line 521 "grammar.y"
    18731872{ if (automatic())
    18741873                                       yyval.stat = new ReturnNode(yyvsp[-1].node);
     
    18771876    break;}
    18781877case 163:
    1879 #line 528 "grammar.y"
     1878#line 527 "grammar.y"
    18801879{ yyval.stat = new WithNode(yyvsp[-2].node,yyvsp[0].stat);
    18811880                                     DBG(yyval.stat, yylsp[-4], yylsp[-1]); ;
    18821881    break;}
    18831882case 164:
    1884 #line 533 "grammar.y"
     1883#line 532 "grammar.y"
    18851884{ yyval.stat = new SwitchNode(yyvsp[-2].node, yyvsp[0].cblk);
    18861885                                     DBG(yyval.stat, yylsp[-4], yylsp[-1]); ;
    18871886    break;}
    18881887case 165:
    1889 #line 538 "grammar.y"
     1888#line 537 "grammar.y"
    18901889{ yyval.cblk = new CaseBlockNode(yyvsp[-1].clist, 0L, 0L); ;
    18911890    break;}
    18921891case 166:
    1893 #line 540 "grammar.y"
     1892#line 539 "grammar.y"
    18941893{ yyval.cblk = new CaseBlockNode(yyvsp[-3].clist, yyvsp[-2].ccl, yyvsp[-1].clist); ;
    18951894    break;}
    18961895case 167:
    1897 #line 544 "grammar.y"
     1896#line 543 "grammar.y"
    18981897{ yyval.clist = 0L; ;
    18991898    break;}
    19001899case 169:
     1900#line 548 "grammar.y"
     1901{ yyval.clist = new ClauseListNode(yyvsp[0].ccl); ;
     1902    break;}
     1903case 170:
    19011904#line 549 "grammar.y"
    1902 { yyval.clist = new ClauseListNode(yyvsp[0].ccl); ;
    1903     break;}
    1904 case 170:
    1905 #line 550 "grammar.y"
    19061905{ yyval.clist = yyvsp[-1].clist->append(yyvsp[0].ccl); ;
    19071906    break;}
    19081907case 171:
     1908#line 553 "grammar.y"
     1909{ yyval.ccl = new CaseClauseNode(yyvsp[-1].node, 0L); ;
     1910    break;}
     1911case 172:
    19091912#line 554 "grammar.y"
    1910 { yyval.ccl = new CaseClauseNode(yyvsp[-1].node, 0L); ;
    1911     break;}
    1912 case 172:
    1913 #line 555 "grammar.y"
    19141913{ yyval.ccl = new CaseClauseNode(yyvsp[-2].node, yyvsp[0].slist); ;
    19151914    break;}
    19161915case 173:
     1916#line 558 "grammar.y"
     1917{ yyval.ccl = new CaseClauseNode(0L, 0L);; ;
     1918    break;}
     1919case 174:
    19171920#line 559 "grammar.y"
    1918 { yyval.ccl = new CaseClauseNode(0L, 0L);; ;
    1919     break;}
    1920 case 174:
    1921 #line 560 "grammar.y"
    19221921{ yyval.ccl = new CaseClauseNode(0L, yyvsp[0].slist); ;
    19231922    break;}
    19241923case 175:
    1925 #line 564 "grammar.y"
     1924#line 563 "grammar.y"
    19261925{ yyvsp[0].stat->pushLabel(yyvsp[-2].ustr);
    19271926                                     yyval.stat = new LabelNode(yyvsp[-2].ustr, yyvsp[0].stat);
     
    19291928    break;}
    19301929case 176:
    1931 #line 570 "grammar.y"
     1930#line 569 "grammar.y"
    19321931{ yyval.stat = new ThrowNode(yyvsp[-1].node); ;
    19331932    break;}
    19341933case 177:
     1934#line 573 "grammar.y"
     1935{ yyval.stat = new TryNode(yyvsp[-1].stat, yyvsp[0].node); ;
     1936    break;}
     1937case 178:
    19351938#line 574 "grammar.y"
    1936 { yyval.stat = new TryNode(yyvsp[-1].stat, yyvsp[0].node); ;
    1937     break;}
    1938 case 178:
     1939{ yyval.stat = new TryNode(yyvsp[-1].stat, 0L, yyvsp[0].node); ;
     1940    break;}
     1941case 179:
    19391942#line 575 "grammar.y"
    1940 { yyval.stat = new TryNode(yyvsp[-1].stat, 0L, yyvsp[0].node); ;
    1941     break;}
    1942 case 179:
    1943 #line 576 "grammar.y"
    19441943{ yyval.stat = new TryNode(yyvsp[-2].stat, yyvsp[-1].node, yyvsp[0].node); ;
    19451944    break;}
    19461945case 180:
    1947 #line 580 "grammar.y"
     1946#line 579 "grammar.y"
    19481947{ yyval.node = new CatchNode(yyvsp[-2].ustr, yyvsp[0].stat); delete yyvsp[-2].ustr; ;
    19491948    break;}
    19501949case 181:
    1951 #line 584 "grammar.y"
     1950#line 583 "grammar.y"
    19521951{ yyval.node = new FinallyNode(yyvsp[0].stat); ;
    19531952    break;}
    19541953case 182:
    1955 #line 588 "grammar.y"
     1954#line 587 "grammar.y"
    19561955{ yyval.func = new FuncDeclNode(yyvsp[-3].ustr, 0L, yyvsp[0].body);
    19571956                                             delete yyvsp[-3].ustr; ;
    19581957    break;}
    19591958case 183:
    1960 #line 591 "grammar.y"
     1959#line 590 "grammar.y"
    19611960{ yyval.func = new FuncDeclNode(yyvsp[-4].ustr, yyvsp[-2].param, yyvsp[0].body);
    19621961                                     delete yyvsp[-4].ustr; ;
    19631962    break;}
    19641963case 184:
    1965 #line 595 "grammar.y"
     1964#line 594 "grammar.y"
    19661965{ yyval.node = new FuncExprNode(0L, yyvsp[0].body); ;
    19671966    break;}
    19681967case 185:
    1969 #line 597 "grammar.y"
     1968#line 596 "grammar.y"
    19701969{ yyval.node = new FuncExprNode(yyvsp[-2].param, yyvsp[0].body); ;
    19711970    break;}
    19721971case 186:
     1972#line 601 "grammar.y"
     1973{ yyval.param = new ParameterNode(yyvsp[0].ustr); delete yyvsp[0].ustr; ;
     1974    break;}
     1975case 187:
    19731976#line 602 "grammar.y"
    1974 { yyval.param = new ParameterNode(yyvsp[0].ustr); delete yyvsp[0].ustr; ;
    1975     break;}
    1976 case 187:
    1977 #line 603 "grammar.y"
    19781977{ yyval.param = yyvsp[-2].param->append(yyvsp[0].ustr);
    19791978                                     delete yyvsp[0].ustr; ;
    19801979    break;}
    19811980case 188:
    1982 #line 608 "grammar.y"
     1981#line 607 "grammar.y"
    19831982{ yyval.body = new FunctionBodyNode(0L);
    19841983                                     DBG(yyval.body, yylsp[-1], yylsp[0]);;
    19851984    break;}
    19861985case 189:
    1987 #line 610 "grammar.y"
     1986#line 609 "grammar.y"
    19881987{ yyval.body = new FunctionBodyNode(yyvsp[-1].srcs);
    19891988                                     DBG(yyval.body, yylsp[-2], yylsp[0]);;
    19901989    break;}
    19911990case 190:
    1992 #line 615 "grammar.y"
     1991#line 614 "grammar.y"
    19931992{ yyval.prog = new ProgramNode(0L);
    19941993                                     Parser::progNode = yyval.prog; ;
    19951994    break;}
    19961995case 191:
    1997 #line 617 "grammar.y"
     1996#line 616 "grammar.y"
    19981997{ yyval.prog = new ProgramNode(yyvsp[0].srcs);
    19991998                                     Parser::progNode = yyval.prog; ;
    20001999    break;}
    20012000case 192:
     2001#line 621 "grammar.y"
     2002{ yyval.srcs = new SourceElementsNode(yyvsp[0].src); ;
     2003    break;}
     2004case 193:
    20022005#line 622 "grammar.y"
    2003 { yyval.srcs = new SourceElementsNode(yyvsp[0].src); ;
    2004     break;}
    2005 case 193:
    2006 #line 623 "grammar.y"
    20072006{ yyval.srcs = new SourceElementsNode(yyvsp[-1].srcs, yyvsp[0].src); ;
    20082007    break;}
    20092008case 194:
     2009#line 626 "grammar.y"
     2010{ yyval.src = new SourceElementNode(yyvsp[0].stat); ;
     2011    break;}
     2012case 195:
    20102013#line 627 "grammar.y"
    2011 { yyval.src = new SourceElementNode(yyvsp[0].stat); ;
    2012     break;}
    2013 case 195:
    2014 #line 628 "grammar.y"
    20152014{ yyval.src = new SourceElementNode(yyvsp[0].func); ;
    20162015    break;}
     
    22382237  return 1;
    22392238}
    2240 #line 631 "grammar.y"
     2239#line 630 "grammar.y"
    22412240
    22422241
  • trunk/JavaScriptCore/kjs/grammar.y

    r798 r903  
    1919 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    2020 *
    21  *  $Id$
    2221 */
    2322
Note: See TracChangeset for help on using the changeset viewer.