From 0b5f394208d5aaf803e2100f2ffe12bdef44a7e8 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Thu, 30 Apr 2009 17:06:10 +1000 Subject: Item insertion and removal for PathView. Not animated at the moment. --- src/declarative/fx/qfxpathview.cpp | 166 ++++++++++++++++++++++--------------- src/declarative/fx/qfxpathview.h | 2 + 2 files changed, 103 insertions(+), 65 deletions(-) diff --git a/src/declarative/fx/qfxpathview.cpp b/src/declarative/fx/qfxpathview.cpp index c0d3ab2..5c24d86 100644 --- a/src/declarative/fx/qfxpathview.cpp +++ b/src/declarative/fx/qfxpathview.cpp @@ -140,28 +140,6 @@ QFxPathView::~QFxPathView() The model provides a set of data that is used to create the items for the view. For large or dynamic datasets the model is usually provided by a C++ model object. - However, models can also be created directly in XML, for example: - \code - - - - pics/john.png - John - Smith - - - pics/bill.png - Bill - Jones - - - pics/jane.png - Jane - Doe - - - - \endcode */ /*! @@ -180,6 +158,10 @@ QVariant QFxPathView::model() const void QFxPathView::setModel(const QVariant &model) { Q_D(QFxPathView); + if (d->model) { + disconnect(d->model, SIGNAL(itemsInserted(int,int)), this, SLOT(itemsInserted(int,int))); + disconnect(d->model, SIGNAL(itemsRemoved(int,int)), this, SLOT(itemsRemoved(int,int))); + } if (QFxVisualItemModel *m = qvariant_cast(model)) { if (d->ownModel) { delete d->model; @@ -193,6 +175,12 @@ void QFxPathView::setModel(const QVariant &model) } d->model->setModel(model); } + if (d->model) { + connect(d->model, SIGNAL(itemsInserted(int,int)), this, SLOT(itemsInserted(int,int))); + connect(d->model, SIGNAL(itemsRemoved(int,int)), this, SLOT(itemsRemoved(int,int))); + } + d->firstIndex = 0; + d->pathOffset = 0; d->regenerate(); d->fixOffset(); } @@ -425,6 +413,8 @@ QPointF QFxPathViewPrivate::pointNear(const QPointF &point, qreal *nearPercent) void QFxPathView::mousePressEvent(QGraphicsSceneMouseEvent *event) { Q_D(QFxPathView); + if (!d->items.count()) + return; QPointF scenePoint = mapToScene(event->pos()); int idx = 0; for (; idx < d->items.count(); ++idx) { @@ -576,9 +566,6 @@ bool QFxPathView::mouseFilter(QGraphicsSceneMouseEvent *e) void QFxPathViewPrivate::regenerate() { Q_Q(QFxPathView); - if (!model || model->count() <= 0 || !model->delegate() || !path) - return; - for (int i=0; iattachedProperties.remove(p); @@ -586,29 +573,23 @@ void QFxPathViewPrivate::regenerate() } items.clear(); - firstIndex = 0; - pathOffset = 0; + if (!model || model->count() <= 0 || !model->delegate() || !path) + return; - int numItems = (pathItems>=0 ? pathItems : model->count()); - qreal minDiff = 1e9; - int minI = -1; - for (int i=0; iitem(i); + if (firstIndex >= model->count()) + firstIndex = model->count()-1; + if (pathOffset >= model->count()) + pathOffset = model->count()-1; + + int numItems = pathItems >= 0 ? pathItems : model->count(); + for (int i=0; i < numItems && i < model->count(); ++i){ + QFxItem *item = model->item((i + firstIndex) % model->count()); if (!item) return; items.append(item); item->setZ(i); item->setParent(q); - qreal percent = i * (100.0 / (numItems)); - percent /= 100.0; - updateItem(items.last(), percent); - qreal diff = qAbs(percent - snapPos); - if (diff < minDiff){ - minDiff = diff; - minI = i; - } } - q->setCurrentIndex(minI); q->refill(); } @@ -639,10 +620,9 @@ void QFxPathView::refill() positions << qAbs(percent/100.0); } - if (d->pathItems==-1){ - for (int i=0; ipathItems==-1) { + for (int i=0; iupdateItem(d->items.at(i), positions[i]); - } return; } @@ -650,54 +630,110 @@ void QFxPathView::refill() for (int i=0; iitems.count(); i++) rotatedPositions << positions[(i + d->pathOffset + d->items.count()) % d->items.count()]; - int firstFind = -1; - int i; - for (i=0; iitems.count()-1; i++) - { + int wrapIndex= -1; + for (int i=0; iitems.count()-1; i++) { if (rotatedPositions[i] > rotatedPositions[i+1]){ - firstFind = i; + wrapIndex = i; break; } } - if (firstFind!=-1 ){ + if (wrapIndex != -1 ){ //A wraparound has occured - if (firstFind<(d->items.count()/2)){ - while(firstFind-- >= 0){ + if (wrapIndex < d->items.count()/2){ + while(wrapIndex-- >= 0){ QFxItem* p = d->items.takeFirst(); attachedProperties.remove(p); d->model->release(p); d->firstIndex++; - d->firstIndex%=d->model->count(); + d->firstIndex %= d->model->count(); int index = (d->firstIndex + d->items.count())%d->model->count(); d->items << d->model->item(index); - d->items.last()->setZ(i); + d->items.last()->setZ(wrapIndex); d->items.last()->setParent(this); d->pathOffset++; d->pathOffset=d->pathOffset % d->items.count(); } - }else{ - while(firstFind++ < (d->items.count()-1)){ + } else { + while(wrapIndex++ < d->items.count()-1){ QFxItem* p = d->items.takeLast(); attachedProperties.remove(p); d->model->release(p); d->firstIndex--; - if (d->firstIndex<0) + if (d->firstIndex < 0) d->firstIndex = d->model->count() - 1; d->items.prepend(d->model->item(d->firstIndex)); d->items.first()->setZ(d->firstIndex); d->items.first()->setParent(this); d->pathOffset--; - if (d->pathOffset<0) + if (d->pathOffset < 0) d->pathOffset = d->items.count() - 1; } } for (int i=0; iitems.count(); i++) rotatedPositions[i] = positions[(i + d->pathOffset + d->items.count()) - % d->items.count()]; + % d->items.count()]; } - for (int i=0; iitems.count(); i++){ + for (int i=0; iitems.count(); i++) d->updateItem(d->items.at(i), rotatedPositions[i]); +} + +void QFxPathView::itemsInserted(int modelIndex, int count) +{ + //XXX support animated insertion + Q_D(QFxPathView); + if (d->pathItems == -1 || d->items.count() < d->pathItems) { + for (int i = 0; i < count; ++i) { + QFxItem *item = d->model->item(modelIndex + i); + item->setZ(modelIndex + i); + item->setParent(this); + d->items.insert(modelIndex + i, item); + } + refill(); + } else { + //XXX This is pretty heavy handed until we reference count items. + d->regenerate(); } + + // make sure the current item is still at the snap position + int itemIndex = (d->currentIndex - d->firstIndex + d->model->count())%d->model->count(); + itemIndex += d->pathOffset; + itemIndex %= d->items.count(); + qreal targetOffset = fmod(100 + (d->snapPos*100) - 100.0 * itemIndex / d->items.count(), 100); + + if (targetOffset < 0) + targetOffset = 100.0 + targetOffset; + if (targetOffset != d->_offset) + d->moveOffset.setValue(targetOffset); +} + +void QFxPathView::itemsRemoved(int modelIndex, int count) +{ + //XXX support animated removal + Q_D(QFxPathView); + if (d->pathItems == -1) { + for (int i = 0; i < count; ++i) { + QFxItem* p = d->items.takeAt(modelIndex); + attachedProperties.remove(p); + d->model->release(p); + } + d->snapToCurrent(); + refill(); + } else { + d->regenerate(); + } + + // make sure the current item is still at the snap position + if (d->currentIndex >= d->model->count()) + d->currentIndex = d->model->count() - 1; + int itemIndex = (d->currentIndex - d->firstIndex + d->model->count())%d->model->count(); + itemIndex += d->pathOffset; + itemIndex %= d->items.count(); + qreal targetOffset = fmod(100 + (d->snapPos*100) - 100.0 * itemIndex / d->items.count(), 100); + + if (targetOffset < 0) + targetOffset = 100.0 + targetOffset; + if (targetOffset != d->_offset) + d->moveOffset.setValue(targetOffset); } void QFxPathView::ticked() @@ -715,7 +751,7 @@ int QFxPathViewPrivate::calcCurrentIndex() if (_offset < 0) _offset += 100.0; - if (pathItems == -1){ + if (pathItems == -1) { qreal delta = fmod(_offset - snapPos, 100.0); if (delta < 0) delta = 100.0 + delta; @@ -723,7 +759,7 @@ int QFxPathViewPrivate::calcCurrentIndex() if (ii < 0) ii = 0; current = ii; - }else{ + } else { qreal bestDiff=1e9; int bestI=-1; for (int i=0; icount() <= 0) return; - int itemIndex = (currentIndex - firstIndex + model->count())%model->count(); + int itemIndex = (currentIndex - firstIndex + model->count()) % model->count(); //Rounds is the number of times round to make the current item visible int rounds = itemIndex / items.count(); - int otherWayRounds = (model->count() - (itemIndex))/items.count() + 1; + int otherWayRounds = (model->count() - (itemIndex)) / items.count() + 1; if (otherWayRounds < rounds) rounds = -otherWayRounds; @@ -792,7 +828,7 @@ void QFxPathViewPrivate::snapToCurrent() if (targetOffset < 0) targetOffset = 100.0 + targetOffset; - if (targetOffset == _offset && rounds==0) + if (targetOffset == _offset && rounds == 0) return; moveReason = Other; diff --git a/src/declarative/fx/qfxpathview.h b/src/declarative/fx/qfxpathview.h index 2cc0769..23f2f07 100644 --- a/src/declarative/fx/qfxpathview.h +++ b/src/declarative/fx/qfxpathview.h @@ -113,6 +113,8 @@ protected: private Q_SLOTS: void refill(); void ticked(); + void itemsInserted(int index, int count); + void itemsRemoved(int index, int count); protected: QFxPathView(QFxPathViewPrivate &dd, QFxItem *parent); -- cgit v0.12 From c50f26a26f1e7ac22bd3ff08fe24a927c57e127b Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Thu, 30 Apr 2009 17:07:55 +1000 Subject: Doc. --- src/declarative/fx/qfxlistview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/declarative/fx/qfxlistview.cpp b/src/declarative/fx/qfxlistview.cpp index 13e5b21..4a626f5 100644 --- a/src/declarative/fx/qfxlistview.cpp +++ b/src/declarative/fx/qfxlistview.cpp @@ -837,7 +837,7 @@ QFxListView::~QFxListView() The model provides a set of data that is used to create the items for the view. For large or dynamic datasets the model is usually provided by a C++ model object. - The C++ model object must be a \l QListModelInterface subclass, a \l VisualModel, + The C++ model object must be a \l QAbstractItemModel subclass, a \l VisualModel, or a simple list. Models can also be created directly in XML, using the \l ListModel element. -- cgit v0.12 From 6d217e8b3ba881eb02d09e225305ccd0329598e9 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Thu, 30 Apr 2009 17:19:23 +1000 Subject: Join some lines in example code. --- examples/declarative/follow/follow.qml | 66 ++++++--------------- examples/declarative/follow/pong.qml | 102 ++++++--------------------------- 2 files changed, 36 insertions(+), 132 deletions(-) diff --git a/examples/declarative/follow/follow.qml b/examples/declarative/follow/follow.qml index 598d953..5368e75 100644 --- a/examples/declarative/follow/follow.qml +++ b/examples/declarative/follow/follow.qml @@ -1,78 +1,46 @@ Rect { - width: 320 - height: 240 color: "#ffffff" + width: 320; height: 240 Rect { id: Rect - y: 200 color: "#00ff00" - width: 60 - height: 20 + y: 200; width: 60; height: 20 y: SequentialAnimation { - running: true - repeat: true + running: true; repeat: true NumericAnimation { - to: 200 + to: 200; duration: 2000 easing: "easeOutBounce(amplitude:180)" - duration: 2000 - } - PauseAnimation { - duration: 1000 } + PauseAnimation { duration: 1000 } } } + // Velocity Rect { - x: Rect.width color: "#ff0000" - width: Rect.width - height: 20 - y: Follow { - source: Rect.y - velocity: 200 - } - } - Text { - x: Rect.width - y: 220 - text: "Velocity" + x: Rect.width; width: Rect.width; height: 20 + y: Follow { source: Rect.y; velocity: 200 } } + Text { x: Rect.width; y: 220; text: "Velocity" } + // Spring Rect { - x: Rect.width * 2 color: "#ff0000" - width: Rect.width - height: 20 - y: Follow { - source: Rect.y - spring: 1.2 - damping: 0.1 - } - } - Text { - x: Rect.width * 2 - y: 220 - text: "Spring" + x: Rect.width * 2; width: Rect.width; height: 20 + y: Follow { source: Rect.y; spring: 1.2; damping: 0.1 } } + Text { x: Rect.width * 2; y: 220; text: "Spring" } + // Follow mouse MouseRegion { id: Mouse anchors.fill: parent Rect { - width: 20 - height: 20 + width: 20; height: 20 radius: 10 color: "#0000ff" - x: Follow { - source: Mouse.mouseX-10 - spring: 1.0 - damping: 0.05 - } - y: Follow { - source: Mouse.mouseY-10 - spring: 1.0 - damping: 0.05 - } + x: Follow { source: Mouse.mouseX-10; spring: 1.0; damping: 0.05 } + y: Follow { source: Mouse.mouseY-10; spring: 1.0; damping: 0.05 } } } } diff --git a/examples/declarative/follow/pong.qml b/examples/declarative/follow/pong.qml index b6695bd..32ee049 100644 --- a/examples/declarative/follow/pong.qml +++ b/examples/declarative/follow/pong.qml @@ -1,57 +1,29 @@ Rect { id: Page - width: 640 - height: 480 + width: 640; height: 480 color: "#000000" // Make a ball to bounce Rect { id: Ball - x: 20 - width: 20 - height: 20 color: "#00ee00" - z: 1 + x: 20; width: 20; height: 20; z: 1 // Add a property for the target y coordinate - properties: Property { - name: "targetY" - value: Page.height-10 - } - properties: Property { - name: "direction" - value: "right" - } + properties: Property { name: "targetY"; value: Page.height-10 } + properties: Property { name: "direction"; value: "right" } // Move the ball to the right and back to the left repeatedly x: SequentialAnimation { - running: true - repeat: true - NumericAnimation { - to: Page.width-40 - duration: 2000 - } - SetPropertyAction { - target: Ball - property: "direction" - value: "left" - } - NumericAnimation { - to: 20 - duration: 2000 - } - SetPropertyAction { - target: Ball - property: "direction" - value: "right" - } + running: true; repeat: true + NumericAnimation { to: Page.width-40; duration: 2000 } + SetPropertyAction { target: Ball; property: "direction"; value: "left" } + NumericAnimation { to: 20; duration: 2000 } + SetPropertyAction { target: Ball; property: "direction"; value: "right" } } // Make y follow the target y coordinate, with a velocity of 200 - y: Follow { - source: Ball.targetY - velocity: 200 - } + y: Follow { source: Ball.targetY; velocity: 200 } // Detect the ball hitting the top or bottom of the view and bounce it onTopChanged: { @@ -67,65 +39,29 @@ Rect { Rect { id: LeftBat color: "#00ee00" - x: 2 - width: 20 - height: 90 + x: 2; width: 20; height: 90 y: Follow { - source: Ball.y-45 - velocity: 300 + source: Ball.y-45; velocity: 300 enabled: Ball.direction == 'left' } } Rect { id: RightBat - x: Page.width-22 color: "#00ee00" - width: 20 - height: 90 + x: Page.width-22; width: 20; height: 90 y: Follow { - source: Ball.y-45 - velocity: 300 + source: Ball.y-45; velocity: 300 enabled: Ball.direction == 'right' } } // The rest, to make it look realistic, if neither ever scores... - Rect { - color: "#00ee00" - x: 320-80 - y: 0 - width: 40 - height: 60 - } - Rect { - color: "#000000" - x: 320-70 - y: 10 - width: 20 - height: 40 - } - Rect { - color: "#00ee00" - x: 320+40 - y: 0 - width: 40 - height: 60 - } - Rect { - color: "#000000" - x: 320+50 - y: 10 - width: 20 - height: 40 - } + Rect { color: "#00ee00"; x: 320-80; y: 0; width: 40; height: 60 } + Rect { color: "#000000"; x: 320-70; y: 10; width: 20; height: 40 } + Rect { color: "#00ee00"; x: 320+40; y: 0; width: 40; height: 60 } + Rect { color: "#000000"; x: 320+50; y: 10; width: 20; height: 40 } Repeater { dataSource: 24 - Rect { - color: "#00ee00" - x: 320-5 - y: index*20 - width: 10 - height: 10 - } + Rect { color: "#00ee00"; x: 320-5; y: index*20; width: 10; height: 10 } } } -- cgit v0.12 From 0ce47e44c2c2259ebe2c8167766d91de082a3531 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Thu, 30 Apr 2009 18:33:31 +1000 Subject: Accept "return" and reserved words as property names --- src/declarative/fx/qfxkeyactions.h | 2 +- src/declarative/qml/parser/javascript.g | 14 + src/declarative/qml/parser/javascriptgrammar.cpp | 1181 +++++++++++----------- src/declarative/qml/parser/javascriptgrammar_p.h | 64 +- src/declarative/qml/parser/javascriptparser.cpp | 365 +++---- src/declarative/qml/parser/javascriptparser_p.h | 4 +- 6 files changed, 880 insertions(+), 750 deletions(-) diff --git a/src/declarative/fx/qfxkeyactions.h b/src/declarative/fx/qfxkeyactions.h index b0d002d..7ad323a 100644 --- a/src/declarative/fx/qfxkeyactions.h +++ b/src/declarative/fx/qfxkeyactions.h @@ -101,7 +101,7 @@ class Q_DECLARATIVE_EXPORT QFxKeyActions : public QFxItem Q_PROPERTY(QString digit9 READ key_9 WRITE setKey_9) Q_PROPERTY(QString asterisk READ key_Asterisk WRITE setKey_Asterisk) Q_PROPERTY(QString escape READ key_Escape WRITE setKey_Escape) - Q_PROPERTY(QString keyReturn READ key_Return WRITE setKey_Return) + Q_PROPERTY(QString return READ key_Return WRITE setKey_Return) Q_PROPERTY(QString enter READ key_Enter WRITE setKey_Enter) Q_PROPERTY(QString delete READ key_Delete WRITE setKey_Delete) Q_PROPERTY(QString space READ key_Space WRITE setKey_Space) diff --git a/src/declarative/qml/parser/javascript.g b/src/declarative/qml/parser/javascript.g index f9a2165..cc72737 100644 --- a/src/declarative/qml/parser/javascript.g +++ b/src/declarative/qml/parser/javascript.g @@ -687,6 +687,20 @@ case $rule_number: { } break; ./ +UiQualifiedId: T_RESERVED_WORD ; +/. +case $rule_number: +./ +UiQualifiedId: T_RETURN ; +/. +case $rule_number: +{ + AST::UiQualifiedId *node = makeAstNode (driver->nodePool(), driver->intern(lexer->characterBuffer(), lexer->characterCount())); + node->identifierToken = loc(1); + sym(1).Node = node; +} break; +./ + UiQualifiedId: T_IDENTIFIER ; /. case $rule_number: { diff --git a/src/declarative/qml/parser/javascriptgrammar.cpp b/src/declarative/qml/parser/javascriptgrammar.cpp index 13c3fad..0d2a215 100644 --- a/src/declarative/qml/parser/javascriptgrammar.cpp +++ b/src/declarative/qml/parser/javascriptgrammar.cpp @@ -1,4 +1,45 @@ // This file was generated by qlalr - DO NOT EDIT! +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include "javascriptgrammar_p.h" const char *const JavaScriptGrammar::spell [] = { @@ -16,509 +57,552 @@ const int JavaScriptGrammar::lhs [] = { 88, 89, 89, 92, 92, 93, 93, 91, 90, 90, 95, 95, 97, 97, 96, 94, 96, 94, 96, 94, 96, 94, 94, 94, 94, 94, 94, 94, 98, 98, - 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, - 103, 103, 103, 103, 103, 105, 105, 109, 109, 104, - 104, 107, 107, 110, 110, 110, 110, 111, 111, 111, + 98, 98, 103, 103, 103, 103, 103, 103, 103, 103, + 103, 103, 103, 103, 103, 103, 103, 105, 105, 109, + 109, 104, 104, 107, 107, 110, 110, 110, 110, 111, + 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, - 111, 111, 111, 111, 111, 111, 111, 111, 112, 112, - 113, 113, 113, 113, 113, 116, 116, 117, 117, 117, - 117, 115, 115, 118, 118, 119, 119, 120, 120, 120, - 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, - 122, 122, 122, 122, 123, 123, 123, 124, 124, 124, - 124, 125, 125, 125, 125, 125, 125, 125, 126, 126, - 126, 126, 126, 126, 127, 127, 127, 127, 127, 128, - 128, 128, 128, 128, 129, 129, 130, 130, 131, 131, - 132, 132, 133, 133, 134, 134, 135, 135, 136, 136, - 137, 137, 138, 138, 139, 139, 140, 140, 108, 108, - 141, 141, 142, 142, 142, 142, 142, 142, 142, 142, - 142, 142, 142, 142, 100, 100, 143, 143, 144, 144, - 145, 145, 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 146, 161, 161, - 160, 160, 102, 102, 162, 162, 163, 163, 165, 165, - 164, 166, 169, 167, 167, 170, 168, 168, 147, 148, - 148, 149, 149, 150, 150, 150, 150, 150, 150, 150, - 151, 151, 151, 151, 152, 152, 152, 152, 153, 153, - 154, 156, 171, 171, 174, 174, 172, 172, 175, 173, - 155, 157, 157, 158, 158, 158, 176, 177, 159, 159, - 101, 114, 181, 181, 178, 178, 179, 179, 182, 183, - 183, 184, 184, 180, 180, 106, 106, 185}; + 112, 112, 113, 113, 113, 113, 113, 116, 116, 117, + 117, 117, 117, 115, 115, 118, 118, 119, 119, 120, + 120, 120, 121, 121, 121, 121, 121, 121, 121, 121, + 121, 121, 122, 122, 122, 122, 123, 123, 123, 124, + 124, 124, 124, 125, 125, 125, 125, 125, 125, 125, + 126, 126, 126, 126, 126, 126, 127, 127, 127, 127, + 127, 128, 128, 128, 128, 128, 129, 129, 130, 130, + 131, 131, 132, 132, 133, 133, 134, 134, 135, 135, + 136, 136, 137, 137, 138, 138, 139, 139, 140, 140, + 108, 108, 141, 141, 142, 142, 142, 142, 142, 142, + 142, 142, 142, 142, 142, 142, 100, 100, 143, 143, + 144, 144, 145, 145, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 146, + 161, 161, 160, 160, 102, 102, 162, 162, 163, 163, + 165, 165, 164, 166, 169, 167, 167, 170, 168, 168, + 147, 148, 148, 149, 149, 150, 150, 150, 150, 150, + 150, 150, 151, 151, 151, 151, 152, 152, 152, 152, + 153, 153, 154, 156, 171, 171, 174, 174, 172, 172, + 175, 173, 155, 157, 157, 158, 158, 158, 176, 177, + 159, 159, 101, 114, 181, 181, 178, 178, 179, 179, + 182, 183, 183, 184, 184, 180, 180, 106, 106, 185}; const int JavaScriptGrammar:: rhs[] = { 2, 1, 1, 1, 2, 3, 3, 0, 1, 2, 1, 3, 2, 3, 4, 4, 2, 2, 5, 5, - 3, 3, 3, 4, 5, 6, 1, 1, 1, 3, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, - 3, 5, 3, 4, 3, 2, 4, 1, 2, 0, - 1, 3, 5, 1, 1, 1, 1, 1, 1, 1, + 3, 3, 3, 4, 5, 6, 1, 1, 1, 1, + 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 3, 3, 5, 3, 4, 3, 2, 4, 1, + 2, 0, 1, 3, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 4, 3, 5, 1, 2, 4, 4, 4, - 3, 0, 1, 1, 3, 1, 1, 1, 2, 2, - 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 1, 3, 3, 3, 1, 3, 3, 1, 3, 3, - 3, 1, 3, 3, 3, 3, 3, 3, 1, 3, - 3, 3, 3, 3, 1, 3, 3, 3, 3, 1, - 3, 3, 3, 3, 1, 3, 1, 3, 1, 3, + 1, 1, 1, 1, 4, 3, 5, 1, 2, 4, + 4, 4, 3, 0, 1, 1, 3, 1, 1, 1, + 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 1, 3, 3, 3, 1, 3, 3, 1, + 3, 3, 3, 1, 3, 3, 3, 3, 3, 3, + 1, 3, 3, 3, 3, 3, 1, 3, 3, 3, + 3, 1, 3, 3, 3, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, - 1, 3, 1, 3, 1, 5, 1, 5, 1, 3, - 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 3, 0, 1, 1, 3, - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 3, 1, 2, - 0, 1, 3, 3, 1, 1, 1, 3, 1, 3, - 2, 2, 2, 0, 1, 2, 0, 1, 1, 2, - 2, 7, 5, 7, 7, 5, 9, 10, 7, 8, - 2, 2, 3, 3, 2, 2, 3, 3, 3, 3, - 5, 5, 3, 5, 1, 2, 0, 1, 4, 3, - 3, 3, 3, 3, 3, 4, 5, 2, 2, 2, - 8, 8, 1, 3, 0, 1, 0, 1, 1, 1, - 2, 1, 1, 0, 1, 0, 1, 2}; + 1, 3, 1, 3, 1, 3, 1, 5, 1, 5, + 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 3, 0, 1, + 1, 3, 0, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, + 1, 2, 0, 1, 3, 3, 1, 1, 1, 3, + 1, 3, 2, 2, 2, 0, 1, 2, 0, 1, + 1, 2, 2, 7, 5, 7, 7, 5, 9, 10, + 7, 8, 2, 2, 3, 3, 2, 2, 3, 3, + 3, 3, 5, 5, 3, 5, 1, 2, 0, 1, + 4, 3, 3, 3, 3, 3, 3, 4, 5, 2, + 2, 2, 8, 8, 1, 3, 0, 1, 0, 1, + 1, 1, 2, 1, 1, 0, 1, 0, 1, 2}; const int JavaScriptGrammar::action_default [] = { 8, 2, 0, 4, 3, 0, 0, 0, 6, 7, - 5, 27, 225, 0, 29, 0, 226, 9, 1, 0, - 0, 28, 0, 285, 286, 0, 283, 0, 284, 0, - 287, 128, 195, 159, 167, 163, 203, 210, 107, 179, - 209, 217, 205, 155, 0, 206, 288, 0, 293, 92, - 207, 208, 213, 108, 171, 175, 96, 125, 106, 111, - 91, 145, 211, 132, 290, 289, 292, 214, 0, 0, - 0, 0, 38, 39, 0, 35, 0, 294, 32, 0, - 296, 50, 0, 0, 0, 0, 0, 33, 36, 0, - 0, 197, 239, 37, 0, 31, 0, 0, 34, 0, - 0, 0, 0, 0, 215, 216, 121, 204, 212, 0, - 0, 108, 127, 294, 32, 296, 110, 109, 0, 0, - 0, 123, 124, 122, 0, 295, 285, 0, 0, 287, - 0, 282, 0, 297, 0, 57, 58, 59, 60, 85, - 61, 86, 62, 63, 64, 65, 66, 67, 68, 69, - 54, 70, 71, 72, 73, 74, 56, 87, 75, 55, - 76, 77, 78, 79, 80, 81, 82, 83, 84, 88, - 0, 52, 0, 0, 44, 0, 53, 43, 126, 0, - 156, 0, 0, 0, 0, 146, 0, 0, 0, 0, - 0, 0, 136, 0, 0, 0, 130, 131, 129, 134, - 138, 137, 135, 133, 148, 147, 149, 0, 164, 0, - 160, 0, 0, 102, 101, 90, 89, 0, 0, 100, - 196, 103, 0, 104, 0, 105, 99, 240, 241, 281, - 0, 192, 185, 183, 190, 191, 189, 188, 194, 187, - 186, 184, 193, 180, 0, 168, 0, 0, 172, 0, - 0, 176, 0, 0, 102, 94, 0, 93, 0, 98, - 291, 255, 0, 256, 257, 258, 251, 0, 252, 253, - 254, 279, 280, 112, 0, 0, 0, 0, 0, 244, - 245, 201, 199, 161, 169, 165, 181, 157, 202, 0, - 108, 173, 177, 150, 139, 0, 0, 158, 0, 0, - 0, 0, 151, 0, 0, 0, 0, 0, 143, 141, - 144, 142, 140, 153, 152, 154, 0, 166, 0, 162, - 0, 200, 108, 0, 182, 197, 198, 0, 197, 0, - 0, 247, 0, 0, 0, 249, 0, 170, 0, 0, - 174, 0, 0, 178, 237, 0, 229, 238, 232, 0, - 236, 0, 197, 230, 0, 197, 0, 0, 248, 0, - 0, 0, 250, 295, 0, 271, 0, 0, 0, 243, - 0, 242, 219, 222, 0, 58, 85, 61, 86, 63, - 64, 35, 68, 69, 32, 70, 73, 33, 36, 197, - 37, 76, 31, 78, 34, 80, 81, 82, 83, 84, - 88, 220, 218, 96, 97, 102, 0, 95, 0, 259, - 260, 0, 0, 0, 262, 267, 265, 268, 0, 0, - 266, 267, 0, 263, 0, 264, 221, 270, 0, 221, - 269, 0, 272, 273, 0, 221, 274, 275, 0, 0, - 276, 0, 0, 0, 277, 278, 114, 113, 0, 0, - 0, 246, 0, 0, 0, 261, 0, 51, 0, 48, - 50, 41, 0, 47, 42, 49, 46, 40, 0, 45, - 118, 116, 120, 117, 115, 119, 0, 18, 13, 0, - 14, 10, 0, 0, 0, 24, 0, 26, 23, 0, - 25, 0, 0, 22, 32, 50, 16, 29, 0, 11, - 0, 17, 0, 20, 12, 0, 21, 32, 50, 15, - 0, 19, 30, 234, 227, 0, 235, 231, 0, 233, - 223, 0, 224, 228, 298}; + 5, 27, 227, 0, 31, 0, 29, 30, 228, 9, + 1, 0, 0, 28, 0, 287, 288, 0, 285, 0, + 286, 0, 289, 130, 197, 161, 169, 165, 205, 212, + 109, 181, 211, 219, 207, 157, 0, 208, 290, 0, + 295, 94, 209, 210, 215, 110, 173, 177, 98, 127, + 108, 113, 93, 147, 213, 134, 292, 291, 294, 216, + 0, 0, 0, 0, 40, 41, 0, 37, 0, 296, + 34, 0, 298, 52, 0, 0, 0, 0, 0, 35, + 38, 0, 0, 199, 241, 39, 0, 33, 0, 0, + 36, 0, 0, 0, 0, 0, 217, 218, 123, 206, + 214, 0, 0, 110, 129, 296, 34, 298, 112, 111, + 0, 0, 0, 125, 126, 124, 0, 297, 287, 0, + 0, 289, 0, 284, 0, 299, 0, 59, 60, 61, + 62, 87, 63, 88, 64, 65, 66, 67, 68, 69, + 70, 71, 56, 72, 73, 74, 75, 76, 58, 89, + 77, 57, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 90, 0, 54, 0, 0, 46, 0, 55, 45, + 128, 0, 158, 0, 0, 0, 0, 148, 0, 0, + 0, 0, 0, 0, 138, 0, 0, 0, 132, 133, + 131, 136, 140, 139, 137, 135, 150, 149, 151, 0, + 166, 0, 162, 0, 0, 104, 103, 92, 91, 0, + 0, 102, 198, 105, 0, 106, 0, 107, 101, 242, + 243, 283, 0, 194, 187, 185, 192, 193, 191, 190, + 196, 189, 188, 186, 195, 182, 0, 170, 0, 0, + 174, 0, 0, 178, 0, 0, 104, 96, 0, 95, + 0, 100, 293, 257, 0, 258, 259, 260, 253, 0, + 254, 255, 256, 281, 282, 114, 0, 0, 0, 0, + 0, 246, 247, 203, 201, 163, 171, 167, 183, 159, + 204, 0, 110, 175, 179, 152, 141, 0, 0, 160, + 0, 0, 0, 0, 153, 0, 0, 0, 0, 0, + 145, 143, 146, 144, 142, 155, 154, 156, 0, 168, + 0, 164, 0, 202, 110, 0, 184, 199, 200, 0, + 199, 0, 0, 249, 0, 0, 0, 251, 0, 172, + 0, 0, 176, 0, 0, 180, 239, 0, 231, 240, + 234, 0, 238, 0, 199, 232, 0, 199, 0, 0, + 250, 0, 0, 0, 252, 297, 0, 273, 0, 0, + 0, 245, 0, 244, 221, 224, 0, 60, 87, 63, + 88, 65, 66, 37, 70, 71, 34, 72, 75, 35, + 38, 199, 39, 78, 33, 80, 36, 82, 83, 84, + 85, 86, 90, 222, 220, 98, 99, 104, 0, 97, + 0, 261, 262, 0, 0, 0, 264, 269, 267, 270, + 0, 0, 268, 269, 0, 265, 0, 266, 223, 272, + 0, 223, 271, 0, 274, 275, 0, 223, 276, 277, + 0, 0, 278, 0, 0, 0, 279, 280, 116, 115, + 0, 0, 0, 248, 0, 0, 0, 263, 0, 53, + 0, 50, 52, 43, 0, 49, 44, 51, 48, 42, + 0, 47, 120, 118, 122, 119, 117, 121, 0, 18, + 13, 0, 14, 10, 0, 0, 0, 24, 0, 26, + 23, 0, 25, 0, 0, 22, 34, 52, 16, 31, + 0, 11, 0, 17, 0, 20, 12, 0, 21, 34, + 52, 15, 0, 19, 32, 236, 229, 0, 237, 233, + 0, 235, 225, 0, 226, 230, 300}; const int JavaScriptGrammar::goto_default [] = { - 6, 5, 18, 1, 4, 3, 17, 498, 499, 477, - 19, 372, 44, 11, 107, 60, 458, 456, 134, 133, - 32, 457, 132, 135, 214, 56, 49, 222, 58, 38, - 221, 53, 59, 106, 57, 31, 63, 61, 293, 43, - 287, 33, 283, 35, 285, 34, 284, 54, 291, 55, - 292, 39, 286, 282, 323, 408, 288, 289, 36, 42, - 45, 50, 51, 40, 37, 62, 108, 52, 67, 104, - 105, 41, 374, 373, 20, 515, 514, 345, 346, 517, - 348, 516, 347, 414, 418, 421, 417, 416, 436, 437, - 25, 47, 124, 24, 46, 65, 64, 0}; + 6, 5, 20, 1, 4, 3, 19, 500, 501, 479, + 21, 374, 46, 11, 109, 62, 460, 458, 136, 135, + 34, 459, 134, 137, 216, 58, 51, 224, 60, 40, + 223, 55, 61, 108, 59, 33, 65, 63, 295, 45, + 289, 35, 285, 37, 287, 36, 286, 56, 293, 57, + 294, 41, 288, 284, 325, 410, 290, 291, 38, 44, + 47, 52, 53, 42, 39, 64, 110, 54, 69, 106, + 107, 43, 376, 375, 22, 517, 516, 347, 348, 519, + 350, 518, 349, 416, 420, 423, 419, 418, 438, 439, + 27, 49, 126, 26, 48, 67, 66, 0}; const int JavaScriptGrammar::action_index [] = { - -18, -88, 35, -88, 13, 262, 83, 118, -88, -88, - -88, -88, -88, 76, 71, 162, -88, -88, 249, 125, - 46, -88, 42, 41, 58, 17, -88, 52, -88, 54, - 1419, 126, -88, 156, 31, 10, -88, -88, 228, -88, - -88, -88, -88, 201, 199, -88, -88, 55, -88, -88, - -88, -88, -88, 408, 72, 79, 203, 188, -88, -88, - -88, 365, -88, 300, -88, 1419, -88, -88, 197, 204, - 80, 603, -88, -88, 1335, -88, 48, 33, 61, 37, - 1587, 64, 603, 603, 603, 441, 603, -88, -88, 603, - 603, 603, -88, -88, 44, -88, 603, 603, -88, 36, - 603, 603, 73, 59, -88, -88, -88, -88, -88, 603, - 603, 78, 185, 62, -88, 1083, -88, -88, 603, 603, - 603, -88, -88, -88, 65, -88, 74, 32, 60, 1419, - 57, -88, 81, 77, 75, -88, -88, -88, -88, -88, + 20, -88, 13, -88, -14, 289, 57, 97, -88, -88, + -88, -88, -88, 64, 70, 118, -88, -88, -88, -88, + 247, 160, 11, -88, 7, 24, 37, -9, -88, 0, + -88, -10, 1383, 126, -88, 86, -16, -39, -88, -88, + 214, -88, -88, -88, -88, 235, 161, -88, -88, 15, + -88, -88, -88, -88, -88, 574, 77, 62, 215, 195, + -88, -88, -88, 312, -88, 274, -88, 1383, -88, -88, + 150, 141, 79, 651, -88, -88, 1299, -88, -21, -8, + -4, -36, 1635, 78, 651, 651, 651, 418, 651, -88, + -88, 651, 651, 651, -88, -88, 65, -88, 651, 651, + -88, 29, 651, 651, 47, 33, -88, -88, -88, -88, + -88, 651, 651, 109, 181, 21, -88, 1131, -88, -88, + 651, 651, 651, -88, -88, -88, -28, -88, 24, -27, + -6, 1383, -17, -88, 3, 5, 35, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, - 603, -88, 1167, 56, -88, 603, -88, -88, 166, 603, - 235, 603, 603, 603, 603, 365, 603, 603, 603, 603, - 603, 603, 163, 603, 603, 603, 94, 96, 84, 300, - 300, 300, 300, 190, 365, 365, 365, 603, 10, 603, - 156, 999, 603, 603, -88, -88, -88, 131, 603, -88, - -88, 68, 30, -88, 603, -88, -88, -88, -88, -88, - 603, -88, -88, -88, -88, -88, -88, -88, -88, -88, - -88, -88, -88, -88, 603, 34, 603, 603, 63, 82, - 603, -88, 999, 603, 603, -88, 148, -88, 67, -88, - -88, -88, 124, -88, -88, -88, -88, 120, -88, -88, - -88, -88, -88, -88, 70, 66, 603, 111, 122, -88, - -88, 757, -88, 21, -24, -53, -88, 222, 5, -51, - 526, 69, 108, 266, 300, -17, 603, 251, 603, 603, - 603, 603, 250, 603, 603, 603, 603, 603, 211, 168, - 187, 167, 171, 276, 291, 270, 603, -76, 603, 1, - 603, -88, 352, 603, -88, 603, -1, -8, 603, 4, - 1335, -88, 603, 114, 1335, -88, 603, -20, 603, 603, - 69, 24, 603, -88, 18, 89, 9, -88, -88, 603, - -88, 15, 603, -88, -19, 603, -21, 1335, -88, 603, - 86, 1335, -88, 2, 1335, -88, 603, 88, 1335, 27, - 1335, -88, -88, 1335, -22, 173, 3, 170, 92, 603, - 1335, 49, 19, 85, 53, 25, 441, 47, 38, 915, - 39, 11, 43, 603, 45, -6, 603, 0, 603, -32, - -27, -88, -88, 174, -88, 603, -43, -88, 90, -88, - -88, 603, 100, -25, -88, 6, -88, 20, 106, 603, - -88, 14, 7, -88, -39, -88, 1335, -88, 99, 1335, - -88, 160, -88, -88, 93, 1335, -2, -88, -15, -13, - -88, -23, -57, -28, -88, -88, -88, -88, 603, 110, - 1335, -88, 603, 109, 1335, -88, 103, 50, 834, -88, - 40, -88, 680, -88, -88, -88, -88, -88, 107, -88, - -88, -88, -88, -88, -88, -88, 287, -88, -88, 295, - -88, -88, 12, 8, -3, 23, 603, 26, 29, 603, - 51, 1503, 28, -88, 130, 147, -88, 16, 117, -88, - 237, -88, 22, -88, -88, 1251, -88, 116, 135, -88, - 157, -88, -88, -16, -88, 195, -88, -88, 603, -88, - -88, -14, -88, -88, -88, + -88, -88, 651, -88, 1215, 10, -88, 651, -88, -88, + 176, 651, 244, 651, 651, 651, 651, 404, 651, 651, + 651, 651, 651, 651, 157, 651, 651, 651, 104, 103, + 106, 189, 190, 172, 193, 274, 292, 322, 302, 651, + 4, 651, 81, 1047, 651, 651, -88, -88, -88, 142, + 651, -88, -88, 48, -5, -88, 651, -88, -88, -88, + -88, -88, 651, -88, -88, -88, -88, -88, -88, -88, + -88, -88, -88, -88, -88, -88, 651, 59, 651, 651, + 98, 89, 651, -88, 1047, 651, 651, -88, 145, -88, + 38, -88, -88, -88, 72, -88, -88, -88, -88, 74, + -88, -88, -88, -88, -88, -88, -65, -22, 651, 121, + 87, -88, -88, 805, -88, 19, -20, -57, -88, 242, + -3, -59, 526, 50, 73, 339, 274, -25, 651, 246, + 651, 651, 651, 651, 339, 651, 651, 651, 651, 651, + 274, 274, 274, 167, 162, 339, 339, 270, 651, -46, + 651, 23, 651, -88, 489, 651, -88, 651, 27, -19, + 651, -29, 1299, -88, 651, 116, 1299, -88, 651, -12, + 651, 651, 50, 18, 651, -88, 22, 102, 16, -88, + -88, 651, -88, 25, 651, -88, -15, 651, -11, 1299, + -88, 651, 211, 1299, -88, -24, 1299, -88, 651, 111, + 1299, 28, 1299, -88, -88, 1299, 39, 205, 63, 184, + 69, 651, 1299, 88, 49, 84, 99, 66, 444, 90, + 92, 963, 51, 32, 53, 651, 131, 31, 651, 30, + 651, 36, 40, -88, -88, 206, -88, 651, 17, -88, + 56, -88, -88, 651, 100, 42, -88, 61, -88, 68, + 154, 651, -88, 60, 67, -88, 12, -88, 1299, -88, + 107, 1299, -88, 175, -88, -88, 105, 1299, -2, -88, + -35, -26, -88, -23, -34, 8, -88, -88, -88, -88, + 651, 113, 1299, -88, 651, 101, 1299, -88, 148, 14, + 728, -88, 26, -88, 882, -88, -88, -88, -88, -88, + 114, -88, -88, -88, -88, -88, -88, -88, 329, -88, + -88, 361, -88, -88, -13, -18, 34, 41, 651, 83, + 82, 651, 80, 1467, 55, -88, 119, 239, -88, 71, + 124, -88, 130, -88, 149, -88, -88, 1551, -88, 132, + 227, -88, 134, -88, -88, 44, -88, 164, -88, -88, + 651, -88, -88, 52, -88, -88, -88, - -98, -98, -98, -98, 2, -10, -98, -98, -98, -98, - -98, -98, -98, -98, -98, -98, -98, -98, 50, -98, + -98, -98, -98, -98, -2, -7, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, - 57, -98, -98, -98, -98, -98, -98, -98, -98, -98, + 184, -98, -98, -98, -98, -98, -98, -98, -98, -98, + -98, -98, 164, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, - -98, -98, -98, -36, -98, -98, -98, -98, -98, -98, - -98, -98, -98, -98, -98, 191, -98, -98, -98, -98, - -98, 68, -98, -98, 67, -98, -98, -98, -98, -98, - -98, -98, 41, 114, 150, 232, 153, -98, -98, 146, - 149, 47, -98, -98, -98, -98, 25, 89, -98, -29, - 85, 80, -98, -98, -98, -98, -98, -98, -98, 103, - 108, -98, -98, -98, -98, -98, -98, -98, 105, 100, - 96, -98, -98, -98, -98, -98, -68, -98, -98, 176, + -98, -98, -98, -98, -98, -32, -98, -98, -98, -98, + -98, -98, -98, -98, -98, -98, -98, 181, -98, -98, + -98, -98, -98, 105, -98, -98, -5, -98, -98, -98, + -98, -98, -98, -98, 51, 79, 84, 44, 91, -98, + -98, 42, 55, 52, -98, -98, -98, -98, 45, 110, + -98, -12, 125, 128, -98, -98, -98, -98, -98, -98, + -98, 131, 132, -98, -98, -98, -98, -98, -98, -98, + 111, 120, 116, -98, -98, -98, -98, -98, -63, -98, + -98, 182, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, + -98, -98, 35, -98, 25, -98, -98, 39, -98, -98, + -98, 56, -98, 59, 61, 62, 60, -98, 46, 43, + 47, 49, 53, 95, -98, 97, 83, 72, -98, -98, + -98, -98, -98, -98, -98, -98, -98, -98, -98, 70, + -98, 80, -98, 17, 33, 15, -98, -98, -98, -98, + 10, -98, -98, -98, -98, -98, 30, -98, -98, -98, + -98, -98, 34, -98, -98, -98, -98, -98, -98, -98, + -98, -98, -98, -98, -98, -98, 63, -98, 88, 36, + -98, -98, 38, -98, 82, 37, 89, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, - -12, -98, -13, -98, -98, 7, -98, -98, -98, 118, - -98, 117, 119, 141, 121, -98, 128, 130, 124, 140, - 83, 51, -98, 48, 62, 55, -98, -98, -98, -98, - -98, -98, -98, -98, -98, -98, -98, 60, -98, 54, - -98, 31, 37, 43, -98, -98, -98, -98, 22, -98, - -98, -98, -98, -98, 42, -98, -98, -98, -98, -98, - 45, -98, -98, -98, -98, -98, -98, -98, -98, -98, - -98, -98, -98, -98, 61, -98, 58, -20, -98, -98, - -7, -98, 52, 4, 53, -98, -98, -98, -98, -98, - -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, - -98, -98, -98, -98, -98, -98, 9, -98, -98, -98, - -98, 138, -98, -98, -98, -98, -98, -98, -98, -98, - -98, -98, -98, -98, -98, -98, 194, -98, 167, 170, - 180, 186, -98, 73, 76, 90, 92, 99, -98, -98, - -98, -98, -98, -98, -98, -98, 196, -98, 184, -98, - 161, -98, -98, 160, -98, 112, -98, -98, 120, -98, - 6, -98, 12, -98, 17, -98, 163, -98, 164, 157, - -98, -98, 154, -98, -98, -98, -98, -98, -98, 192, - -98, -28, 113, -98, -98, 86, -98, 49, -98, 20, - -98, 28, -98, -98, 35, -98, 36, -98, 24, -98, - 30, -98, -98, 29, -98, -98, -98, -98, -98, 77, - 67, -98, -98, -98, -98, -98, 115, -98, -98, 19, - -98, -98, -98, 26, -98, -24, 84, -98, 69, -98, - -98, -98, -98, -98, -98, 126, -98, -98, -98, -98, - -98, 39, -98, -98, -98, -98, -98, -42, -98, 18, - -98, -82, -98, -98, -98, -98, -67, -98, -98, -71, - -98, -98, -98, -98, -98, -98, -86, -98, -98, -35, - -98, -98, -98, -33, -98, -98, -98, -98, 14, -98, - 8, -98, -2, -98, 1, -98, -98, -98, -9, -98, - -1, -98, -6, -98, -98, -98, -98, -98, -98, -98, - -98, -98, -98, -98, -98, -98, 82, -98, -98, 159, - -98, -98, -98, -98, -98, -98, 40, -98, -98, 46, - -98, 44, -98, -98, 38, 23, -98, 27, -98, -98, - -98, -98, 64, -98, -98, 33, -98, 34, 59, -98, - -98, -98, -98, -98, -98, -98, -98, -98, -14, -98, - -98, -56, -98, -98, -98}; + -98, -98, -98, -98, -98, -98, -98, -98, 32, -98, + -98, -98, -98, 94, -98, -98, -98, -98, -98, -98, + -98, -98, -98, -98, -98, -98, -98, -98, 179, -98, + 189, 176, 251, 175, -98, 133, 143, 149, 137, 109, + -98, -98, -98, -98, -98, -98, -98, -98, 165, -98, + 166, -98, 186, -98, -98, 193, -98, 121, -98, -98, + 136, -98, 31, -98, 19, -98, 21, -98, 195, -98, + 187, 185, -98, -98, 152, -98, -98, -98, -98, -98, + -98, 151, -98, -54, 134, -98, -98, 117, -98, 22, + -98, 24, -98, 28, -98, -98, 27, -98, 29, -98, + 26, -98, 23, -98, -98, 14, -98, -98, -98, -98, + -98, 106, 50, -98, -98, -98, -98, -98, 129, -98, + -98, 40, -98, -98, -98, 41, -98, 13, 119, -98, + 69, -98, -98, -98, -98, -98, -98, 107, -98, -98, + -98, -98, -98, 48, -98, -98, -98, -98, -98, -44, + -98, -10, -98, -79, -98, -98, -98, -98, -72, -98, + -98, -68, -98, -98, -98, -98, -98, -98, -71, -98, + -98, -41, -98, -98, -98, -37, -98, -98, -98, -98, + 92, -98, -1, -98, 2, -98, 4, -98, -98, -98, + 8, -98, -3, -98, 9, -98, -98, -98, -98, -98, + -98, -98, -98, -98, -98, -98, -98, -98, 153, -98, + -98, 172, -98, -98, -98, -98, -98, -98, -4, -98, + -98, 7, -98, 5, -98, -98, 3, 1, -98, 0, + -98, -98, -98, -98, 57, -98, -98, 12, -98, 11, + 113, -98, -98, -98, -98, -98, -98, -98, -98, -98, + 6, -98, -98, -75, -98, -98, -98}; const int JavaScriptGrammar::action_info [] = { - 318, 518, 296, 443, 448, 435, 442, 218, 415, 452, - 325, 419, 344, 320, 426, 513, 425, 407, 439, 419, - 435, 441, 296, 318, 316, 419, 485, 435, 316, -226, - 486, 342, -225, 402, 218, 349, 489, 488, 23, 357, - 359, 484, 355, 370, 344, -56, -55, 411, 459, 476, - -77, 497, -79, 328, -74, 281, -66, 512, 465, 218, - -54, 366, 363, 175, 330, 244, 27, 2, 364, 435, - 26, 336, 459, 366, 244, 513, 224, 29, 23, 207, - 411, 28, 207, 524, 281, 172, 209, 30, 170, 250, - 226, 125, 128, 129, 218, 452, 218, 351, 2, 438, - 7, 126, 276, 26, 476, 22, 429, 218, 218, 448, - 229, 460, 131, 439, 125, 218, 422, 218, 218, 218, - 116, -294, 218, 364, 109, 502, 0, 259, 0, 246, - 177, 117, 491, 247, 109, 110, 109, 364, 0, 218, - 492, 272, 271, 459, 275, 110, 361, 110, 368, 476, - 352, 410, 409, 272, 271, 459, 218, 179, 338, 461, - 413, 423, 339, 476, 497, 502, 109, 469, 218, 454, - 450, 278, 482, 503, 334, 0, 497, 110, 118, 9, - 8, 270, 269, 280, 279, 265, 264, 219, 193, 252, - 194, 483, 193, 193, 194, 194, 193, 118, 194, 267, - 118, 195, 262, 521, 257, 195, 195, 218, 253, 195, - 405, 0, 193, 511, 194, 193, 0, 194, 252, 181, - 182, 433, 432, 119, 0, 195, 262, 0, 195, 120, - 0, 268, 266, 267, 263, 261, 193, 253, 194, 254, - 298, 299, 119, 211, 505, 119, 183, 184, 120, 195, - 0, 120, 492, 181, 182, 0, 522, 520, 263, 261, - 228, 227, 212, 0, 213, 268, 266, 300, 301, 298, - 299, 13, 0, 303, 304, 0, 0, 0, 14, 0, - 183, 184, 305, 0, 13, 306, 0, 307, 0, 303, - 304, 14, 0, 303, 304, 0, 300, 301, 305, 303, - 304, 306, 305, 307, 0, 306, 0, 307, 305, 13, - 0, 306, 0, 307, 303, 304, 14, 13, 0, 0, - 0, 16, 0, 305, 14, 193, 306, 194, 307, 0, - 12, 0, 0, 15, 16, 0, 0, 0, 195, 0, - 0, 0, 478, 12, 0, 0, 15, 0, 0, 0, - 480, 0, 0, 0, 0, 231, 0, 0, 0, 16, - 0, 0, 0, 0, 0, 232, 0, 16, 12, 233, - 0, 15, 0, 0, 0, 0, 12, 0, 234, 15, - 235, 0, 0, 0, 0, 0, 0, 0, 186, 187, - 0, 236, 0, 237, 116, 0, 188, 189, 0, 0, - 190, 238, 191, 0, 239, 117, 0, 0, 0, 0, - 240, 231, 0, 0, 0, 0, 241, 0, 0, 0, - 0, 232, 0, 0, 0, 233, 0, 0, 0, 242, - 0, 0, 0, 0, 234, 0, 235, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 236, 0, 237, - 116, 0, 0, 72, 73, 0, 0, 238, 0, 0, - 239, 117, 0, 113, 0, 0, 240, 0, 0, 0, - 114, 0, 241, 0, 115, 81, 0, 82, 0, 0, - 0, 0, 0, 0, 85, 242, 0, 0, 88, 0, + 368, 443, 327, 366, 346, 322, 444, 437, 128, 277, + 172, 490, 25, 174, 278, 283, 486, 177, 441, 320, + 298, 365, 467, 32, 298, 344, 445, 131, 318, 30, + 320, 332, 209, 130, 461, 220, 318, 211, 133, 351, + 515, 437, 330, 25, 372, 29, 357, 361, 488, 359, + 127, 31, 338, 28, 346, 228, 226, 526, -57, -228, + -79, 520, 437, 487, 437, 421, 421, 427, 413, 454, + 231, 2, 450, 421, 428, 417, 454, 409, 7, 246, + 211, 515, 181, 450, 514, 283, 461, 181, 220, 491, + 179, 220, -227, 24, 404, -68, 252, -76, 261, -58, + 246, 413, 368, 478, 478, 2, -56, 209, 220, 220, + 353, 440, 248, 127, 431, 220, 249, 412, 411, 220, + -296, 220, 220, 340, 220, 441, 366, 341, 484, 220, + 274, 273, 504, 267, 266, 272, 271, 507, -81, 366, + 274, 273, 504, 111, 111, 494, 111, 485, 282, 281, + 220, 118, 478, 220, 112, 112, 462, 112, 9, 8, + 415, 456, 119, 354, 424, 478, 111, 493, 0, 220, + 269, 370, 523, 452, 471, 494, 336, 112, 499, 264, + 505, 280, 195, 220, 196, 0, 0, 195, 120, 196, + 513, 0, 195, 120, 196, 197, 0, 195, 221, 196, + 197, 259, 270, 268, 463, 197, 0, 120, 17, 425, + 197, 265, 263, 269, 195, 195, 196, 196, 195, 220, + 196, 254, 230, 229, 0, 524, 522, 197, 197, 213, + 254, 197, 16, 121, 264, 461, 435, 434, 121, 122, + 255, 0, 407, 0, 122, 270, 268, 461, 214, 255, + 215, 256, 121, 183, 184, 0, 499, 0, 122, 0, + 300, 301, 183, 184, 300, 301, 265, 263, 499, 13, + 0, 363, 0, 0, 0, 0, 14, 0, 0, 0, + 185, 186, 0, 0, 0, 0, 17, 302, 303, 185, + 186, 302, 303, 305, 306, 0, 0, 0, 17, 195, + 0, 196, 307, 0, 0, 308, 17, 309, 0, 0, + 16, 13, 197, 0, 0, 188, 189, 0, 14, 18, + 0, 0, 16, 190, 191, 188, 189, 192, 12, 193, + 16, 15, 0, 190, 191, 188, 189, 192, 0, 193, + 0, 0, 0, 190, 191, 188, 189, 192, 17, 193, + 0, 13, 0, 190, 191, 0, 0, 192, 14, 193, + 0, 18, 305, 306, 0, 0, 0, 0, 0, 0, + 12, 307, 16, 15, 308, 0, 309, 0, 0, 0, + 0, 0, 0, 13, 480, 0, 0, 0, 17, 0, + 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, + 12, 0, 16, 15, 0, 0, 482, 0, 0, 0, + 17, 0, 0, 0, 0, 0, 0, 188, 189, 0, + 74, 75, 0, 18, 0, 190, 191, 0, 0, 192, + 115, 193, 12, 0, 16, 15, 0, 116, 0, 0, + 0, 117, 83, 0, 84, 0, 74, 75, 0, 0, + 0, 87, 0, 0, 0, 90, 115, 0, 0, 0, + 0, 0, 0, 116, 0, 0, 0, 117, 83, 0, + 84, 0, 0, 95, 0, 97, 0, 87, 0, 0, + 0, 90, 233, 0, 0, 0, 89, 100, 77, 0, + 0, 0, 234, 0, 0, 0, 235, 0, 0, 95, + 0, 97, 0, 0, 0, 236, 0, 237, 0, 0, + 0, 0, 89, 100, 77, 0, 0, 0, 238, 233, + 239, 118, 0, 0, 0, 0, 0, 0, 240, 234, + 0, 241, 119, 235, 0, 0, 0, 242, 0, 0, + 0, 0, 236, 243, 237, 0, 0, 334, 0, 0, + 0, 0, 0, 0, 0, 238, 244, 239, 118, 0, + 0, 0, 0, 0, 0, 240, 0, 233, 241, 119, + 0, 0, 0, 0, 242, 0, 0, 234, 0, 0, + 243, 235, 0, 0, 0, 0, 0, 0, 0, 0, + 236, 0, 237, 244, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 238, 0, 239, 118, 0, 0, 0, + 0, 0, 0, 240, 0, 0, 241, 119, 0, 0, + 0, 0, 242, 0, 0, 0, 0, 0, 243, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 244, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 73, 74, 75, 0, 0, 0, 0, 0, + 0, 0, 0, 115, 0, 0, 0, 0, 0, 0, + 116, 0, 0, 0, 117, 83, 0, 84, 0, 0, + 0, 85, 0, 86, 87, 88, 0, 0, 90, 0, + 0, 0, 91, 0, 92, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 95, 0, 97, 0, + 99, 0, 102, 0, 103, 0, 0, 0, 0, 89, + 100, 77, 0, 0, 0, 0, 0, 0, 0, 73, + 74, 75, 0, 0, 0, 0, 0, 0, 0, 0, + 115, 0, 0, 0, 0, 0, 0, 116, 0, 0, + 0, 117, 83, 0, 84, 0, 0, 0, 85, 0, + 86, 87, 88, 0, 0, 90, 0, 0, 0, 91, + 0, 92, 0, 0, 469, 0, 0, 0, 0, 0, + 0, 0, 0, 95, 0, 97, 0, 99, 0, 102, + 0, 103, 0, 0, 0, 0, 89, 100, 77, 0, + 0, 0, 0, 0, 0, 0, 73, 74, 75, 0, + 0, 0, 0, 0, 0, 0, 0, 115, 0, 0, + 0, 0, 0, 0, 116, 0, 0, 0, 117, 83, + 0, 84, 0, 0, 0, 85, 0, 86, 87, 88, + 0, 0, 90, 0, 0, 0, 91, 0, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 93, 0, 95, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, - 98, 75, 0, 0, 0, 0, 0, 0, 0, 231, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, - 0, 0, 0, 233, 0, 0, 0, 0, 0, 0, - 0, 0, 234, 0, 235, 0, 0, 332, 0, 0, - 0, 0, 0, 0, 0, 236, 0, 237, 116, 0, - 0, 0, 0, 0, 0, 238, 0, 0, 239, 117, - 0, 0, 0, 0, 240, 0, 0, 0, 0, 0, - 241, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 242, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 71, 72, 73, 0, 0, 0, - 0, 0, 0, 0, 0, 113, 0, 0, 0, 0, - 0, 0, 114, 0, 0, 0, 115, 81, 0, 82, - 0, 0, 0, 83, 0, 84, 85, 86, 0, 0, - 88, 0, 0, 0, 89, 0, 90, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 93, 0, - 95, 0, 97, 0, 100, 0, 101, 0, 0, 0, - 0, 87, 98, 75, 0, 0, 0, 0, 0, 0, - 0, 71, 72, 73, 0, 0, 0, 0, 0, 0, - 0, 0, 113, 0, 0, 0, 0, 0, 0, 114, - 0, 0, 0, 115, 81, 0, 82, 0, 0, 0, - 83, 0, 84, 85, 86, 0, 0, 88, 0, 0, - 0, 89, 0, 90, 0, 0, 464, 0, 0, 0, - 0, 0, 0, 0, 0, 93, 0, 95, 0, 97, - 0, 100, 0, 101, 0, 0, 0, 0, 87, 98, - 75, 0, 0, 0, 0, 0, 0, 0, 71, 72, - 73, 0, 0, 0, 0, 0, 0, 0, 0, 113, - 0, 0, 0, 0, 0, 0, 114, 0, 0, 0, - 115, 81, 0, 82, 0, 0, 0, 83, 0, 84, - 85, 86, 0, 0, 88, 0, 0, 0, 89, 0, - 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 93, 0, 95, 0, 97, 0, 100, 295, - 101, 0, 0, 0, 0, 87, 98, 75, 0, 0, - 0, 0, 0, 0, 0, 71, 72, 73, 0, 0, - 0, 0, 0, 0, 0, 0, 113, 0, 0, 0, - 0, 0, 0, 114, 0, 0, 0, 115, 81, 0, - 82, 0, 0, 0, 83, 0, 84, 85, 86, 0, - 0, 88, 0, 0, 0, 89, 0, 90, 0, 0, - 467, 0, 0, 0, 0, 0, 0, 0, 0, 93, - 0, 95, 0, 97, 0, 100, 0, 101, 0, 0, - 0, 0, 87, 98, 75, 0, 0, 0, 0, 0, - 0, 0, -75, 0, 0, 0, 71, 72, 73, 0, - 0, 0, 0, 0, 0, 0, 0, 113, 0, 0, - 0, 0, 0, 0, 114, 0, 0, 0, 115, 81, - 0, 82, 0, 0, 0, 83, 0, 84, 85, 86, - 0, 0, 88, 0, 0, 0, 89, 0, 90, 0, + 95, 0, 97, 0, 99, 0, 102, 297, 103, 0, + 0, 0, 0, 89, 100, 77, 0, 0, 0, 0, + 0, 0, 0, 73, 74, 75, 0, 0, 0, 0, + 0, 0, 0, 0, 115, 0, 0, 0, 0, 0, + 0, 116, 0, 0, 0, 117, 83, 0, 84, 0, + 0, 0, 85, 0, 86, 87, 88, 0, 0, 90, + 0, 0, 0, 91, 0, 92, 0, 0, 466, 0, + 0, 0, 0, 0, 0, 0, 0, 95, 0, 97, + 0, 99, 0, 102, 0, 103, 0, 0, 0, 0, + 89, 100, 77, 0, 0, 0, 0, 0, 0, 0, + -77, 0, 0, 0, 73, 74, 75, 0, 0, 0, + 0, 0, 0, 0, 0, 115, 0, 0, 0, 0, + 0, 0, 116, 0, 0, 0, 117, 83, 0, 84, + 0, 0, 0, 85, 0, 86, 87, 88, 0, 0, + 90, 0, 0, 0, 91, 0, 92, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 95, 0, + 97, 0, 99, 0, 102, 0, 103, 0, 0, 0, + 0, 89, 100, 77, 0, 0, 0, 0, 0, 0, + 0, 138, 139, 140, 0, 0, 142, 144, 145, 0, + 0, 146, 0, 147, 0, 0, 0, 149, 150, 151, + 0, 0, 0, 0, 0, 0, 218, 153, 154, 155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 93, 0, 95, 0, 97, 0, 100, 0, 101, 0, - 0, 0, 0, 87, 98, 75, 0, 0, 0, 0, - 0, 0, 0, 136, 137, 138, 0, 0, 140, 142, - 143, 0, 0, 144, 0, 145, 0, 0, 0, 147, - 148, 149, 0, 0, 0, 0, 0, 0, 216, 151, - 152, 153, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 154, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 158, 0, - 0, 0, 0, 0, 0, 160, 161, 162, 0, 164, - 165, 166, 167, 168, 169, 0, 0, 155, 163, 146, - 139, 141, 157, 0, 0, 0, 0, 136, 137, 138, - 0, 0, 140, 142, 143, 0, 0, 144, 0, 145, - 0, 0, 0, 147, 148, 149, 0, 0, 0, 0, - 0, 0, 150, 151, 152, 153, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 154, 0, 0, 0, 156, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 158, 0, 0, 0, 0, 0, 159, 160, - 161, 162, 0, 164, 165, 166, 167, 168, 169, 0, - 0, 155, 163, 146, 139, 141, 157, 0, 0, 0, - 0, 136, 137, 138, 0, 0, 140, 142, 143, 0, - 0, 144, 0, 145, 0, 0, 0, 147, 148, 149, - 0, 0, 0, 0, 0, 0, 150, 151, 152, 153, + 0, 0, 0, 0, 0, 0, 160, 0, 0, 0, + 0, 0, 0, 162, 163, 164, 0, 166, 167, 168, + 169, 170, 171, 0, 0, 157, 165, 148, 141, 143, + 159, 0, 0, 0, 0, 138, 139, 140, 0, 0, + 142, 144, 145, 0, 0, 146, 0, 147, 0, 0, + 0, 149, 150, 151, 0, 0, 0, 0, 0, 0, + 152, 153, 154, 155, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 156, 0, 0, 0, 158, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 154, 0, 0, 0, 156, 0, 0, 0, 0, 0, - 0, 0, 174, 0, 0, 0, 158, 0, 0, 0, - 0, 0, 159, 160, 161, 162, 0, 164, 165, 166, - 167, 168, 169, 0, 0, 155, 163, 146, 139, 141, - 157, 0, 0, 0, 0, 68, 0, 0, 0, 0, - 69, 0, 71, 72, 73, 74, 0, 0, 0, 0, - 0, 0, 76, 113, 0, 0, 0, 0, 0, 0, - 507, 79, 0, 0, 80, 508, 0, 82, 0, 0, - 0, 83, 0, 84, 85, 86, 0, 0, 88, 0, - 0, 0, 89, 0, 90, 0, 0, 0, 0, 0, - 91, 0, 92, 0, 0, 0, 93, 94, 95, 96, - 97, 99, 100, 16, 101, 102, 103, 0, 0, 87, - 98, 75, 12, 70, 0, 0, 0, 0, 0, 68, - 0, 0, 0, 0, 69, 0, 71, 72, 73, 74, - 0, 0, 0, 0, 0, 0, 76, 113, 0, 0, - 0, 0, 0, 0, 78, 79, 0, 0, 80, 81, - 0, 82, 0, 0, 0, 83, 0, 84, 85, 86, - 0, 0, 88, 0, 0, 0, 89, 0, 90, 0, - 0, 0, 0, 0, 91, 0, 92, 0, 0, 0, - 93, 94, 95, 96, 97, 99, 100, 16, 101, 102, - 103, 0, 0, 87, 98, 75, 12, 70, 0, 0, - 0, 0, 0, 68, 0, 0, 0, 0, 69, 0, - 71, 72, 73, 74, 0, 0, 0, 0, 0, 0, - 76, 77, 0, 0, 0, 0, 0, 0, 78, 79, - 0, 0, 80, 81, 0, 82, 0, 0, 0, 83, - 0, 84, 85, 86, 0, 0, 88, 0, 0, 0, - 89, 0, 90, 0, 0, 0, 0, 0, 91, 0, - 92, 0, 0, 0, 93, 94, 95, 96, 97, 99, - 100, 16, 101, 102, 103, 0, 0, 87, 98, 75, - 12, 70, 0, 0, 0, 0, 0, 68, 0, 0, - 0, 0, 69, 0, 71, 72, 73, 74, 0, 0, - 0, 0, 0, 0, 76, 113, 0, 0, 0, 0, - 0, 0, 494, 79, 0, 0, 80, 495, 0, 82, - 0, 0, 0, 83, 0, 84, 85, 86, 0, 0, - 88, 0, 0, 0, 89, 0, 90, 0, 0, 0, - 0, 0, 91, 0, 92, 0, 0, 0, 93, 94, - 95, 96, 97, 99, 100, 16, 101, 102, 103, 0, - 0, 87, 98, 75, 12, 70, 0, 0, 0, 0, - 0, 375, 137, 138, 0, 0, 377, 142, 379, 72, - 73, 380, 0, 145, 0, 0, 0, 147, 382, 383, - 0, 0, 0, 0, 0, 0, 384, 385, 152, 153, - 80, 81, 0, 82, 0, 0, 0, 83, 0, 84, - 386, 86, 0, 0, 388, 0, 0, 0, 89, 0, - 90, 0, -221, 0, 0, 0, 389, 0, 92, 0, - 0, 0, 390, 391, 392, 393, 97, 395, 396, 397, - 398, 399, 400, 0, 0, 387, 394, 381, 376, 378, - 157, 0, 0, 0, 0, + 160, 0, 0, 0, 0, 0, 161, 162, 163, 164, + 0, 166, 167, 168, 169, 170, 171, 0, 0, 157, + 165, 148, 141, 143, 159, 0, 0, 0, 0, 138, + 139, 140, 0, 0, 142, 144, 145, 0, 0, 146, + 0, 147, 0, 0, 0, 149, 150, 151, 0, 0, + 0, 0, 0, 0, 152, 153, 154, 155, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 156, 0, + 0, 0, 158, 0, 0, 0, 0, 0, 0, 0, + 176, 0, 0, 0, 160, 0, 0, 0, 0, 0, + 161, 162, 163, 164, 0, 166, 167, 168, 169, 170, + 171, 0, 0, 157, 165, 148, 141, 143, 159, 0, + 0, 0, 0, 70, 0, 0, 0, 0, 71, 0, + 73, 74, 75, 76, 0, 0, 0, 0, 0, 0, + 78, 115, 0, 0, 0, 0, 0, 0, 80, 81, + 0, 0, 82, 83, 0, 84, 0, 0, 0, 85, + 0, 86, 87, 88, 0, 0, 90, 0, 0, 0, + 91, 0, 92, 0, 0, 0, 0, 0, 93, 0, + 94, 0, 0, 0, 95, 96, 97, 98, 99, 101, + 102, 18, 103, 104, 105, 0, 0, 89, 100, 77, + 12, 72, 0, 0, 0, 0, 0, 70, 0, 0, + 0, 0, 71, 0, 73, 74, 75, 76, 0, 0, + 0, 0, 0, 0, 78, 79, 0, 0, 0, 0, + 0, 0, 80, 81, 0, 0, 82, 83, 0, 84, + 0, 0, 0, 85, 0, 86, 87, 88, 0, 0, + 90, 0, 0, 0, 91, 0, 92, 0, 0, 0, + 0, 0, 93, 0, 94, 0, 0, 0, 95, 96, + 97, 98, 99, 101, 102, 18, 103, 104, 105, 0, + 0, 89, 100, 77, 12, 72, 0, 0, 0, 0, + 0, 70, 0, 0, 0, 0, 71, 0, 73, 74, + 75, 76, 0, 0, 0, 0, 0, 0, 78, 115, + 0, 0, 0, 0, 0, 0, 496, 81, 0, 0, + 82, 497, 0, 84, 0, 0, 0, 85, 0, 86, + 87, 88, 0, 0, 90, 0, 0, 0, 91, 0, + 92, 0, 0, 0, 0, 0, 93, 0, 94, 0, + 0, 0, 95, 96, 97, 98, 99, 101, 102, 18, + 103, 104, 105, 0, 0, 89, 100, 77, 12, 72, + 0, 0, 0, 0, 0, 70, 0, 0, 0, 0, + 71, 0, 73, 74, 75, 76, 0, 0, 0, 0, + 0, 0, 78, 115, 0, 0, 0, 0, 0, 0, + 509, 81, 0, 0, 82, 510, 0, 84, 0, 0, + 0, 85, 0, 86, 87, 88, 0, 0, 90, 0, + 0, 0, 91, 0, 92, 0, 0, 0, 0, 0, + 93, 0, 94, 0, 0, 0, 95, 96, 97, 98, + 99, 101, 102, 18, 103, 104, 105, 0, 0, 89, + 100, 77, 12, 72, 0, 0, 0, 0, 0, 377, + 139, 140, 0, 0, 379, 144, 381, 74, 75, 382, + 0, 147, 0, 0, 0, 149, 384, 385, 0, 0, + 0, 0, 0, 0, 386, 387, 154, 155, 82, 83, + 0, 84, 0, 0, 0, 85, 0, 86, 388, 88, + 0, 0, 390, 0, 0, 0, 91, 0, 92, 0, + -223, 0, 0, 0, 391, 0, 94, 0, 0, 0, + 392, 393, 394, 395, 99, 397, 398, 399, 400, 401, + 402, 0, 0, 389, 396, 383, 378, 380, 159, 0, + 0, 0, 0, - 249, 430, 424, 440, 21, 427, 519, 10, 171, 173, - 453, 466, 455, 251, 463, 462, 256, 331, 230, 451, - 523, 277, 127, 445, 333, 444, 449, 176, 335, 434, - 428, 326, 360, 500, 434, 369, 501, 431, 431, 362, - 401, 371, 220, 509, 506, 420, 365, 496, 367, 217, - 353, 412, 487, 468, 215, 493, 481, 0, 490, 326, - 358, 0, 225, 223, 21, 243, 510, 0, 66, 500, - 48, 0, 504, 223, 500, 215, 255, 0, 274, 111, - 258, 0, 111, 196, 479, 111, 111, 203, 0, 111, - 198, 111, 111, 111, 0, 210, 21, 197, 326, 111, - 111, 273, 447, 208, 111, 248, 245, 111, 111, 308, - 273, 111, 309, 447, 111, 111, 111, 446, 446, 202, - 111, 111, 475, 111, 326, 326, 310, 111, 311, 123, - 111, 111, 326, 122, 111, 312, 111, 112, 121, 111, - 403, 356, 178, 404, 0, 111, 223, 470, 111, 111, - 111, 0, 111, 406, 185, 111, 204, 180, 206, 111, - 200, 111, 0, 0, 192, 481, 199, 327, 354, 290, - 0, 111, 111, 21, 294, 329, 201, 111, 205, 473, - 111, 111, 474, 471, 111, 322, 472, 66, 322, 48, - 294, 322, 322, 294, 111, 111, 294, 294, 111, 294, - 294, 111, 66, 294, 48, 302, 294, 343, 313, 337, - 341, 111, 340, 324, 321, 111, 294, 111, 314, 0, - 294, 0, 294, 322, 315, 111, 319, 111, 294, 0, - 294, 0, 294, 0, 297, 0, 0, 0, 0, 0, - 317, 0, 0, 0, 0, 350, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 403, 0, 0, - 404, 0, 0, 0, 0, 0, 0, 130, 0, 0, + 429, 525, 430, 10, 432, 426, 276, 23, 489, 503, + 453, 502, 498, 464, 455, 457, 495, 447, 442, 492, + 511, 446, 232, 508, 355, 403, 521, 129, 468, 465, + 222, 335, 337, 360, 373, 225, 362, 371, 367, 364, + 217, 369, 333, 422, 279, 219, 436, 175, 0, 258, + 227, 0, 328, 433, 245, 173, 251, 433, 253, 178, + 414, 276, 0, 470, 328, 506, 0, 502, 0, 405, + 0, 436, 406, 113, 113, 475, 0, 113, 113, 201, + 113, 0, 194, 202, 113, 203, 113, 113, 476, 204, + 113, 113, 113, 113, 113, 182, 187, 208, 206, 207, + 113, 113, 449, 113, 451, 217, 257, 200, 247, 225, + 113, 113, 472, 210, 113, 113, 260, 473, 199, 113, + 512, 212, 113, 502, 474, 292, 113, 225, 113, 328, + 296, 205, 198, 328, 408, 250, 113, 113, 275, 275, + 113, 113, 113, 477, 123, 314, 328, 113, 328, 125, + 113, 113, 448, 124, 405, 481, 113, 406, 448, 113, + 0, 449, 113, 113, 113, 114, 180, 23, 113, 310, + 0, 0, 358, 313, 113, 68, 329, 50, 483, 311, + 113, 0, 324, 324, 0, 312, 23, 296, 296, 356, + 483, 331, 68, 68, 50, 50, 113, 113, 23, 0, + 0, 296, 296, 0, 352, 345, 113, 113, 321, 319, + 113, 296, 296, 317, 315, 296, 324, 324, 113, 299, + 113, 296, 296, 296, 324, 296, 113, 304, 0, 296, + 0, 296, 0, 0, 0, 342, 0, 0, 343, 323, + 0, 339, 0, 0, 0, 0, 326, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 260, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 132, 0, 0, 0, 262, 0, 0, + 0, 0, 113, 0, 0, 0, 0, 296, 0, 316, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0}; const int JavaScriptGrammar::action_check [] = { - 76, 17, 1, 60, 36, 33, 29, 8, 33, 36, - 61, 5, 29, 8, 7, 29, 55, 60, 20, 5, - 33, 36, 1, 76, 48, 5, 29, 33, 48, 29, - 7, 7, 29, 55, 8, 17, 7, 29, 36, 60, - 31, 29, 61, 16, 29, 7, 7, 36, 8, 33, - 7, 29, 7, 61, 7, 36, 7, 29, 8, 8, - 7, 36, 29, 7, 60, 2, 8, 85, 7, 33, - 29, 2, 8, 36, 2, 29, 8, 60, 36, 48, - 36, 29, 48, 0, 36, 8, 76, 33, 7, 7, - 60, 29, 60, 33, 8, 36, 8, 8, 85, 6, - 65, 36, 36, 29, 33, 29, 7, 8, 8, 36, - 55, 8, 55, 20, 29, 8, 10, 8, 8, 8, - 42, 36, 8, 7, 40, 8, -1, 60, -1, 50, - 55, 53, 7, 54, 40, 51, 40, 7, -1, 8, - 15, 61, 62, 8, 74, 51, 60, 51, 60, 33, - 61, 61, 62, 61, 62, 8, 8, 1, 50, 56, - 60, 55, 54, 33, 29, 8, 40, 60, 8, 60, - 60, 60, 10, 56, 60, -1, 29, 51, 12, 61, - 62, 61, 62, 61, 62, 61, 62, 56, 25, 15, - 27, 29, 25, 25, 27, 27, 25, 12, 27, 29, - 12, 38, 29, 8, 56, 38, 38, 8, 34, 38, - 36, -1, 25, 56, 27, 25, -1, 27, 15, 18, - 19, 61, 62, 57, -1, 38, 29, -1, 38, 63, - -1, 61, 62, 29, 61, 62, 25, 34, 27, 36, - 18, 19, 57, 15, 7, 57, 45, 46, 63, 38, - -1, 63, 15, 18, 19, -1, 61, 62, 61, 62, - 61, 62, 34, -1, 36, 61, 62, 45, 46, 18, - 19, 22, -1, 23, 24, -1, -1, -1, 29, -1, - 45, 46, 32, -1, 22, 35, -1, 37, -1, 23, - 24, 29, -1, 23, 24, -1, 45, 46, 32, 23, - 24, 35, 32, 37, -1, 35, -1, 37, 32, 22, - -1, 35, -1, 37, 23, 24, 29, 22, -1, -1, - -1, 72, -1, 32, 29, 25, 35, 27, 37, -1, - 81, -1, -1, 84, 72, -1, -1, -1, 38, -1, - -1, -1, 55, 81, -1, -1, 84, -1, -1, -1, - 55, -1, -1, -1, -1, 3, -1, -1, -1, 72, - -1, -1, -1, -1, -1, 13, -1, 72, 81, 17, - -1, 84, -1, -1, -1, -1, 81, -1, 26, 84, - 28, -1, -1, -1, -1, -1, -1, -1, 23, 24, - -1, 39, -1, 41, 42, -1, 31, 32, -1, -1, - 35, 49, 37, -1, 52, 53, -1, -1, -1, -1, - 58, 3, -1, -1, -1, -1, 64, -1, -1, -1, - -1, 13, -1, -1, -1, 17, -1, -1, -1, 77, - -1, -1, -1, -1, 26, -1, 28, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 39, -1, 41, - 42, -1, -1, 12, 13, -1, -1, 49, -1, -1, - 52, 53, -1, 22, -1, -1, 58, -1, -1, -1, - 29, -1, 64, -1, 33, 34, -1, 36, -1, -1, - -1, -1, -1, -1, 43, 77, -1, -1, 47, -1, + 36, 36, 61, 7, 29, 8, 29, 33, 36, 74, + 7, 29, 36, 8, 36, 36, 29, 7, 20, 76, + 1, 29, 8, 33, 1, 7, 60, 33, 48, 29, + 76, 60, 48, 60, 8, 8, 48, 76, 55, 17, + 29, 33, 61, 36, 16, 8, 61, 31, 7, 60, + 29, 60, 2, 29, 29, 60, 8, 0, 7, 29, + 7, 17, 33, 29, 33, 5, 5, 55, 36, 36, + 55, 85, 36, 5, 7, 33, 36, 60, 65, 2, + 76, 29, 1, 36, 29, 36, 8, 1, 8, 7, + 55, 8, 29, 29, 55, 7, 7, 7, 60, 7, + 2, 36, 36, 33, 33, 85, 7, 48, 8, 8, + 8, 6, 50, 29, 7, 8, 54, 61, 62, 8, + 36, 8, 8, 50, 8, 20, 7, 54, 10, 8, + 61, 62, 8, 61, 62, 61, 62, 7, 7, 7, + 61, 62, 8, 40, 40, 15, 40, 29, 61, 62, + 8, 42, 33, 8, 51, 51, 8, 51, 61, 62, + 60, 60, 53, 61, 10, 33, 40, 7, -1, 8, + 29, 60, 8, 60, 60, 15, 60, 51, 29, 29, + 56, 60, 25, 8, 27, -1, -1, 25, 12, 27, + 56, -1, 25, 12, 27, 38, -1, 25, 56, 27, + 38, 56, 61, 62, 56, 38, -1, 12, 59, 55, + 38, 61, 62, 29, 25, 25, 27, 27, 25, 8, + 27, 15, 61, 62, -1, 61, 62, 38, 38, 15, + 15, 38, 83, 57, 29, 8, 61, 62, 57, 63, + 34, -1, 36, -1, 63, 61, 62, 8, 34, 34, + 36, 36, 57, 18, 19, -1, 29, -1, 63, -1, + 18, 19, 18, 19, 18, 19, 61, 62, 29, 22, + -1, 60, -1, -1, -1, -1, 29, -1, -1, -1, + 45, 46, -1, -1, -1, -1, 59, 45, 46, 45, + 46, 45, 46, 23, 24, -1, -1, -1, 59, 25, + -1, 27, 32, -1, -1, 35, 59, 37, -1, -1, + 83, 22, 38, -1, -1, 23, 24, -1, 29, 72, + -1, -1, 83, 31, 32, 23, 24, 35, 81, 37, + 83, 84, -1, 31, 32, 23, 24, 35, -1, 37, + -1, -1, -1, 31, 32, 23, 24, 35, 59, 37, + -1, 22, -1, 31, 32, -1, -1, 35, 29, 37, + -1, 72, 23, 24, -1, -1, -1, -1, -1, -1, + 81, 32, 83, 84, 35, -1, 37, -1, -1, -1, + -1, -1, -1, 22, 55, -1, -1, -1, 59, -1, + 29, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 72, -1, -1, -1, -1, -1, -1, -1, -1, + 81, -1, 83, 84, -1, -1, 55, -1, -1, -1, + 59, -1, -1, -1, -1, -1, -1, 23, 24, -1, + 12, 13, -1, 72, -1, 31, 32, -1, -1, 35, + 22, 37, 81, -1, 83, 84, -1, 29, -1, -1, + -1, 33, 34, -1, 36, -1, 12, 13, -1, -1, + -1, 43, -1, -1, -1, 47, 22, -1, -1, -1, + -1, -1, -1, 29, -1, -1, -1, 33, 34, -1, + 36, -1, -1, 65, -1, 67, -1, 43, -1, -1, + -1, 47, 3, -1, -1, -1, 78, 79, 80, -1, + -1, -1, 13, -1, -1, -1, 17, -1, -1, 65, + -1, 67, -1, -1, -1, 26, -1, 28, -1, -1, + -1, -1, 78, 79, 80, -1, -1, -1, 39, 3, + 41, 42, -1, -1, -1, -1, -1, -1, 49, 13, + -1, 52, 53, 17, -1, -1, -1, 58, -1, -1, + -1, -1, 26, 64, 28, -1, -1, 31, -1, -1, + -1, -1, -1, -1, -1, 39, 77, 41, 42, -1, + -1, -1, -1, -1, -1, 49, -1, 3, 52, 53, + -1, -1, -1, -1, 58, -1, -1, 13, -1, -1, + 64, 17, -1, -1, -1, -1, -1, -1, -1, -1, + 26, -1, 28, 77, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 39, -1, 41, 42, -1, -1, -1, + -1, -1, -1, 49, -1, -1, 52, 53, -1, -1, + -1, -1, 58, -1, -1, -1, -1, -1, 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 77, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 11, 12, 13, -1, -1, -1, -1, -1, + -1, -1, -1, 22, -1, -1, -1, -1, -1, -1, + 29, -1, -1, -1, 33, 34, -1, 36, -1, -1, + -1, 40, -1, 42, 43, 44, -1, -1, 47, -1, + -1, -1, 51, -1, 53, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 65, -1, 67, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 78, - 79, 80, -1, -1, -1, -1, -1, -1, -1, 3, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 13, - -1, -1, -1, 17, -1, -1, -1, -1, -1, -1, - -1, -1, 26, -1, 28, -1, -1, 31, -1, -1, - -1, -1, -1, -1, -1, 39, -1, 41, 42, -1, - -1, -1, -1, -1, -1, 49, -1, -1, 52, 53, - -1, -1, -1, -1, 58, -1, -1, -1, -1, -1, - 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 77, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 11, 12, 13, -1, -1, -1, + 69, -1, 71, -1, 73, -1, -1, -1, -1, 78, + 79, 80, -1, -1, -1, -1, -1, -1, -1, 11, + 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, + 22, -1, -1, -1, -1, -1, -1, 29, -1, -1, + -1, 33, 34, -1, 36, -1, -1, -1, 40, -1, + 42, 43, 44, -1, -1, 47, -1, -1, -1, 51, + -1, 53, -1, -1, 56, -1, -1, -1, -1, -1, + -1, -1, -1, 65, -1, 67, -1, 69, -1, 71, + -1, 73, -1, -1, -1, -1, 78, 79, 80, -1, + -1, -1, -1, -1, -1, -1, 11, 12, 13, -1, + -1, -1, -1, -1, -1, -1, -1, 22, -1, -1, + -1, -1, -1, -1, 29, -1, -1, -1, 33, 34, + -1, 36, -1, -1, -1, 40, -1, 42, 43, 44, + -1, -1, 47, -1, -1, -1, 51, -1, 53, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 65, -1, 67, -1, 69, -1, 71, 72, 73, -1, + -1, -1, -1, 78, 79, 80, -1, -1, -1, -1, + -1, -1, -1, 11, 12, 13, -1, -1, -1, -1, + -1, -1, -1, -1, 22, -1, -1, -1, -1, -1, + -1, 29, -1, -1, -1, 33, 34, -1, 36, -1, + -1, -1, 40, -1, 42, 43, 44, -1, -1, 47, + -1, -1, -1, 51, -1, 53, -1, -1, 56, -1, + -1, -1, -1, -1, -1, -1, -1, 65, -1, 67, + -1, 69, -1, 71, -1, 73, -1, -1, -1, -1, + 78, 79, 80, -1, -1, -1, -1, -1, -1, -1, + 7, -1, -1, -1, 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, 22, -1, -1, -1, -1, -1, -1, 29, -1, -1, -1, 33, 34, -1, 36, -1, -1, -1, 40, -1, 42, 43, 44, -1, -1, @@ -526,79 +610,31 @@ const int JavaScriptGrammar::action_check [] = { -1, -1, -1, -1, -1, -1, -1, -1, 65, -1, 67, -1, 69, -1, 71, -1, 73, -1, -1, -1, -1, 78, 79, 80, -1, -1, -1, -1, -1, -1, - -1, 11, 12, 13, -1, -1, -1, -1, -1, -1, - -1, -1, 22, -1, -1, -1, -1, -1, -1, 29, - -1, -1, -1, 33, 34, -1, 36, -1, -1, -1, - 40, -1, 42, 43, 44, -1, -1, 47, -1, -1, - -1, 51, -1, 53, -1, -1, 56, -1, -1, -1, - -1, -1, -1, -1, -1, 65, -1, 67, -1, 69, - -1, 71, -1, 73, -1, -1, -1, -1, 78, 79, - 80, -1, -1, -1, -1, -1, -1, -1, 11, 12, - 13, -1, -1, -1, -1, -1, -1, -1, -1, 22, - -1, -1, -1, -1, -1, -1, 29, -1, -1, -1, - 33, 34, -1, 36, -1, -1, -1, 40, -1, 42, - 43, 44, -1, -1, 47, -1, -1, -1, 51, -1, - 53, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 65, -1, 67, -1, 69, -1, 71, 72, - 73, -1, -1, -1, -1, 78, 79, 80, -1, -1, - -1, -1, -1, -1, -1, 11, 12, 13, -1, -1, - -1, -1, -1, -1, -1, -1, 22, -1, -1, -1, - -1, -1, -1, 29, -1, -1, -1, 33, 34, -1, - 36, -1, -1, -1, 40, -1, 42, 43, 44, -1, - -1, 47, -1, -1, -1, 51, -1, 53, -1, -1, - 56, -1, -1, -1, -1, -1, -1, -1, -1, 65, - -1, 67, -1, 69, -1, 71, -1, 73, -1, -1, - -1, -1, 78, 79, 80, -1, -1, -1, -1, -1, - -1, -1, 7, -1, -1, -1, 11, 12, 13, -1, - -1, -1, -1, -1, -1, -1, -1, 22, -1, -1, - -1, -1, -1, -1, 29, -1, -1, -1, 33, 34, - -1, 36, -1, -1, -1, 40, -1, 42, 43, 44, - -1, -1, 47, -1, -1, -1, 51, -1, 53, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 65, -1, 67, -1, 69, -1, 71, -1, 73, -1, - -1, -1, -1, 78, 79, 80, -1, -1, -1, -1, - -1, -1, -1, 4, 5, 6, -1, -1, 9, 10, - 11, -1, -1, 14, -1, 16, -1, -1, -1, 20, - 21, 22, -1, -1, -1, -1, -1, -1, 29, 30, - 31, 32, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 43, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 59, -1, - -1, -1, -1, -1, -1, 66, 67, 68, -1, 70, - 71, 72, 73, 74, 75, -1, -1, 78, 79, 80, - 81, 82, 83, -1, -1, -1, -1, 4, 5, 6, - -1, -1, 9, 10, 11, -1, -1, 14, -1, 16, - -1, -1, -1, 20, 21, 22, -1, -1, -1, -1, - -1, -1, 29, 30, 31, 32, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 43, -1, -1, -1, - 47, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 59, -1, -1, -1, -1, -1, 65, 66, - 67, 68, -1, 70, 71, 72, 73, 74, 75, -1, - -1, 78, 79, 80, 81, 82, 83, -1, -1, -1, -1, 4, 5, 6, -1, -1, 9, 10, 11, -1, -1, 14, -1, 16, -1, -1, -1, 20, 21, 22, -1, -1, -1, -1, -1, -1, 29, 30, 31, 32, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 43, -1, -1, -1, 47, -1, -1, -1, -1, -1, - -1, -1, 55, -1, -1, -1, 59, -1, -1, -1, - -1, -1, 65, 66, 67, 68, -1, 70, 71, 72, + 43, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 59, -1, -1, -1, + -1, -1, -1, 66, 67, 68, -1, 70, 71, 72, 73, 74, 75, -1, -1, 78, 79, 80, 81, 82, - 83, -1, -1, -1, -1, 4, -1, -1, -1, -1, - 9, -1, 11, 12, 13, 14, -1, -1, -1, -1, - -1, -1, 21, 22, -1, -1, -1, -1, -1, -1, - 29, 30, -1, -1, 33, 34, -1, 36, -1, -1, - -1, 40, -1, 42, 43, 44, -1, -1, 47, -1, - -1, -1, 51, -1, 53, -1, -1, -1, -1, -1, - 59, -1, 61, -1, -1, -1, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, -1, -1, 78, - 79, 80, 81, 82, -1, -1, -1, -1, -1, 4, - -1, -1, -1, -1, 9, -1, 11, 12, 13, 14, - -1, -1, -1, -1, -1, -1, 21, 22, -1, -1, - -1, -1, -1, -1, 29, 30, -1, -1, 33, 34, - -1, 36, -1, -1, -1, 40, -1, 42, 43, 44, - -1, -1, 47, -1, -1, -1, 51, -1, 53, -1, - -1, -1, -1, -1, 59, -1, 61, -1, -1, -1, - 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 75, -1, -1, 78, 79, 80, 81, 82, -1, -1, + 83, -1, -1, -1, -1, 4, 5, 6, -1, -1, + 9, 10, 11, -1, -1, 14, -1, 16, -1, -1, + -1, 20, 21, 22, -1, -1, -1, -1, -1, -1, + 29, 30, 31, 32, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 43, -1, -1, -1, 47, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 59, -1, -1, -1, -1, -1, 65, 66, 67, 68, + -1, 70, 71, 72, 73, 74, 75, -1, -1, 78, + 79, 80, 81, 82, 83, -1, -1, -1, -1, 4, + 5, 6, -1, -1, 9, 10, 11, -1, -1, 14, + -1, 16, -1, -1, -1, 20, 21, 22, -1, -1, + -1, -1, -1, -1, 29, 30, 31, 32, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 43, -1, + -1, -1, 47, -1, -1, -1, -1, -1, -1, -1, + 55, -1, -1, -1, 59, -1, -1, -1, -1, -1, + 65, 66, 67, 68, -1, 70, 71, 72, 73, 74, + 75, -1, -1, 78, 79, 80, 81, 82, 83, -1, -1, -1, -1, 4, -1, -1, -1, -1, 9, -1, 11, 12, 13, 14, -1, -1, -1, -1, -1, -1, 21, 22, -1, -1, -1, -1, -1, -1, 29, 30, @@ -616,47 +652,66 @@ const int JavaScriptGrammar::action_check [] = { -1, -1, 59, -1, 61, -1, -1, -1, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, -1, -1, 78, 79, 80, 81, 82, -1, -1, -1, -1, - -1, 4, 5, 6, -1, -1, 9, 10, 11, 12, - 13, 14, -1, 16, -1, -1, -1, 20, 21, 22, - -1, -1, -1, -1, -1, -1, 29, 30, 31, 32, + -1, 4, -1, -1, -1, -1, 9, -1, 11, 12, + 13, 14, -1, -1, -1, -1, -1, -1, 21, 22, + -1, -1, -1, -1, -1, -1, 29, 30, -1, -1, 33, 34, -1, 36, -1, -1, -1, 40, -1, 42, 43, 44, -1, -1, 47, -1, -1, -1, 51, -1, - 53, -1, 55, -1, -1, -1, 59, -1, 61, -1, + 53, -1, -1, -1, -1, -1, 59, -1, 61, -1, -1, -1, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, -1, -1, 78, 79, 80, 81, 82, - 83, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 4, -1, -1, -1, -1, + 9, -1, 11, 12, 13, 14, -1, -1, -1, -1, + -1, -1, 21, 22, -1, -1, -1, -1, -1, -1, + 29, 30, -1, -1, 33, 34, -1, 36, -1, -1, + -1, 40, -1, 42, 43, 44, -1, -1, 47, -1, + -1, -1, 51, -1, 53, -1, -1, -1, -1, -1, + 59, -1, 61, -1, -1, -1, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, -1, -1, 78, + 79, 80, 81, 82, -1, -1, -1, -1, -1, 4, + 5, 6, -1, -1, 9, 10, 11, 12, 13, 14, + -1, 16, -1, -1, -1, 20, 21, 22, -1, -1, + -1, -1, -1, -1, 29, 30, 31, 32, 33, 34, + -1, 36, -1, -1, -1, 40, -1, 42, 43, 44, + -1, -1, 47, -1, -1, -1, 51, -1, 53, -1, + 55, -1, -1, -1, 59, -1, 61, -1, -1, -1, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, -1, -1, 78, 79, 80, 81, 82, 83, -1, + -1, -1, -1, - 20, 72, 84, 89, 14, 72, 20, 5, 20, 22, - 12, 20, 11, 20, 20, 16, 12, 11, 54, 11, - 76, 12, 90, 58, 12, 58, 12, 20, 11, 58, - 12, 12, 12, 10, 58, 11, 9, 12, 12, 11, - 11, 11, 20, 9, 11, 87, 11, 9, 12, 12, - 78, 12, 12, 12, 23, 11, 6, -1, 12, 12, - 11, -1, 20, 20, 14, 20, 7, -1, 11, 10, - 13, -1, 8, 20, 10, 23, 24, -1, 11, 31, - 27, -1, 31, 35, 2, 31, 31, 36, -1, 31, - 35, 31, 31, 31, -1, 41, 14, 35, 12, 31, - 31, 33, 33, 43, 31, 47, 45, 31, 31, 36, - 33, 31, 36, 33, 31, 31, 31, 33, 33, 36, - 31, 31, 33, 31, 12, 12, 36, 31, 36, 33, - 31, 31, 12, 33, 31, 36, 31, 34, 33, 31, - 25, 55, 34, 28, -1, 31, 20, 33, 31, 31, - 31, -1, 31, 27, 37, 31, 37, 39, 37, 31, - 36, 31, -1, -1, 36, 6, 36, 55, 55, 31, - -1, 31, 31, 14, 36, 55, 36, 31, 37, 33, - 31, 31, 33, 33, 31, 31, 33, 11, 31, 13, - 36, 31, 31, 36, 31, 31, 36, 36, 31, 36, - 36, 31, 11, 36, 13, 38, 36, 53, 38, 46, - 53, 31, 48, 53, 53, 31, 36, 31, 38, -1, - 36, -1, 36, 31, 38, 31, 42, 31, 36, -1, - 36, -1, 36, -1, 40, -1, -1, -1, -1, -1, - 44, -1, -1, -1, -1, 53, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 25, -1, -1, - 28, -1, -1, -1, -1, -1, -1, 91, -1, -1, + 72, 76, 12, 5, 72, 84, 11, 14, 12, 9, + 11, 10, 9, 16, 12, 11, 11, 58, 89, 12, + 9, 58, 54, 11, 78, 11, 20, 90, 20, 20, + 20, 12, 11, 11, 11, 20, 12, 11, 11, 11, + 23, 12, 11, 87, 12, 12, 58, 22, -1, 12, + 20, -1, 12, 12, 20, 20, 20, 12, 20, 20, + 12, 11, -1, 12, 12, 8, -1, 10, -1, 25, + -1, 58, 28, 31, 31, 33, -1, 31, 31, 36, + 31, -1, 36, 36, 31, 36, 31, 31, 33, 36, + 31, 31, 31, 31, 31, 39, 37, 37, 37, 37, + 31, 31, 33, 31, 12, 23, 24, 35, 45, 20, + 31, 31, 33, 43, 31, 31, 27, 33, 35, 31, + 7, 41, 31, 10, 33, 31, 31, 20, 31, 12, + 36, 36, 35, 12, 27, 47, 31, 31, 33, 33, + 31, 31, 31, 33, 33, 36, 12, 31, 12, 33, + 31, 31, 33, 33, 25, 2, 31, 28, 33, 31, + -1, 33, 31, 31, 31, 34, 34, 14, 31, 36, + -1, -1, 55, 36, 31, 11, 55, 13, 6, 36, + 31, -1, 31, 31, -1, 36, 14, 36, 36, 55, + 6, 55, 11, 11, 13, 13, 31, 31, 14, -1, + -1, 36, 36, -1, 53, 53, 31, 31, 42, 44, + 31, 36, 36, 38, 38, 36, 31, 31, 31, 40, + 31, 36, 36, 36, 31, 36, 31, 38, -1, 36, + -1, 36, -1, -1, -1, 48, -1, -1, 53, 53, + -1, 46, -1, -1, -1, -1, 53, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 91, -1, -1, -1, 96, -1, -1, + -1, -1, 31, -1, -1, -1, -1, 36, -1, 38, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}; + -1, -1, -1, -1, -1, -1, -1, -1, -1}; diff --git a/src/declarative/qml/parser/javascriptgrammar_p.h b/src/declarative/qml/parser/javascriptgrammar_p.h index b6ffbc6..3412844 100644 --- a/src/declarative/qml/parser/javascriptgrammar_p.h +++ b/src/declarative/qml/parser/javascriptgrammar_p.h @@ -1,4 +1,56 @@ // This file was generated by qlalr - DO NOT EDIT! +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists for the convenience +// of other Qt classes. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #ifndef JAVASCRIPTGRAMMAR_P_H #define JAVASCRIPTGRAMMAR_P_H @@ -95,15 +147,15 @@ public: T_XOR = 76, T_XOR_EQ = 77, - ACCEPT_STATE = 524, - RULE_COUNT = 298, - STATE_COUNT = 525, + ACCEPT_STATE = 526, + RULE_COUNT = 300, + STATE_COUNT = 527, TERMINAL_COUNT = 88, NON_TERMINAL_COUNT = 98, - GOTO_INDEX_OFFSET = 525, - GOTO_INFO_OFFSET = 1675, - GOTO_CHECK_OFFSET = 1675 + GOTO_INDEX_OFFSET = 527, + GOTO_INFO_OFFSET = 1723, + GOTO_CHECK_OFFSET = 1723 }; static const char *const spell []; diff --git a/src/declarative/qml/parser/javascriptparser.cpp b/src/declarative/qml/parser/javascriptparser.cpp index f868216..137e2b0 100644 --- a/src/declarative/qml/parser/javascriptparser.cpp +++ b/src/declarative/qml/parser/javascriptparser.cpp @@ -305,61 +305,70 @@ case 27: { sym(1).Node = makeAstNode(driver->nodePool(), sym(1).Node); } break; -case 28: { +case 28: + +case 29: +{ + AST::UiQualifiedId *node = makeAstNode (driver->nodePool(), driver->intern(lexer->characterBuffer(), lexer->characterCount())); + node->identifierToken = loc(1); + sym(1).Node = node; +} break; + +case 30: { AST::UiQualifiedId *node = makeAstNode (driver->nodePool(), sym(1).sval); node->identifierToken = loc(1); sym(1).Node = node; } break; -case 29: { +case 31: { AST::UiQualifiedId *node = makeAstNode (driver->nodePool(), sym(1).UiQualifiedId, sym(3).sval); node->identifierToken = loc(3); sym(1).Node = node; } break; -case 30: { +case 32: { AST::ThisExpression *node = makeAstNode (driver->nodePool()); node->thisToken = loc(1); sym(1).Node = node; } break; -case 31: { +case 33: { AST::IdentifierExpression *node = makeAstNode (driver->nodePool(), sym(1).sval); node->identifierToken = loc(1); sym(1).Node = node; } break; -case 32: { +case 34: { AST::NullExpression *node = makeAstNode (driver->nodePool()); node->nullToken = loc(1); sym(1).Node = node; } break; -case 33: { +case 35: { AST::TrueLiteral *node = makeAstNode (driver->nodePool()); node->trueToken = loc(1); sym(1).Node = node; } break; -case 34: { +case 36: { AST::FalseLiteral *node = makeAstNode (driver->nodePool()); node->falseToken = loc(1); sym(1).Node = node; } break; -case 35: { +case 37: { AST::NumericLiteral *node = makeAstNode (driver->nodePool(), sym(1).dval); node->literalToken = loc(1); sym(1).Node = node; } break; -case 36: { +case 38: { AST::StringLiteral *node = makeAstNode (driver->nodePool(), sym(1).sval); node->literalToken = loc(1); sym(1).Node = node; } break; -case 37: { +case 39: { bool rx = lexer->scanRegExp(Lexer::NoPrefix); if (!rx) { diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, lexer->startLineNo(), @@ -371,7 +380,7 @@ case 37: { sym(1).Node = node; } break; -case 38: { +case 40: { bool rx = lexer->scanRegExp(Lexer::EqualPrefix); if (!rx) { diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, lexer->startLineNo(), @@ -383,21 +392,21 @@ case 38: { sym(1).Node = node; } break; -case 39: { +case 41: { AST::ArrayLiteral *node = makeAstNode (driver->nodePool(), sym(2).Elision); node->lbracketToken = loc(1); node->rbracketToken = loc(3); sym(1).Node = node; } break; -case 40: { +case 42: { AST::ArrayLiteral *node = makeAstNode (driver->nodePool(), sym(2).ElementList->finish ()); node->lbracketToken = loc(1); node->rbracketToken = loc(3); sym(1).Node = node; } break; -case 41: { +case 43: { AST::ArrayLiteral *node = makeAstNode (driver->nodePool(), sym(2).ElementList->finish (), sym(4).Elision); node->lbracketToken = loc(1); node->commaToken = loc(3); @@ -405,7 +414,7 @@ case 41: { sym(1).Node = node; } break; -case 42: { +case 44: { AST::ObjectLiteral *node = 0; if (sym(2).Node) node = makeAstNode (driver->nodePool(), @@ -417,7 +426,7 @@ case 42: { sym(1).Node = node; } break; -case 43: { +case 45: { AST::ObjectLiteral *node = makeAstNode (driver->nodePool(), sym(2).PropertyNameAndValueList->finish ()); node->lbraceToken = loc(1); @@ -425,51 +434,51 @@ case 43: { sym(1).Node = node; } break; -case 44: { +case 46: { AST::NestedExpression *node = makeAstNode(driver->nodePool(), sym(2).Expression); node->lparenToken = loc(1); node->rparenToken = loc(3); sym(1).Node = node; } break; -case 45: { +case 47: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).Elision, sym(2).Expression); } break; -case 46: { +case 48: { AST::ElementList *node = makeAstNode (driver->nodePool(), sym(1).ElementList, sym(3).Elision, sym(4).Expression); node->commaToken = loc(2); sym(1).Node = node; } break; -case 47: { +case 49: { AST::Elision *node = makeAstNode (driver->nodePool()); node->commaToken = loc(1); sym(1).Node = node; } break; -case 48: { +case 50: { AST::Elision *node = makeAstNode (driver->nodePool(), sym(1).Elision); node->commaToken = loc(2); sym(1).Node = node; } break; -case 49: { +case 51: { sym(1).Node = 0; } break; -case 50: { +case 52: { sym(1).Elision = sym(1).Elision->finish (); } break; -case 51: { +case 53: { AST::PropertyNameAndValueList *node = makeAstNode (driver->nodePool(), sym(1).PropertyName, sym(3).Expression); node->colonToken = loc(2); sym(1).Node = node; } break; -case 52: { +case 54: { AST::PropertyNameAndValueList *node = makeAstNode (driver->nodePool(), sym(1).PropertyNameAndValueList, sym(3).PropertyName, sym(5).Expression); node->commaToken = loc(2); @@ -477,34 +486,30 @@ case 52: { sym(1).Node = node; } break; -case 53: { +case 55: { AST::IdentifierPropertyName *node = makeAstNode (driver->nodePool(), sym(1).sval); node->propertyNameToken = loc(1); sym(1).Node = node; } break; -case 54: { +case 56: { AST::StringLiteralPropertyName *node = makeAstNode (driver->nodePool(), sym(1).sval); node->propertyNameToken = loc(1); sym(1).Node = node; } break; -case 55: { +case 57: { AST::NumericLiteralPropertyName *node = makeAstNode (driver->nodePool(), sym(1).dval); node->propertyNameToken = loc(1); sym(1).Node = node; } break; -case 56: { +case 58: { AST::IdentifierPropertyName *node = makeAstNode (driver->nodePool(), sym(1).sval); node->propertyNameToken = loc(1); sym(1).Node = node; } break; -case 57: - -case 58: - case 59: case 60: @@ -562,25 +567,29 @@ case 85: case 86: case 87: + +case 88: + +case 89: { sym(1).sval = driver->intern(lexer->characterBuffer(), lexer->characterCount()); } break; -case 92: { +case 94: { AST::ArrayMemberExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).Expression); node->lbracketToken = loc(2); node->rbracketToken = loc(4); sym(1).Node = node; } break; -case 93: { +case 95: { AST::FieldMemberExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).sval); node->dotToken = loc(2); node->identifierToken = loc(3); sym(1).Node = node; } break; -case 94: { +case 96: { AST::NewMemberExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression, sym(4).ArgumentList); node->newToken = loc(1); node->lparenToken = loc(3); @@ -588,316 +597,309 @@ case 94: { sym(1).Node = node; } break; -case 96: { +case 98: { AST::NewExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->newToken = loc(1); sym(1).Node = node; } break; -case 97: { +case 99: { AST::CallExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).ArgumentList); node->lparenToken = loc(2); node->rparenToken = loc(4); sym(1).Node = node; } break; -case 98: { +case 100: { AST::CallExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).ArgumentList); node->lparenToken = loc(2); node->rparenToken = loc(4); sym(1).Node = node; } break; -case 99: { +case 101: { AST::ArrayMemberExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).Expression); node->lbracketToken = loc(2); node->rbracketToken = loc(4); sym(1).Node = node; } break; -case 100: { +case 102: { AST::FieldMemberExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).sval); node->dotToken = loc(2); node->identifierToken = loc(3); sym(1).Node = node; } break; -case 101: { +case 103: { sym(1).Node = 0; } break; -case 102: { +case 104: { sym(1).Node = sym(1).ArgumentList->finish(); } break; -case 103: { +case 105: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).Expression); } break; -case 104: { +case 106: { AST::ArgumentList *node = makeAstNode (driver->nodePool(), sym(1).ArgumentList, sym(3).Expression); node->commaToken = loc(2); sym(1).Node = node; } break; -case 108: { +case 110: { AST::PostIncrementExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression); node->incrementToken = loc(2); sym(1).Node = node; } break; -case 109: { +case 111: { AST::PostDecrementExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression); node->decrementToken = loc(2); sym(1).Node = node; } break; -case 111: { +case 113: { AST::DeleteExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->deleteToken = loc(1); sym(1).Node = node; } break; -case 112: { +case 114: { AST::VoidExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->voidToken = loc(1); sym(1).Node = node; } break; -case 113: { +case 115: { AST::TypeOfExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->typeofToken = loc(1); sym(1).Node = node; } break; -case 114: { +case 116: { AST::PreIncrementExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->incrementToken = loc(1); sym(1).Node = node; } break; -case 115: { +case 117: { AST::PreDecrementExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->decrementToken = loc(1); sym(1).Node = node; } break; -case 116: { +case 118: { AST::UnaryPlusExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->plusToken = loc(1); sym(1).Node = node; } break; -case 117: { +case 119: { AST::UnaryMinusExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->minusToken = loc(1); sym(1).Node = node; } break; -case 118: { +case 120: { AST::TildeExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->tildeToken = loc(1); sym(1).Node = node; } break; -case 119: { +case 121: { AST::NotExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->notToken = loc(1); sym(1).Node = node; } break; -case 121: { +case 123: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Mul, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 122: { +case 124: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Div, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 123: { +case 125: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Mod, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 125: { +case 127: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Add, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 126: { +case 128: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Sub, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 128: { +case 130: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::LShift, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 129: { +case 131: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::RShift, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 130: { +case 132: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::URShift, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 132: { +case 134: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Lt, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 133: { +case 135: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Gt, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 134: { +case 136: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Le, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 135: { +case 137: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Ge, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 136: { +case 138: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::InstanceOf, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 137: { +case 139: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::In, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 139: { +case 141: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Lt, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 140: { +case 142: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Gt, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 141: { +case 143: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Le, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 142: { +case 144: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Ge, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 143: { +case 145: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::InstanceOf, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 145: { +case 147: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Equal, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 146: { +case 148: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::NotEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 147: { +case 149: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::StrictEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 148: { +case 150: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::StrictNotEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 150: { +case 152: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Equal, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 151: { +case 153: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::NotEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 152: { +case 154: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::StrictEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 153: { - AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, - QSOperator::StrictNotEqual, sym(3).Expression); - node->operatorToken = loc(2); - sym(1).Node = node; -} break; - case 155: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, - QSOperator::BitAnd, sym(3).Expression); + QSOperator::StrictNotEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; @@ -911,7 +913,7 @@ case 157: { case 159: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, - QSOperator::BitXor, sym(3).Expression); + QSOperator::BitAnd, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; @@ -925,7 +927,7 @@ case 161: { case 163: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, - QSOperator::BitOr, sym(3).Expression); + QSOperator::BitXor, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; @@ -939,7 +941,7 @@ case 165: { case 167: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, - QSOperator::And, sym(3).Expression); + QSOperator::BitOr, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; @@ -953,7 +955,7 @@ case 169: { case 171: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, - QSOperator::Or, sym(3).Expression); + QSOperator::And, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; @@ -966,6 +968,13 @@ case 173: { } break; case 175: { + AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, + QSOperator::Or, sym(3).Expression); + node->operatorToken = loc(2); + sym(1).Node = node; +} break; + +case 177: { AST::ConditionalExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).Expression, sym(5).Expression); node->questionToken = loc(2); @@ -973,7 +982,7 @@ case 175: { sym(1).Node = node; } break; -case 177: { +case 179: { AST::ConditionalExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).Expression, sym(5).Expression); node->questionToken = loc(2); @@ -981,112 +990,112 @@ case 177: { sym(1).Node = node; } break; -case 179: { +case 181: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(2).ival, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 181: { +case 183: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(2).ival, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 182: { +case 184: { sym(1).ival = QSOperator::Assign; } break; -case 183: { +case 185: { sym(1).ival = QSOperator::InplaceMul; } break; -case 184: { +case 186: { sym(1).ival = QSOperator::InplaceDiv; } break; -case 185: { +case 187: { sym(1).ival = QSOperator::InplaceMod; } break; -case 186: { +case 188: { sym(1).ival = QSOperator::InplaceAdd; } break; -case 187: { +case 189: { sym(1).ival = QSOperator::InplaceSub; } break; -case 188: { +case 190: { sym(1).ival = QSOperator::InplaceLeftShift; } break; -case 189: { +case 191: { sym(1).ival = QSOperator::InplaceRightShift; } break; -case 190: { +case 192: { sym(1).ival = QSOperator::InplaceURightShift; } break; -case 191: { +case 193: { sym(1).ival = QSOperator::InplaceAnd; } break; -case 192: { +case 194: { sym(1).ival = QSOperator::InplaceXor; } break; -case 193: { +case 195: { sym(1).ival = QSOperator::InplaceOr; } break; -case 195: { +case 197: { AST::Expression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).Expression); node->commaToken = loc(2); sym(1).Node = node; } break; -case 196: { +case 198: { sym(1).Node = 0; } break; -case 199: { +case 201: { AST::Expression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).Expression); node->commaToken = loc(2); sym(1).Node = node; } break; -case 200: { +case 202: { sym(1).Node = 0; } break; -case 217: { +case 219: { AST::Block *node = makeAstNode (driver->nodePool(), sym(2).StatementList); node->lbraceToken = loc(1); node->rbraceToken = loc(3); sym(1).Node = node; } break; -case 218: { +case 220: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).Statement); } break; -case 219: { +case 221: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).StatementList, sym(2).Statement); } break; -case 220: { +case 222: { sym(1).Node = 0; } break; -case 221: { +case 223: { sym(1).Node = sym(1).StatementList->finish (); } break; -case 223: { +case 225: { AST::VariableStatement *node = makeAstNode (driver->nodePool(), sym(2).VariableDeclarationList->finish (/*readOnly=*/sym(1).ival == T_CONST)); node->declarationKindToken = loc(1); @@ -1094,76 +1103,76 @@ case 223: { sym(1).Node = node; } break; -case 224: { +case 226: { sym(1).ival = T_CONST; } break; -case 225: { +case 227: { sym(1).ival = T_VAR; } break; -case 226: { +case 228: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).VariableDeclaration); } break; -case 227: { +case 229: { AST::VariableDeclarationList *node = makeAstNode (driver->nodePool(), sym(1).VariableDeclarationList, sym(3).VariableDeclaration); node->commaToken = loc(2); sym(1).Node = node; } break; -case 228: { +case 230: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).VariableDeclaration); } break; -case 229: { +case 231: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).VariableDeclarationList, sym(3).VariableDeclaration); } break; -case 230: { +case 232: { AST::VariableDeclaration *node = makeAstNode (driver->nodePool(), sym(1).sval, sym(2).Expression); node->identifierToken = loc(1); sym(1).Node = node; } break; -case 231: { +case 233: { AST::VariableDeclaration *node = makeAstNode (driver->nodePool(), sym(1).sval, sym(2).Expression); node->identifierToken = loc(1); sym(1).Node = node; } break; -case 232: { +case 234: { // ### TODO: AST for initializer sym(1) = sym(2); } break; -case 233: { +case 235: { sym(1).Node = 0; } break; -case 235: { +case 237: { // ### TODO: AST for initializer sym(1) = sym(2); } break; -case 236: { +case 238: { sym(1).Node = 0; } break; -case 238: { +case 240: { AST::EmptyStatement *node = makeAstNode (driver->nodePool()); node->semicolonToken = loc(1); sym(1).Node = node; } break; -case 240: { +case 242: { AST::ExpressionStatement *node = makeAstNode (driver->nodePool(), sym(1).Expression); node->semicolonToken = loc(2); sym(1).Node = node; } break; -case 241: { +case 243: { AST::IfStatement *node = makeAstNode (driver->nodePool(), sym(3).Expression, sym(5).Statement, sym(7).Statement); node->ifToken = loc(1); node->lparenToken = loc(2); @@ -1172,7 +1181,7 @@ case 241: { sym(1).Node = node; } break; -case 242: { +case 244: { AST::IfStatement *node = makeAstNode (driver->nodePool(), sym(3).Expression, sym(5).Statement); node->ifToken = loc(1); node->lparenToken = loc(2); @@ -1180,7 +1189,7 @@ case 242: { sym(1).Node = node; } break; -case 244: { +case 246: { AST::DoWhileStatement *node = makeAstNode (driver->nodePool(), sym(2).Statement, sym(5).Expression); node->doToken = loc(1); node->whileToken = loc(3); @@ -1190,7 +1199,7 @@ case 244: { sym(1).Node = node; } break; -case 245: { +case 247: { AST::WhileStatement *node = makeAstNode (driver->nodePool(), sym(3).Expression, sym(5).Statement); node->whileToken = loc(1); node->lparenToken = loc(2); @@ -1198,7 +1207,7 @@ case 245: { sym(1).Node = node; } break; -case 246: { +case 248: { AST::ForStatement *node = makeAstNode (driver->nodePool(), sym(3).Expression, sym(5).Expression, sym(7).Expression, sym(9).Statement); node->forToken = loc(1); @@ -1209,7 +1218,7 @@ case 246: { sym(1).Node = node; } break; -case 247: { +case 249: { AST::LocalForStatement *node = makeAstNode (driver->nodePool(), sym(4).VariableDeclarationList->finish (/*readOnly=*/false), sym(6).Expression, sym(8).Expression, sym(10).Statement); @@ -1222,7 +1231,7 @@ case 247: { sym(1).Node = node; } break; -case 248: { +case 250: { AST:: ForEachStatement *node = makeAstNode (driver->nodePool(), sym(3).Expression, sym(5).Expression, sym(7).Statement); node->forToken = loc(1); @@ -1232,7 +1241,7 @@ case 248: { sym(1).Node = node; } break; -case 249: { +case 251: { AST::LocalForEachStatement *node = makeAstNode (driver->nodePool(), sym(4).VariableDeclaration, sym(6).Expression, sym(8).Statement); node->forToken = loc(1); @@ -1243,14 +1252,14 @@ case 249: { sym(1).Node = node; } break; -case 251: { +case 253: { AST::ContinueStatement *node = makeAstNode (driver->nodePool()); node->continueToken = loc(1); node->semicolonToken = loc(2); sym(1).Node = node; } break; -case 253: { +case 255: { AST::ContinueStatement *node = makeAstNode (driver->nodePool(), sym(2).sval); node->continueToken = loc(1); node->identifierToken = loc(2); @@ -1258,14 +1267,14 @@ case 253: { sym(1).Node = node; } break; -case 255: { +case 257: { AST::BreakStatement *node = makeAstNode (driver->nodePool()); node->breakToken = loc(1); node->semicolonToken = loc(2); sym(1).Node = node; } break; -case 257: { +case 259: { AST::BreakStatement *node = makeAstNode (driver->nodePool(), sym(2).sval); node->breakToken = loc(1); node->identifierToken = loc(2); @@ -1273,14 +1282,14 @@ case 257: { sym(1).Node = node; } break; -case 259: { +case 261: { AST::ReturnStatement *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->returnToken = loc(1); node->semicolonToken = loc(3); sym(1).Node = node; } break; -case 260: { +case 262: { AST::WithStatement *node = makeAstNode (driver->nodePool(), sym(3).Expression, sym(5).Statement); node->withToken = loc(1); node->lparenToken = loc(2); @@ -1288,7 +1297,7 @@ case 260: { sym(1).Node = node; } break; -case 261: { +case 263: { AST::SwitchStatement *node = makeAstNode (driver->nodePool(), sym(3).Expression, sym(5).CaseBlock); node->switchToken = loc(1); node->lparenToken = loc(2); @@ -1296,83 +1305,83 @@ case 261: { sym(1).Node = node; } break; -case 262: { +case 264: { AST::CaseBlock *node = makeAstNode (driver->nodePool(), sym(2).CaseClauses); node->lbraceToken = loc(1); node->rbraceToken = loc(3); sym(1).Node = node; } break; -case 263: { +case 265: { AST::CaseBlock *node = makeAstNode (driver->nodePool(), sym(2).CaseClauses, sym(3).DefaultClause, sym(4).CaseClauses); node->lbraceToken = loc(1); node->rbraceToken = loc(5); sym(1).Node = node; } break; -case 264: { +case 266: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).CaseClause); } break; -case 265: { +case 267: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).CaseClauses, sym(2).CaseClause); } break; -case 266: { +case 268: { sym(1).Node = 0; } break; -case 267: { +case 269: { sym(1).Node = sym(1).CaseClauses->finish (); } break; -case 268: { +case 270: { AST::CaseClause *node = makeAstNode (driver->nodePool(), sym(2).Expression, sym(4).StatementList); node->caseToken = loc(1); node->colonToken = loc(3); sym(1).Node = node; } break; -case 269: { +case 271: { AST::DefaultClause *node = makeAstNode (driver->nodePool(), sym(3).StatementList); node->defaultToken = loc(1); node->colonToken = loc(2); sym(1).Node = node; } break; -case 270: { +case 272: { AST::LabelledStatement *node = makeAstNode (driver->nodePool(), sym(1).sval, sym(3).Statement); node->identifierToken = loc(1); node->colonToken = loc(2); sym(1).Node = node; } break; -case 272: { +case 274: { AST::ThrowStatement *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->throwToken = loc(1); node->semicolonToken = loc(3); sym(1).Node = node; } break; -case 273: { +case 275: { AST::TryStatement *node = makeAstNode (driver->nodePool(), sym(2).Statement, sym(3).Catch); node->tryToken = loc(1); sym(1).Node = node; } break; -case 274: { +case 276: { AST::TryStatement *node = makeAstNode (driver->nodePool(), sym(2).Statement, sym(3).Finally); node->tryToken = loc(1); sym(1).Node = node; } break; -case 275: { +case 277: { AST::TryStatement *node = makeAstNode (driver->nodePool(), sym(2).Statement, sym(3).Catch, sym(4).Finally); node->tryToken = loc(1); sym(1).Node = node; } break; -case 276: { +case 278: { AST::Catch *node = makeAstNode (driver->nodePool(), sym(3).sval, sym(5).Block); node->catchToken = loc(1); node->lparenToken = loc(2); @@ -1381,20 +1390,20 @@ case 276: { sym(1).Node = node; } break; -case 277: { +case 279: { AST::Finally *node = makeAstNode (driver->nodePool(), sym(2).Block); node->finallyToken = loc(1); sym(1).Node = node; } break; -case 279: { +case 281: { AST::DebuggerStatement *node = makeAstNode (driver->nodePool()); node->debuggerToken = loc(1); node->semicolonToken = loc(2); sym(1).Node = node; } break; -case 280: { +case 282: { AST::FunctionDeclaration *node = makeAstNode (driver->nodePool(), sym(2).sval, sym(4).FormalParameterList, sym(7).FunctionBody); node->functionToken = loc(1); node->identifierToken = loc(2); @@ -1405,7 +1414,7 @@ case 280: { sym(1).Node = node; } break; -case 281: { +case 283: { AST::FunctionExpression *node = makeAstNode (driver->nodePool(), sym(2).sval, sym(4).FormalParameterList, sym(7).FunctionBody); node->functionToken = loc(1); if (sym(2).sval) @@ -1417,56 +1426,56 @@ case 281: { sym(1).Node = node; } break; -case 282: { +case 284: { AST::FormalParameterList *node = makeAstNode (driver->nodePool(), sym(1).sval); node->identifierToken = loc(1); sym(1).Node = node; } break; -case 283: { +case 285: { AST::FormalParameterList *node = makeAstNode (driver->nodePool(), sym(1).FormalParameterList, sym(3).sval); node->commaToken = loc(2); node->identifierToken = loc(3); sym(1).Node = node; } break; -case 284: { +case 286: { sym(1).Node = 0; } break; -case 285: { +case 287: { sym(1).Node = sym(1).FormalParameterList->finish (); } break; -case 286: { +case 288: { sym(1).Node = 0; } break; -case 288: { +case 290: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).SourceElements->finish ()); } break; -case 289: { +case 291: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).SourceElement); } break; -case 290: { +case 292: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).SourceElements, sym(2).SourceElement); } break; -case 291: { +case 293: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).Statement); } break; -case 292: { +case 294: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).FunctionDeclaration); } break; -case 293: { +case 295: { sym(1).sval = 0; } break; -case 295: { +case 297: { sym(1).Node = 0; } break; diff --git a/src/declarative/qml/parser/javascriptparser_p.h b/src/declarative/qml/parser/javascriptparser_p.h index 34edaf7..e91286d 100644 --- a/src/declarative/qml/parser/javascriptparser_p.h +++ b/src/declarative/qml/parser/javascriptparser_p.h @@ -206,9 +206,9 @@ protected: }; -#define J_SCRIPT_REGEXPLITERAL_RULE1 37 +#define J_SCRIPT_REGEXPLITERAL_RULE1 39 -#define J_SCRIPT_REGEXPLITERAL_RULE2 38 +#define J_SCRIPT_REGEXPLITERAL_RULE2 40 QT_END_NAMESPACE -- cgit v0.12 From 2e71dc6b97dfa0f8193162019da326aa32291d5e Mon Sep 17 00:00:00 2001 From: Leonardo Sobral Cunha Date: Wed, 29 Apr 2009 14:58:38 +0200 Subject: Using qvariant color interpolator for QmlColorAnimation --- src/declarative/util/qmlanimation.cpp | 27 +++++++++------------------ src/declarative/util/qmlanimation_p.h | 8 +++++++- 2 files changed, 16 insertions(+), 19 deletions(-) diff --git a/src/declarative/util/qmlanimation.cpp b/src/declarative/util/qmlanimation.cpp index c09b378..a099e54 100644 --- a/src/declarative/util/qmlanimation.cpp +++ b/src/declarative/util/qmlanimation.cpp @@ -811,9 +811,9 @@ void QmlColorAnimation::transition(QmlStateActions &actions, struct NTransitionData : public QmlTimeLineValue { QmlStateActions actions; - void write(QmlMetaProperty &property, const QColor &color) + void write(QmlMetaProperty &property, const QVariant &color) { - if (property.propertyType() == qMetaTypeId()) { + if (property.propertyType() == QVariant::Color) { property.write(color); } } @@ -837,13 +837,8 @@ void QmlColorAnimation::transition(QmlStateActions &actions, QColor from(action.fromValue.value()); - //XXX consolidate somewhere - uint red = uint(qreal(from.red()) + v * (qreal(to.red()) - qreal(from.red()))); - uint green = uint(qreal(from.green()) + v * (qreal(to.green()) - qreal(from.green()))); - uint blue = uint(qreal(from.blue()) + v * (qreal(to.blue()) - qreal(from.blue()))); - uint alpha = uint(qreal(from.alpha()) + v * (qreal(to.alpha()) - qreal(from.alpha()))); - - write(action.property, QColor(red, green, blue, alpha)); + QVariant newColor = QmlColorAnimationPrivate::colorInterpolator(&from, &to, v); + write(action.property, newColor); } } } @@ -902,24 +897,20 @@ void QmlColorAnimation::transition(QmlStateActions &actions, delete data; } +QVariantAnimation::Interpolator QmlColorAnimationPrivate::colorInterpolator = 0; void QmlColorAnimationPrivate::valueChanged(qreal v) { if (!fromSourced) { if (!fromValue.isValid()) { - fromValue = QColor(qvariant_cast(property.read())); + fromValue = qvariant_cast(property.read()); } fromSourced = true; } - //XXX consolidate somewhere - uint red = uint(qreal(fromValue.red()) + v * (qreal(toValue.red()) - qreal(fromValue.red()))); - uint green = uint(qreal(fromValue.green()) + v * (qreal(toValue.green()) - qreal(fromValue.green()))); - uint blue = uint(qreal(fromValue.blue()) + v * (qreal(toValue.blue()) - qreal(fromValue.blue()))); - uint alpha = uint(qreal(fromValue.alpha()) + v * (qreal(toValue.alpha()) - qreal(fromValue.alpha()))); - - if (property.propertyType() == qMetaTypeId()) { - property.write(QColor(red, green, blue, alpha)); + if (property.propertyType() == QVariant::Color) { + QVariant newColor = colorInterpolator(&fromValue, &toValue, v); + property.write(newColor); } } QML_DEFINE_TYPE(QmlColorAnimation,ColorAnimation); diff --git a/src/declarative/util/qmlanimation_p.h b/src/declarative/util/qmlanimation_p.h index 728584c..0ef89f4 100644 --- a/src/declarative/util/qmlanimation_p.h +++ b/src/declarative/util/qmlanimation_p.h @@ -203,7 +203,11 @@ class QmlColorAnimationPrivate : public QmlAbstractAnimationPrivate Q_DECLARE_PUBLIC(QmlColorAnimation); public: QmlColorAnimationPrivate() - : QmlAbstractAnimationPrivate(), fromSourced(false), ca(0), value(this, &QmlColorAnimationPrivate::valueChanged) {} + : QmlAbstractAnimationPrivate(), fromSourced(false), ca(0), value(this, &QmlColorAnimationPrivate::valueChanged) + { + if (!colorInterpolator) + colorInterpolator = QVariantAnimationPrivate::getInterpolator(QVariant::Color); + } void init(); @@ -218,6 +222,8 @@ public: virtual void valueChanged(qreal); QmlTimeLineValueProxy value; + + static QVariantAnimation::Interpolator colorInterpolator; }; class QmlRunScriptActionPrivate : public QmlAbstractAnimationPrivate -- cgit v0.12 From 5b15e629641281dd87197b22bd4d0dc5dc7c89e1 Mon Sep 17 00:00:00 2001 From: Leonardo Sobral Cunha Date: Wed, 29 Apr 2009 16:57:46 +0200 Subject: Using QVariant for 'to' and 'from' values in QmlVariantAnimationPrivate The 'to' and 'from' attiributes in QmlVariantAnimationPrivate were QmlNullableValue before, but we can query QVariant::isValid for the same purpose. --- src/declarative/util/qmlanimation.cpp | 32 +++++++++++++++----------------- src/declarative/util/qmlanimation_p.h | 6 +++--- 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/src/declarative/util/qmlanimation.cpp b/src/declarative/util/qmlanimation.cpp index a099e54..7861e55 100644 --- a/src/declarative/util/qmlanimation.cpp +++ b/src/declarative/util/qmlanimation.cpp @@ -1997,7 +1997,7 @@ QVariant QmlVariantAnimation::from() const void QmlVariantAnimation::setFrom(const QVariant &f) { Q_D(QmlVariantAnimation); - if (!d->from.isNull && f == d->from) + if (d->from.isValid() && f == d->from) return; d->from = f; emit fromChanged(f); @@ -2021,7 +2021,7 @@ QVariant QmlVariantAnimation::to() const void QmlVariantAnimation::setTo(const QVariant &t) { Q_D(QmlVariantAnimation); - if (!d->to.isNull && t == d->to) + if (d->to.isValid() && t == d->to) return; d->to = t; emit toChanged(t); @@ -2113,18 +2113,16 @@ QList *QmlVariantAnimation::exclude() void QmlVariantAnimationPrivate::valueChanged(qreal r) { if (!fromSourced) { - if (from.isNull) { - fromValue = property.read(); - } else { - fromValue = from; + if (!from.isValid()) { + from = property.read(); } fromSourced = true; } if (r == 1.) { - property.write(to.value); + property.write(to); } else { - QVariant val = interpolateVariant(fromValue, to.value, r); + QVariant val = interpolateVariant(from, to, r); property.write(val); } } @@ -2143,9 +2141,9 @@ void QmlVariantAnimation::prepare(QmlMetaProperty &p) else d->property = d->userProperty; - d->convertVariant(d->to.value, (QVariant::Type)d->property.propertyType()); - if (!d->from.isNull) - d->convertVariant(d->from.value, (QVariant::Type)d->property.propertyType()); + d->convertVariant(d->to, (QVariant::Type)d->property.propertyType()); + if (d->from.isValid()) + d->convertVariant(d->from, (QVariant::Type)d->property.propertyType()); d->fromSourced = false; d->value.QmlTimeLineValue::setValue(0.); @@ -2205,12 +2203,12 @@ void QmlVariantAnimation::transition(QmlStateActions &actions, Action myAction = action; if (d->from.isValid()) { - myAction.fromValue = QVariant(d->from); + myAction.fromValue = d->from; } else { myAction.fromValue = QVariant(); } if (d->to.isValid()) - myAction.toValue = QVariant(d->to); + myAction.toValue = d->to; d->convertVariant(myAction.fromValue, (QVariant::Type)myAction.property.propertyType()); d->convertVariant(myAction.toValue, (QVariant::Type)myAction.property.propertyType()); @@ -2229,12 +2227,12 @@ void QmlVariantAnimation::transition(QmlStateActions &actions, myAction.property = QmlMetaProperty(obj, props.at(jj)); if (d->from.isValid()) { - d->convertVariant(d->from.value, (QVariant::Type)myAction.property.propertyType()); - myAction.fromValue = QVariant(d->from); + d->convertVariant(d->from, (QVariant::Type)myAction.property.propertyType()); + myAction.fromValue = d->from; } - d->convertVariant(d->to.value, (QVariant::Type)myAction.property.propertyType()); - myAction.toValue = QVariant(d->to); + d->convertVariant(d->to, (QVariant::Type)myAction.property.propertyType()); + myAction.toValue = d->to; myAction.bv = 0; myAction.event = 0; data->actions << myAction; diff --git a/src/declarative/util/qmlanimation_p.h b/src/declarative/util/qmlanimation_p.h index 0ef89f4..4fcaa47 100644 --- a/src/declarative/util/qmlanimation_p.h +++ b/src/declarative/util/qmlanimation_p.h @@ -354,8 +354,8 @@ public: void init(); - QmlNullableValue from; - QmlNullableValue to; + QVariant from; + QVariant to; QString easing; @@ -364,7 +364,7 @@ public: QList exclude; bool fromSourced; - QVariant fromValue; + QmlTimeLineValueAnimator *va; virtual void valueChanged(qreal); -- cgit v0.12 From e2f9eb037dfd26e02cad8a31a499a9c92a315d8b Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Thu, 30 Apr 2009 13:33:23 +0200 Subject: qdoc: Corrected some qdoc warnings. --- doc/src/animation.qdoc | 2 +- src/corelib/tools/qeasingcurve.cpp | 2 +- src/declarative/fx/qfximage.cpp | 2 +- src/declarative/fx/qfxtextedit.cpp | 5 +-- src/declarative/timeline/qmltimeline.cpp | 2 +- src/declarative/util/qfxview.cpp | 64 +++++++++++++++++++++++++++++--- src/declarative/util/qmlscript.cpp | 2 +- src/gui/painting/qpainterpath.cpp | 2 +- tools/qdoc3/test/qt-cpp-ignore.qdocconf | 3 +- 9 files changed, 69 insertions(+), 15 deletions(-) diff --git a/doc/src/animation.qdoc b/doc/src/animation.qdoc index 081660c..f8b6d4c 100644 --- a/doc/src/animation.qdoc +++ b/doc/src/animation.qdoc @@ -43,7 +43,7 @@ \page animation.html \title The Animation Framework \ingroup architecture - \ingroup animation + \ingroup group_animation \brief An overview of the Animation Framework \keyword Animation diff --git a/src/corelib/tools/qeasingcurve.cpp b/src/corelib/tools/qeasingcurve.cpp index a1a0d1f..da86442 100644 --- a/src/corelib/tools/qeasingcurve.cpp +++ b/src/corelib/tools/qeasingcurve.cpp @@ -53,7 +53,7 @@ /*! \class QEasingCurve - \ingroup animation + \ingroup group_animation \brief The QEasingCurve class provides easing curves for controlling animation. Easing curves describe a function that controls how the speed of the interpolation diff --git a/src/declarative/fx/qfximage.cpp b/src/declarative/fx/qfximage.cpp index a34cd12..9eb8277 100644 --- a/src/declarative/fx/qfximage.cpp +++ b/src/declarative/fx/qfximage.cpp @@ -812,7 +812,7 @@ QFxImage::Status QFxImage::status() const */ /*! - \property QFxImage::src + \property QFxImage::source \brief the url of the image to be displayed in this item. The content specified can be of any image type loadable by QImage. Alternatively, diff --git a/src/declarative/fx/qfxtextedit.cpp b/src/declarative/fx/qfxtextedit.cpp index 68aea01..807fcbf 100644 --- a/src/declarative/fx/qfxtextedit.cpp +++ b/src/declarative/fx/qfxtextedit.cpp @@ -63,16 +63,15 @@ QML_DEFINE_TYPE(QFxTextEdit, TextEdit); /*! \qmlclass TextEdit \brief The TextEdit element allows you to add editable formatted text to a scene. - \inherits ImageItem It can display both plain and rich text. For example: - \code + \qml Hello World!]]/> - \endcode + \endqml \image declarative-textedit.gif diff --git a/src/declarative/timeline/qmltimeline.cpp b/src/declarative/timeline/qmltimeline.cpp index b9f79ac..3fa0161 100644 --- a/src/declarative/timeline/qmltimeline.cpp +++ b/src/declarative/timeline/qmltimeline.cpp @@ -561,7 +561,7 @@ void QmlTimeLine::sync(QmlTimeLineValue &timeLineValue) } } -/*! +/* Synchronize all currently and future scheduled values in this timeline to the longest action currently scheduled. diff --git a/src/declarative/util/qfxview.cpp b/src/declarative/util/qfxview.cpp index 5611bca..aefe3e4 100644 --- a/src/declarative/util/qfxview.cpp +++ b/src/declarative/util/qfxview.cpp @@ -145,7 +145,7 @@ QFxView::QFxView(QWidget *parent) /*! \fn QFxView::QFxView(QSimpleCanvas::CanvasMode mode, QWidget *parent) - + \internal Constructs a QFxView with the given \a parent. The canvas \a mode can be QSimpleCanvas::GraphicsView or QSimpleCanvas::SimpleCanvas. @@ -173,8 +173,8 @@ void QFxViewPrivate::init() } /*! - The destructor clears the instance and deletes the internal - representation. + The destructor clears the view's \l {QFxItem} {items} and + deletes the internal representation. \sa clearItems() */ @@ -213,18 +213,29 @@ QString QFxView::xml() const } /*! - Returns a pointer to the QmlEngine. + Returns a pointer to the QmlEngine used for instantiating + QML Components. */ QmlEngine* QFxView::engine() { return &d->engine; } +/*! + This function returns the root of the context hierarchy. Each QML + component is instantiated in a QmlContext. QmlContext's are + essential for passing data to QML components. In QML, contexts are + arranged hierarchically and this hierarchy is managed by the + QmlEngine. + */ QmlContext* QFxView::rootContext() { return d->engine.rootContext(); } +/*! + Displays the Qt Declarative user interface. +*/ void QFxView::execute() { rootContext()->activate(); @@ -242,6 +253,9 @@ void QFxView::execute() } } +/*! + \internal + */ void QFxView::continueExecute() { disconnect(d->component, SIGNAL(statusChanged(QmlComponent::Status)), this, SLOT(continueExecute())); @@ -283,12 +297,23 @@ void QFxView::continueExecute() } } +/*! \fn void QFxView::sceneResized(QSize size) + This signal is emitted when the view is resized. + */ + +/*! + \internal + */ void QFxView::sizeChanged() { // delay, so we catch both width and height changing. d->resizetimer.start(0,this); } +/*! + If the \l {QTimerEvent} {timer event} \a e is this + view's resize timer, sceneResized() is emitted. + */ void QFxView::timerEvent(QTimerEvent* e) { if (e->timerId() == d->resizetimer.timerId()) { @@ -298,6 +323,12 @@ void QFxView::timerEvent(QTimerEvent* e) } } +/*! + Creates a \l{QmlComponent} {component} from the \a xml + string, and returns it as an \l {QFxItem} {item}. If the + \a parent item is provided, it becomes the new item's + parent. \a parent should be in this view's item hierarchy. + */ QFxItem* QFxView::addItem(const QString &xml, QFxItem* parent) { if (!d->root) @@ -316,12 +347,19 @@ QFxItem* QFxView::addItem(const QString &xml, QFxItem* parent) return 0; } +/*! + Deletes the view's \l {QFxItem} {items} and the \l {QmlEngine} + {QML engine's} Component cache. + */ void QFxView::reset() { clearItems(); d->engine.clearComponentCache(); } +/*! + Deletes the view's \l {QFxItem} {items}. + */ void QFxView::clearItems() { if (!d->root) @@ -330,11 +368,18 @@ void QFxView::clearItems() d->root = 0; } +/*! + Returns the view's root \l {QFxItem} {item}. + */ QFxItem *QFxView::root() const { return d->root; } +/*! + This function handles the \l {QResizeEvent} {resize event} + \a e. + */ void QFxView::resizeEvent(QResizeEvent *e) { if (d->root) { @@ -344,17 +389,26 @@ void QFxView::resizeEvent(QResizeEvent *e) QSimpleCanvas::resizeEvent(e); } +/*! \fn void QFxView::focusInEvent(QFocusEvent *e) + This virtual function does nothing in this class. + */ void QFxView::focusInEvent(QFocusEvent *) { // Do nothing (do not call QWidget::update()) } + +/*! \fn void QFxView::focusOutEvent(QFocusEvent *e) + This virtual function does nothing in this class. + */ void QFxView::focusOutEvent(QFocusEvent *) { // Do nothing (do not call QWidget::update()) } - +/*! + \internal + */ void QFxView::dumpRoot() { root()->dump(); diff --git a/src/declarative/util/qmlscript.cpp b/src/declarative/util/qmlscript.cpp index fbaf56e..757ae09 100644 --- a/src/declarative/util/qmlscript.cpp +++ b/src/declarative/util/qmlscript.cpp @@ -136,7 +136,7 @@ void QmlScript::setScript(const QString &script) the file specified. */ /*! - \property QmlScript::src + \property QmlScript::source \brief the path to a script file. */ QString QmlScript::source() const diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp index d471aaa..5f110e3 100644 --- a/src/gui/painting/qpainterpath.cpp +++ b/src/gui/painting/qpainterpath.cpp @@ -2049,7 +2049,7 @@ QPainterPath QPainterPath::translated(qreal dx, qreal dy) const } /*! - \fn void QPainterPath::translated(const QPointF &offset) + \fn void QPainterPath::translated(const QPointF &offset) const \overload \since 4.6 diff --git a/tools/qdoc3/test/qt-cpp-ignore.qdocconf b/tools/qdoc3/test/qt-cpp-ignore.qdocconf index 107c692..603f531 100644 --- a/tools/qdoc3/test/qt-cpp-ignore.qdocconf +++ b/tools/qdoc3/test/qt-cpp-ignore.qdocconf @@ -65,7 +65,8 @@ Cpp.ignoretokens = QAXFACTORY_EXPORT \ QT_BEGIN_INCLUDE_NAMESPACE \ QT_END_NAMESPACE \ QT_END_INCLUDE_NAMESPACE \ - PHONON_EXPORT + PHONON_EXPORT \ + Q_DECLARATIVE_EXPORT Cpp.ignoredirectives = Q_DECLARE_HANDLE \ Q_DECLARE_INTERFACE \ Q_DECLARE_METATYPE \ -- cgit v0.12 From 052e6a8e82b707749be2ecbad1af60effecefebb Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Thu, 30 Apr 2009 13:51:22 +0200 Subject: Removed a fiew compilation warnings on MSVC --- src/declarative/qml/qmlcomponent.h | 2 +- src/declarative/qml/qmldom.cpp | 2 ++ src/declarative/util/qmlanimation.cpp | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/declarative/qml/qmlcomponent.h b/src/declarative/qml/qmlcomponent.h index 83d08ea..0493c1f 100644 --- a/src/declarative/qml/qmlcomponent.h +++ b/src/declarative/qml/qmlcomponent.h @@ -98,7 +98,7 @@ private: QmlComponent(QmlEngine *, QmlCompiledComponent *, int, int, QObject *parent); friend class QmlVME; - friend class QmlCompositeTypeData; + friend struct QmlCompositeTypeData; }; QML_DECLARE_TYPE(QmlComponent); diff --git a/src/declarative/qml/qmldom.cpp b/src/declarative/qml/qmldom.cpp index 4e8e1f7..937c244 100644 --- a/src/declarative/qml/qmldom.cpp +++ b/src/declarative/qml/qmldom.cpp @@ -150,6 +150,8 @@ int QmlDomDocument::version() const */ bool QmlDomDocument::load(QmlEngine *engine, const QByteArray &data) { + Q_UNUSED(engine); + d->error = QString(); QmlScriptParser parser; diff --git a/src/declarative/util/qmlanimation.cpp b/src/declarative/util/qmlanimation.cpp index 7861e55..4bcc550 100644 --- a/src/declarative/util/qmlanimation.cpp +++ b/src/declarative/util/qmlanimation.cpp @@ -211,7 +211,7 @@ void QmlAbstractAnimationPrivate::commence() q->prepare(userProperty.value); q->qtAnimation()->start(); - if (!q->qtAnimation()->state() == QAbstractAnimation::Running) { + if (q->qtAnimation()->state() != QAbstractAnimation::Running) { running = false; emit q->completed(); } -- cgit v0.12 From 6091b55ef4da3459ca3dd9d92e41fc223cf06aaf Mon Sep 17 00:00:00 2001 From: Roberto Raggi Date: Thu, 30 Apr 2009 16:26:22 +0200 Subject: Report the syntax errors. --- src/declarative/qml/qmlscriptparser.cpp | 39 ++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/src/declarative/qml/qmlscriptparser.cpp b/src/declarative/qml/qmlscriptparser.cpp index adc30dd..61cb2ee 100644 --- a/src/declarative/qml/qmlscriptparser.cpp +++ b/src/declarative/qml/qmlscriptparser.cpp @@ -547,7 +547,9 @@ bool QmlScriptParser::parse(const QByteArray &data, const QUrl &url) } const QString fileName = url.toString(); - const QString code = QString::fromUtf8(data); // ### FIXME + + QTextStream stream(data, QIODevice::ReadOnly); + const QString code = stream.readAll(); JavaScriptParser parser; JavaScriptEnginePrivate driver; @@ -562,6 +564,41 @@ bool QmlScriptParser::parse(const QByteArray &data, const QUrl &url) if (! parser.parse(&driver)) { _error = parser.errorMessage(); _errorLine = parser.errorLineNumber(); + + const QStringList lines = code.split(QLatin1Char('\n')); + + foreach (const JavaScriptParser::DiagnosticMessage &m, parser.diagnosticMessages()) { + + if (m.isWarning()) + continue; + + qWarning().nospace() << qPrintable(fileName) << ":" + << m.line << ":" + << m.column << ": " + << "error: " + << qPrintable(m.message); + + const QString textLine = lines.at(m.line - 1); + + qWarning() << qPrintable(textLine); + + int column = qMax(0, m.column - 1); + column = qMin(column, textLine.length()); // paranoia check + + QByteArray ind; + ind.reserve(column); + + for (int i = 0; i < column; ++i) { + const QChar ch = textLine.at(i); + if (ch.isSpace()) + ind.append(ch.unicode()); + else + ind.append(' '); + } + ind.append('^'); + qWarning() << ind.constData(); + } + return false; } -- cgit v0.12 From 5b548025ca353fa2f512356d0969b096b5b705e1 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Thu, 30 Apr 2009 16:44:40 +0200 Subject: Added simple autotests for QmlDom classes --- tests/auto/declarative/qmldom/qmldom.pro | 3 + tests/auto/declarative/qmldom/tst_qmldom.cpp | 90 ++++++++++++++++++++++++++++ 2 files changed, 93 insertions(+) create mode 100644 tests/auto/declarative/qmldom/qmldom.pro create mode 100644 tests/auto/declarative/qmldom/tst_qmldom.cpp diff --git a/tests/auto/declarative/qmldom/qmldom.pro b/tests/auto/declarative/qmldom/qmldom.pro new file mode 100644 index 0000000..5294cb4 --- /dev/null +++ b/tests/auto/declarative/qmldom/qmldom.pro @@ -0,0 +1,3 @@ +load(qttest_p4) +contains(QT_CONFIG,declarative): QT += declarative +SOURCES += tst_qmldom.cpp diff --git a/tests/auto/declarative/qmldom/tst_qmldom.cpp b/tests/auto/declarative/qmldom/tst_qmldom.cpp new file mode 100644 index 0000000..7e7e067 --- /dev/null +++ b/tests/auto/declarative/qmldom/tst_qmldom.cpp @@ -0,0 +1,90 @@ +#include +#include +#include +#include + +#include + +class tst_qmldom : public QObject +{ + Q_OBJECT +public: + tst_qmldom() {} + +private slots: + void loadSimple(); + void loadProperties(); + void loadChildObject(); + +private: + QmlEngine engine; +}; + + +void tst_qmldom::loadSimple() +{ + QByteArray qml = "Item {}"; + //QByteArray qml = ""; + + QmlDomDocument document; + QVERIFY(document.load(&engine, qml)); + QVERIFY(document.loadError().isEmpty()); + + QmlDomObject rootObject = document.rootObject(); + QVERIFY(rootObject.isValid()); + QVERIFY(!rootObject.isComponent()); + QVERIFY(!rootObject.isCustomType()); + QVERIFY(rootObject.objectType() == "Item"); +} + +void tst_qmldom::loadProperties() +{ + QByteArray qml = "Item { id : item; x : 300; visible : true }"; + //QByteArray qml = ""; + + QmlDomDocument document; + QVERIFY(document.load(&engine, qml)); + + QmlDomObject rootObject = document.rootObject(); + QVERIFY(rootObject.isValid()); + QVERIFY(rootObject.objectId() == "item"); + QVERIFY(rootObject.properties().size() == 2); + + QmlDomProperty xProperty = rootObject.property("x"); + QVERIFY(xProperty.propertyName() == "x"); + QVERIFY(xProperty.value().isLiteral()); + QVERIFY(xProperty.value().toLiteral().literal() == "300"); + + QmlDomProperty visibleProperty = rootObject.property("visible"); + QVERIFY(visibleProperty.propertyName() == "visible"); + QVERIFY(visibleProperty.value().isLiteral()); + QVERIFY(visibleProperty.value().toLiteral().literal() == "true"); +} + +void tst_qmldom::loadChildObject() +{ + QByteArray qml = "Item { Item }"; + //QByteArray qml = " "; + + QmlDomDocument document; + QVERIFY(document.load(&engine, qml)); + + QmlDomObject rootItem = document.rootObject(); + QVERIFY(rootItem.isValid()); + QVERIFY(rootItem.properties().size() == 1); + + QmlDomProperty listProperty = rootItem.properties().at(0); + QVERIFY(listProperty.isDefaultProperty()); + QVERIFY(listProperty.value().isList()); + + QmlDomList list = listProperty.value().toList(); + QVERIFY(list.values().size() == 1); + + QmlDomObject childItem = list.values().first().toObject(); + QVERIFY(childItem.isValid()); + QVERIFY(childItem.objectType() == "Item"); +} + +QTEST_MAIN(tst_qmldom) + +#include "tst_qmldom.moc" -- cgit v0.12 From f57e5f12807e1860839a4b3c47af180230bdbfaa Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Fri, 1 May 2009 10:03:07 +1000 Subject: Fix typo. --- tools/qmlconv/qmlconv.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/qmlconv/qmlconv.cpp b/tools/qmlconv/qmlconv.cpp index 3457a4f..6e89530 100644 --- a/tools/qmlconv/qmlconv.cpp +++ b/tools/qmlconv/qmlconv.cpp @@ -448,7 +448,7 @@ int main(int argc, char *argv[]) } if (args.isEmpty() && optionInPlace) { - qWarning() << "Usage: qmlconf [ [-i] filename ]"; + qWarning() << "Usage: qmlconv [ [-i] filename ]"; exit(1); } -- cgit v0.12 From 3e3e22b2eb1ac2cc3fa33de3810962cd95be9988 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Fri, 1 May 2009 10:06:55 +1000 Subject: PathView format conversion. --- doc/src/images/declarative-pathattribute.png | Bin 481 -> 7207 bytes .../declarative/pathview/dummydata/MenuModel.qml | 15 ++++ .../declarative/pathview/pathattributes.qml | 34 ++++++++ doc/src/snippets/declarative/pathview/pathview.qml | 28 +++++++ .../declarative/pathview/pics/qtlogo-64.png | Bin 0 -> 2991 bytes src/declarative/fx/qfxpath.cpp | 90 +++++++++------------ src/declarative/fx/qfxpathview.cpp | 28 +------ 7 files changed, 115 insertions(+), 80 deletions(-) create mode 100644 doc/src/snippets/declarative/pathview/dummydata/MenuModel.qml create mode 100644 doc/src/snippets/declarative/pathview/pathattributes.qml create mode 100644 doc/src/snippets/declarative/pathview/pathview.qml create mode 100644 doc/src/snippets/declarative/pathview/pics/qtlogo-64.png diff --git a/doc/src/images/declarative-pathattribute.png b/doc/src/images/declarative-pathattribute.png index 04215db..57cd049 100644 Binary files a/doc/src/images/declarative-pathattribute.png and b/doc/src/images/declarative-pathattribute.png differ diff --git a/doc/src/snippets/declarative/pathview/dummydata/MenuModel.qml b/doc/src/snippets/declarative/pathview/dummydata/MenuModel.qml new file mode 100644 index 0000000..5b973d7 --- /dev/null +++ b/doc/src/snippets/declarative/pathview/dummydata/MenuModel.qml @@ -0,0 +1,15 @@ +ListModel2 { + id: MenuModel + ListElement { + name: "Bill Jones" + icon: "pics/qtlogo-64.png" + } + ListElement { + name: "Jane Doe" + icon: "pics/qtlogo-64.png" + } + ListElement { + name: "John Smith" + icon: "pics/qtlogo-64.png" + } +} diff --git a/doc/src/snippets/declarative/pathview/pathattributes.qml b/doc/src/snippets/declarative/pathview/pathattributes.qml new file mode 100644 index 0000000..44789f2 --- /dev/null +++ b/doc/src/snippets/declarative/pathview/pathattributes.qml @@ -0,0 +1,34 @@ +Rect { + width: 240; height: 200; color: 'white' +//! [0] +//! [1] + Component { + id: Delegate + Item { + id: Wrapper + width: 80; height: 80 + scale: PathView.scale + opacity: PathView.opacity + VerticalLayout { + Image { anchors.horizontalCenter: Name.horizontalCenter; width: 64; height: 64; source: icon } + Text { id: Name; text: name; font.size: 16} + } + } + } +//! [1] +//! [2] + PathView { + anchors.fill: parent; model: MenuModel; delegate: Delegate + path: Path { + startX: 120; startY: 100 + PathAttribute { name: "scale"; value: 1.0 } + PathAttribute { name: "opacity"; value: 1.0 } + PathQuad { x: 120; y: 25; controlX: 260; controlY: 75 } + PathAttribute { name: "scale"; value: 0.3 } + PathAttribute { name: "opacity"; value: 0.5 } + PathQuad { x: 120; y: 100; controlX: -20; controlY: 75 } + } + } +//! [2] +//! [0] +} diff --git a/doc/src/snippets/declarative/pathview/pathview.qml b/doc/src/snippets/declarative/pathview/pathview.qml new file mode 100644 index 0000000..11df0a2 --- /dev/null +++ b/doc/src/snippets/declarative/pathview/pathview.qml @@ -0,0 +1,28 @@ +Rect { + width: 240; height: 200; color: 'white' +//! [0] +//! [1] + Component { + id: Delegate + Item { + id: Wrapper + width: 80; height: 80 + VerticalLayout { + Image { anchors.horizontalCenter: Name.horizontalCenter; width: 64; height: 64; source: icon } + Text { id: Name; text: name; font.size: 16} + } + } + } +//! [1] +//! [2] + PathView { + anchors.fill: parent; model: MenuModel; delegate: Delegate + path: Path { + startX: 120; startY: 100 + PathQuad { x: 120; y: 25; controlX: 260; controlY: 75 } + PathQuad { x: 120; y: 100; controlX: -20; controlY: 75 } + } + } +//! [2] +//! [0] +} diff --git a/doc/src/snippets/declarative/pathview/pics/qtlogo-64.png b/doc/src/snippets/declarative/pathview/pics/qtlogo-64.png new file mode 100644 index 0000000..4f68e16 Binary files /dev/null and b/doc/src/snippets/declarative/pathview/pics/qtlogo-64.png differ diff --git a/src/declarative/fx/qfxpath.cpp b/src/declarative/fx/qfxpath.cpp index f08671d..26aa10e 100644 --- a/src/declarative/fx/qfxpath.cpp +++ b/src/declarative/fx/qfxpath.cpp @@ -164,16 +164,7 @@ void QFxPath::setStartY(qreal y) \i \l PathPercent - a way to spread out items along various segments of the path. \endlist - \code - - - - - - - - - \endcode + \snippet doc/src/snippets/declarative/pathview/pathattributes.qml 2 */ QList* QFxPath::pathElements() @@ -493,31 +484,15 @@ void QFxCurve::setY(qreal y) an attribute at any particular point is interpolated from the PathAttributes bounding the point. - The example below shows a path with the items scaled to 10% at the ends of - the path and scaled 100% along the PathLine in the middle. Note the use - of the PathView.scale attached property to set the scale of the delegate. + The example below shows a path with the items scaled to 30% with opacity 50% + at the top of the path and scaled 100% with opacity 100% at the bottom. + Note the use of the PathView.scale and PathView.opacity attached properties + to set the scale and opacity of the delegate. \table \row \o \image declarative-pathattribute.png \o - \code - - - - - - - - - - - - - - - - - \endcode + \snippet doc/src/snippets/declarative/pathview/pathattributes.qml 0 \endtable \sa Path @@ -583,9 +558,10 @@ void QFxPathAttribute::setValue(qreal value) 0,100 to 200,100: \code - - - + Path { + startX: 0; startY: 100 + PathLine { x: 200; y: 100 } + } \endcode \sa Path, PathQuad, PathCubic @@ -624,9 +600,10 @@ void QFxPathLine::addToPath(QPainterPath &path) \o \image declarative-pathquad.png \o \code - - - + Path { + startX: 0; startY: 0 + PathQuad x: 200; y: 0; controlX: 100; controlY: 150 } + } \endcode \endtable @@ -707,10 +684,13 @@ void QFxPathQuad::addToPath(QPainterPath &path) \o \image declarative-pathcubic.png \o \code - - - + Path { + startX: 20; startY: 0 + PathCubic { + x: 180; y: 0; control1X: -10; control1Y: 90 + control2X: 210; control2Y: 90 + } + } \endcode \endtable @@ -834,24 +814,26 @@ void QFxPathCubic::addToPath(QPainterPath &path) \o \image declarative-nopercent.png \o \code - - - - - + Path { + startX: 20; startY: 0 + PathQuad { x: 50; y: 80; controlX: 0; controlY: 80 } + PathLine { x: 150; y: 80 } + PathQuad { x: 180; y: 0; controlX: 200; controlY: 80 } + } \endcode \row \o \image declarative-percent.png \o \code - - - - - - - - + Path { + startX: 20; startY: 0 + PathQuad { x: 50; y: 80; controlX: 0; controlY: 80 } + PathPercent { value: 0.25 } + PathLine { x: 150; y: 80 } + PathPercent { value: 0.75 } + PathQuad { x: 180; y: 0; controlX: 200; controlY: 80 } + PathPercent { value: 1 } + } \endcode \endtable diff --git a/src/declarative/fx/qfxpathview.cpp b/src/declarative/fx/qfxpathview.cpp index a2ea8ee..4785a52 100644 --- a/src/declarative/fx/qfxpathview.cpp +++ b/src/declarative/fx/qfxpathview.cpp @@ -41,7 +41,6 @@ #include #include -#include #include #include "qmlbindablevalue.h" #include "qmlstate.h" @@ -51,7 +50,6 @@ #include "qfxpathview.h" #include "qfxpathview_p.h" #include -#include static const int FlickThreshold = 5; @@ -103,13 +101,7 @@ private: The items are laid out along a path defined by a \l Path and may be flicked to scroll. - \code - - ... - ... - ... - - \endcode + \snippet doc/src/snippets/declarative/pathview/pathview.qml 0 \image pathview.gif @@ -320,23 +312,7 @@ void QFxPathView::setDragMargin(qreal dragMargin) The delegate provides a template describing what each item in the view should look and act like. Here is an example delegate: - \code - - - - - - - - - - ... - - \endcode + \snippet doc/src/snippets/declarative/pathview/pathview.qml 1 */ /*! -- cgit v0.12 From afbf5a144f40cacce0673292d34eda3086a3745e Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Fri, 1 May 2009 10:19:49 +1000 Subject: Format conversion. --- src/declarative/fx/qfximage.cpp | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/src/declarative/fx/qfximage.cpp b/src/declarative/fx/qfximage.cpp index dded48c..1361d68 100644 --- a/src/declarative/fx/qfximage.cpp +++ b/src/declarative/fx/qfximage.cpp @@ -68,28 +68,27 @@ QML_DEFINE_TYPE(QFxImage,Image); \o \image declarative-qtlogo1.png \o Untransformed \code - + Image { source: "pics/qtlogo.png" } \endcode \row \o \image declarative-qtlogo2.png \o Stretched \code - + Image { width: 160; height: 160; source: "pics/qtlogo.png" } \endcode \row \o \image declarative-qtlogo4.png \o Grid-scaled \code - + Image { scaleGrid.left: 20; scaleGrid.right: 10 + scaleGrid.top: 14; scaleGrid.bottom: 14 + width: 160; height: 160; source: "pics/qtlogo.png" } \endcode \row \o \image declarative-qtlogo3.png \o Tiled \code - + Image { tile: true; width: 160; height: 160; source: "pics/qtlogo.png" } \endcode \endtable */ @@ -103,7 +102,7 @@ QML_DEFINE_TYPE(QFxImage,Image); Example: \code - + Image { source: "pics/star.png" } \endcode A QFxImage object can be instantiated in Qml using the tag \l Image. @@ -200,11 +199,11 @@ QFxScaleGrid *QFxImage::scaleGrid() of unscaled tiles, clipped to the size of the Image. \code - - - - - + Item { + Image { source: "tile.png" } + Image { x: 80; width: 100; height: 100; src: "tile.png" } + Image { x: 190; width: 100; height: 100; tile: true; src: "tile.png" } + } \endcode \image declarative-image_tile.png -- cgit v0.12 From dae1a84e571691e32147e7d1699e161693dbfee1 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Fri, 1 May 2009 10:40:13 +1000 Subject: Fix insertion of items when there are no existing items. --- src/declarative/fx/qfxpathview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/declarative/fx/qfxpathview.cpp b/src/declarative/fx/qfxpathview.cpp index 4785a52..810a359 100644 --- a/src/declarative/fx/qfxpathview.cpp +++ b/src/declarative/fx/qfxpathview.cpp @@ -658,7 +658,7 @@ void QFxPathView::itemsInserted(int modelIndex, int count) { //XXX support animated insertion Q_D(QFxPathView); - if (d->pathItems == -1 || d->items.count() < d->pathItems) { + if (d->pathItems == -1) { for (int i = 0; i < count; ++i) { QFxItem *item = d->model->item(modelIndex + i); item->setZ(modelIndex + i); -- cgit v0.12 From 020f86805e2f3f9fa8e069c3a0ae04ef4a6d57cd Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Fri, 1 May 2009 10:49:51 +1000 Subject: Format conversion for animation, states and transitions, and transform elements. --- doc/src/snippets/declarative/pics/qt.png | Bin 0 -> 514 bytes doc/src/snippets/declarative/rotation.qml | 27 ++++++++++ src/declarative/fx/qfxtransform.cpp | 34 +++--------- src/declarative/util/qmlanimation.cpp | 78 +++++++++++++--------------- src/declarative/util/qmlbehaviour.cpp | 20 ++++--- src/declarative/util/qmlfollow.cpp | 36 ++++++++----- src/declarative/util/qmlsetproperties.cpp | 14 ++++- src/declarative/util/qmlstateoperations.cpp | 41 +++++++++++---- src/declarative/util/qmltransition.cpp | 6 ++- 9 files changed, 152 insertions(+), 104 deletions(-) create mode 100644 doc/src/snippets/declarative/pics/qt.png create mode 100644 doc/src/snippets/declarative/rotation.qml diff --git a/doc/src/snippets/declarative/pics/qt.png b/doc/src/snippets/declarative/pics/qt.png new file mode 100644 index 0000000..cbed1a9 Binary files /dev/null and b/doc/src/snippets/declarative/pics/qt.png differ diff --git a/doc/src/snippets/declarative/rotation.qml b/doc/src/snippets/declarative/rotation.qml new file mode 100644 index 0000000..01838dd --- /dev/null +++ b/doc/src/snippets/declarative/rotation.qml @@ -0,0 +1,27 @@ +Rect { + width: 360; height: 80 + color: "white" +//! [0] + HorizontalLayout { + margin: 10 + spacing: 10 + Image { source: "pics/qt.png" } + Image { + source: "pics/qt.png" + transform: Rotation3D { axis.startX: 30; axis.endX: 30; axis.endY: 60; angle: 18 } + } + Image { + source: "pics/qt.png" + transform: Rotation3D { axis.startX: 30; axis.endX: 30; axis.endY: 60; angle: 36 } + } + Image { + source: "pics/qt.png" + transform: Rotation3D { axis.startX: 30; axis.endX: 30; axis.endY: 60; angle: 54 } + } + Image { + source: "pics/qt.png" + transform: Rotation3D { axis.startX: 30; axis.endX: 30; axis.endY: 60; angle: 72 } + } + } +//! [0] +} diff --git a/src/declarative/fx/qfxtransform.cpp b/src/declarative/fx/qfxtransform.cpp index 2bed170..8ff4c54 100644 --- a/src/declarative/fx/qfxtransform.cpp +++ b/src/declarative/fx/qfxtransform.cpp @@ -93,7 +93,7 @@ void QFxTransform::update() between the points does matter for translation along an axis. \code - + Axis { startX: 0; startY: 0; endX: 20; endY: 30 } \endcode */ @@ -182,31 +182,7 @@ void QFxAxis::setEndZ(qreal z) \brief The Rotation3D element provides a way to rotate an Item around an axis. Here is an example of various rotations applied to an \l Image. - \code - - - - - - - - - - - - - - - - - - - - - - - - \endcode + \snippet doc/src/snippets/declarative/rotation.qml 0 \image axisrotation.png */ @@ -233,6 +209,8 @@ QFxRotation3D::~QFxRotation3D() A rotation axis is specified by 2 points in 3D space: a start point and an end point. The z-position of the start point is assumed to be 0, and cannot be changed. + + \sa Axis */ QFxAxis *QFxRotation3D::axis() { @@ -374,6 +352,8 @@ QFxTranslation3D::~QFxTranslation3D() an end point. The z-position of the start point is assumed to be 0, and cannot be changed. Changing the z-position of the end point is only valid when running under OpenGL. + + \sa Axis */ QFxAxis *QFxTranslation3D::axis() { @@ -388,7 +368,7 @@ QFxAxis *QFxTranslation3D::axis() of 0.5 would translate to 50, 25. \code - + Translation3D { axis.startX: 0; axis.startY: 0; axis.endX: 100; axis.endY: 50 } \endcode */ qreal QFxTranslation3D::distance() const diff --git a/src/declarative/util/qmlanimation.cpp b/src/declarative/util/qmlanimation.cpp index 4bcc550..d5765c1 100644 --- a/src/declarative/util/qmlanimation.cpp +++ b/src/declarative/util/qmlanimation.cpp @@ -177,12 +177,14 @@ QmlAbstractAnimation::QmlAbstractAnimation(QmlAbstractAnimationPrivate &dd, QObj whenever the \l MouseRegion is pressed. \code - - - - - - + Rect { + width: 100; height: 100 + x: NumericAnimation { + running: MyMouse.pressed + from: 0; to: 100 + } + MouseRegion { id: MyMouse } + } \endcode Likewise, the \c running property can be read to determine if the animation @@ -190,8 +192,8 @@ QmlAbstractAnimation::QmlAbstractAnimation(QmlAbstractAnimationPrivate &dd, QObj or not the animation is running. \code - - + NumericAnimation { id: MyAnimation } + Text { text: MyAnimation.running ? "Animation is running" : "Animation is not running" } \endcode Animations can also be started and stopped imperatively from JavaScript @@ -304,11 +306,9 @@ void QmlAbstractAnimation::setFinishPlaying(bool f) In the following example, the rectangle will spin indefinately. \code - - - - - + Rect { + rotation: NumericAnimation { running: true; repeat: true; from: 0 to: 360 } + } \endcode */ bool QmlAbstractAnimation::repeat() const @@ -435,11 +435,9 @@ void QmlAbstractAnimation::start() Normally \c stop() stops the animation immediately, and the animation has no further influence on property values. In this example animation \code - - - - - + Rect { + x: NumericAnimation { from: 0; to: 100; duration: 500 } + } \endcode was stopped at time 250ms, the \c x property will have a value of 50. @@ -475,11 +473,9 @@ void QmlAbstractAnimation::restart() Unlike \c stop(), \c complete() immediately fast-forwards the animation to its end. In the following example, \code - - - - - + Rect { + x: NumericAnimation { from: 0; to: 100; duration: 500 } + } \endcode calling \c stop() at time 250ms will result in the \c x property having a value of 50, while calling \c complete() will set the \c x property to @@ -529,11 +525,11 @@ void QmlAbstractAnimation::timelineComplete() A 500ms animation sequence, with a 100ms pause between two animations: \code - - - - - + SequentialAnimation { + NumericAnimation { ... duration: 200 } + PauseAnimation { duration: 100 } + NumericAnimation { ... duration: 200 } + } \endcode */ /*! @@ -621,7 +617,7 @@ QAbstractAnimation *QmlPauseAnimation::qtAnimation() \brief The ColorAnimation allows you to animate color changes. \code - + ColorAnimation { from: "white" to: "#c0c0c0"; duration: 100 } \endcode The default property animated is \c color, but like other animations, @@ -1016,12 +1012,12 @@ QML_DEFINE_TYPE(QmlRunScriptAction, RunScriptAction); Explicitly set \c theimage.smooth=true during a transition: \code - + SetPropertyAction { target: theimage; property: "smooth"; value: true } \endcode Set \c thewebview.url to the value set for the destination state: \code - + SetPropertyAction { target: thewebview; property: "url" } \endcode The SetPropertyAction is immediate - @@ -1324,7 +1320,7 @@ QML_DEFINE_TYPE(QmlParentChangeAction,ParentChangeAction); Animate a set of properties over 200ms, from their values in the start state to their values in the end state of the transition: \code - + NumericAnimation { properties: "x,y,scale"; duration: 200 } \endcode */ @@ -1723,10 +1719,10 @@ QmlList *QmlAnimationGroup::animations() object will animate from its current x position to 100, and then back to 0. \code - - - - + SequentialAnimation { + NumericAnimation { target: MyItem; property: "x"; to: 100 } + NumericAnimation { target: MyItem; property: "x"; to: 0 } + } \endcode \sa ParallelAnimation @@ -1800,10 +1796,10 @@ QML_DEFINE_TYPE(QmlSequentialAnimation,SequentialAnimation); to (100,100) by animating the x and y properties in parallel. \code - - - - + ParallelAnimation { + NumericAnimation { target: MyItem; property: "x"; to: 100 } + NumericAnimation { target: MyItem; property: "y"; to: 100 } + } \endcode \sa SequentialAnimation @@ -1924,7 +1920,7 @@ void QmlVariantAnimationPrivate::convertVariant(QVariant &variant, QVariant::Typ Animate a size property over 200ms, from its current size to 20-by-20: \code - + VariantAnimation { property: "size"; to: "20x20"; duration: 200 } \endcode */ diff --git a/src/declarative/util/qmlbehaviour.cpp b/src/declarative/util/qmlbehaviour.cpp index 58e515f..354c7e3 100644 --- a/src/declarative/util/qmlbehaviour.cpp +++ b/src/declarative/util/qmlbehaviour.cpp @@ -105,15 +105,19 @@ public: \qmlclass Behaviour QmlBehaviour \brief The Behaviour element allows you to specify a default animation for a property change. - In example below, Rect1 will use a bounce easing curve over 200 millisecond for any changes to its y property: + In example below, the rect will use a bounce easing curve over 200 millisecond for any changes to its y property: \code - - - - - - - + Rect { + width: 20; height: 20 + color: "#00ff00" + y: 200 //initial value + y: Behaviour { + NumericAnimation { + easing: "easeOutBounce(amplitude:100)" + duration: 200 + } + } + } \endcode */ diff --git a/src/declarative/util/qmlfollow.cpp b/src/declarative/util/qmlfollow.cpp index 35f3c49..998166a 100644 --- a/src/declarative/util/qmlfollow.cpp +++ b/src/declarative/util/qmlfollow.cpp @@ -174,19 +174,29 @@ void QmlFollowPrivate::stop() In example below, Rect2 will follow Rect1 moving with a velocity of up to 200: \code - - - - - - - - - - - - - + Rect { + id: Rect1 + width: 20; height: 20 + color: "#00ff00" + y: 200 //initial value + y: SequentialAnimation { + running: true + repeat: true + NumericAnimation { + to: 200 + easing: "easeOutBounce(amplitude:100)" + duration: 2000 + } + PauseAnimation { duration: 1000 } + } + } + Rect { + id: Rect2 + x: Rect1.width + width: 20; height: 20 + color: "#ff0000" + y: Follow { source: Rect1.y; velocity: 200 } + } \endcode */ diff --git a/src/declarative/util/qmlsetproperties.cpp b/src/declarative/util/qmlsetproperties.cpp index 108f2b2..9b5a58e 100644 --- a/src/declarative/util/qmlsetproperties.cpp +++ b/src/declarative/util/qmlsetproperties.cpp @@ -108,7 +108,12 @@ void QmlSetPropertiesMetaObject::propertyWrite(int id) you normally would specify them for the actual item: \code - + SetProperties { + target: myRect + x: 52 + y: 300 + width: 48 + } \endcode \c target is a property of \c SetProperties, so if the property you want to change @@ -129,7 +134,12 @@ void QmlSetPropertiesMetaObject::propertyWrite(int id) you normally would specify them for the actual item: \code - + SetProperties { + target: myRect + x: 52 + y: 300 + width: 48 + } \endcode \c target is a property of \c SetProperties, so if the property you want to change diff --git a/src/declarative/util/qmlstateoperations.cpp b/src/declarative/util/qmlstateoperations.cpp index 755befe..01f9cdd 100644 --- a/src/declarative/util/qmlstateoperations.cpp +++ b/src/declarative/util/qmlstateoperations.cpp @@ -212,17 +212,36 @@ QmlRunScript::ActionList QmlRunScript::actions() the current state: \code - - - - - - - - - - - + Rect { + id: myrect + width: 50 + height: 50 + color: "red" + } + + states: [ + State { + name: "Position1" + SetProperty { + target: myrect + property: "x" + value: 150 + } + SetProperty { + target: myrect + property: "y" + value: 50 + } + }, + State { + name: "Position2" + SetProperty { + target: myrect + property: "y" + value: 200 + } + } + ] \endcode \sa SetProperties diff --git a/src/declarative/util/qmltransition.cpp b/src/declarative/util/qmltransition.cpp index a515f58..47e70ad 100644 --- a/src/declarative/util/qmltransition.cpp +++ b/src/declarative/util/qmltransition.cpp @@ -188,9 +188,11 @@ void QmlTransition::prepare(QmlStateOperation::ActionList &actions, be applied. By default fromState and toState are both "*" (any state). In the following example, the transition is applied when changing from state1 to state2. \code - + Transition { + fromState: "state1" + toState: "state2" ... - + } \endcode */ -- cgit v0.12