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


Ignore:
Timestamp:
Apr 15, 2002, 4:43:21 PM (23 years ago)
Author:
darin
Message:

Merged KDE 3.0 final code in and:

JavaScriptCore:

  • kjs/internal.cpp:
  • kjs/property_map.cpp:
  • kjs/ustring.h: Removed some unneeded <config.h> includes so we are more similar to the real KDE sources.

Merged changes from KDE 3.0 final and did some build fixes.

  • kjs/grammar.*: Regenerated.
  • kjs/*.lut.h: Regenerated.

WebCore:

  • src/kdelibs/khtml/rendering/render_text.cpp: (TextSlave::printDecoration): Remove some minor gratuitous diffs vs. KDE.
  • src/kdelibs/khtml/rendering/render_text.cpp: (TextSlave::printDecoration): Richard updated to reflect changes in KDE.
  • src/kdelibs/khtml/css/css_valueimpl.cpp: (FontFamilyValueImpl::FontFamilyValueImpl): Fix comment.
  • src/kdelibs/khtml/css/cssstyleselector.cpp: Remove some gratuitous diffs vs. KDE.
  • src/kdelibs/khtml/html/html_objectimpl.cpp: (HTMLEmbedElementImpl::parseAttribute): Remove unneeded copy from KWQ's early days.
  • src/kdelibs/khtml/html/html_tableimpl.cpp: (HTMLTableElementImpl::parseAttribute), (HTMLTablePartElementImpl::parseAttribute): Remove unneeded copy from KWQ's early days.
  • src/kdelibs/khtml/html/htmltokenizer.cpp: (HTMLTokenizer::processToken): Redo the APPLE_CHANGES ifdef here.
  • src/kdelibs/khtml/khtmlpart_p.h: Update to latest kde.
  • src/kdelibs/khtml/khtmlview.cpp: (KHTMLView::KHTMLView): Add ifdef APPLE_CHANGES. (KHTMLView::~KHTMLView): Add ifdef APPLE_CHANGES. (KHTMLView::print): Remove code left in here during merge process.
  • src/kwq/KWQKHTMLPart.mm: Remove unused setFontSizes(), fontSizes(), and resetFontSizes(). After the merge is landed, remove more.
  • src/libwebcore.exp: Export updateStyleSelector() for WebKit.

Fix text to it displays at the right font size.

  • src/kdelibs/khtml/css/cssstyleselector.cpp: (CSSStyleSelector::computeFontSizes): Apply the same SCREEN_RESOLUTION hack here that we do elsewhere.
  • src/kdelibs/khtml/rendering/font.cpp: (Font::width): Use kMin instead of max (oops). (Font::update): Turn off font database chicanery.
  • src/kwq/KWQKHTMLPart.mm: (KHTMLPart::zoomFactor): Use zoom factor 100, not 1.

More fixes so text displays (still at wrong font size).

  • src/kdelibs/khtml/rendering/font.cpp: (max): New helper. (Font::drawText): Simplified implementation for now. (Font::width): Simplified implementation for now.
  • src/kwq/KWQColorGroup.mm: Reinstated QCOLOR_GROUP_SIZE.
  • src/kwq/qt/qfontmetrics.h: Removed charWidth and changed _width to take QChar *.
  • src/kwq/KWQFontMetrics.mm: Removed charWidth and changed _width to take QChar *.

Merged changes from KDE 3.0 final. Other fixes to get things compiling.

  • src/kdelibs/khtml/css/css_valueimpl.cpp: (CSSStyleDeclarationImpl::setProperty): Fix unused variable.
  • src/kdelibs/khtml/khtmlview.cpp: (KHTMLView::contentsContextMenuEvent): Fix unused variable.
  • src/kdelibs/khtml/rendering/font.cpp: (Font::drawText), (Font::width), (Font::update): Disable special "nsbp" logic for now. We can reenable it if necessary.
  • src/kdelibs/khtml/rendering/render_replaced.cpp: Fix mismerge.
  • src/kdelibs/khtml/rendering/render_text.cpp: (RenderText::nodeAtPoint): Fix unused variable.
  • src/kwq/KWQApplication.mm: (QDesktopWidget::width), (QApplication::desktop): Fix mismerge.
  • src/kwq/KWQColorGroup.mm: Fix QCOLOR_GROUP_SIZE.
  • src/kwq/KWQFontMetrics.mm: (QFontMetrics::lineSpacing): New. (QFontMetrics::width): Remove unused optimization.
  • src/kwq/qt/qfontmetrics.h: Add lineSpacing().

Merged changes from previous merge pass.

2002-03-25 Darin Adler <Darin Adler>

Last bit of making stuff compile and link. Probably will drop the merge now
and take it up again when it's time to merge in KDE 3.0 final.

  • src/kwq/KWQEvent.mm: (QFocusEvent::reason): New.
  • src/kwq/KWQPainter.mm: (QPainter::drawText): New overload.

2002-03-25 Darin Adler <Darin Adler>

  • src/kdelibs/khtml/rendering/font.cpp: (Font::width): Make it call _width so we don't lose the optimization.
  • src/kwq/KWQApplication.mm: (QDesktopWidget::screenNumber): New. (QDesktopWidget::screenGeometry): New. (QApplication::style): New.
  • src/kwq/KWQColorGroup.mm: (QColorGroup::highlight): New. (QColorGroup::highlightedText): New.
  • src/kwq/KWQFont.mm: (QFont::setPixelSize): New.
  • src/kwq/KWQFontMetrics.mm: (QFontMetrics::charWidth): New.
  • src/kwq/KWQKGlobal.mm: (KGlobal::locale): Implement. (KLocale::KLocale): New. (KLocale::languageList): New.
  • src/kwq/KWQKHTMLPart.mm: (KHTMLPart::sheetUsed): New. (KHTMLPart::setSheetUsed): New. (KHTMLPart::zoomFactor): New.
  • src/kwq/KWQKHTMLSettings.mm: (KHTMLSettings::mediumFontSize): New.
  • src/kwq/KWQScrollView.mm: (QScrollView::childX): New. (QScrollView::childY): New.
  • src/kwq/qt/qapplication.h: style() returns a QStyle &.
  • src/kwq/qt/qpalette.h: Add Highlight and HighlightedText.

2002-03-24 Darin Adler <Darin Adler>

More compiling. Still won't link.

  • src/kdelibs/khtml/khtmlview.cpp: Disable printing and drag and drop code.
  • src/kdelibs/khtml/rendering/render_text.cpp: (TextSlave::printDecoration): Temporarily turn off our smarter underlining since it relies on access to the string, and TextSlave doesn't have that any more. (RenderText::nodeAtPoint): Get rid of a workaround we don't need any more for a bug that was fixed by KDE folks.
  • src/kwq/KWQApplication.mm: (QApplication::desktop): Make the desktop be a QDesktopWidget.
  • src/kwq/qt/qnamespace.h: Add MetaButton.
  • src/kwq/qt/qtooltip.h: Add a maybeTip virtual function member and a virtual destructor.

2002-03-24 Darin Adler <Darin Adler>

Some fixes to get more stuff to compile.

  • src/kdelibs/khtml/ecma/kjs_dom.cpp: (DOMDocument::getValueProperty): Don't try to look at the private m_bComplete to display "complete". Just do "loading" and "loaded".
  • src/kdelibs/khtml/khtmlpart_p.h: #ifdef this all out for APPLE_CHANGES.
  • src/kdelibs/khtml/rendering/font.cpp: (Font::update): Add an explicit cast to int to avoid float -> int warning.
  • src/kdelibs/khtml/rendering/render_table.cpp: (RenderTable::calcColMinMax): Add an explicit cast to int to avoid uint compared with int warning.
  • src/kdelibs/khtml/xml/dom_docimpl.cpp: (DocumentImpl::recalcStyleSelector): Use sheetUsed() and setSheetUsed() functions on KHTMLPart intead of getting at private fields the way the real KDE code does.
  • src/kwq/KWQKHTMLPart.h: Declare zoomFactor(), sheetUsed(), and setSheetUsed().
  • src/kwq/KWQStyle.h: Add PM_DefaultFramWidth as another metric.
  • src/kwq/kdecore/klocale.h: Add languageList().
  • src/kwq/khtml/khtml_settings.h: Add mediumFontSize().
  • src/kwq/qt/qapplication.h: Add style() and QDesktopWidget.
  • src/kwq/qt/qevent.h: Add reason().
  • src/kwq/qt/qfont.h: Add setPixelSize(int).
  • src/kwq/qt/qfontmetrics.h: Add charWidth() and _charWidth() functions.
  • src/kwq/qt/qpainter.h: Add drawText() overload with position parameter.
  • src/kwq/qt/qpalette.h: Add highlight() and highlightedText().
  • src/kwq/qt/qscrollview.h: Add childX() and childY().
  • src/kwq/KWQApplication.mm: Change KWQDesktopWidget to QDesktopWidget.

WebKit:

  • WebView.subproj/IFPreferences.h:
  • WebView.subproj/IFPreferences.mm: (+[IFPreferences load]): Remove the old WebKitFontSizes preference. (-[IFPreferences mediumFontSize]), (-[IFPreferences setMediumFontSize:]): New.
  • WebView.subproj/IFWebView.mm: (-[IFWebView reapplyStyles]): Call updateStyleSelector() instead of recalcStyle().

Merged changes from previous merge branch.

2002-03-25 Darin Adler <Darin Adler>

  • WebView.subproj/IFPreferences.mm: (+[IFPreferences load]): Add WebKitMediumFontSizePreferenceKey.

WebBrowser:

  • Preferences.subproj/TextPreferences.m: (-[TextPreferences defaultFontSize]), (-[TextPreferences setDefaultFontSize:]): Just get and set the new mediumFontSize preference rather than doing the whole fontSizes preference dance.
File:
1 edited

Legend:

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

    r903 r1024  
    318318   180,   181,   182,   183,   186,   188,   189,   192,   194,   198,
    319319   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
     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,   623,   626,   628
    337337};
    338338#endif
     
    14671467case 39:
    14681468#line 239 "grammar.y"
    1469 { yyval.node = new AccessorNode2(yyvsp[-2].node, yyvsp[0].ustr); ;
     1469{ yyval.node = new AccessorNode2(yyvsp[-2].node, yyvsp[0].ustr);
     1470                                     delete yyvsp[0].ustr; ;
    14701471    break;}
    14711472case 40:
    1472 #line 243 "grammar.y"
     1473#line 244 "grammar.y"
    14731474{ yyval.args = new ArgumentsNode(0L); ;
    14741475    break;}
    14751476case 41:
    1476 #line 244 "grammar.y"
     1477#line 245 "grammar.y"
    14771478{ yyval.args = new ArgumentsNode(yyvsp[-1].alist); ;
    14781479    break;}
    14791480case 42:
    1480 #line 248 "grammar.y"
     1481#line 249 "grammar.y"
    14811482{ yyval.alist = new ArgumentListNode(yyvsp[0].node); ;
    14821483    break;}
    14831484case 43:
    1484 #line 249 "grammar.y"
     1485#line 250 "grammar.y"
    14851486{ yyval.alist = new ArgumentListNode(yyvsp[-2].alist, yyvsp[0].node); ;
    14861487    break;}
    14871488case 47:
    1488 #line 259 "grammar.y"
     1489#line 260 "grammar.y"
    14891490{ yyval.node = new PostfixNode(yyvsp[-1].node, OpPlusPlus); ;
    14901491    break;}
    14911492case 48:
    1492 #line 260 "grammar.y"
     1493#line 261 "grammar.y"
    14931494{ yyval.node = new PostfixNode(yyvsp[-1].node, OpMinusMinus); ;
    14941495    break;}
    14951496case 50:
    1496 #line 265 "grammar.y"
     1497#line 266 "grammar.y"
    14971498{ yyval.node = new DeleteNode(yyvsp[0].node); ;
    14981499    break;}
    14991500case 51:
    1500 #line 266 "grammar.y"
     1501#line 267 "grammar.y"
    15011502{ yyval.node = new VoidNode(yyvsp[0].node); ;
    15021503    break;}
    15031504case 52:
    1504 #line 267 "grammar.y"
     1505#line 268 "grammar.y"
    15051506{ yyval.node = new TypeOfNode(yyvsp[0].node); ;
    15061507    break;}
    15071508case 53:
    1508 #line 268 "grammar.y"
    1509 { yyval.node = new PrefixNode(OpPlusPlus, yyvsp[0].node); ;
    1510     break;}
    1511 case 54:
    15121509#line 269 "grammar.y"
    15131510{ yyval.node = new PrefixNode(OpPlusPlus, yyvsp[0].node); ;
    15141511    break;}
     1512case 54:
     1513#line 270 "grammar.y"
     1514{ yyval.node = new PrefixNode(OpPlusPlus, yyvsp[0].node); ;
     1515    break;}
    15151516case 55:
    1516 #line 270 "grammar.y"
    1517 { yyval.node = new PrefixNode(OpMinusMinus, yyvsp[0].node); ;
    1518     break;}
    1519 case 56:
    15201517#line 271 "grammar.y"
    15211518{ yyval.node = new PrefixNode(OpMinusMinus, yyvsp[0].node); ;
    15221519    break;}
     1520case 56:
     1521#line 272 "grammar.y"
     1522{ yyval.node = new PrefixNode(OpMinusMinus, yyvsp[0].node); ;
     1523    break;}
    15231524case 57:
    1524 #line 272 "grammar.y"
     1525#line 273 "grammar.y"
    15251526{ yyval.node = new UnaryPlusNode(yyvsp[0].node); ;
    15261527    break;}
    15271528case 58:
    1528 #line 273 "grammar.y"
     1529#line 274 "grammar.y"
    15291530{ yyval.node = new NegateNode(yyvsp[0].node); ;
    15301531    break;}
    15311532case 59:
    1532 #line 274 "grammar.y"
     1533#line 275 "grammar.y"
    15331534{ yyval.node = new BitwiseNotNode(yyvsp[0].node); ;
    15341535    break;}
    15351536case 60:
    1536 #line 275 "grammar.y"
     1537#line 276 "grammar.y"
    15371538{ yyval.node = new LogicalNotNode(yyvsp[0].node); ;
    15381539    break;}
    15391540case 62:
    1540 #line 280 "grammar.y"
     1541#line 281 "grammar.y"
    15411542{ yyval.node = new MultNode(yyvsp[-2].node, yyvsp[0].node, '*'); ;
    15421543    break;}
    15431544case 63:
    1544 #line 281 "grammar.y"
     1545#line 282 "grammar.y"
    15451546{ yyval.node = new MultNode(yyvsp[-2].node, yyvsp[0].node, '/'); ;
    15461547    break;}
    15471548case 64:
    1548 #line 282 "grammar.y"
     1549#line 283 "grammar.y"
    15491550{ yyval.node = new MultNode(yyvsp[-2].node,yyvsp[0].node,'%'); ;
    15501551    break;}
    15511552case 66:
    1552 #line 287 "grammar.y"
     1553#line 288 "grammar.y"
    15531554{ yyval.node = new AddNode(yyvsp[-2].node, yyvsp[0].node, '+'); ;
    15541555    break;}
    15551556case 67:
    1556 #line 288 "grammar.y"
     1557#line 289 "grammar.y"
    15571558{ yyval.node = new AddNode(yyvsp[-2].node, yyvsp[0].node, '-'); ;
    15581559    break;}
    15591560case 69:
    1560 #line 293 "grammar.y"
     1561#line 294 "grammar.y"
    15611562{ yyval.node = new ShiftNode(yyvsp[-2].node, OpLShift, yyvsp[0].node); ;
    15621563    break;}
    15631564case 70:
    1564 #line 294 "grammar.y"
     1565#line 295 "grammar.y"
    15651566{ yyval.node = new ShiftNode(yyvsp[-2].node, OpRShift, yyvsp[0].node); ;
    15661567    break;}
    15671568case 71:
    1568 #line 295 "grammar.y"
     1569#line 296 "grammar.y"
    15691570{ yyval.node = new ShiftNode(yyvsp[-2].node, OpURShift, yyvsp[0].node); ;
    15701571    break;}
    15711572case 73:
    1572 #line 301 "grammar.y"
     1573#line 302 "grammar.y"
    15731574{ yyval.node = new RelationalNode(yyvsp[-2].node, OpLess, yyvsp[0].node); ;
    15741575    break;}
    15751576case 74:
    1576 #line 303 "grammar.y"
     1577#line 304 "grammar.y"
    15771578{ yyval.node = new RelationalNode(yyvsp[-2].node, OpGreater, yyvsp[0].node); ;
    15781579    break;}
    15791580case 75:
    1580 #line 305 "grammar.y"
     1581#line 306 "grammar.y"
    15811582{ yyval.node = new RelationalNode(yyvsp[-2].node, OpLessEq, yyvsp[0].node); ;
    15821583    break;}
    15831584case 76:
    1584 #line 307 "grammar.y"
     1585#line 308 "grammar.y"
    15851586{ yyval.node = new RelationalNode(yyvsp[-2].node, OpGreaterEq, yyvsp[0].node); ;
    15861587    break;}
    15871588case 77:
    1588 #line 309 "grammar.y"
     1589#line 310 "grammar.y"
    15891590{ yyval.node = new RelationalNode(yyvsp[-2].node, OpInstanceOf, yyvsp[0].node); ;
    15901591    break;}
    15911592case 78:
    1592 #line 311 "grammar.y"
     1593#line 312 "grammar.y"
    15931594{ yyval.node = new RelationalNode(yyvsp[-2].node, OpIn, yyvsp[0].node); ;
    15941595    break;}
    15951596case 80:
    1596 #line 316 "grammar.y"
     1597#line 317 "grammar.y"
    15971598{ yyval.node = new EqualNode(yyvsp[-2].node, OpEqEq, yyvsp[0].node); ;
    15981599    break;}
    15991600case 81:
    1600 #line 317 "grammar.y"
     1601#line 318 "grammar.y"
    16011602{ yyval.node = new EqualNode(yyvsp[-2].node, OpNotEq, yyvsp[0].node); ;
    16021603    break;}
    16031604case 82:
    1604 #line 318 "grammar.y"
     1605#line 319 "grammar.y"
    16051606{ yyval.node = new EqualNode(yyvsp[-2].node, OpStrEq, yyvsp[0].node); ;
    16061607    break;}
    16071608case 83:
    1608 #line 319 "grammar.y"
     1609#line 320 "grammar.y"
    16091610{ yyval.node = new EqualNode(yyvsp[-2].node, OpStrNEq, yyvsp[0].node);;
    16101611    break;}
    16111612case 85:
    1612 #line 324 "grammar.y"
     1613#line 325 "grammar.y"
    16131614{ yyval.node = new BitOperNode(yyvsp[-2].node, OpBitAnd, yyvsp[0].node); ;
    16141615    break;}
    16151616case 87:
    1616 #line 329 "grammar.y"
     1617#line 330 "grammar.y"
    16171618{ yyval.node = new BitOperNode(yyvsp[-2].node, OpBitXOr, yyvsp[0].node); ;
    16181619    break;}
    16191620case 89:
    1620 #line 334 "grammar.y"
     1621#line 335 "grammar.y"
    16211622{ yyval.node = new BitOperNode(yyvsp[-2].node, OpBitOr, yyvsp[0].node); ;
    16221623    break;}
    16231624case 91:
    1624 #line 340 "grammar.y"
     1625#line 341 "grammar.y"
    16251626{ yyval.node = new BinaryLogicalNode(yyvsp[-2].node, OpAnd, yyvsp[0].node); ;
    16261627    break;}
    16271628case 93:
    1628 #line 346 "grammar.y"
     1629#line 347 "grammar.y"
    16291630{ yyval.node = new BinaryLogicalNode(yyvsp[-2].node, OpOr, yyvsp[0].node); ;
    16301631    break;}
    16311632case 95:
    1632 #line 352 "grammar.y"
     1633#line 353 "grammar.y"
    16331634{ yyval.node = new ConditionalNode(yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].node); ;
    16341635    break;}
    16351636case 97:
    1636 #line 358 "grammar.y"
     1637#line 359 "grammar.y"
    16371638{ yyval.node = new AssignNode(yyvsp[-2].node, yyvsp[-1].op, yyvsp[0].node);;
    16381639    break;}
    16391640case 98:
    1640 #line 362 "grammar.y"
     1641#line 363 "grammar.y"
    16411642{ yyval.op = OpEqual; ;
    16421643    break;}
    16431644case 99:
    1644 #line 363 "grammar.y"
     1645#line 364 "grammar.y"
    16451646{ yyval.op = OpPlusEq; ;
    16461647    break;}
    16471648case 100:
    1648 #line 364 "grammar.y"
     1649#line 365 "grammar.y"
    16491650{ yyval.op = OpMinusEq; ;
    16501651    break;}
    16511652case 101:
    1652 #line 365 "grammar.y"
     1653#line 366 "grammar.y"
    16531654{ yyval.op = OpMultEq; ;
    16541655    break;}
    16551656case 102:
    1656 #line 366 "grammar.y"
     1657#line 367 "grammar.y"
    16571658{ yyval.op = OpDivEq; ;
    16581659    break;}
    16591660case 103:
    1660 #line 367 "grammar.y"
     1661#line 368 "grammar.y"
    16611662{ yyval.op = OpLShift; ;
    16621663    break;}
    16631664case 104:
    1664 #line 368 "grammar.y"
     1665#line 369 "grammar.y"
    16651666{ yyval.op = OpRShift; ;
    16661667    break;}
    16671668case 105:
    1668 #line 369 "grammar.y"
     1669#line 370 "grammar.y"
    16691670{ yyval.op = OpURShift; ;
    16701671    break;}
    16711672case 106:
    1672 #line 370 "grammar.y"
     1673#line 371 "grammar.y"
    16731674{ yyval.op = OpAndEq; ;
    16741675    break;}
    16751676case 107:
    1676 #line 371 "grammar.y"
     1677#line 372 "grammar.y"
    16771678{ yyval.op = OpXOrEq; ;
    16781679    break;}
    16791680case 108:
    1680 #line 372 "grammar.y"
     1681#line 373 "grammar.y"
    16811682{ yyval.op = OpOrEq; ;
    16821683    break;}
    16831684case 109:
    1684 #line 373 "grammar.y"
     1685#line 374 "grammar.y"
    16851686{ yyval.op = OpModEq; ;
    16861687    break;}
    16871688case 111:
    1688 #line 378 "grammar.y"
     1689#line 379 "grammar.y"
    16891690{ yyval.node = new CommaNode(yyvsp[-2].node, yyvsp[0].node); ;
    16901691    break;}
    16911692case 126:
    1692 #line 399 "grammar.y"
     1693#line 400 "grammar.y"
    16931694{ yyval.stat = new BlockNode(0L); DBG(yyval.stat, yylsp[0], yylsp[0]); ;
    16941695    break;}
    16951696case 127:
    1696 #line 400 "grammar.y"
     1697#line 401 "grammar.y"
    16971698{ yyval.stat = new BlockNode(yyvsp[-1].srcs); DBG(yyval.stat, yylsp[0], yylsp[0]); ;
    16981699    break;}
    16991700case 128:
    1700 #line 404 "grammar.y"
     1701#line 405 "grammar.y"
    17011702{ yyval.slist = new StatListNode(yyvsp[0].stat); ;
    17021703    break;}
    17031704case 129:
    1704 #line 405 "grammar.y"
     1705#line 406 "grammar.y"
    17051706{ yyval.slist = new StatListNode(yyvsp[-1].slist, yyvsp[0].stat); ;
    17061707    break;}
    17071708case 130:
    1708 #line 409 "grammar.y"
     1709#line 410 "grammar.y"
    17091710{ yyval.stat = new VarStatementNode(yyvsp[-1].vlist);
    17101711                                      DBG(yyval.stat, yylsp[-2], yylsp[0]); ;
    17111712    break;}
    17121713case 131:
    1713 #line 411 "grammar.y"
     1714#line 412 "grammar.y"
    17141715{ if (automatic()) {
    17151716                                          yyval.stat = new VarStatementNode(yyvsp[-1].vlist);
     
    17211722    break;}
    17221723case 132:
    1723 #line 421 "grammar.y"
     1724#line 422 "grammar.y"
    17241725{ yyval.vlist = new VarDeclListNode(yyvsp[0].decl); ;
    17251726    break;}
    17261727case 133:
    1727 #line 423 "grammar.y"
     1728#line 424 "grammar.y"
    17281729{ yyval.vlist = new VarDeclListNode(yyvsp[-2].vlist, yyvsp[0].decl); ;
    17291730    break;}
    17301731case 134:
    1731 #line 427 "grammar.y"
     1732#line 428 "grammar.y"
    17321733{ yyval.decl = new VarDeclNode(yyvsp[0].ustr, 0); delete yyvsp[0].ustr; ;
    17331734    break;}
    17341735case 135:
    1735 #line 428 "grammar.y"
     1736#line 429 "grammar.y"
    17361737{ yyval.decl = new VarDeclNode(yyvsp[-1].ustr, yyvsp[0].init); delete yyvsp[-1].ustr; ;
    17371738    break;}
    17381739case 136:
    1739 #line 432 "grammar.y"
     1740#line 433 "grammar.y"
    17401741{ yyval.init = new AssignExprNode(yyvsp[0].node); ;
    17411742    break;}
    17421743case 137:
    1743 #line 436 "grammar.y"
     1744#line 437 "grammar.y"
    17441745{ yyval.stat = new EmptyStatementNode(); ;
    17451746    break;}
    17461747case 138:
    1747 #line 440 "grammar.y"
     1748#line 441 "grammar.y"
    17481749{ yyval.stat = new ExprStatementNode(yyvsp[-1].node);
    17491750                                     DBG(yyval.stat, yylsp[-1], yylsp[0]); ;
    17501751    break;}
    17511752case 139:
    1752 #line 442 "grammar.y"
     1753#line 443 "grammar.y"
    17531754{ if (automatic()) {
    17541755                                       yyval.stat = new ExprStatementNode(yyvsp[-1].node);
     
    17581759    break;}
    17591760case 140:
    1760 #line 450 "grammar.y"
     1761#line 451 "grammar.y"
    17611762{ yyval.stat = new IfNode(yyvsp[-2].node,yyvsp[0].stat,0L);DBG(yyval.stat,yylsp[-4],yylsp[-1]); ;
    17621763    break;}
    17631764case 141:
    1764 #line 452 "grammar.y"
     1765#line 453 "grammar.y"
    17651766{ yyval.stat = new IfNode(yyvsp[-4].node,yyvsp[-2].stat,yyvsp[0].stat);DBG(yyval.stat,yylsp[-6],yylsp[-3]); ;
    17661767    break;}
    17671768case 142:
    1768 #line 456 "grammar.y"
     1769#line 457 "grammar.y"
    17691770{ yyval.stat=new DoWhileNode(yyvsp[-4].stat,yyvsp[-1].node);DBG(yyval.stat,yylsp[-5],yylsp[-3]);;
    17701771    break;}
    17711772case 143:
    1772 #line 457 "grammar.y"
     1773#line 458 "grammar.y"
    17731774{ yyval.stat = new WhileNode(yyvsp[-2].node,yyvsp[0].stat);DBG(yyval.stat,yylsp[-4],yylsp[-1]); ;
    17741775    break;}
    17751776case 144:
    1776 #line 459 "grammar.y"
     1777#line 460 "grammar.y"
    17771778{ yyval.stat = new ForNode(yyvsp[-6].node,yyvsp[-4].node,yyvsp[-2].node,yyvsp[0].stat);
    17781779                                     DBG(yyval.stat,yylsp[-8],yylsp[-1]); ;
    17791780    break;}
    17801781case 145:
    1781 #line 462 "grammar.y"
     1782#line 463 "grammar.y"
    17821783{ yyval.stat = new ForNode(yyvsp[-6].vlist,yyvsp[-4].node,yyvsp[-2].node,yyvsp[0].stat);
    17831784                                     DBG(yyval.stat,yylsp[-9],yylsp[-1]); ;
    17841785    break;}
    17851786case 146:
    1786 #line 465 "grammar.y"
     1787#line 466 "grammar.y"
    17871788{ yyval.stat = new ForInNode(yyvsp[-4].node, yyvsp[-2].node, yyvsp[0].stat);
    17881789                                     DBG(yyval.stat,yylsp[-6],yylsp[-1]); ;
    17891790    break;}
    17901791case 147:
    1791 #line 468 "grammar.y"
     1792#line 469 "grammar.y"
    17921793{ yyval.stat = new ForInNode(yyvsp[-4].ustr,0L,yyvsp[-2].node,yyvsp[0].stat);
    17931794                                     DBG(yyval.stat,yylsp[-7],yylsp[-1]);
     
    17951796    break;}
    17961797case 148:
    1797 #line 472 "grammar.y"
     1798#line 473 "grammar.y"
    17981799{ yyval.stat = new ForInNode(yyvsp[-5].ustr,yyvsp[-4].init,yyvsp[-2].node,yyvsp[0].stat);
    17991800                                     DBG(yyval.stat,yylsp[-8],yylsp[-1]);
     
    18011802    break;}
    18021803case 149:
    1803 #line 478 "grammar.y"
     1804#line 479 "grammar.y"
    18041805{ yyval.node = 0L; ;
    18051806    break;}
    18061807case 151:
    1807 #line 483 "grammar.y"
     1808#line 484 "grammar.y"
    18081809{ yyval.stat = new ContinueNode(); DBG(yyval.stat,yylsp[-1],yylsp[0]); ;
    18091810    break;}
    18101811case 152:
    1811 #line 484 "grammar.y"
     1812#line 485 "grammar.y"
    18121813{ if (automatic()) {
    18131814                                       yyval.stat = new ContinueNode(); DBG(yyval.stat,yylsp[-1],yylsp[0]);
     
    18161817    break;}
    18171818case 153:
    1818 #line 488 "grammar.y"
     1819#line 489 "grammar.y"
    18191820{ yyval.stat = new ContinueNode(yyvsp[-1].ustr); DBG(yyval.stat,yylsp[-2],yylsp[0]);
    18201821                                     delete yyvsp[-1].ustr; ;
    18211822    break;}
    18221823case 154:
    1823 #line 490 "grammar.y"
     1824#line 491 "grammar.y"
    18241825{ if (automatic()) {
    18251826                                       yyval.stat = new ContinueNode(yyvsp[-1].ustr);DBG(yyval.stat,yylsp[-2],yylsp[-1]);
     
    18291830    break;}
    18301831case 155:
    1831 #line 498 "grammar.y"
     1832#line 499 "grammar.y"
    18321833{ yyval.stat = new BreakNode();DBG(yyval.stat,yylsp[-1],yylsp[0]); ;
    18331834    break;}
    18341835case 156:
    1835 #line 499 "grammar.y"
     1836#line 500 "grammar.y"
    18361837{ if (automatic()) {
    18371838                                       yyval.stat = new BreakNode(); DBG(yyval.stat,yylsp[-1],yylsp[-1]);
     
    18401841    break;}
    18411842case 157:
    1842 #line 503 "grammar.y"
     1843#line 504 "grammar.y"
    18431844{ yyval.stat = new BreakNode(yyvsp[-1].ustr); DBG(yyval.stat,yylsp[-2],yylsp[0]);
    18441845                                     delete yyvsp[-1].ustr; ;
    18451846    break;}
    18461847case 158:
    1847 #line 505 "grammar.y"
     1848#line 506 "grammar.y"
    18481849{ if (automatic()) {
    18491850                                       yyval.stat = new BreakNode(yyvsp[-1].ustr); DBG(yyval.stat,yylsp[-2],yylsp[-1]);
     
    18541855    break;}
    18551856case 159:
    1856 #line 514 "grammar.y"
     1857#line 515 "grammar.y"
    18571858{ yyval.stat = new ReturnNode(0L); DBG(yyval.stat,yylsp[-1],yylsp[0]); ;
    18581859    break;}
    18591860case 160:
    1860 #line 515 "grammar.y"
     1861#line 516 "grammar.y"
    18611862{ if (automatic()) {
    18621863                                       yyval.stat = new ReturnNode(0L); DBG(yyval.stat,yylsp[-1],yylsp[-1]);
     
    18651866    break;}
    18661867case 161:
    1867 #line 519 "grammar.y"
     1868#line 520 "grammar.y"
    18681869{ yyval.stat = new ReturnNode(yyvsp[-1].node); ;
    18691870    break;}
    18701871case 162:
    1871 #line 520 "grammar.y"
     1872#line 521 "grammar.y"
    18721873{ if (automatic())
    18731874                                       yyval.stat = new ReturnNode(yyvsp[-1].node);
     
    18761877    break;}
    18771878case 163:
    1878 #line 527 "grammar.y"
     1879#line 528 "grammar.y"
    18791880{ yyval.stat = new WithNode(yyvsp[-2].node,yyvsp[0].stat);
    18801881                                     DBG(yyval.stat, yylsp[-4], yylsp[-1]); ;
    18811882    break;}
    18821883case 164:
    1883 #line 532 "grammar.y"
     1884#line 533 "grammar.y"
    18841885{ yyval.stat = new SwitchNode(yyvsp[-2].node, yyvsp[0].cblk);
    18851886                                     DBG(yyval.stat, yylsp[-4], yylsp[-1]); ;
    18861887    break;}
    18871888case 165:
    1888 #line 537 "grammar.y"
     1889#line 538 "grammar.y"
    18891890{ yyval.cblk = new CaseBlockNode(yyvsp[-1].clist, 0L, 0L); ;
    18901891    break;}
    18911892case 166:
    1892 #line 539 "grammar.y"
     1893#line 540 "grammar.y"
    18931894{ yyval.cblk = new CaseBlockNode(yyvsp[-3].clist, yyvsp[-2].ccl, yyvsp[-1].clist); ;
    18941895    break;}
    18951896case 167:
    1896 #line 543 "grammar.y"
     1897#line 544 "grammar.y"
    18971898{ yyval.clist = 0L; ;
    18981899    break;}
    18991900case 169:
    1900 #line 548 "grammar.y"
     1901#line 549 "grammar.y"
    19011902{ yyval.clist = new ClauseListNode(yyvsp[0].ccl); ;
    19021903    break;}
    19031904case 170:
    1904 #line 549 "grammar.y"
     1905#line 550 "grammar.y"
    19051906{ yyval.clist = yyvsp[-1].clist->append(yyvsp[0].ccl); ;
    19061907    break;}
    19071908case 171:
    1908 #line 553 "grammar.y"
     1909#line 554 "grammar.y"
    19091910{ yyval.ccl = new CaseClauseNode(yyvsp[-1].node, 0L); ;
    19101911    break;}
    19111912case 172:
    1912 #line 554 "grammar.y"
     1913#line 555 "grammar.y"
    19131914{ yyval.ccl = new CaseClauseNode(yyvsp[-2].node, yyvsp[0].slist); ;
    19141915    break;}
    19151916case 173:
    1916 #line 558 "grammar.y"
     1917#line 559 "grammar.y"
    19171918{ yyval.ccl = new CaseClauseNode(0L, 0L);; ;
    19181919    break;}
    19191920case 174:
    1920 #line 559 "grammar.y"
     1921#line 560 "grammar.y"
    19211922{ yyval.ccl = new CaseClauseNode(0L, yyvsp[0].slist); ;
    19221923    break;}
    19231924case 175:
    1924 #line 563 "grammar.y"
     1925#line 564 "grammar.y"
    19251926{ yyvsp[0].stat->pushLabel(yyvsp[-2].ustr);
    19261927                                     yyval.stat = new LabelNode(yyvsp[-2].ustr, yyvsp[0].stat);
     
    19281929    break;}
    19291930case 176:
    1930 #line 569 "grammar.y"
     1931#line 570 "grammar.y"
    19311932{ yyval.stat = new ThrowNode(yyvsp[-1].node); ;
    19321933    break;}
    19331934case 177:
    1934 #line 573 "grammar.y"
     1935#line 574 "grammar.y"
    19351936{ yyval.stat = new TryNode(yyvsp[-1].stat, yyvsp[0].node); ;
    19361937    break;}
    19371938case 178:
    1938 #line 574 "grammar.y"
     1939#line 575 "grammar.y"
    19391940{ yyval.stat = new TryNode(yyvsp[-1].stat, 0L, yyvsp[0].node); ;
    19401941    break;}
    19411942case 179:
    1942 #line 575 "grammar.y"
     1943#line 576 "grammar.y"
    19431944{ yyval.stat = new TryNode(yyvsp[-2].stat, yyvsp[-1].node, yyvsp[0].node); ;
    19441945    break;}
    19451946case 180:
    1946 #line 579 "grammar.y"
     1947#line 580 "grammar.y"
    19471948{ yyval.node = new CatchNode(yyvsp[-2].ustr, yyvsp[0].stat); delete yyvsp[-2].ustr; ;
    19481949    break;}
    19491950case 181:
    1950 #line 583 "grammar.y"
     1951#line 584 "grammar.y"
    19511952{ yyval.node = new FinallyNode(yyvsp[0].stat); ;
    19521953    break;}
    19531954case 182:
    1954 #line 587 "grammar.y"
     1955#line 588 "grammar.y"
    19551956{ yyval.func = new FuncDeclNode(yyvsp[-3].ustr, 0L, yyvsp[0].body);
    19561957                                             delete yyvsp[-3].ustr; ;
    19571958    break;}
    19581959case 183:
    1959 #line 590 "grammar.y"
     1960#line 591 "grammar.y"
    19601961{ yyval.func = new FuncDeclNode(yyvsp[-4].ustr, yyvsp[-2].param, yyvsp[0].body);
    19611962                                     delete yyvsp[-4].ustr; ;
    19621963    break;}
    19631964case 184:
    1964 #line 594 "grammar.y"
     1965#line 595 "grammar.y"
    19651966{ yyval.node = new FuncExprNode(0L, yyvsp[0].body); ;
    19661967    break;}
    19671968case 185:
    1968 #line 596 "grammar.y"
     1969#line 597 "grammar.y"
    19691970{ yyval.node = new FuncExprNode(yyvsp[-2].param, yyvsp[0].body); ;
    19701971    break;}
    19711972case 186:
    1972 #line 601 "grammar.y"
     1973#line 602 "grammar.y"
    19731974{ yyval.param = new ParameterNode(yyvsp[0].ustr); delete yyvsp[0].ustr; ;
    19741975    break;}
    19751976case 187:
    1976 #line 602 "grammar.y"
     1977#line 603 "grammar.y"
    19771978{ yyval.param = yyvsp[-2].param->append(yyvsp[0].ustr);
    19781979                                     delete yyvsp[0].ustr; ;
    19791980    break;}
    19801981case 188:
    1981 #line 607 "grammar.y"
     1982#line 608 "grammar.y"
    19821983{ yyval.body = new FunctionBodyNode(0L);
    19831984                                     DBG(yyval.body, yylsp[-1], yylsp[0]);;
    19841985    break;}
    19851986case 189:
    1986 #line 609 "grammar.y"
     1987#line 610 "grammar.y"
    19871988{ yyval.body = new FunctionBodyNode(yyvsp[-1].srcs);
    19881989                                     DBG(yyval.body, yylsp[-2], yylsp[0]);;
    19891990    break;}
    19901991case 190:
    1991 #line 614 "grammar.y"
     1992#line 615 "grammar.y"
    19921993{ yyval.prog = new ProgramNode(0L);
    19931994                                     Parser::progNode = yyval.prog; ;
    19941995    break;}
    19951996case 191:
    1996 #line 616 "grammar.y"
     1997#line 617 "grammar.y"
    19971998{ yyval.prog = new ProgramNode(yyvsp[0].srcs);
    19981999                                     Parser::progNode = yyval.prog; ;
    19992000    break;}
    20002001case 192:
    2001 #line 621 "grammar.y"
     2002#line 622 "grammar.y"
    20022003{ yyval.srcs = new SourceElementsNode(yyvsp[0].src); ;
    20032004    break;}
    20042005case 193:
    2005 #line 622 "grammar.y"
     2006#line 623 "grammar.y"
    20062007{ yyval.srcs = new SourceElementsNode(yyvsp[-1].srcs, yyvsp[0].src); ;
    20072008    break;}
    20082009case 194:
    2009 #line 626 "grammar.y"
     2010#line 627 "grammar.y"
    20102011{ yyval.src = new SourceElementNode(yyvsp[0].stat); ;
    20112012    break;}
    20122013case 195:
    2013 #line 627 "grammar.y"
     2014#line 628 "grammar.y"
    20142015{ yyval.src = new SourceElementNode(yyvsp[0].func); ;
    20152016    break;}
     
    22372238  return 1;
    22382239}
    2239 #line 630 "grammar.y"
     2240#line 631 "grammar.y"
    22402241
    22412242
Note: See TracChangeset for help on using the changeset viewer.