summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/qml')
-rw-r--r--src/declarative/qml/parser/javascript.g350
-rw-r--r--src/declarative/qml/parser/javascriptast.cpp2
-rw-r--r--src/declarative/qml/parser/javascriptast_p.h129
-rw-r--r--src/declarative/qml/parser/javascriptastfwd_p.h21
-rw-r--r--src/declarative/qml/parser/javascriptengine_p.cpp50
-rw-r--r--src/declarative/qml/parser/javascriptengine_p.h125
-rw-r--r--src/declarative/qml/parser/javascriptgrammar.cpp1277
-rw-r--r--src/declarative/qml/parser/javascriptgrammar_p.h14
-rw-r--r--src/declarative/qml/parser/javascriptlexer.cpp66
-rw-r--r--src/declarative/qml/parser/javascriptlexer_p.h16
-rw-r--r--src/declarative/qml/parser/javascriptnodepool_p.h9
-rw-r--r--src/declarative/qml/parser/javascriptparser.cpp560
-rw-r--r--src/declarative/qml/parser/javascriptparser_p.h135
-rw-r--r--src/declarative/qml/parser/javascriptprettypretty.cpp32
-rw-r--r--src/declarative/qml/parser/javascriptvalue.h6
-rw-r--r--src/declarative/qml/parser/parser.pri3
-rw-r--r--src/declarative/qml/qmlbindablevalue.h8
-rw-r--r--src/declarative/qml/qmlbindablevalue_p.h4
-rw-r--r--src/declarative/qml/qmlboundsignal_p.h2
-rw-r--r--src/declarative/qml/qmlcompiledcomponent_p.h2
-rw-r--r--src/declarative/qml/qmlcompiler.cpp59
-rw-r--r--src/declarative/qml/qmlcompiler_p.h6
-rw-r--r--src/declarative/qml/qmlcomponent_p.h24
-rw-r--r--src/declarative/qml/qmlcompositetypemanager_p.h4
-rw-r--r--src/declarative/qml/qmlcontext.cpp4
-rw-r--r--src/declarative/qml/qmlcontext_p.h6
-rw-r--r--src/declarative/qml/qmlcustomparser.cpp28
-rw-r--r--src/declarative/qml/qmlcustomparser_p.h2
-rw-r--r--src/declarative/qml/qmldom.cpp7
-rw-r--r--src/declarative/qml/qmlengine.cpp56
-rw-r--r--src/declarative/qml/qmlengine.h2
-rw-r--r--src/declarative/qml/qmlengine_p.h18
-rw-r--r--src/declarative/qml/qmlexpression.h2
-rw-r--r--src/declarative/qml/qmlinstruction.cpp9
-rw-r--r--src/declarative/qml/qmlinstruction_p.h11
-rw-r--r--src/declarative/qml/qmlmetaproperty.cpp108
-rw-r--r--src/declarative/qml/qmlmetaproperty.h4
-rw-r--r--src/declarative/qml/qmlmetaproperty_p.h3
-rw-r--r--src/declarative/qml/qmlmetatype.cpp15
-rw-r--r--src/declarative/qml/qmlmetatype.h6
-rw-r--r--src/declarative/qml/qmlparser_p.h12
-rw-r--r--src/declarative/qml/qmlpropertyvaluesource.h6
-rw-r--r--src/declarative/qml/qmlproxymetaobject_p.h6
-rw-r--r--src/declarative/qml/qmlrefcount_p.h2
-rw-r--r--src/declarative/qml/qmlscriptparser.cpp79
-rw-r--r--src/declarative/qml/qmlvme.cpp91
-rw-r--r--src/declarative/qml/qmlvme_p.h8
-rw-r--r--src/declarative/qml/qmlvmemetaobject_p.h6
-rw-r--r--src/declarative/qml/script/lexer.h2
-rw-r--r--src/declarative/qml/script/qmlbasicscript.h6
50 files changed, 1785 insertions, 1618 deletions
diff --git a/src/declarative/qml/parser/javascript.g b/src/declarative/qml/parser/javascript.g
index 48e8244..155630b 100644
--- a/src/declarative/qml/parser/javascript.g
+++ b/src/declarative/qml/parser/javascript.g
@@ -46,7 +46,7 @@
%decl javascriptparser_p.h
%impl javascriptparser.cpp
%expect 2
-%expect-rr 1
+%expect-rr 2
%token T_AND "&" T_AND_AND "&&" T_AND_EQ "&="
%token T_BREAK "break" T_CASE "case" T_CATCH "catch"
@@ -207,86 +207,71 @@
#include "javascriptgrammar_p.h"
#include "javascriptast_p.h"
+#include "javascriptengine_p.h"
+
#include <QtCore/QList>
QT_BEGIN_NAMESPACE
class QString;
-class JavaScriptEnginePrivate;
-class JavaScriptNameIdImpl;
-class JavaScriptParser: protected $table
+namespace JavaScript {
+
+class Engine;
+class NameId;
+
+class Parser: protected $table
{
public:
union Value {
int ival;
double dval;
- JavaScriptNameIdImpl *sval;
- JavaScript::AST::ArgumentList *ArgumentList;
- JavaScript::AST::CaseBlock *CaseBlock;
- JavaScript::AST::CaseClause *CaseClause;
- JavaScript::AST::CaseClauses *CaseClauses;
- JavaScript::AST::Catch *Catch;
- JavaScript::AST::DefaultClause *DefaultClause;
- JavaScript::AST::ElementList *ElementList;
- JavaScript::AST::Elision *Elision;
- JavaScript::AST::ExpressionNode *Expression;
- JavaScript::AST::Finally *Finally;
- JavaScript::AST::FormalParameterList *FormalParameterList;
- JavaScript::AST::FunctionBody *FunctionBody;
- JavaScript::AST::FunctionDeclaration *FunctionDeclaration;
- JavaScript::AST::Node *Node;
- JavaScript::AST::PropertyName *PropertyName;
- JavaScript::AST::PropertyNameAndValueList *PropertyNameAndValueList;
- JavaScript::AST::SourceElement *SourceElement;
- JavaScript::AST::SourceElements *SourceElements;
- JavaScript::AST::Statement *Statement;
- JavaScript::AST::StatementList *StatementList;
- JavaScript::AST::Block *Block;
- JavaScript::AST::VariableDeclaration *VariableDeclaration;
- JavaScript::AST::VariableDeclarationList *VariableDeclarationList;
-
- JavaScript::AST::UiProgram *UiProgram;
- JavaScript::AST::UiImportList *UiImportList;
- JavaScript::AST::UiImport *UiImport;
- JavaScript::AST::UiPublicMember *UiPublicMember;
- JavaScript::AST::UiObjectDefinition *UiObjectDefinition;
- JavaScript::AST::UiObjectInitializer *UiObjectInitializer;
- JavaScript::AST::UiObjectBinding *UiObjectBinding;
- JavaScript::AST::UiScriptBinding *UiScriptBinding;
- JavaScript::AST::UiArrayBinding *UiArrayBinding;
- JavaScript::AST::UiObjectMember *UiObjectMember;
- JavaScript::AST::UiObjectMemberList *UiObjectMemberList;
- JavaScript::AST::UiQualifiedId *UiQualifiedId;
- };
-
- struct DiagnosticMessage {
- enum Kind { Warning, Error };
-
- DiagnosticMessage()
- : kind(Error) {}
-
- DiagnosticMessage(Kind kind, const JavaScript::AST::SourceLocation &loc, const QString &message)
- : kind(kind), loc(loc), message(message) {}
-
- bool isWarning() const
- { return kind == Warning; }
-
- bool isError() const
- { return kind == Error; }
-
- Kind kind;
- JavaScript::AST::SourceLocation loc;
- QString message;
+ NameId *sval;
+ AST::ArgumentList *ArgumentList;
+ AST::CaseBlock *CaseBlock;
+ AST::CaseClause *CaseClause;
+ AST::CaseClauses *CaseClauses;
+ AST::Catch *Catch;
+ AST::DefaultClause *DefaultClause;
+ AST::ElementList *ElementList;
+ AST::Elision *Elision;
+ AST::ExpressionNode *Expression;
+ AST::Finally *Finally;
+ AST::FormalParameterList *FormalParameterList;
+ AST::FunctionBody *FunctionBody;
+ AST::FunctionDeclaration *FunctionDeclaration;
+ AST::Node *Node;
+ AST::PropertyName *PropertyName;
+ AST::PropertyNameAndValueList *PropertyNameAndValueList;
+ AST::SourceElement *SourceElement;
+ AST::SourceElements *SourceElements;
+ AST::Statement *Statement;
+ AST::StatementList *StatementList;
+ AST::Block *Block;
+ AST::VariableDeclaration *VariableDeclaration;
+ AST::VariableDeclarationList *VariableDeclarationList;
+
+ AST::UiProgram *UiProgram;
+ AST::UiImportList *UiImportList;
+ AST::UiImport *UiImport;
+ AST::UiPublicMember *UiPublicMember;
+ AST::UiObjectDefinition *UiObjectDefinition;
+ AST::UiObjectInitializer *UiObjectInitializer;
+ AST::UiObjectBinding *UiObjectBinding;
+ AST::UiScriptBinding *UiScriptBinding;
+ AST::UiArrayBinding *UiArrayBinding;
+ AST::UiObjectMember *UiObjectMember;
+ AST::UiObjectMemberList *UiObjectMemberList;
+ AST::UiQualifiedId *UiQualifiedId;
};
public:
- JavaScriptParser();
- ~JavaScriptParser();
+ Parser(Engine *engine);
+ ~Parser();
- bool parse(JavaScriptEnginePrivate *driver);
+ bool parse();
- JavaScript::AST::UiProgram *ast()
+ AST::UiProgram *ast()
{ return program; }
QList<DiagnosticMessage> diagnosticMessages() const
@@ -317,17 +302,20 @@ protected:
inline Value &sym(int index)
{ return sym_stack [tos + index - 1]; }
- inline JavaScript::AST::SourceLocation &loc(int index)
+ inline AST::SourceLocation &loc(int index)
{ return location_stack [tos + index - 1]; }
+ AST::UiQualifiedId *reparseAsQualifiedId(AST::ExpressionNode *expr);
+
protected:
+ Engine *driver;
int tos;
int stack_size;
Value *sym_stack;
int *state_stack;
- JavaScript::AST::SourceLocation *location_stack;
+ AST::SourceLocation *location_stack;
- JavaScript::AST::UiProgram *program;
+ AST::UiProgram *program;
// error recovery
enum { TOKEN_BUFFER_SIZE = 3 };
@@ -335,12 +323,12 @@ protected:
struct SavedToken {
int token;
double dval;
- JavaScript::AST::SourceLocation loc;
+ AST::SourceLocation loc;
};
double yylval;
- JavaScript::AST::SourceLocation yylloc;
- JavaScript::AST::SourceLocation yyprevlloc;
+ AST::SourceLocation yylloc;
+ AST::SourceLocation yyprevlloc;
SavedToken token_buffer[TOKEN_BUFFER_SIZE];
SavedToken *first_token;
@@ -349,12 +337,16 @@ protected:
QList<DiagnosticMessage> diagnostic_messages;
};
+} // end of namespace JavaScript
+
+
:/
/.
#include "javascriptparser_p.h"
+#include <QVarLengthArray>
//
// This file is automatically generated from javascript.g.
@@ -365,7 +357,7 @@ using namespace JavaScript;
QT_BEGIN_NAMESPACE
-void JavaScriptParser::reallocateStack()
+void Parser::reallocateStack()
{
if (! stack_size)
stack_size = 128;
@@ -377,7 +369,7 @@ void JavaScriptParser::reallocateStack()
location_stack = reinterpret_cast<AST::SourceLocation*> (qRealloc(location_stack, stack_size * sizeof(AST::SourceLocation)));
}
-inline static bool automatic(JavaScriptEnginePrivate *driver, int token)
+inline static bool automatic(Engine *driver, int token)
{
return token == $table::T_RBRACE
|| token == 0
@@ -385,7 +377,8 @@ inline static bool automatic(JavaScriptEnginePrivate *driver, int token)
}
-JavaScriptParser::JavaScriptParser():
+Parser::Parser(Engine *engine):
+ driver(engine),
tos(0),
stack_size(0),
sym_stack(0),
@@ -396,7 +389,7 @@ JavaScriptParser::JavaScriptParser():
{
}
-JavaScriptParser::~JavaScriptParser()
+Parser::~Parser()
{
if (stack_size) {
qFree(sym_stack);
@@ -415,7 +408,35 @@ static inline AST::SourceLocation location(Lexer *lexer)
return loc;
}
-bool JavaScriptParser::parse(JavaScriptEnginePrivate *driver)
+AST::UiQualifiedId *Parser::reparseAsQualifiedId(AST::ExpressionNode *expr)
+{
+ QVarLengthArray<NameId *, 4> nameIds;
+ QVarLengthArray<AST::SourceLocation, 4> locations;
+
+ AST::ExpressionNode *it = expr;
+ while (AST::FieldMemberExpression *m = AST::cast<AST::FieldMemberExpression *>(it)) {
+ nameIds.append(m->name);
+ locations.append(m->identifierToken);
+ it = m->base;
+ }
+
+ if (AST::IdentifierExpression *idExpr = AST::cast<AST::IdentifierExpression *>(it)) {
+ AST::UiQualifiedId *q = makeAstNode<AST::UiQualifiedId>(driver->nodePool(), idExpr->name);
+ q->identifierToken = idExpr->identifierToken;
+
+ AST::UiQualifiedId *currentId = q;
+ for (int i = nameIds.size() - 1; i != -1; --i) {
+ currentId = makeAstNode<AST::UiQualifiedId>(driver->nodePool(), currentId, nameIds[i]);
+ currentId->identifierToken = locations[i];
+ }
+
+ return currentId->finish();
+ }
+
+ return 0;
+}
+
+bool Parser::parse()
{
Lexer *lexer = driver->lexer();
bool hadErrors = false;
@@ -475,7 +496,7 @@ UiProgram: UiImportListOpt UiRootMember ;
case $rule_number: {
program = makeAstNode<AST::UiProgram> (driver->nodePool(), sym(1).UiImportList,
sym(2).UiObjectMemberList->finish());
- sym(1).UiProgram = program;
+ sym(1).UiProgram = program;
} break;
./
@@ -580,23 +601,11 @@ case $rule_number: {
} break;
./
-UiObjectMember: UiQualifiedId T_COLON T_IDENTIFIER UiObjectInitializer ;
+UiObjectDefinition: UiQualifiedId UiObjectInitializer ;
/.
case $rule_number: {
- AST::UiObjectBinding *node = makeAstNode<AST::UiObjectBinding> (driver->nodePool(), sym(1).UiQualifiedId->finish(),
- sym(3).sval, sym(4).UiObjectInitializer);
- node->colonToken = loc(2);
- node->identifierToken = loc(3);
- sym(1).Node = node;
-} break;
-./
-
-UiObjectDefinition: T_IDENTIFIER UiObjectInitializer ;
-/.
-case $rule_number: {
- AST::UiObjectDefinition *node = makeAstNode<AST::UiObjectDefinition> (driver->nodePool(), sym(1).sval,
+ AST::UiObjectDefinition *node = makeAstNode<AST::UiObjectDefinition> (driver->nodePool(), sym(1).UiQualifiedId->finish(),
sym(2).UiObjectInitializer);
- node->identifierToken = loc(1);
sym(1).Node = node;
} break;
./
@@ -634,11 +643,46 @@ case $rule_number: {
} break;
./
-UiObjectMember: UiQualifiedId T_COLON UiMultilineStringStatement ;
-/. case $rule_number: ./
-UiObjectMember: UiQualifiedId T_COLON Statement ;
+
+UiObjectMember: UiQualifiedId T_COLON Expression UiObjectInitializer ;
/.
case $rule_number: {
+ if (AST::UiQualifiedId *qualifiedId = reparseAsQualifiedId(sym(3).Expression)) {
+ AST::UiObjectBinding *node = makeAstNode<AST::UiObjectBinding> (driver->nodePool(),
+ sym(1).UiQualifiedId->finish(), qualifiedId, sym(4).UiObjectInitializer);
+ node->colonToken = loc(2);
+ sym(1).Node = node;
+ } else {
+ sym(1).Node = 0;
+
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, loc(2),
+ QLatin1String("Expected a type name after token `:'")));
+
+ return false; // ### recover
+ }
+} break;
+./
+
+UiObjectMember: UiQualifiedId T_COLON Block ;
+/.case $rule_number:./
+
+UiObjectMember: UiQualifiedId T_COLON EmptyStatement ;
+/.case $rule_number:./
+
+UiObjectMember: UiQualifiedId T_COLON ExpressionStatement ;
+/.case $rule_number:./
+
+UiObjectMember: UiQualifiedId T_COLON DebuggerStatement ;
+/.case $rule_number:./
+
+UiObjectMember: UiQualifiedId T_COLON UiMultilineStringStatement ;
+/.case $rule_number:./
+
+UiObjectMember: UiQualifiedId T_COLON IfStatement ; --- ### do we really want if statement in a binding?
+/.case $rule_number:./
+
+/.
+{
AST::UiScriptBinding *node = makeAstNode<AST::UiScriptBinding> (driver->nodePool(), sym(1).UiQualifiedId->finish(),
sym(3).Statement);
node->colonToken = loc(2);
@@ -648,7 +692,7 @@ case $rule_number: {
UiPropertyType: T_VAR ;
/.
-case $rule_number:
+case $rule_number:
./
UiPropertyType: T_RESERVED_WORD ;
/.
@@ -663,7 +707,7 @@ UiPropertyType: T_IDENTIFIER ;
UiObjectMember: T_SIGNAL T_IDENTIFIER ;
/.
case $rule_number: {
- AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), (JavaScriptNameIdImpl *)0, sym(2).sval);
+ AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), (NameId *)0, sym(2).sval);
node->type = AST::UiPublicMember::Signal;
node->propertyToken = loc(1);
node->typeToken = loc(2);
@@ -779,25 +823,6 @@ case $rule_number: {
}
./
-UiQualifiedId: JsIdentifier ;
-/.
-case $rule_number: {
- AST::UiQualifiedId *node = makeAstNode<AST::UiQualifiedId> (driver->nodePool(), sym(1).sval);
- node->identifierToken = loc(1);
- sym(1).Node = node;
-} break;
-./
-
-UiQualifiedId: UiQualifiedId T_DOT JsIdentifier ;
-/.
-case $rule_number: {
- AST::UiQualifiedId *node = makeAstNode<AST::UiQualifiedId> (driver->nodePool(), sym(1).UiQualifiedId, sym(3).sval);
- node->identifierToken = loc(3);
- sym(1).Node = node;
-} break;
-./
-
-
--------------------------------------------------------------------------------------------------------
-- Expressions
--------------------------------------------------------------------------------------------------------
@@ -899,10 +924,20 @@ case $rule_number: {
} break;
./
-PrimaryExpression: T_LBRACKET ElisionOpt T_RBRACKET ;
+PrimaryExpression: T_LBRACKET T_RBRACKET ;
+/.
+case $rule_number: {
+ AST::ArrayLiteral *node = makeAstNode<AST::ArrayLiteral> (driver->nodePool(), (AST::Elision *) 0);
+ node->lbracketToken = loc(1);
+ node->rbracketToken = loc(2);
+ sym(1).Node = node;
+} break;
+./
+
+PrimaryExpression: T_LBRACKET Elision T_RBRACKET ;
/.
case $rule_number: {
- AST::ArrayLiteral *node = makeAstNode<AST::ArrayLiteral> (driver->nodePool(), sym(2).Elision);
+ AST::ArrayLiteral *node = makeAstNode<AST::ArrayLiteral> (driver->nodePool(), sym(2).Elision->finish());
node->lbracketToken = loc(1);
node->rbracketToken = loc(3);
sym(1).Node = node;
@@ -919,10 +954,23 @@ case $rule_number: {
} break;
./
-PrimaryExpression: T_LBRACKET ElementList T_COMMA ElisionOpt T_RBRACKET ;
+PrimaryExpression: T_LBRACKET ElementList T_COMMA T_RBRACKET ;
/.
case $rule_number: {
- AST::ArrayLiteral *node = makeAstNode<AST::ArrayLiteral> (driver->nodePool(), sym(2).ElementList->finish (), sym(4).Elision);
+ AST::ArrayLiteral *node = makeAstNode<AST::ArrayLiteral> (driver->nodePool(), sym(2).ElementList->finish (),
+ (AST::Elision *) 0);
+ node->lbracketToken = loc(1);
+ node->commaToken = loc(3);
+ node->rbracketToken = loc(4);
+ sym(1).Node = node;
+} break;
+./
+
+PrimaryExpression: T_LBRACKET ElementList T_COMMA Elision T_RBRACKET ;
+/.
+case $rule_number: {
+ AST::ArrayLiteral *node = makeAstNode<AST::ArrayLiteral> (driver->nodePool(), sym(2).ElementList->finish (),
+ sym(4).Elision->finish());
node->lbracketToken = loc(1);
node->commaToken = loc(3);
node->rbracketToken = loc(5);
@@ -973,51 +1021,73 @@ case $rule_number: {
} break;
./
-ElementList: ElisionOpt AssignmentExpression ;
+UiQualifiedId: JsIdentifier ;
+/.
+case $rule_number: {
+ AST::UiQualifiedId *node = makeAstNode<AST::UiQualifiedId> (driver->nodePool(), sym(1).sval);
+ node->identifierToken = loc(1);
+ sym(1).Node = node;
+} break;
+./
+
+UiQualifiedId: UiQualifiedId T_DOT JsIdentifier ;
/.
case $rule_number: {
- sym(1).Node = makeAstNode<AST::ElementList> (driver->nodePool(), sym(1).Elision, sym(2).Expression);
+ AST::UiQualifiedId *node = makeAstNode<AST::UiQualifiedId> (driver->nodePool(), sym(1).UiQualifiedId, sym(3).sval);
+ node->identifierToken = loc(3);
+ sym(1).Node = node;
+} break;
+./
+
+ElementList: AssignmentExpression ;
+/.
+case $rule_number: {
+ sym(1).Node = makeAstNode<AST::ElementList> (driver->nodePool(), (AST::Elision *) 0, sym(1).Expression);
} break;
./
-ElementList: ElementList T_COMMA ElisionOpt AssignmentExpression ;
+ElementList: Elision AssignmentExpression ;
/.
case $rule_number: {
- AST::ElementList *node = makeAstNode<AST::ElementList> (driver->nodePool(), sym(1).ElementList, sym(3).Elision, sym(4).Expression);
- node->commaToken = loc(2);
- sym(1).Node = node;
+ sym(1).Node = makeAstNode<AST::ElementList> (driver->nodePool(), sym(1).Elision->finish(), sym(2).Expression);
} break;
./
-Elision: T_COMMA ;
+ElementList: ElementList T_COMMA AssignmentExpression ;
/.
case $rule_number: {
- AST::Elision *node = makeAstNode<AST::Elision> (driver->nodePool());
- node->commaToken = loc(1);
+ AST::ElementList *node = makeAstNode<AST::ElementList> (driver->nodePool(), sym(1).ElementList,
+ (AST::Elision *) 0, sym(3).Expression);
+ node->commaToken = loc(2);
sym(1).Node = node;
} break;
./
-Elision: Elision T_COMMA ;
+ElementList: ElementList T_COMMA Elision AssignmentExpression ;
/.
case $rule_number: {
- AST::Elision *node = makeAstNode<AST::Elision> (driver->nodePool(), sym(1).Elision);
+ AST::ElementList *node = makeAstNode<AST::ElementList> (driver->nodePool(), sym(1).ElementList, sym(3).Elision->finish(),
+ sym(4).Expression);
node->commaToken = loc(2);
sym(1).Node = node;
} break;
./
-ElisionOpt: %prec SHIFT_THERE ;
+Elision: T_COMMA ;
/.
case $rule_number: {
- sym(1).Node = 0;
+ AST::Elision *node = makeAstNode<AST::Elision> (driver->nodePool());
+ node->commaToken = loc(1);
+ sym(1).Node = node;
} break;
./
-ElisionOpt: Elision ;
+Elision: Elision T_COMMA ;
/.
case $rule_number: {
- sym(1).Elision = sym(1).Elision->finish ();
+ AST::Elision *node = makeAstNode<AST::Elision> (driver->nodePool(), sym(1).Elision);
+ node->commaToken = loc(2);
+ sym(1).Node = node;
} break;
./
@@ -1038,7 +1108,7 @@ case $rule_number: {
sym(1).PropertyNameAndValueList, sym(3).PropertyName, sym(5).Expression);
node->commaToken = loc(2);
node->colonToken = loc(4);
- sym(1).Node = node;
+ sym(1).Node = node;
} break;
./
@@ -1047,7 +1117,7 @@ PropertyName: T_IDENTIFIER %prec REDUCE_HERE ;
case $rule_number: {
AST::IdentifierPropertyName *node = makeAstNode<AST::IdentifierPropertyName> (driver->nodePool(), sym(1).sval);
node->propertyNameToken = loc(1);
- sym(1).Node = node;
+ sym(1).Node = node;
} break;
./
@@ -1059,7 +1129,7 @@ PropertyName: T_PROPERTY ;
case $rule_number: {
AST::IdentifierPropertyName *node = makeAstNode<AST::IdentifierPropertyName> (driver->nodePool(), driver->intern(lexer->characterBuffer(), lexer->characterCount()));
node->propertyNameToken = loc(1);
- sym(1).Node = node;
+ sym(1).Node = node;
} break;
./
@@ -1068,7 +1138,7 @@ PropertyName: T_STRING_LITERAL ;
case $rule_number: {
AST::StringLiteralPropertyName *node = makeAstNode<AST::StringLiteralPropertyName> (driver->nodePool(), sym(1).sval);
node->propertyNameToken = loc(1);
- sym(1).Node = node;
+ sym(1).Node = node;
} break;
./
@@ -1077,7 +1147,7 @@ PropertyName: T_NUMERIC_LITERAL ;
case $rule_number: {
AST::NumericLiteralPropertyName *node = makeAstNode<AST::NumericLiteralPropertyName> (driver->nodePool(), sym(1).dval);
node->propertyNameToken = loc(1);
- sym(1).Node = node;
+ sym(1).Node = node;
} break;
./
@@ -1086,7 +1156,7 @@ PropertyName: ReservedIdentifier ;
case $rule_number: {
AST::IdentifierPropertyName *node = makeAstNode<AST::IdentifierPropertyName> (driver->nodePool(), sym(1).sval);
node->propertyNameToken = loc(1);
- sym(1).Node = node;
+ sym(1).Node = node;
} break;
./
diff --git a/src/declarative/qml/parser/javascriptast.cpp b/src/declarative/qml/parser/javascriptast.cpp
index 8a10650..083dd28 100644
--- a/src/declarative/qml/parser/javascriptast.cpp
+++ b/src/declarative/qml/parser/javascriptast.cpp
@@ -813,6 +813,7 @@ void UiPublicMember::accept0(Visitor *visitor)
void UiObjectDefinition::accept0(Visitor *visitor)
{
if (visitor->visit(this)) {
+ acceptChild(qualifiedTypeNameId, visitor);
acceptChild(initializer, visitor);
}
@@ -833,6 +834,7 @@ void UiObjectBinding::accept0(Visitor *visitor)
{
if (visitor->visit(this)) {
acceptChild(qualifiedId, visitor);
+ acceptChild(qualifiedTypeNameId, visitor);
acceptChild(initializer, visitor);
}
diff --git a/src/declarative/qml/parser/javascriptast_p.h b/src/declarative/qml/parser/javascriptast_p.h
index cd47e42..134f3cc 100644
--- a/src/declarative/qml/parser/javascriptast_p.h
+++ b/src/declarative/qml/parser/javascriptast_p.h
@@ -53,18 +53,15 @@
// We mean it.
//
-#include <QtCore/QString>
-
-
-
#include "javascriptastvisitor_p.h"
+#include <QtCore/QString>
QT_BEGIN_NAMESPACE
#define JAVASCRIPT_DECLARE_AST_NODE(name) \
enum { K = Kind_##name };
-class JavaScriptNameIdImpl;
+class NameId;
namespace QSOperator // ### rename
{
@@ -120,27 +117,6 @@ _T1 cast(_T2 *ast)
return 0;
}
-class SourceLocation
-{
-public:
- SourceLocation(quint32 offset = 0, quint32 length = 0)
- : offset(offset), length(length),
- startLine(0), startColumn(0)
- { }
-
- bool isValid() const { return length != 0; }
-
- quint32 begin() const { return offset; }
- quint32 end() const { return offset + length; }
-
-// attributes
- // ### encode
- quint32 offset;
- quint32 length;
- quint32 startLine;
- quint32 startColumn;
-};
-
class Node
{
public:
@@ -339,7 +315,7 @@ class IdentifierExpression: public ExpressionNode
public:
JAVASCRIPT_DECLARE_AST_NODE(IdentifierExpression)
- IdentifierExpression(JavaScriptNameIdImpl *n):
+ IdentifierExpression(NameId *n):
name (n) { kind = K; }
virtual ~IdentifierExpression() {}
@@ -353,7 +329,7 @@ public:
{ return identifierToken; }
// attributes
- JavaScriptNameIdImpl *name;
+ NameId *name;
SourceLocation identifierToken;
};
@@ -444,7 +420,7 @@ class StringLiteral: public ExpressionNode
public:
JAVASCRIPT_DECLARE_AST_NODE(StringLiteral)
- StringLiteral(JavaScriptNameIdImpl *v):
+ StringLiteral(NameId *v):
value (v) { kind = K; }
virtual ~StringLiteral() {}
@@ -458,7 +434,7 @@ public:
{ return literalToken; }
// attributes:
- JavaScriptNameIdImpl *value;
+ NameId *value;
SourceLocation literalToken;
};
@@ -467,7 +443,7 @@ class RegExpLiteral: public ExpressionNode
public:
JAVASCRIPT_DECLARE_AST_NODE(RegExpLiteral)
- RegExpLiteral(JavaScriptNameIdImpl *p, int f):
+ RegExpLiteral(NameId *p, int f):
pattern (p), flags (f) { kind = K; }
virtual ~RegExpLiteral() {}
@@ -481,7 +457,7 @@ public:
{ return literalToken; }
// attributes:
- JavaScriptNameIdImpl *pattern;
+ NameId *pattern;
int flags;
SourceLocation literalToken;
};
@@ -667,7 +643,7 @@ class IdentifierPropertyName: public PropertyName
public:
JAVASCRIPT_DECLARE_AST_NODE(IdentifierPropertyName)
- IdentifierPropertyName(JavaScriptNameIdImpl *n):
+ IdentifierPropertyName(NameId *n):
id (n) { kind = K; }
virtual ~IdentifierPropertyName() {}
@@ -675,7 +651,7 @@ public:
virtual void accept0(Visitor *visitor);
// attributes
- JavaScriptNameIdImpl *id;
+ NameId *id;
};
class StringLiteralPropertyName: public PropertyName
@@ -683,14 +659,14 @@ class StringLiteralPropertyName: public PropertyName
public:
JAVASCRIPT_DECLARE_AST_NODE(StringLiteralPropertyName)
- StringLiteralPropertyName(JavaScriptNameIdImpl *n):
+ StringLiteralPropertyName(NameId *n):
id (n) { kind = K; }
virtual ~StringLiteralPropertyName() {}
virtual void accept0(Visitor *visitor);
// attributes
- JavaScriptNameIdImpl *id;
+ NameId *id;
};
class NumericLiteralPropertyName: public PropertyName
@@ -739,7 +715,7 @@ class FieldMemberExpression: public ExpressionNode
public:
JAVASCRIPT_DECLARE_AST_NODE(FieldMemberExpression)
- FieldMemberExpression(ExpressionNode *b, JavaScriptNameIdImpl *n):
+ FieldMemberExpression(ExpressionNode *b, NameId *n):
base (b), name (n)
{ kind = K; }
@@ -755,7 +731,7 @@ public:
// attributes
ExpressionNode *base;
- JavaScriptNameIdImpl *name;
+ NameId *name;
SourceLocation dotToken;
SourceLocation identifierToken;
};
@@ -1288,7 +1264,7 @@ class VariableDeclaration: public Node
public:
JAVASCRIPT_DECLARE_AST_NODE(VariableDeclaration)
- VariableDeclaration(JavaScriptNameIdImpl *n, ExpressionNode *e):
+ VariableDeclaration(NameId *n, ExpressionNode *e):
name (n), expression (e), readOnly(false)
{ kind = K; }
@@ -1297,7 +1273,7 @@ public:
virtual void accept0(Visitor *visitor);
// attributes
- JavaScriptNameIdImpl *name;
+ NameId *name;
ExpressionNode *expression;
bool readOnly;
SourceLocation identifierToken;
@@ -1602,7 +1578,7 @@ class ContinueStatement: public Statement
public:
JAVASCRIPT_DECLARE_AST_NODE(ContinueStatement)
- ContinueStatement(JavaScriptNameIdImpl *l = 0):
+ ContinueStatement(NameId *l = 0):
label (l) { kind = K; }
virtual ~ContinueStatement() {}
@@ -1616,7 +1592,7 @@ public:
{ return semicolonToken; }
// attributes
- JavaScriptNameIdImpl *label;
+ NameId *label;
SourceLocation continueToken;
SourceLocation identifierToken;
SourceLocation semicolonToken;
@@ -1627,7 +1603,7 @@ class BreakStatement: public Statement
public:
JAVASCRIPT_DECLARE_AST_NODE(BreakStatement)
- BreakStatement(JavaScriptNameIdImpl *l = 0):
+ BreakStatement(NameId *l = 0):
label (l) { kind = K; }
virtual ~BreakStatement() {}
@@ -1641,7 +1617,7 @@ public:
{ return semicolonToken; }
// attributes
- JavaScriptNameIdImpl *label;
+ NameId *label;
SourceLocation breakToken;
SourceLocation identifierToken;
SourceLocation semicolonToken;
@@ -1823,7 +1799,7 @@ class LabelledStatement: public Statement
public:
JAVASCRIPT_DECLARE_AST_NODE(LabelledStatement)
- LabelledStatement(JavaScriptNameIdImpl *l, Statement *stmt):
+ LabelledStatement(NameId *l, Statement *stmt):
label (l), statement (stmt)
{ kind = K; }
@@ -1838,7 +1814,7 @@ public:
{ return statement->lastSourceLocation(); }
// attributes
- JavaScriptNameIdImpl *label;
+ NameId *label;
Statement *statement;
SourceLocation identifierToken;
SourceLocation colonToken;
@@ -1873,7 +1849,7 @@ class Catch: public Node
public:
JAVASCRIPT_DECLARE_AST_NODE(Catch)
- Catch(JavaScriptNameIdImpl *n, Block *stmt):
+ Catch(NameId *n, Block *stmt):
name (n), statement (stmt)
{ kind = K; }
@@ -1882,7 +1858,7 @@ public:
virtual void accept0(Visitor *visitor);
// attributes
- JavaScriptNameIdImpl *name;
+ NameId *name;
Block *statement;
SourceLocation catchToken;
SourceLocation lparenToken;
@@ -1954,7 +1930,7 @@ class FunctionExpression: public ExpressionNode
public:
JAVASCRIPT_DECLARE_AST_NODE(FunctionExpression)
- FunctionExpression(JavaScriptNameIdImpl *n, FormalParameterList *f, FunctionBody *b):
+ FunctionExpression(NameId *n, FormalParameterList *f, FunctionBody *b):
name (n), formals (f), body (b)
{ kind = K; }
@@ -1969,7 +1945,7 @@ public:
{ return rbraceToken; }
// attributes
- JavaScriptNameIdImpl *name;
+ NameId *name;
FormalParameterList *formals;
FunctionBody *body;
SourceLocation functionToken;
@@ -1985,7 +1961,7 @@ class FunctionDeclaration: public FunctionExpression
public:
JAVASCRIPT_DECLARE_AST_NODE(FunctionDeclaration)
- FunctionDeclaration(JavaScriptNameIdImpl *n, FormalParameterList *f, FunctionBody *b):
+ FunctionDeclaration(NameId *n, FormalParameterList *f, FunctionBody *b):
FunctionExpression(n, f, b)
{ kind = K; }
@@ -1999,11 +1975,11 @@ class FormalParameterList: public Node
public:
JAVASCRIPT_DECLARE_AST_NODE(FormalParameterList)
- FormalParameterList(JavaScriptNameIdImpl *n):
+ FormalParameterList(NameId *n):
name (n), next (this)
{ kind = K; }
- FormalParameterList(FormalParameterList *previous, JavaScriptNameIdImpl *n):
+ FormalParameterList(FormalParameterList *previous, NameId *n):
name (n)
{
kind = K;
@@ -2023,7 +1999,7 @@ public:
}
// attributes
- JavaScriptNameIdImpl *name;
+ NameId *name;
FormalParameterList *next;
SourceLocation commaToken;
SourceLocation identifierToken;
@@ -2185,11 +2161,11 @@ class UiQualifiedId: public Node
public:
JAVASCRIPT_DECLARE_AST_NODE(UiQualifiedId)
- UiQualifiedId(JavaScriptNameIdImpl *name)
+ UiQualifiedId(NameId *name)
: next(this), name(name)
{ kind = K; }
- UiQualifiedId(UiQualifiedId *previous, JavaScriptNameIdImpl *name)
+ UiQualifiedId(UiQualifiedId *previous, NameId *name)
: name(name)
{
kind = K;
@@ -2210,7 +2186,7 @@ public:
// attributes
UiQualifiedId *next;
- JavaScriptNameIdImpl *name;
+ NameId *name;
SourceLocation identifierToken;
};
@@ -2219,14 +2195,14 @@ class UiImport: public Node
public:
JAVASCRIPT_DECLARE_AST_NODE(UiImport)
- UiImport(JavaScriptNameIdImpl *fileName)
+ UiImport(NameId *fileName)
: fileName(fileName)
{ kind = K; }
virtual void accept0(Visitor *visitor);
// attributes
- JavaScriptNameIdImpl *fileName;
+ NameId *fileName;
SourceLocation importToken;
SourceLocation fileNameToken;
SourceLocation semicolonToken;
@@ -2324,13 +2300,13 @@ class UiPublicMember: public UiObjectMember
public:
JAVASCRIPT_DECLARE_AST_NODE(UiPublicMember)
- UiPublicMember(JavaScriptNameIdImpl *memberType,
- JavaScriptNameIdImpl *name)
+ UiPublicMember(NameId *memberType,
+ NameId *name)
: type(Property), memberType(memberType), name(name), expression(0), isDefaultMember(false)
{ kind = K; }
- UiPublicMember(JavaScriptNameIdImpl *memberType,
- JavaScriptNameIdImpl *name,
+ UiPublicMember(NameId *memberType,
+ NameId *name,
ExpressionNode *expression)
: type(Property), memberType(memberType), name(name), expression(expression), isDefaultMember(false)
{ kind = K; }
@@ -2352,8 +2328,8 @@ public:
// attributes
enum { Signal, Property } type;
- JavaScriptNameIdImpl *memberType;
- JavaScriptNameIdImpl *name;
+ NameId *memberType;
+ NameId *name;
ExpressionNode *expression;
bool isDefaultMember;
SourceLocation defaultToken;
@@ -2369,28 +2345,22 @@ class UiObjectDefinition: public UiObjectMember
public:
JAVASCRIPT_DECLARE_AST_NODE(UiObjectDefinition)
- UiObjectDefinition(JavaScriptNameIdImpl *name,
+ UiObjectDefinition(UiQualifiedId *qualifiedTypeNameId,
UiObjectInitializer *initializer)
- : name(name), initializer(initializer)
+ : qualifiedTypeNameId(qualifiedTypeNameId), initializer(initializer)
{ kind = K; }
virtual SourceLocation firstSourceLocation() const
- { return identifierToken; }
+ { return qualifiedTypeNameId->identifierToken; }
virtual SourceLocation lastSourceLocation() const
- {
- if (initializer)
- return initializer->rbraceToken;
-
- return identifierToken;
- }
+ { return initializer->rbraceToken; }
virtual void accept0(Visitor *visitor);
// attributes
- JavaScriptNameIdImpl *name;
+ UiQualifiedId *qualifiedTypeNameId;
UiObjectInitializer *initializer;
- SourceLocation identifierToken;
};
class UiSourceElement: public UiObjectMember
@@ -2435,10 +2405,10 @@ public:
JAVASCRIPT_DECLARE_AST_NODE(UiObjectBinding)
UiObjectBinding(UiQualifiedId *qualifiedId,
- JavaScriptNameIdImpl *name,
+ UiQualifiedId *qualifiedTypeNameId,
UiObjectInitializer *initializer)
: qualifiedId(qualifiedId),
- name(name),
+ qualifiedTypeNameId(qualifiedTypeNameId),
initializer(initializer)
{ kind = K; }
@@ -2452,10 +2422,9 @@ public:
// attributes
UiQualifiedId *qualifiedId;
- JavaScriptNameIdImpl *name;
+ UiQualifiedId *qualifiedTypeNameId;
UiObjectInitializer *initializer;
SourceLocation colonToken;
- SourceLocation identifierToken;
};
class UiScriptBinding: public UiObjectMember
diff --git a/src/declarative/qml/parser/javascriptastfwd_p.h b/src/declarative/qml/parser/javascriptastfwd_p.h
index 858e393..822a2d7 100644
--- a/src/declarative/qml/parser/javascriptastfwd_p.h
+++ b/src/declarative/qml/parser/javascriptastfwd_p.h
@@ -59,7 +59,26 @@ QT_BEGIN_NAMESPACE
namespace JavaScript { namespace AST {
-class SourceLocation;
+class SourceLocation
+{
+public:
+ SourceLocation(quint32 offset = 0, quint32 length = 0)
+ : offset(offset), length(length),
+ startLine(0), startColumn(0)
+ { }
+
+ bool isValid() const { return length != 0; }
+
+ quint32 begin() const { return offset; }
+ quint32 end() const { return offset + length; }
+
+// attributes
+ // ### encode
+ quint32 offset;
+ quint32 length;
+ quint32 startLine;
+ quint32 startColumn;
+};
class Visitor;
class Node;
diff --git a/src/declarative/qml/parser/javascriptengine_p.cpp b/src/declarative/qml/parser/javascriptengine_p.cpp
index ca15b75..d893a90 100644
--- a/src/declarative/qml/parser/javascriptengine_p.cpp
+++ b/src/declarative/qml/parser/javascriptengine_p.cpp
@@ -29,7 +29,6 @@
#include "javascriptengine_p.h"
#include "javascriptnodepool_p.h"
-#include "javascriptvalue.h"
#include <qnumeric.h>
#include <QHash>
@@ -37,7 +36,10 @@ QT_BEGIN_NAMESPACE
namespace JavaScript {
-QString numberToString(qjsreal value)
+uint qHash(const JavaScript::NameId &id)
+{ return qHash(id.asString()); }
+
+QString numberToString(double value)
{ return QString::number(value); }
int Ecma::RegExp::flagFromChar(const QChar &ch)
@@ -67,9 +69,10 @@ QString Ecma::RegExp::flagsToString(int flags)
return result;
}
-NodePool::NodePool(const QString &fileName, JavaScriptEnginePrivate *engine)
+NodePool::NodePool(const QString &fileName, Engine *engine)
: m_fileName(fileName), m_engine(engine)
{
+ m_engine->setNodePool(this);
}
NodePool::~NodePool()
@@ -93,12 +96,12 @@ static int toDigit(char c)
return -1;
}
-qjsreal integerFromString(const char *buf, int size, int radix)
+double integerFromString(const char *buf, int size, int radix)
{
if (size == 0)
return qSNaN();
- qjsreal sign = 1.0;
+ double sign = 1.0;
int i = 0;
if (buf[0] == '+') {
++i;
@@ -130,7 +133,7 @@ qjsreal integerFromString(const char *buf, int size, int radix)
if ((d == -1) || (d >= radix))
break;
}
- qjsreal result;
+ double result;
if (j == i) {
if (!qstrcmp(buf, "Infinity"))
result = qInf();
@@ -138,7 +141,7 @@ qjsreal integerFromString(const char *buf, int size, int radix)
result = qSNaN();
} else {
result = 0;
- qjsreal multiplier = 1;
+ double multiplier = 1;
for (--i ; i >= j; --i, multiplier *= radix)
result += toDigit(buf[i]) * multiplier;
}
@@ -146,12 +149,43 @@ qjsreal integerFromString(const char *buf, int size, int radix)
return result;
}
-qjsreal integerFromString(const QString &str, int radix)
+double integerFromString(const QString &str, int radix)
{
QByteArray ba = str.trimmed().toUtf8();
return integerFromString(ba.constData(), ba.size(), radix);
}
+
+Engine::Engine()
+ : _lexer(0), _nodePool(0)
+{ }
+
+Engine::~Engine()
+{ }
+
+QSet<NameId> Engine::literals() const
+{ return _literals; }
+
+NameId *Engine::intern(const QChar *u, int s)
+{ return const_cast<NameId *>(&*_literals.insert(NameId(u, s))); }
+
+QString Engine::toString(NameId *id)
+{ return id->asString(); }
+
+Lexer *Engine::lexer() const
+{ return _lexer; }
+
+void Engine::setLexer(Lexer *lexer)
+{ _lexer = lexer; }
+
+NodePool *Engine::nodePool() const
+{ return _nodePool; }
+
+void Engine::setNodePool(NodePool *nodePool)
+{ _nodePool = nodePool; }
+
+
+
} // end of namespace JavaScript
QT_END_NAMESPACE
diff --git a/src/declarative/qml/parser/javascriptengine_p.h b/src/declarative/qml/parser/javascriptengine_p.h
index 1e6e568..3bd924a 100644
--- a/src/declarative/qml/parser/javascriptengine_p.h
+++ b/src/declarative/qml/parser/javascriptengine_p.h
@@ -30,23 +30,50 @@
#ifndef JAVASCRIPTENGINE_P_H
#define JAVASCRIPTENGINE_P_H
-#include "javascriptvalue.h"
#include <QString>
#include <QSet>
+#include "javascriptastfwd_p.h"
+
QT_BEGIN_NAMESPACE
namespace JavaScript {
+class NameId
+{
+ QString _text;
-class Node;
-class Lexer;
-class NodePool;
+public:
+ NameId(const QChar *u, int s)
+ : _text(u, s)
+ { }
-namespace AST {
+ const QString asString() const
+ { return _text; }
-class Node;
+ bool operator == (const NameId &other) const
+ { return _text == other._text; }
-} // end of namespace AST
+ bool operator != (const NameId &other) const
+ { return _text != other._text; }
+
+ bool operator < (const NameId &other) const
+ { return _text < other._text; }
+};
+
+uint qHash(const JavaScript::NameId &id);
+
+} // end of namespace JavaScript
+
+#if defined(Q_CC_MSVC) && _MSC_VER <= 1300
+//this ensures that code outside JavaScript can use the hash function
+//it also a workaround for some compilers
+inline uint qHash(const JavaScript::NameId &nameId) { return JavaScript::qHash(nameId); }
+#endif
+
+namespace JavaScript {
+
+class Lexer;
+class NodePool;
namespace Ecma {
@@ -66,79 +93,53 @@ public:
} // end of namespace Ecma
-} // end of namespace JavaScript
-
-
-
-class JavaScriptNameIdImpl
+class DiagnosticMessage
{
- QString _text;
-
public:
- JavaScriptNameIdImpl(const QChar *u, int s)
- : _text(u, s)
- { }
+ enum Kind { Warning, Error };
- const QString asString() const
- { return _text; }
+ DiagnosticMessage()
+ : kind(Error) {}
- bool operator == (const JavaScriptNameIdImpl &other) const
- { return _text == other._text; }
+ DiagnosticMessage(Kind kind, const AST::SourceLocation &loc, const QString &message)
+ : kind(kind), loc(loc), message(message) {}
- bool operator != (const JavaScriptNameIdImpl &other) const
- { return _text != other._text; }
+ bool isWarning() const
+ { return kind == Warning; }
- bool operator < (const JavaScriptNameIdImpl &other) const
- { return _text < other._text; }
-};
+ bool isError() const
+ { return kind == Error; }
-inline uint qHash(const JavaScriptNameIdImpl &id)
-{ return qHash(id.asString()); }
+ Kind kind;
+ AST::SourceLocation loc;
+ QString message;
+};
-class JavaScriptEnginePrivate
+class Engine
{
- JavaScript::Lexer *_lexer;
- JavaScript::NodePool *_nodePool;
- JavaScript::AST::Node *_ast;
- QSet<JavaScriptNameIdImpl> _literals;
+ Lexer *_lexer;
+ NodePool *_nodePool;
+ QSet<NameId> _literals;
public:
- JavaScriptEnginePrivate()
- : _lexer(0), _nodePool(0), _ast(0)
- { }
-
- QSet<JavaScriptNameIdImpl> literals() const
- { return _literals; }
+ Engine();
+ ~Engine();
- JavaScriptNameIdImpl *intern(const QChar *u, int s)
- { return const_cast<JavaScriptNameIdImpl *>(&*_literals.insert(JavaScriptNameIdImpl(u, s))); }
+ QSet<NameId> literals() const;
- static QString toString(JavaScriptNameIdImpl *id)
- { return id->asString(); }
+ NameId *intern(const QChar *u, int s);
- JavaScript::Lexer *lexer() const
- { return _lexer; }
+ static QString toString(NameId *id);
- void setLexer(JavaScript::Lexer *lexer)
- { _lexer = lexer; }
+ Lexer *lexer() const;
+ void setLexer(Lexer *lexer);
- JavaScript::NodePool *nodePool() const
- { return _nodePool; }
-
- void setNodePool(JavaScript::NodePool *nodePool)
- { _nodePool = nodePool; }
-
- JavaScript::AST::Node *ast() const
- { return _ast; }
-
- JavaScript::AST::Node *changeAbstractSyntaxTree(JavaScript::AST::Node *node)
- {
- JavaScript::AST::Node *previousAST = _ast;
- _ast = node;
- return previousAST;
- }
+ NodePool *nodePool() const;
+ void setNodePool(NodePool *nodePool);
};
+} // end of namespace JavaScript
+
QT_END_NAMESPACE
#endif // JAVASCRIPTENGINE_P_H
diff --git a/src/declarative/qml/parser/javascriptgrammar.cpp b/src/declarative/qml/parser/javascriptgrammar.cpp
index abe3f1c..a879bfe 100644
--- a/src/declarative/qml/parser/javascriptgrammar.cpp
+++ b/src/declarative/qml/parser/javascriptgrammar.cpp
@@ -56,527 +56,585 @@ const char *const JavaScriptGrammar::spell [] = {
const int JavaScriptGrammar::lhs [] = {
91, 92, 92, 95, 95, 96, 96, 94, 93, 98,
- 98, 100, 100, 101, 101, 99, 97, 99, 99, 103,
- 104, 104, 99, 99, 106, 106, 106, 99, 99, 99,
- 99, 99, 99, 99, 99, 99, 99, 99, 102, 102,
- 110, 110, 110, 102, 102, 111, 111, 111, 111, 111,
- 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
- 113, 113, 117, 117, 112, 112, 115, 115, 118, 118,
- 118, 118, 118, 118, 119, 119, 119, 119, 119, 119,
- 119, 119, 119, 119, 119, 119, 119, 119, 119, 119,
- 119, 119, 119, 119, 119, 119, 119, 119, 119, 119,
- 119, 119, 119, 119, 119, 120, 120, 121, 121, 121,
- 121, 121, 124, 124, 125, 125, 125, 125, 123, 123,
- 126, 126, 127, 127, 128, 128, 128, 129, 129, 129,
- 129, 129, 129, 129, 129, 129, 129, 130, 130, 130,
- 130, 131, 131, 131, 132, 132, 132, 132, 133, 133,
- 133, 133, 133, 133, 133, 134, 134, 134, 134, 134,
- 134, 135, 135, 135, 135, 135, 136, 136, 136, 136,
- 136, 137, 137, 138, 138, 139, 139, 140, 140, 141,
+ 98, 100, 100, 101, 101, 97, 99, 99, 103, 104,
+ 104, 99, 99, 99, 99, 99, 99, 99, 111, 111,
+ 111, 99, 99, 99, 99, 99, 99, 99, 99, 99,
+ 99, 99, 102, 102, 114, 114, 114, 115, 115, 115,
+ 115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
+ 115, 115, 115, 115, 102, 102, 117, 117, 117, 117,
+ 116, 116, 119, 119, 121, 121, 121, 121, 121, 121,
+ 122, 122, 122, 122, 122, 122, 122, 122, 122, 122,
+ 122, 122, 122, 122, 122, 122, 122, 122, 122, 122,
+ 122, 122, 122, 122, 122, 122, 122, 122, 122, 122,
+ 122, 123, 123, 124, 124, 124, 124, 124, 127, 127,
+ 128, 128, 128, 128, 126, 126, 129, 129, 130, 130,
+ 131, 131, 131, 132, 132, 132, 132, 132, 132, 132,
+ 132, 132, 132, 133, 133, 133, 133, 134, 134, 134,
+ 135, 135, 135, 135, 136, 136, 136, 136, 136, 136,
+ 136, 137, 137, 137, 137, 137, 137, 138, 138, 138,
+ 138, 138, 139, 139, 139, 139, 139, 140, 140, 141,
141, 142, 142, 143, 143, 144, 144, 145, 145, 146,
- 146, 147, 147, 148, 148, 116, 116, 149, 149, 150,
- 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
- 150, 107, 107, 151, 151, 152, 152, 153, 153, 105,
- 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
- 105, 105, 105, 105, 154, 169, 169, 168, 168, 109,
- 109, 170, 170, 171, 171, 173, 173, 172, 174, 177,
- 175, 175, 178, 176, 176, 155, 156, 156, 157, 157,
- 158, 158, 158, 158, 158, 158, 158, 159, 159, 159,
- 159, 160, 160, 160, 160, 161, 161, 162, 164, 179,
- 179, 182, 182, 180, 180, 183, 181, 163, 163, 163,
- 165, 165, 166, 166, 166, 184, 185, 167, 167, 108,
- 122, 189, 189, 186, 186, 187, 187, 190, 191, 191,
- 192, 192, 188, 188, 114, 114, 193};
+ 146, 147, 147, 148, 148, 149, 149, 150, 150, 151,
+ 151, 120, 120, 152, 152, 153, 153, 153, 153, 153,
+ 153, 153, 153, 153, 153, 153, 153, 105, 105, 154,
+ 154, 155, 155, 156, 156, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 106, 168, 168, 167, 167, 113, 113, 169, 169, 170,
+ 170, 172, 172, 171, 173, 176, 174, 174, 177, 175,
+ 175, 107, 108, 108, 110, 110, 158, 158, 158, 158,
+ 158, 158, 158, 159, 159, 159, 159, 160, 160, 160,
+ 160, 161, 161, 162, 164, 178, 178, 181, 181, 179,
+ 179, 182, 180, 163, 163, 163, 165, 165, 166, 166,
+ 166, 183, 184, 109, 109, 112, 125, 188, 188, 185,
+ 185, 186, 186, 189, 190, 190, 191, 191, 187, 187,
+ 118, 118, 192};
const int JavaScriptGrammar:: rhs[] = {
2, 1, 1, 1, 2, 3, 3, 0, 1, 1,
- 2, 1, 3, 2, 3, 4, 2, 1, 5, 1,
- 2, 2, 3, 3, 1, 1, 1, 2, 4, 4,
- 5, 5, 6, 6, 7, 7, 1, 1, 1, 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,
+ 2, 1, 3, 2, 3, 2, 1, 5, 1, 2,
+ 2, 4, 3, 3, 3, 3, 3, 3, 1, 1,
+ 1, 2, 4, 4, 5, 5, 6, 6, 7, 7,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 2, 3, 3, 4,
+ 5, 3, 4, 3, 1, 3, 1, 2, 3, 4,
+ 1, 2, 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, 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,
- 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, 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, 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,
- 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, 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};
+ 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, 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, 0, 9, 1, 0, 17, 37, 44, 242, 0,
- 0, 41, 42, 14, 39, 40, 43, 243, 18, 10,
- 0, 0, 0, 38, 0, 27, 26, 25, 0, 0,
- 31, 0, 32, 145, 212, 176, 184, 180, 124, 196,
- 172, 0, 109, 47, 125, 188, 192, 113, 142, 123,
- 128, 108, 162, 149, 0, 53, 54, 50, 313, 41,
- 315, 65, 0, 0, 0, 0, 0, 48, 51, 0,
- 0, 42, 43, 52, 46, 0, 49, 0, 0, 138,
- 0, 0, 125, 144, 127, 126, 0, 0, 0, 140,
- 141, 139, 143, 0, 173, 0, 0, 0, 0, 163,
- 0, 0, 0, 0, 0, 0, 153, 0, 0, 0,
- 147, 148, 146, 151, 155, 154, 152, 150, 165, 164,
- 166, 0, 181, 0, 177, 0, 0, 119, 106, 118,
- 107, 75, 76, 77, 102, 78, 103, 79, 80, 81,
- 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
- 104, 92, 93, 94, 95, 96, 97, 98, 99, 100,
- 101, 105, 0, 0, 117, 213, 120, 0, 121, 0,
- 122, 116, 35, 36, 0, 209, 202, 200, 207, 208,
- 206, 205, 211, 204, 203, 201, 210, 197, 0, 185,
- 0, 0, 189, 0, 0, 193, 0, 0, 119, 111,
- 0, 110, 0, 115, 129, 0, 314, 304, 305, 0,
- 302, 0, 303, 0, 306, 220, 227, 226, 234, 222,
- 0, 223, 307, 0, 312, 224, 225, 230, 228, 309,
- 308, 311, 231, 0, 0, 0, 0, 0, 313, 41,
- 0, 315, 42, 214, 256, 43, 0, 0, 0, 0,
- 0, 232, 233, 221, 229, 257, 258, 301, 310, 0,
- 272, 273, 274, 275, 0, 268, 269, 270, 271, 298,
- 299, 0, 0, 0, 0, 0, 261, 262, 218, 216,
- 178, 186, 182, 198, 174, 219, 0, 125, 190, 194,
- 167, 156, 0, 0, 175, 0, 0, 0, 0, 168,
- 0, 0, 0, 0, 0, 160, 158, 161, 159, 157,
- 170, 169, 171, 0, 183, 0, 179, 0, 217, 125,
- 0, 199, 214, 215, 0, 214, 0, 0, 264, 0,
- 0, 0, 266, 0, 187, 0, 0, 191, 0, 0,
- 195, 254, 0, 246, 255, 249, 0, 253, 0, 214,
- 247, 0, 214, 0, 0, 265, 0, 0, 0, 267,
- 314, 304, 0, 0, 306, 0, 300, 0, 290, 0,
- 0, 0, 260, 0, 259, 0, 316, 0, 74, 236,
- 239, 0, 75, 242, 78, 103, 80, 81, 50, 85,
- 86, 41, 87, 90, 48, 51, 42, 214, 43, 52,
- 93, 46, 95, 49, 97, 98, 243, 100, 101, 105,
- 0, 67, 0, 0, 69, 73, 71, 59, 70, 72,
- 0, 68, 58, 237, 235, 113, 114, 119, 0, 112,
- 0, 289, 0, 276, 277, 0, 288, 0, 0, 0,
- 279, 284, 282, 285, 0, 0, 283, 284, 0, 280,
- 0, 281, 238, 287, 0, 238, 286, 0, 291, 292,
- 0, 238, 293, 294, 0, 0, 295, 0, 0, 0,
- 296, 297, 131, 130, 0, 0, 0, 263, 0, 0,
- 0, 278, 0, 66, 0, 63, 65, 56, 0, 62,
- 57, 64, 61, 55, 0, 60, 135, 133, 137, 134,
- 132, 136, 0, 0, 0, 29, 0, 30, 0, 33,
- 34, 28, 15, 11, 0, 0, 24, 41, 65, 20,
- 0, 23, 16, 0, 12, 0, 19, 13, 21, 22,
- 45, 251, 244, 0, 252, 248, 0, 250, 240, 0,
- 241, 245, 317};
+ 5, 65, 45, 46, 43, 44, 47, 9, 0, 1,
+ 0, 0, 16, 66, 41, 248, 0, 0, 46, 14,
+ 47, 249, 17, 10, 0, 0, 0, 42, 0, 31,
+ 30, 29, 0, 0, 35, 0, 36, 151, 218, 182,
+ 190, 186, 130, 202, 178, 0, 115, 49, 131, 194,
+ 198, 119, 148, 129, 134, 114, 168, 155, 0, 55,
+ 56, 52, 319, 321, 0, 0, 0, 0, 0, 0,
+ 50, 53, 0, 0, 54, 48, 0, 51, 0, 0,
+ 144, 0, 0, 131, 150, 133, 132, 0, 0, 0,
+ 146, 147, 145, 149, 0, 179, 0, 0, 0, 0,
+ 169, 0, 0, 0, 0, 0, 0, 159, 0, 0,
+ 0, 153, 154, 152, 157, 161, 160, 158, 156, 171,
+ 170, 172, 0, 187, 0, 183, 0, 0, 125, 112,
+ 124, 113, 81, 82, 83, 108, 84, 109, 85, 86,
+ 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
+ 97, 110, 98, 99, 100, 101, 102, 103, 104, 105,
+ 106, 107, 111, 0, 0, 123, 219, 126, 0, 127,
+ 0, 128, 122, 39, 40, 0, 215, 208, 206, 213,
+ 214, 212, 211, 217, 210, 209, 207, 216, 203, 0,
+ 191, 0, 0, 195, 0, 0, 199, 0, 0, 125,
+ 117, 0, 116, 0, 121, 135, 0, 320, 310, 311,
+ 0, 308, 0, 309, 0, 312, 226, 233, 232, 240,
+ 228, 0, 229, 313, 0, 318, 230, 231, 236, 234,
+ 315, 314, 317, 237, 0, 0, 0, 0, 0, 319,
+ 45, 0, 321, 46, 220, 262, 47, 0, 0, 0,
+ 0, 0, 238, 239, 227, 235, 263, 264, 307, 316,
+ 0, 278, 279, 280, 281, 0, 274, 275, 276, 277,
+ 304, 305, 0, 0, 0, 0, 0, 267, 268, 224,
+ 222, 184, 192, 188, 204, 180, 225, 0, 131, 196,
+ 200, 173, 162, 0, 0, 181, 0, 0, 0, 0,
+ 174, 0, 0, 0, 0, 0, 166, 164, 167, 165,
+ 163, 176, 175, 177, 0, 189, 0, 185, 0, 223,
+ 131, 0, 205, 220, 221, 0, 220, 0, 0, 270,
+ 0, 0, 0, 272, 0, 193, 0, 0, 197, 0,
+ 0, 201, 260, 0, 252, 261, 255, 0, 259, 0,
+ 220, 253, 0, 220, 0, 0, 271, 0, 0, 0,
+ 273, 320, 310, 0, 0, 312, 0, 306, 0, 296,
+ 0, 0, 0, 266, 0, 265, 0, 322, 0, 80,
+ 242, 245, 0, 81, 248, 84, 109, 86, 87, 52,
+ 91, 92, 45, 93, 96, 50, 53, 46, 220, 47,
+ 54, 99, 48, 101, 51, 103, 104, 249, 106, 107,
+ 111, 0, 73, 0, 0, 75, 79, 77, 63, 76,
+ 78, 0, 74, 62, 243, 241, 119, 120, 125, 0,
+ 118, 0, 295, 0, 282, 283, 0, 294, 0, 0,
+ 0, 285, 290, 288, 291, 0, 0, 289, 290, 0,
+ 286, 0, 287, 244, 293, 0, 244, 292, 0, 297,
+ 298, 0, 244, 299, 300, 0, 0, 301, 0, 0,
+ 0, 302, 303, 137, 136, 0, 0, 0, 269, 0,
+ 0, 0, 284, 67, 0, 0, 71, 57, 0, 59,
+ 69, 0, 60, 70, 72, 61, 68, 58, 0, 64,
+ 141, 139, 143, 140, 138, 142, 0, 0, 0, 33,
+ 0, 34, 0, 37, 38, 32, 15, 11, 0, 23,
+ 26, 24, 0, 25, 28, 244, 0, 19, 0, 27,
+ 22, 81, 248, 84, 109, 86, 87, 52, 91, 92,
+ 45, 93, 96, 50, 53, 46, 220, 47, 54, 99,
+ 48, 101, 51, 103, 104, 249, 106, 107, 111, 49,
+ 0, 12, 0, 18, 13, 20, 21, 257, 250, 0,
+ 258, 254, 0, 256, 246, 0, 247, 251, 323};
const int JavaScriptGrammar::goto_default [] = {
- 6, 5, 13, 1, 4, 3, 28, 30, 29, 533,
- 15, 31, 530, 531, 389, 513, 230, 234, 263, 53,
- 61, 494, 492, 387, 386, 44, 493, 385, 388, 139,
- 57, 52, 177, 59, 48, 176, 54, 60, 89, 58,
- 43, 63, 62, 300, 50, 294, 45, 290, 47, 292,
- 46, 291, 55, 298, 56, 299, 49, 293, 289, 330,
- 442, 295, 296, 225, 229, 231, 235, 236, 227, 226,
- 238, 264, 237, 242, 261, 262, 228, 391, 390, 32,
- 543, 542, 352, 353, 545, 355, 544, 354, 450, 454,
- 457, 453, 452, 472, 473, 219, 233, 215, 218, 232,
- 240, 239, 0};
+ 6, 5, 19, 1, 4, 3, 32, 34, 33, 570,
+ 22, 18, 538, 539, 231, 226, 230, 232, 229, 236,
+ 517, 235, 264, 57, 65, 495, 494, 388, 387, 48,
+ 386, 389, 140, 61, 56, 178, 63, 52, 177, 58,
+ 64, 90, 62, 47, 67, 66, 301, 54, 295, 49,
+ 291, 51, 293, 50, 292, 59, 299, 60, 300, 53,
+ 294, 290, 331, 443, 296, 297, 390, 237, 228, 227,
+ 239, 265, 238, 243, 262, 263, 392, 391, 36, 579,
+ 578, 353, 354, 581, 356, 580, 355, 451, 455, 458,
+ 454, 453, 473, 474, 220, 234, 216, 219, 233, 241,
+ 240, 0};
const int JavaScriptGrammar::action_index [] = {
- -23, -91, 10, -91, -19, 50, 77, 56, -91, -91,
- -91, 67, -91, -91, 383, -91, -91, -91, -91, -4,
- 213, 20, 186, -91, -91, -91, -18, -91, -91, -91,
- 370, 129, 203, -91, 204, -91, -91, -91, -17, 192,
- -91, 693, -91, 87, -91, 42, 9, -20, 191, -91,
- 310, 140, -91, -91, 534, 17, 114, 160, 125, -91,
- -91, -91, 344, 162, 693, -91, -91, -91, 157, -91,
- 1191, 34, 693, 693, 693, 613, 693, -91, -91, 693,
- 693, -91, -91, -91, -91, 693, -91, 693, 693, -91,
- 693, 693, 119, 227, -91, -91, 693, 693, 693, -91,
- -91, -91, 193, 693, 310, 693, 693, 693, 693, 446,
- 693, 693, 693, 693, 693, 693, 237, 693, 693, 693,
- 88, 106, 107, 237, 237, 166, 237, 237, 354, 372,
- 334, 693, -11, 693, 19, 1104, 693, 693, -91, -91,
+ 8, -91, 14, -91, -15, 296, 67, 94, -91, -91,
+ -91, -91, -91, -91, -91, -91, -91, -91, 109, -91,
+ 184, 408, -91, -91, -91, -91, 45, 125, 170, -91,
+ 46, -91, -91, -91, 429, 171, 130, -91, 120, -91,
+ -91, -91, -19, 169, -91, 733, -91, 72, -91, 22,
+ -26, -59, 173, -91, 278, 174, -91, -91, 574, 51,
+ 112, 183, 177, -91, -91, -91, 412, 214, 733, -91,
+ -91, -91, 161, 1566, 980, 733, 733, 733, 653, 733,
+ -91, -91, 733, 733, -91, -91, 733, -91, 733, 733,
+ -91, 733, 733, 98, 235, -91, -91, 733, 733, 733,
+ -91, -91, -91, 230, 733, 276, 733, 733, 733, 733,
+ 396, 733, 733, 733, 733, 733, 733, 288, 733, 733,
+ 733, 88, 87, 74, 288, 288, 288, 218, 221, 486,
+ 372, 362, 733, 4, 733, 76, 1479, 733, 733, -91,
-91, -91, -91, -91, -91, -91, -91, -91, -91, -91,
-91, -91, -91, -91, -91, -91, -91, -91, -91, -91,
-91, -91, -91, -91, -91, -91, -91, -91, -91, -91,
- -91, -91, 98, 693, -91, -91, 0, -43, -91, 693,
- -91, -91, -91, -91, 693, -91, -91, -91, -91, -91,
- -91, -91, -91, -91, -91, -91, -91, -91, 693, 6,
- 693, 693, -2, 82, 693, -91, 1104, 693, 693, -91,
- 96, -91, 8, -91, -91, 61, -91, 147, 80, 33,
- -91, 154, -91, 63, 1452, -91, -91, -91, -91, -91,
- 169, -91, -91, 23, -91, -91, -91, -91, -91, -91,
- 1452, -91, -91, 285, 287, 68, 1365, 55, 112, 79,
- 46, 1626, 66, 693, -91, 65, 47, 693, 52, 58,
- 59, -91, -91, -91, -91, -91, -91, -91, -91, 64,
- -91, -91, -91, -91, 73, -91, -91, -91, -91, -91,
- -91, -5, 45, 693, 137, 81, -91, -91, 1017, -91,
- 69, 28, 14, -91, 240, 76, 53, 476, 171, 120,
- 308, 237, 180, 693, 264, 693, 693, 693, 693, 298,
- 693, 693, 693, 693, 693, 230, 237, 237, 237, 237,
- 288, 268, 378, 693, -68, 693, 12, 693, -91, 445,
- 693, -91, 693, 7, -47, 693, -44, 1365, -91, 693,
- 100, 1365, -91, 693, -25, 693, 693, 22, 15, 693,
- -91, -8, 108, -13, -91, -91, 693, -91, 178, 693,
- -91, -60, 693, -58, 1365, -91, 693, 99, 1365, -91,
- -33, 199, -53, -27, 1452, -26, -91, 1365, -91, 693,
- 95, 1365, 32, 1365, -91, 43, 41, 4, -91, -91,
- 1365, 5, 232, 54, 275, 70, 693, 1365, 49, 27,
- 252, 48, 30, 613, 40, 39, -91, 777, -91, 25,
- -1, 26, 693, 24, -3, 693, 21, 693, 1, 2,
- 693, -91, 1278, 37, -91, -91, -91, -91, -91, -91,
- 693, -91, -91, -91, -91, 156, -91, 693, -21, -91,
- 1365, -91, 60, -91, -91, 1365, -91, 693, 102, 3,
- -91, 29, -91, 35, 101, 693, -91, 36, 38, -91,
- -30, -91, 1365, -91, 94, 1365, -91, 176, -91, -91,
- 143, 1365, 44, -91, 16, -6, -91, 207, -9, -29,
- -91, -91, -91, -91, 693, 90, 1365, -91, 693, 91,
- 1365, -91, 111, 13, 857, -91, 18, -91, 937, -91,
- -91, -91, -91, -91, 105, -91, -91, -91, -91, -91,
- -91, -91, -33, -24, 215, -91, 693, -91, 187, -91,
- -91, -91, -91, -91, 1539, 174, -91, 133, 104, -91,
- 62, -91, -91, 97, -91, 51, -91, -91, -91, -91,
- -91, 57, -91, 173, -91, -91, 693, -91, -91, 151,
- -91, -91, -91,
+ -91, -91, -91, 102, 733, -91, -91, 60, 3, -91,
+ 733, -91, -91, -91, -91, 733, -91, -91, -91, -91,
+ -91, -91, -91, -91, -91, -91, -91, -91, -91, 733,
+ -6, 733, 733, 30, 32, 733, -91, 1479, 733, 733,
+ -91, 107, -91, -14, -91, -91, 69, -91, 191, 49,
+ 18, -91, 233, -91, 47, 1827, -91, -91, -91, -91,
+ -91, 204, -91, -91, 39, -91, -91, -91, -91, -91,
+ -91, 1827, -91, -91, 322, 281, 103, 1740, 50, 203,
+ 77, 40, 2001, 53, 733, -91, 52, 29, 733, 25,
+ 28, 35, -91, -91, -91, -91, -91, -91, -91, -91,
+ 113, -91, -91, -91, -91, 106, -91, -91, -91, -91,
+ -91, -91, 15, 68, 733, 135, 119, -91, -91, 897,
+ -91, 82, 58, 17, -91, 261, 84, 42, 494, 91,
+ 79, 304, 288, 208, 733, 245, 733, 733, 733, 733,
+ 418, 733, 733, 733, 733, 733, 288, 288, 288, 288,
+ 288, 343, 336, 279, 733, -57, 733, 19, 733, -91,
+ 574, 733, -91, 733, -7, -30, 733, -60, 1740, -91,
+ 733, 111, 1740, -91, 733, 2, 733, 733, 43, 37,
+ 733, -91, 34, 118, 23, -91, -91, 733, -91, 238,
+ 733, -91, -5, 733, -17, 1740, -91, 733, 133, 1740,
+ -91, -9, 194, -32, -8, 1827, -25, -91, 1740, -91,
+ 733, 100, 1740, 21, 1740, -91, 31, 26, -20, -91,
+ -91, 1740, -38, 283, 41, 291, 85, 733, 1740, -1,
+ -34, 252, 54, -27, 653, 9, 5, -91, 817, -91,
+ 6, -21, 7, 733, 11, -28, 733, 1, 733, -33,
+ -10, 733, -91, 1653, 33, -91, -91, -91, -91, -91,
+ -91, 733, -91, -91, -91, -91, 172, -91, 733, -24,
+ -91, 1740, -91, 73, -91, -91, 1740, -91, 733, 93,
+ 0, -91, 24, -91, 36, 122, 733, -91, 44, 48,
+ -91, -3, -91, 1740, -91, 110, 1740, -91, 192, -91,
+ -91, 124, 1740, 27, -91, -12, -29, -91, 155, -53,
+ -22, -91, -91, -91, -91, 733, 123, 1740, -91, 733,
+ 92, 1740, -91, -91, 105, 1229, -91, -91, 1146, -91,
+ -91, 1063, -91, -91, -91, -91, -91, -91, 90, -91,
+ -91, -91, -91, -91, -91, -91, 71, 70, 222, -91,
+ 733, -91, 164, -91, -91, -91, -91, -91, 1392, -91,
+ -91, -91, 268, -91, -91, 1914, 1312, -91, 75, -91,
+ -91, 350, 55, 303, 108, 733, 1740, 59, 38, 242,
+ 62, 40, 527, 63, 81, -91, 817, -91, 138, 29,
+ 65, 733, 78, 56, 733, 80, 733, 61, 66, 57,
+ 101, -91, 347, -91, -91, -91, -91, 64, -91, 140,
+ -91, -91, 733, -91, -91, 144, -91, -91, -91,
- -103, -103, -103, -103, 15, 16, -103, -103, -103, -103,
- -103, -103, -103, -103, 208, -103, -103, -103, -103, -103,
- -1, -103, -103, -103, -103, -103, -103, -103, -103, -103,
- 237, -103, 26, -103, 31, -103, -103, -103, -103, -103,
- -103, 28, -103, -103, -103, -103, -103, -103, -103, -103,
- -103, -103, -103, -103, -46, -103, -103, -103, -103, -103,
- -103, -103, -103, -103, 98, -103, -103, -103, 7, -103,
- -103, -103, -10, 118, 111, 67, 112, -103, -103, 119,
- 123, -103, -103, -103, -103, 124, -103, 115, 97, -103,
- 32, 106, -103, -103, -103, -103, 128, 171, 101, -103,
- -103, -103, -103, 156, -103, 157, 159, 81, 131, -103,
- 127, 136, 145, 139, 102, 91, -103, 59, 50, 72,
- -103, -103, -103, -103, -103, -103, -103, -103, -103, -103,
- -103, 70, -103, 80, -103, 85, 61, 51, -103, -103,
- -103, -103, -103, -103, -103, -103, -103, -103, -103, -103,
- -103, -103, -103, -103, -103, -103, -103, -103, -103, -103,
- -103, -103, -103, -103, -103, -103, -103, -103, -103, -103,
- -103, -103, -103, 54, -103, -103, -103, -103, -103, -24,
- -103, -103, -103, -103, -23, -103, -103, -103, -103, -103,
- -103, -103, -103, -103, -103, -103, -103, -103, 134, -103,
- 138, 17, -103, -103, 23, -103, 255, -4, 73, -103,
- -103, -103, -103, -103, -103, -103, -103, 11, -103, -103,
- -103, 8, -103, -103, 9, -103, -103, -103, -103, -103,
- -103, -103, -103, -103, -103, -103, -103, -103, -103, -103,
- 77, -103, -103, 10, 2, -103, 5, -103, -3, -103,
- -103, -103, -103, 19, -103, -103, -103, 27, -31, -103,
- -103, -103, -103, -103, -103, -103, -103, -103, -103, -103,
- -103, -103, -103, -103, -103, -103, -103, -103, -103, -103,
- -103, -103, -103, -5, -103, -103, -103, -103, 105, -103,
- -103, -103, -103, -103, -103, -103, -103, -103, -103, -103,
- -103, -103, 34, 205, -103, 193, 169, 181, 201, -103,
- 147, 66, 78, 79, 89, -103, -103, -103, -103, -103,
- -103, -103, -103, 202, -103, 192, -103, 212, -103, -103,
- 182, -103, 68, -103, -103, 62, -103, 56, -103, 33,
- -103, 55, -103, 170, -103, 161, 162, -103, -103, 172,
- -103, -103, -103, -103, -103, -103, 211, -103, 69, 71,
- -103, -103, 64, -103, 60, -103, 41, -103, 42, -103,
- -103, 74, -103, -103, 75, -103, -103, 38, -103, 35,
- -103, 36, -103, 44, -103, -103, -103, -103, -103, -103,
- 52, -103, 45, -103, 43, -103, 65, 46, -103, -103,
- 40, -103, -103, 146, -103, -103, -103, 49, -103, -103,
- -103, -103, 47, -103, -22, 149, -103, 153, -103, -103,
- 30, -103, 48, -103, -103, -103, -103, -103, -103, -103,
- 29, -103, -103, -103, -103, -103, -103, 133, -103, -103,
- 53, -103, -103, -103, -103, 58, -103, 57, -103, -103,
- -103, -103, -103, -56, -103, -6, -103, -82, -103, -103,
- -103, -103, -77, -103, -103, -68, -103, -103, -103, -103,
- -103, -103, -90, -103, -103, -58, -103, -11, -103, -60,
- -103, -103, -103, -103, 21, -103, 25, -103, 22, -103,
- 20, -103, -103, -103, 6, -103, 12, -103, 3, -103,
- -103, -103, -103, -103, -103, -103, -103, -103, -103, -103,
- -103, -103, -103, -103, -103, -103, 24, -103, -103, -103,
- -103, -103, -103, -103, 1, -2, -103, 4, 104, -103,
- -103, -103, -103, -103, -103, 18, -103, -103, -103, -103,
- -103, -103, -103, -103, -103, -103, 0, -103, -103, 63,
- -103, -103, -103};
+ -102, -102, -102, -102, 19, 103, -102, -102, -102, -102,
+ -102, -102, -102, -102, -102, -102, -102, -102, -102, -102,
+ -4, 249, -102, -102, -102, -102, -102, -7, -102, -102,
+ -102, -102, -102, -102, 257, -102, -13, -102, -11, -102,
+ -102, -102, -102, -102, -102, -3, -102, -102, -102, -102,
+ -102, -102, -102, -102, -102, -102, -102, -102, -44, -102,
+ -102, -102, -102, -102, -102, -102, -102, -102, 141, -102,
+ -102, -102, -8, -102, 0, 16, 116, 122, 129, 119,
+ -102, -102, 90, 64, -102, -102, 94, -102, 91, 86,
+ -102, 71, 79, -102, -102, -102, -102, 159, 81, 76,
+ -102, -102, -102, -102, 98, -102, 67, 63, 47, 163,
+ -102, 160, 115, 104, 105, 127, 133, -102, 151, 144,
+ 130, -102, -102, -102, -102, -102, -102, -102, -102, -102,
+ -102, -102, 145, -102, 152, -102, 162, 31, 21, -102,
+ -102, -102, -102, -102, -102, -102, -102, -102, -102, -102,
+ -102, -102, -102, -102, -102, -102, -102, -102, -102, -102,
+ -102, -102, -102, -102, -102, -102, -102, -102, -102, -102,
+ -102, -102, -102, -102, 23, -102, -102, -102, -102, -102,
+ 29, -102, -102, -102, -102, 34, -102, -102, -102, -102,
+ -102, -102, -102, -102, -102, -102, -102, -102, -102, 89,
+ -102, 68, 36, -102, -102, 42, -102, 235, 46, 49,
+ -102, -102, -102, -102, -102, -102, -102, -102, 33, -102,
+ -102, -102, 26, -102, -102, -18, -102, -102, -102, -102,
+ -102, -102, -102, -102, -102, -102, -102, -102, -102, -102,
+ -102, 53, -102, -102, 8, 20, -102, -5, -102, 32,
+ -102, -102, -102, -102, 39, -102, -102, -102, 37, 73,
+ -102, -102, -102, -102, -102, -102, -102, -102, -102, -102,
+ -102, -102, -102, -102, -102, -102, -102, -102, -102, -102,
+ -102, -102, -102, -102, 40, -102, -102, -102, -102, 97,
+ -102, -102, -102, -102, -102, -102, -102, -102, -102, -102,
+ -102, -102, -102, 41, 213, -102, 186, 199, 203, 209,
+ -102, 50, 51, 38, 57, 60, -102, -102, -102, -102,
+ -102, -102, -102, -102, 212, -102, 174, -102, 166, -102,
+ -102, 168, -102, 125, -102, -102, 61, -102, 1, -102,
+ 45, -102, -9, -102, 172, -102, 184, 176, -102, -102,
+ 170, -102, -102, -102, -102, -102, -102, 215, -102, 124,
+ 132, -102, -102, 178, -102, -29, -102, 25, -102, 2,
+ -102, -102, 62, -102, -102, 102, -102, -102, -28, -102,
+ 22, -102, -31, -102, -33, -102, -102, -102, -102, -102,
+ -102, -34, -102, 17, -102, 18, -102, 111, -20, -102,
+ -102, 24, -102, -102, 153, -102, -102, -102, 30, -102,
+ -102, -102, -102, 28, -102, 73, 140, -102, 205, -102,
+ -102, 5, -102, 44, -102, -102, -102, -102, -102, -102,
+ -102, 43, -102, -102, -102, -102, -102, -102, 135, -102,
+ -102, 7, -102, -102, -102, -102, 4, -102, 55, -102,
+ -102, -102, -102, -102, -25, -102, 48, -102, 9, -102,
+ -102, -102, -102, -69, -102, -102, -70, -102, -102, -102,
+ -102, -102, -102, -92, -102, -102, -12, -102, -10, -102,
+ -1, -102, -102, -102, -102, 11, -102, -40, -102, 14,
+ -102, -39, -102, -102, -102, -17, -102, -102, 54, -102,
+ -102, -24, -102, -102, -102, -102, -102, -102, -102, -102,
+ -102, -102, -102, -102, -102, -102, -102, -102, -102, -102,
+ 3, -102, -102, -102, -102, -102, -102, -102, 267, -102,
+ -102, -102, 12, -102, -102, -102, 301, -102, -102, -102,
+ -102, -19, -102, -15, -102, 59, -64, -102, -102, -2,
+ -102, -102, 142, -102, -102, -102, -14, -102, -102, -102,
+ -102, 6, -102, 73, 52, -102, 75, -102, -102, -102,
+ -102, -102, 128, -102, -102, -102, -102, -102, -102, -102,
+ -102, -102, -6, -102, -102, 58, -102, -102, -102};
const int JavaScriptGrammar::action_info [] = {
- 198, 362, 364, 371, 471, 514, 374, 373, 179, 356,
- 325, 521, 39, 303, 335, 173, 337, 181, 366, 198,
- 103, 501, 349, 323, 343, 461, 495, 471, -99, 376,
- 471, -96, -72, -94, 455, 447, 451, 484, 488, 439,
- 455, 455, 495, 103, 430, 462, -73, -91, 383, 422,
- 420, 479, 477, 14, 131, -69, -83, 131, 133, 432,
- 434, -102, 34, 288, 475, 2, 379, 133, 213, 2,
- 303, 282, 445, 440, 546, 7, 323, 552, 267, 11,
- 11, 283, 379, 447, 327, 471, 377, 0, 221, 204,
- 0, 288, 325, 223, 484, 488, 224, 217, 173, 173,
- 14, 465, 173, 173, 173, 535, 173, 173, 173, 0,
- 173, 458, 495, 173, 332, 0, 358, 9, 8, 496,
- 0, 444, 443, 539, 538, 273, 272, 90, 90, 280,
- 279, 280, 279, 11, 278, 277, 524, 96, 91, 91,
- 377, 69, 287, 286, 525, 173, 90, 90, 173, 474,
- 486, 490, 211, 536, 174, 381, 459, 91, 91, 368,
- 341, 94, 449, 475, 200, 505, 14, 497, 201, 359,
- 345, 206, 95, 343, 346, 206, 69, 173, 81, 82,
- 69, 549, 97, 69, 173, 0, 69, 117, 98, 118,
- 207, 117, 437, 118, 207, 173, 208, 285, 0, 41,
- 119, 183, 182, 69, 119, 96, 135, 69, 0, 69,
- 0, 0, 0, 81, 82, 35, 0, 81, 82, 0,
- 81, 82, 516, 81, 82, 136, 0, 137, 69, 0,
- 266, 265, 69, 35, 550, 548, 69, 469, 468, 96,
- 81, 82, 69, 0, 81, 82, 81, 82, 520, 519,
- 97, 0, 0, 42, 40, 117, 98, 118, 305, 306,
- 37, 69, 117, 0, 118, 81, 82, 0, 119, 81,
- 82, 36, 0, 81, 82, 119, 517, 515, 37, 81,
- 82, 69, 305, 306, 97, 307, 308, 0, -313, 36,
- 98, 310, 311, 271, 270, 0, 0, 0, 81, 82,
- 312, 0, 0, 313, 69, 314, 0, 0, 0, 307,
- 308, 310, 311, 0, 69, 0, 69, 0, 81, 82,
- 312, 310, 311, 313, 0, 314, 0, 0, 105, 106,
- 312, 310, 311, 313, 0, 314, 276, 275, 0, 0,
- 312, 81, 82, 313, 0, 314, 271, 270, 276, 275,
- 0, 81, 82, 81, 82, 107, 108, 110, 111, 0,
- 0, 0, 0, 0, 0, 112, 113, 110, 111, 114,
- 0, 115, 0, 0, 0, 112, 113, 110, 111, 114,
- 19, 115, 0, 0, 0, 112, 113, 0, 0, 114,
- 0, 115, 20, 19, 0, 110, 111, 0, 0, 21,
- 0, 310, 311, 112, 113, 20, 0, 114, 0, 115,
- 312, 0, 21, 313, 0, 314, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 522, 0, 0, 0, 25,
- 0, 0, 0, 0, 0, 0, 22, 26, 23, 0,
- 0, 0, 25, 0, 27, 0, 0, 0, 185, 22,
- 26, 0, 0, 18, 0, 24, 0, 27, 186, 0,
- 0, 0, 187, 0, 0, 0, 18, 0, 24, 110,
- 111, 188, 0, 189, 0, 0, 0, 112, 113, 185,
- 0, 114, 0, 115, 190, 0, 191, 94, 0, 186,
- 0, 0, 0, 187, 192, 0, 0, 193, 95, 0,
- 0, 0, 188, 194, 189, 0, 0, 339, 0, 195,
- 0, 0, 0, 0, 0, 190, 0, 191, 94, 0,
- 0, 0, 0, 0, 196, 192, 0, 0, 193, 95,
- 0, 0, 0, 0, 194, 0, 0, 185, 0, 0,
- 195, 0, 0, 0, 0, 0, 0, 186, 0, 0,
- 0, 187, 0, 0, 0, 196, 0, 0, 0, 0,
- 188, 0, 189, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 190, 0, 191, 94, 0, 0, 0,
- 0, 0, 0, 192, 0, 0, 193, 95, 0, 0,
- 0, 0, 194, 0, 0, 0, 0, 0, 195, 0,
+ 338, 174, 289, 485, 472, 472, -89, 480, -105, 380,
+ 43, 472, -79, -78, -100, 448, -97, 435, -102, 134,
+ 304, 326, 132, 104, 478, 375, 489, 372, 374, 456,
+ 377, 336, 199, 452, 423, 433, 440, 384, 421, 205,
+ 431, 456, 132, 365, 350, 344, 214, 476, -108, 456,
+ 324, 357, 462, 199, 367, 463, 363, 222, 472, 446,
+ 441, -75, -108, 182, 485, 448, -89, 588, 180, -75,
+ -97, 489, -100, 2, 289, 525, 380, 104, 224, 7,
+ 225, 582, 134, 304, 378, -102, 289, -105, -79, 472,
+ -65, 283, 328, 344, 268, 326, 2, 485, 174, 518,
+ 174, 174, 489, 333, 284, 218, 324, 372, 174, 572,
+ 174, 38, 91, 498, 91, 174, 0, 466, 174, 174,
+ 0, 0, 0, 92, 20, 92, 359, 91, 91, 346,
+ 475, 174, 459, 347, 445, 444, 576, 575, 92, 92,
+ 95, 174, 21, 174, 476, -78, 281, 280, 585, 39,
+ 509, 96, 491, 450, 12, 9, 8, 573, 175, 12,
+ 382, 499, 201, 212, 281, 280, 202, 279, 278, 281,
+ 280, 342, 174, 12, 274, 273, 45, 460, 528, 360,
+ 288, 287, 174, 487, 12, 0, 20, 207, 136, 97,
+ 12, 13, 16, 369, 41, 286, 13, 16, 207, 39,
+ 174, 586, 584, 0, 21, 40, 208, 137, 438, 138,
+ 13, 16, 174, 12, 0, 0, 0, 208, 0, 209,
+ 12, 13, 16, 12, 0, 524, 523, 13, 16, 520,
+ 46, 44, 12, 0, 98, 184, 183, 12, 0, 118,
+ 99, 119, 97, 118, 41, 119, 118, 97, 119, 0,
+ 13, 16, 120, 470, 469, 40, 120, 13, 16, 120,
+ 13, 16, 12, 306, 307, 267, 266, 12, 0, 13,
+ 16, 12, 0, 0, 13, 16, 174, 0, -319, 306,
+ 307, 12, 0, 521, 519, 0, 0, 98, -319, 0,
+ 308, 309, 98, 99, 106, 107, 106, 107, 99, 13,
+ 16, 21, 311, 312, 13, 16, 308, 309, 13, 16,
+ 12, 313, 12, 118, 314, 119, 315, 0, 13, 16,
+ 12, 108, 109, 108, 109, 12, 120, 311, 312, 267,
+ 266, 0, 12, 0, 0, 0, 313, 0, 0, 314,
+ 0, 315, 277, 276, 272, 271, 0, 13, 16, 13,
+ 16, 12, 277, 276, 0, 15, 0, 13, 16, 311,
+ 312, 0, 13, 16, 277, 276, 311, 312, 313, 13,
+ 16, 314, 0, 315, 0, 313, 12, 0, 314, 12,
+ 315, 14, 0, 272, 271, 111, 112, 0, 13, 16,
+ 0, 0, 0, 113, 114, 111, 112, 115, 0, 116,
+ 0, 0, 0, 113, 114, 0, 15, 115, 0, 116,
+ 0, 272, 271, 13, 16, 0, 13, 16, 26, 111,
+ 112, 0, 0, 0, 0, 0, 0, 113, 114, 0,
+ 27, 115, 14, 116, 0, 111, 112, 12, 0, 26,
+ 0, 311, 312, 113, 114, 0, 0, 115, 0, 116,
+ 313, 27, 0, 314, 0, 315, 0, 0, 12, 0,
+ 0, 0, 0, 29, 0, 0, 0, 15, 0, 0,
+ 0, 0, 0, 0, 28, 30, 0, 0, 0, 0,
+ 0, 0, 31, 0, 526, 0, 0, 0, 15, 0,
+ 0, 25, 0, 14, 0, 28, 30, 186, 0, 0,
+ 0, 0, 0, 31, 0, 0, 0, 187, 0, 111,
+ 112, 188, 25, 0, 14, 0, 0, 113, 114, 0,
+ 189, 115, 190, 116, 0, 340, 0, 0, 0, 0,
+ 0, 0, 0, 191, 0, 192, 95, 0, 0, 69,
+ 70, 0, 0, 193, 0, 0, 194, 96, 0, 72,
+ 0, 0, 195, 0, 0, 0, 12, 0, 196, 0,
+ 73, 74, 0, 75, 0, 0, 0, 0, 0, 0,
+ 78, 0, 0, 197, 81, 0, 0, 186, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 187, 0, 0,
+ 0, 188, 84, 13, 16, 0, 85, 0, 0, 0,
+ 189, 0, 190, 0, 0, 0, 0, 80, 87, 71,
+ 0, 0, 0, 191, 0, 192, 95, 0, 0, 0,
+ 0, 0, 0, 193, 0, 0, 194, 96, 0, 0,
+ 0, 0, 195, 0, 0, 0, 0, 0, 196, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 196, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 65, 66, 0, 0, 0,
- 0, 0, 0, 0, 0, 68, 0, 0, 0, 0,
- 0, 0, 69, 0, 0, 0, 70, 71, 0, 72,
- 0, 0, 0, 0, 0, 0, 75, 0, 0, 0,
- 78, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 83, 81,
- 82, 0, 84, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 77, 86, 67, 0, 0, 0, 0,
- 0, 0, 0, 0, 64, 65, 66, 0, 0, 0,
- 0, 0, 0, 0, 0, 68, 0, 0, 0, 0,
- 0, 0, 69, 0, 0, 0, 70, 71, 0, 72,
- 0, 0, 0, 73, 0, 74, 75, 76, 0, 0,
- 78, 0, 0, 0, 79, 0, 80, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 83, 81,
- 82, 0, 84, 0, 85, 0, 87, 0, 88, 0,
- 0, 0, 0, 77, 86, 67, 0, 0, 0, 0,
- 0, 0, 0, 0, -92, 0, 0, 0, 64, 65,
- 66, 0, 0, 0, 0, 0, 0, 0, 0, 68,
- 0, 0, 0, 0, 0, 0, 69, 0, 0, 0,
- 70, 71, 0, 72, 0, 0, 0, 73, 0, 74,
- 75, 76, 0, 0, 78, 0, 0, 0, 79, 0,
- 80, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 83, 81, 82, 0, 84, 0, 85, 0,
- 87, 0, 88, 0, 0, 0, 0, 77, 86, 67,
- 0, 0, 0, 0, 0, 0, 0, 0, 64, 65,
- 66, 0, 0, 0, 0, 0, 0, 0, 0, 68,
- 0, 0, 0, 0, 0, 0, 69, 0, 0, 0,
- 70, 71, 0, 72, 0, 0, 0, 73, 0, 74,
- 75, 76, 0, 0, 78, 0, 0, 0, 79, 0,
- 80, 0, 0, 503, 0, 0, 0, 0, 0, 0,
- 0, 0, 83, 81, 82, 0, 84, 0, 85, 0,
- 87, 0, 88, 0, 0, 0, 0, 77, 86, 67,
- 0, 0, 0, 0, 0, 0, 0, 0, 64, 65,
- 66, 0, 0, 0, 0, 0, 0, 0, 0, 68,
- 0, 0, 0, 0, 0, 0, 69, 0, 0, 0,
- 70, 71, 0, 72, 0, 0, 0, 73, 0, 74,
- 75, 76, 0, 0, 78, 0, 0, 0, 79, 0,
- 80, 0, 0, 500, 0, 0, 0, 0, 0, 0,
- 0, 0, 83, 81, 82, 0, 84, 0, 85, 0,
- 87, 0, 88, 0, 0, 0, 0, 77, 86, 67,
- 0, 0, 0, 0, 0, 0, 0, 0, 64, 65,
- 66, 0, 0, 0, 0, 0, 0, 0, 0, 68,
- 0, 0, 0, 0, 0, 0, 69, 0, 0, 0,
- 70, 71, 0, 72, 0, 0, 0, 73, 0, 74,
- 75, 76, 0, 0, 78, 0, 0, 0, 79, 0,
- 80, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 83, 81, 82, 0, 84, 0, 85, 0,
- 87, 302, 88, 0, 0, 0, 0, 77, 86, 67,
- 0, 0, 0, 0, 0, 0, 0, 0, 141, 142,
- 143, 0, 0, 145, 147, 148, 0, 0, 149, 0,
- 150, 0, 0, 0, 152, 153, 154, 0, 0, 0,
- 0, 0, 0, 69, 155, 156, 157, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 158, 0, 0,
+ 0, 0, 0, 197, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 69, 70, 0, 0, 0,
+ 0, 0, 0, 0, 0, 72, 0, 0, 0, 0,
+ 0, 0, 12, 0, 0, 0, 73, 74, 0, 75,
+ 0, 0, 0, 0, 0, 0, 78, 0, 0, 0,
+ 81, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 84, 13,
+ 16, 0, 85, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 80, 87, 71, 0, 0, 0, 0,
+ 0, 0, 0, 0, 68, 69, 70, 0, 0, 0,
+ 0, 0, 0, 0, 0, 72, 0, 0, 0, 0,
+ 0, 0, 12, 0, 0, 0, 73, 74, 0, 75,
+ 0, 0, 0, 76, 0, 77, 78, 79, 0, 0,
+ 81, 0, 0, 0, 82, 0, 83, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 84, 13,
+ 16, 0, 85, 0, 86, 0, 88, 0, 89, 0,
+ 0, 0, 0, 80, 87, 71, 0, 0, 0, 0,
+ 0, 0, 0, 0, -98, 0, 0, 0, 68, 69,
+ 70, 0, 0, 0, 0, 0, 0, 0, 0, 72,
+ 0, 0, 0, 0, 0, 0, 12, 0, 0, 0,
+ 73, 74, 0, 75, 0, 0, 0, 76, 0, 77,
+ 78, 79, 0, 0, 81, 0, 0, 0, 82, 0,
+ 83, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 84, 13, 16, 0, 85, 0, 86, 0,
+ 88, 0, 89, 0, 0, 0, 0, 80, 87, 71,
+ 0, 0, 0, 0, 0, 0, 0, 0, 68, 69,
+ 70, 0, 0, 0, 0, 0, 0, 0, 0, 72,
+ 0, 0, 0, 0, 0, 0, 12, 0, 0, 0,
+ 73, 74, 0, 75, 0, 0, 0, 76, 0, 77,
+ 78, 79, 0, 0, 81, 0, 0, 0, 82, 0,
+ 83, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 84, 13, 16, 0, 85, 0, 86, 0,
+ 88, 303, 89, 0, 0, 0, 0, 80, 87, 71,
+ 0, 0, 0, 0, 0, 0, 0, 0, 496, 0,
+ 0, 68, 69, 70, 0, 0, 0, 0, 0, 0,
+ 0, 0, 72, 0, 0, 0, 0, 0, 0, 12,
+ 0, 0, 0, 73, 74, 0, 75, 0, 0, 0,
+ 76, 0, 77, 78, 79, 0, 0, 81, 0, 0,
+ 0, 82, 0, 83, 0, 0, 497, 0, 0, 0,
+ 0, 0, 0, 0, 0, 84, 13, 16, 0, 85,
+ 0, 86, 0, 88, 0, 89, 0, 0, 0, 0,
+ 80, 87, 71, 0, 0, 0, 0, 0, 0, 0,
+ 0, 504, 0, 0, 68, 69, 70, 0, 0, 0,
+ 0, 0, 0, 0, 0, 72, 0, 0, 0, 0,
+ 0, 0, 12, 0, 0, 0, 73, 74, 0, 75,
+ 0, 0, 0, 76, 0, 77, 78, 79, 0, 0,
+ 81, 0, 0, 0, 82, 0, 83, 0, 0, 505,
+ 0, 0, 0, 0, 0, 0, 0, 0, 84, 13,
+ 16, 0, 85, 0, 86, 0, 88, 0, 89, 0,
+ 0, 0, 0, 80, 87, 71, 0, 0, 0, 0,
+ 0, 0, 0, 0, 496, 0, 0, 68, 69, 70,
+ 0, 0, 0, 0, 0, 0, 0, 0, 72, 0,
+ 0, 0, 0, 0, 0, 12, 0, 0, 0, 73,
+ 74, 0, 75, 0, 0, 0, 76, 0, 77, 78,
+ 79, 0, 0, 81, 0, 0, 0, 82, 0, 83,
+ 0, 0, 502, 0, 0, 0, 0, 0, 0, 0,
+ 0, 84, 13, 16, 0, 85, 0, 86, 0, 88,
+ 0, 89, 0, 0, 0, 0, 80, 87, 71, 0,
+ 0, 0, 0, 0, 0, 0, 0, 504, 0, 0,
+ 68, 69, 70, 0, 0, 0, 0, 0, 0, 0,
+ 0, 72, 0, 0, 0, 0, 0, 0, 12, 0,
+ 0, 0, 73, 74, 0, 75, 0, 0, 0, 76,
+ 0, 77, 78, 79, 0, 0, 81, 0, 0, 0,
+ 82, 0, 83, 0, 0, 507, 0, 0, 0, 0,
+ 0, 0, 0, 0, 84, 13, 16, 0, 85, 0,
+ 86, 0, 88, 0, 89, 0, 0, 0, 0, 80,
+ 87, 71, 0, 0, 0, 0, 0, 0, 0, 0,
+ 496, 0, 0, 68, 69, 70, 0, 0, 0, 0,
+ 0, 0, 0, 0, 72, 0, 0, 0, 0, 0,
+ 0, 12, 0, 0, 0, 73, 74, 0, 75, 0,
+ 0, 0, 76, 0, 77, 78, 79, 0, 0, 81,
+ 0, 0, 0, 82, 0, 83, 0, 0, 497, 0,
+ 0, 15, 0, 0, 0, 0, 0, 84, 13, 16,
+ 0, 85, 0, 86, 0, 88, 0, 89, 0, 0,
+ 0, 0, 80, 87, 71, 0, 0, 14, 0, 0,
+ 0, 0, 0, 68, 69, 70, 0, 0, 0, 0,
+ 0, 0, 0, 0, 72, 0, 0, 0, 0, 0,
+ 0, 12, 251, 0, 0, 535, 536, 0, 75, 0,
+ 0, 0, 76, 0, 77, 78, 79, 0, 0, 81,
+ 0, 0, 0, 82, 0, 83, 0, 0, 0, 0,
+ 0, 0, 0, 255, 0, 0, 0, 84, 13, 16,
+ 0, 85, 0, 86, 0, 88, 0, 89, 0, 0,
+ 0, 0, 80, 87, 71, 0, 246, 0, 537, 0,
+ 0, 0, 0, 142, 143, 144, 0, 0, 146, 148,
+ 149, 0, 0, 150, 0, 151, 0, 0, 0, 153,
+ 154, 155, 0, 0, 0, 0, 0, 0, 12, 156,
+ 157, 158, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 159, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 162, 0,
+ 0, 0, 0, 0, 0, 13, 16, 163, 164, 165,
+ 0, 167, 168, 169, 170, 171, 172, 0, 0, 160,
+ 166, 152, 145, 147, 161, 0, 0, 0, 0, 0,
+ 142, 143, 144, 0, 0, 146, 148, 149, 0, 0,
+ 150, 0, 151, 0, 0, 0, 153, 154, 155, 0,
+ 0, 0, 0, 0, 0, 425, 156, 157, 158, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 159,
+ 0, 0, 0, 426, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 162, 0, 0, 0, 0,
+ 0, 430, 427, 429, 163, 164, 165, 0, 167, 168,
+ 169, 170, 171, 172, 0, 0, 160, 166, 152, 145,
+ 147, 161, 0, 0, 0, 0, 0, 142, 143, 144,
+ 0, 0, 146, 148, 149, 0, 0, 150, 0, 151,
+ 0, 0, 0, 153, 154, 155, 0, 0, 0, 0,
+ 0, 0, 425, 156, 157, 158, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 159, 0, 0, 0,
+ 426, 0, 0, 0, 0, 0, 0, 0, 428, 0,
+ 0, 0, 162, 0, 0, 0, 0, 0, 430, 427,
+ 429, 163, 164, 165, 0, 167, 168, 169, 170, 171,
+ 172, 0, 0, 160, 166, 152, 145, 147, 161, 0,
+ 0, 0, 0, 0, 244, 0, 0, 0, 0, 245,
+ 0, 68, 69, 70, 247, 0, 0, 0, 0, 0,
+ 0, 248, 72, 0, 0, 0, 0, 0, 0, 250,
+ 251, 0, 0, 252, 74, 0, 75, 0, 0, 0,
+ 76, 0, 77, 78, 79, 0, 0, 81, 0, 0,
+ 0, 82, 0, 83, 0, 0, 0, 0, 0, 254,
+ 0, 255, 0, 0, 0, 84, 253, 256, 257, 85,
+ 258, 86, 259, 88, 31, 89, 260, 261, 0, 0,
+ 80, 87, 71, 25, 246, 0, 0, 0, 0, 0,
+ 0, 244, 0, 0, 0, 0, 245, 0, 68, 69,
+ 70, 247, 0, 0, 0, 0, 0, 0, 248, 249,
+ 0, 0, 0, 0, 0, 0, 250, 251, 0, 0,
+ 252, 74, 0, 75, 0, 0, 0, 76, 0, 77,
+ 78, 79, 0, 0, 81, 0, 0, 0, 82, 0,
+ 83, 0, 0, 0, 0, 0, 254, 0, 255, 0,
+ 0, 0, 84, 253, 256, 257, 85, 258, 86, 259,
+ 88, 31, 89, 260, 261, 0, 0, 80, 87, 71,
+ 25, 246, 0, 0, 0, 0, 0, 0, 541, 143,
+ 144, 0, 0, 543, 148, 545, 69, 70, 546, 0,
+ 151, 0, 0, 0, 153, 548, 549, 0, 0, 0,
+ 0, 0, 0, 550, 551, 157, 158, 252, 74, 0,
+ 75, 0, 0, 0, 76, 0, 77, 552, 79, 0,
+ 0, 554, 0, 0, 0, 82, 0, 83, 0, 0,
+ 0, 0, 0, 556, 0, 255, 0, 0, 0, 558,
+ 555, 557, 559, 560, 561, 86, 563, 564, 565, 566,
+ 567, 568, 0, 0, 553, 562, 547, 542, 544, 161,
+ 0, 0, 0, 0, 0, 393, 143, 144, 0, 0,
+ 395, 148, 397, 69, 70, 398, 0, 151, 0, 0,
+ 0, 153, 400, 401, 0, 0, 0, 0, 0, 0,
+ 402, 403, 157, 158, 252, 74, 0, 75, 0, 0,
+ 0, 76, 0, 77, 404, 79, 0, 0, 406, 0,
+ 0, 0, 82, 0, 83, 0, -244, 0, 0, 0,
+ 408, 0, 255, 0, 0, 0, 410, 407, 409, 411,
+ 412, 413, 86, 415, 416, 417, 418, 419, 420, 0,
+ 0, 405, 414, 399, 394, 396, 161, 0, 0, 0,
+ 0, 0,
+
+ 334, 477, 282, 482, 270, 503, 467, 464, 275, 42,
+ 577, 55, 506, 479, 481, 217, 516, 522, 185, 23,
+ 468, 217, 540, 583, 10, 486, 488, 492, 490, 493,
+ 508, 270, 434, 385, 422, 383, 381, 366, 379, 368,
+ 270, 275, 468, 275, 334, 173, 282, 217, 242, 223,
+ 179, 468, 176, 334, 285, 371, 221, 343, 181, 341,
+ 211, 282, 465, 198, 352, 204, 457, 339, 370, 449,
+ 447, 206, 432, 442, 424, 334, 0, 93, 179, 501,
+ 0, 577, 318, 500, 213, 221, 93, 0, 471, 93,
+ 93, 93, 130, 483, 316, 317, 93, 461, 93, 93,
+ 215, 319, 93, 93, 320, 514, 93, 93, 129, 17,
+ 93, 0, 110, 94, 93, 93, 484, 102, 93, 242,
+ 93, 103, 101, 203, 337, 93, 11, 484, 93, 93,
+ 93, 513, 483, 93, 574, 515, 298, 93, 587, 334,
+ 0, 302, 200, 93, 93, 105, 334, 352, 125, 126,
+ 93, 11, 215, 269, 93, 93, 373, 510, 93, 124,
+ 512, 93, 436, 511, 179, 437, 93, 0, 242, 93,
+ 439, 127, 93, 123, 0, 436, 0, 128, 437, 93,
+ 93, 483, 215, 93, 93, 139, 436, 122, 335, 437,
+ 93, 93, 334, 141, 121, 362, 133, 376, 93, 93,
+ 100, 135, 93, 0, 117, 330, 361, 330, 131, 330,
+ 302, 93, 302, 93, 302, 330, 302, 0, 302, 0,
+ 302, 0, 0, 93, 327, 93, 345, 329, 302, 332,
+ 302, 351, 310, 0, 0, 0, 0, 349, 93, 0,
+ 348, 364, 93, 302, 93, 321, 484, 302, 93, 322,
+ 0, 93, 93, 302, 330, 323, 302, 302, 139, 302,
+ 35, 305, 0, 0, 325, 527, 141, 210, 35, 0,
+ 24, 37, 11, 0, 0, 0, 358, 0, 24, 37,
+ 11, 532, 529, 531, 533, 530, 534, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 161, 0, 0, 0, 0, 0, 0,
- 81, 82, 162, 163, 164, 0, 166, 167, 168, 169,
- 170, 171, 0, 0, 159, 165, 151, 144, 146, 160,
- 0, 0, 0, 0, 0, 141, 142, 143, 0, 0,
- 145, 147, 148, 0, 0, 149, 0, 150, 0, 0,
- 0, 152, 153, 154, 0, 0, 0, 0, 0, 0,
- 424, 155, 156, 157, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 158, 0, 0, 0, 425, 0,
+ 0, 0, 0, 0, 0, 0, 0, 571, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 161, 0, 0, 0, 0, 0, 429, 426, 428, 162,
- 163, 164, 0, 166, 167, 168, 169, 170, 171, 0,
- 0, 159, 165, 151, 144, 146, 160, 0, 0, 0,
- 0, 0, 141, 142, 143, 0, 0, 145, 147, 148,
- 0, 0, 149, 0, 150, 0, 0, 0, 152, 153,
- 154, 0, 0, 0, 0, 0, 0, 424, 155, 156,
- 157, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 158, 0, 0, 0, 425, 0, 0, 0, 0,
- 0, 0, 0, 427, 0, 0, 0, 161, 0, 0,
- 0, 0, 0, 429, 426, 428, 162, 163, 164, 0,
- 166, 167, 168, 169, 170, 171, 0, 0, 159, 165,
- 151, 144, 146, 160, 0, 0, 0, 0, 0, 243,
- 0, 0, 0, 0, 244, 0, 64, 65, 66, 246,
- 0, 0, 0, 0, 0, 0, 247, 68, 0, 0,
- 0, 0, 0, 0, 249, 250, 0, 0, 251, 71,
- 0, 72, 0, 0, 0, 73, 0, 74, 75, 76,
- 0, 0, 78, 0, 0, 0, 79, 0, 80, 0,
- 0, 0, 0, 0, 253, 0, 254, 0, 0, 0,
- 83, 252, 255, 256, 84, 257, 85, 258, 87, 27,
- 88, 259, 260, 0, 0, 77, 86, 67, 18, 245,
- 0, 0, 0, 0, 0, 0, 243, 0, 0, 0,
- 0, 244, 0, 64, 65, 66, 246, 0, 0, 0,
- 0, 0, 0, 247, 248, 0, 0, 0, 0, 0,
- 0, 249, 250, 0, 0, 251, 71, 0, 72, 0,
- 0, 0, 73, 0, 74, 75, 76, 0, 0, 78,
- 0, 0, 0, 79, 0, 80, 0, 0, 0, 0,
- 0, 253, 0, 254, 0, 0, 0, 83, 252, 255,
- 256, 84, 257, 85, 258, 87, 27, 88, 259, 260,
- 0, 0, 77, 86, 67, 18, 245, 0, 0, 0,
- 0, 0, 0, 243, 0, 0, 0, 0, 244, 0,
- 64, 65, 66, 246, 0, 0, 0, 0, 0, 0,
- 247, 68, 0, 0, 0, 0, 0, 0, 527, 250,
- 0, 0, 251, 528, 0, 72, 0, 0, 0, 73,
- 0, 74, 75, 76, 0, 0, 78, 0, 0, 0,
- 79, 0, 80, 0, 0, 0, 0, 0, 253, 0,
- 254, 0, 0, 0, 83, 252, 255, 256, 84, 257,
- 85, 258, 87, 27, 88, 259, 260, 0, 0, 77,
- 86, 67, 18, 245, 0, 529, 0, 0, 0, 0,
- 392, 142, 143, 0, 0, 394, 147, 396, 65, 66,
- 397, 0, 150, 0, 0, 0, 152, 399, 400, 0,
- 0, 0, 0, 0, 0, 401, 402, 156, 157, 251,
- 71, 0, 72, 0, 0, 0, 73, 0, 74, 403,
- 76, 0, 0, 405, 0, 0, 0, 79, 0, 80,
- 0, -238, 0, 0, 0, 407, 0, 254, 0, 0,
- 0, 409, 406, 408, 410, 411, 412, 85, 414, 415,
- 416, 417, 418, 419, 0, 0, 404, 413, 398, 393,
- 395, 160, 0, 0, 0, 0, 0,
-
- 463, 180, 197, 480, 476, 481, 504, 460, 478, 466,
- 464, 284, 210, 184, 532, 526, 370, 540, 512, 281,
- 10, 274, 12, 241, 537, 547, 216, 222, 499, 269,
- 220, 502, 470, 498, 491, 333, 456, 485, 489, 487,
- 518, 470, 203, 467, 51, 541, 38, 0, 205, 340,
- 382, 380, 378, 351, 431, 421, 369, 367, 384, 216,
- 281, 0, 274, 467, 269, 333, 433, 441, 92, 342,
- 338, 93, 446, 448, 365, 423, 178, 172, 333, 175,
- 333, 0, 541, 0, 333, 0, 92, 333, 351, 241,
- 121, 241, 0, 220, 0, 92, 0, 435, 178, 120,
- 436, 92, 92, 214, 138, 212, 92, 316, 92, 0,
- 534, 0, 122, 140, 92, 92, 92, 92, 132, 317,
- 318, 0, 336, 129, 363, 92, 134, 92, 334, 0,
- 319, 361, 127, 92, 92, 483, 214, 92, 92, 101,
- 0, 297, 92, 126, 551, 102, 301, 92, 92, 507,
- 508, 92, 360, 482, 92, 92, 506, 509, 178, 92,
- 92, 510, 511, 92, 92, 438, 99, 92, 116, 372,
- 92, 375, 92, 130, 92, 92, 435, 123, 268, 436,
- 125, 92, 0, 92, 199, 92, 124, 482, 315, 92,
- 202, 483, 92, 92, 0, 92, 0, 92, 329, 109,
- 104, 128, 301, 301, 0, 92, 92, 92, 329, 100,
- 301, 301, 320, 301, 347, 0, 0, 92, 329, 0,
- 348, 344, 301, 301, 321, 16, 33, 17, 92, 92,
- 350, 0, 0, 301, 301, 0, 309, 92, 92, 326,
- 331, 92, 301, 301, 322, 523, 301, 329, 329, 0,
- 304, 324, 301, 301, 16, 33, 17, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 357,
- 328, 0, 0, 0, 138, 0, 0, 0, 0, 0,
- 0, 0, 0, 140, 209, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 569, 0, 0, 0, 0, 0,
+ 493, 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,
- 0, 0, 0, 0, 0, 0, 0, 0};
+ 0, 0, 0};
const int JavaScriptGrammar::action_check [] = {
- 2, 61, 60, 36, 33, 29, 33, 60, 8, 17,
- 78, 29, 29, 1, 61, 8, 60, 60, 31, 2,
- 1, 8, 7, 48, 2, 55, 8, 33, 7, 55,
- 33, 7, 7, 7, 5, 36, 33, 36, 36, 60,
- 5, 5, 8, 1, 7, 7, 7, 7, 16, 8,
- 7, 60, 36, 33, 48, 7, 7, 48, 78, 55,
- 55, 7, 66, 36, 20, 88, 36, 78, 60, 88,
- 1, 76, 7, 7, 17, 65, 48, 0, 55, 29,
- 29, 36, 36, 36, 8, 33, 7, -1, 8, 7,
- -1, 36, 78, 60, 36, 36, 33, 36, 8, 8,
- 33, 7, 8, 8, 8, 8, 8, 8, 8, -1,
- 8, 10, 8, 8, 61, -1, 8, 61, 62, 8,
- -1, 61, 62, 61, 62, 61, 62, 40, 40, 61,
- 62, 61, 62, 29, 61, 62, 7, 12, 51, 51,
- 7, 29, 61, 62, 15, 8, 40, 40, 8, 6,
- 60, 60, 56, 56, 56, 60, 55, 51, 51, 60,
- 60, 42, 60, 20, 50, 60, 33, 56, 54, 61,
- 50, 15, 53, 2, 54, 15, 29, 8, 66, 67,
- 29, 8, 57, 29, 8, -1, 29, 25, 63, 27,
- 34, 25, 36, 27, 34, 8, 36, 60, -1, 7,
- 38, 61, 62, 29, 38, 12, 15, 29, -1, 29,
- -1, -1, -1, 66, 67, 29, -1, 66, 67, -1,
- 66, 67, 7, 66, 67, 34, -1, 36, 29, -1,
- 61, 62, 29, 29, 61, 62, 29, 61, 62, 12,
- 66, 67, 29, -1, 66, 67, 66, 67, 61, 62,
- 57, -1, -1, 61, 62, 25, 63, 27, 18, 19,
- 74, 29, 25, -1, 27, 66, 67, -1, 38, 66,
- 67, 85, -1, 66, 67, 38, 61, 62, 74, 66,
- 67, 29, 18, 19, 57, 45, 46, -1, 36, 85,
- 63, 23, 24, 61, 62, -1, -1, -1, 66, 67,
- 32, -1, -1, 35, 29, 37, -1, -1, -1, 45,
- 46, 23, 24, -1, 29, -1, 29, -1, 66, 67,
- 32, 23, 24, 35, -1, 37, -1, -1, 18, 19,
- 32, 23, 24, 35, -1, 37, 61, 62, -1, -1,
- 32, 66, 67, 35, -1, 37, 61, 62, 61, 62,
- -1, 66, 67, 66, 67, 45, 46, 23, 24, -1,
- -1, -1, -1, -1, -1, 31, 32, 23, 24, 35,
- -1, 37, -1, -1, -1, 31, 32, 23, 24, 35,
- 10, 37, -1, -1, -1, 31, 32, -1, -1, 35,
- -1, 37, 22, 10, -1, 23, 24, -1, -1, 29,
- -1, 23, 24, 31, 32, 22, -1, 35, -1, 37,
- 32, -1, 29, 35, -1, 37, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 55, -1, -1, -1, 59,
- -1, -1, -1, -1, -1, -1, 66, 67, 55, -1,
- -1, -1, 59, -1, 74, -1, -1, -1, 3, 66,
- 67, -1, -1, 83, -1, 85, -1, 74, 13, -1,
- -1, -1, 17, -1, -1, -1, 83, -1, 85, 23,
- 24, 26, -1, 28, -1, -1, -1, 31, 32, 3,
- -1, 35, -1, 37, 39, -1, 41, 42, -1, 13,
- -1, -1, -1, 17, 49, -1, -1, 52, 53, -1,
- -1, -1, 26, 58, 28, -1, -1, 31, -1, 64,
- -1, -1, -1, -1, -1, 39, -1, 41, 42, -1,
- -1, -1, -1, -1, 79, 49, -1, -1, 52, 53,
- -1, -1, -1, -1, 58, -1, -1, 3, -1, -1,
- 64, -1, -1, -1, -1, -1, -1, 13, -1, -1,
- -1, 17, -1, -1, -1, 79, -1, -1, -1, -1,
- 26, -1, 28, -1, -1, -1, -1, -1, -1, -1,
+ 60, 8, 36, 36, 33, 33, 7, 60, 7, 36,
+ 29, 33, 7, 7, 7, 36, 7, 55, 7, 78,
+ 1, 78, 48, 1, 36, 33, 36, 36, 60, 5,
+ 55, 61, 2, 33, 8, 55, 60, 16, 7, 7,
+ 7, 5, 48, 60, 7, 2, 60, 20, 7, 5,
+ 48, 17, 55, 2, 31, 7, 61, 8, 33, 7,
+ 7, 7, 7, 60, 36, 36, 7, 0, 8, 7,
+ 7, 36, 7, 88, 36, 29, 36, 1, 60, 65,
+ 33, 17, 78, 1, 7, 7, 36, 7, 7, 33,
+ 33, 76, 8, 2, 55, 78, 88, 36, 8, 29,
+ 8, 8, 36, 61, 36, 36, 48, 36, 8, 8,
+ 8, 66, 40, 8, 40, 8, -1, 7, 8, 8,
+ -1, -1, -1, 51, 15, 51, 8, 40, 40, 50,
+ 6, 8, 10, 54, 61, 62, 61, 62, 51, 51,
+ 42, 8, 33, 8, 20, 7, 61, 62, 8, 29,
+ 60, 53, 60, 60, 29, 61, 62, 56, 56, 29,
+ 60, 56, 50, 56, 61, 62, 54, 61, 62, 61,
+ 62, 60, 8, 29, 61, 62, 7, 55, 7, 61,
+ 61, 62, 8, 60, 29, -1, 15, 15, 15, 12,
+ 29, 66, 67, 60, 74, 60, 66, 67, 15, 29,
+ 8, 61, 62, -1, 33, 85, 34, 34, 36, 36,
+ 66, 67, 8, 29, -1, -1, -1, 34, -1, 36,
+ 29, 66, 67, 29, -1, 61, 62, 66, 67, 7,
+ 61, 62, 29, -1, 57, 61, 62, 29, -1, 25,
+ 63, 27, 12, 25, 74, 27, 25, 12, 27, -1,
+ 66, 67, 38, 61, 62, 85, 38, 66, 67, 38,
+ 66, 67, 29, 18, 19, 61, 62, 29, -1, 66,
+ 67, 29, -1, -1, 66, 67, 8, -1, 36, 18,
+ 19, 29, -1, 61, 62, -1, -1, 57, 36, -1,
+ 45, 46, 57, 63, 18, 19, 18, 19, 63, 66,
+ 67, 33, 23, 24, 66, 67, 45, 46, 66, 67,
+ 29, 32, 29, 25, 35, 27, 37, -1, 66, 67,
+ 29, 45, 46, 45, 46, 29, 38, 23, 24, 61,
+ 62, -1, 29, -1, -1, -1, 32, -1, -1, 35,
+ -1, 37, 61, 62, 61, 62, -1, 66, 67, 66,
+ 67, 29, 61, 62, -1, 59, -1, 66, 67, 23,
+ 24, -1, 66, 67, 61, 62, 23, 24, 32, 66,
+ 67, 35, -1, 37, -1, 32, 29, -1, 35, 29,
+ 37, 85, -1, 61, 62, 23, 24, -1, 66, 67,
+ -1, -1, -1, 31, 32, 23, 24, 35, -1, 37,
+ -1, -1, -1, 31, 32, -1, 59, 35, -1, 37,
+ -1, 61, 62, 66, 67, -1, 66, 67, 10, 23,
+ 24, -1, -1, -1, -1, -1, -1, 31, 32, -1,
+ 22, 35, 85, 37, -1, 23, 24, 29, -1, 10,
+ -1, 23, 24, 31, 32, -1, -1, 35, -1, 37,
+ 32, 22, -1, 35, -1, 37, -1, -1, 29, -1,
+ -1, -1, -1, 55, -1, -1, -1, 59, -1, -1,
+ -1, -1, -1, -1, 66, 67, -1, -1, -1, -1,
+ -1, -1, 74, -1, 55, -1, -1, -1, 59, -1,
+ -1, 83, -1, 85, -1, 66, 67, 3, -1, -1,
+ -1, -1, -1, 74, -1, -1, -1, 13, -1, 23,
+ 24, 17, 83, -1, 85, -1, -1, 31, 32, -1,
+ 26, 35, 28, 37, -1, 31, -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, -1, -1, 79, 47, -1, -1, 3, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 13, -1, -1,
+ -1, 17, 65, 66, 67, -1, 69, -1, -1, -1,
+ 26, -1, 28, -1, -1, -1, -1, 80, 81, 82,
-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,
@@ -611,122 +669,161 @@ const int JavaScriptGrammar::action_check [] = {
-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, 66, 67, -1, 69, -1, 71, -1,
- 73, -1, 75, -1, -1, -1, -1, 80, 81, 82,
- -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, 56, -1, -1, -1, -1, -1, -1,
- -1, -1, 65, 66, 67, -1, 69, -1, 71, -1,
- 73, -1, 75, -1, -1, -1, -1, 80, 81, 82,
- -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, 66, 67, -1, 69, -1, 71, -1,
73, 74, 75, -1, -1, -1, -1, 80, 81, 82,
- -1, -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, 69, 70, -1, 72, 73, 74, 75,
- 76, 77, -1, -1, 80, 81, 82, 83, 84, 85,
- -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, 47, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 59, -1, -1, -1, -1, -1, 65, 66, 67, 68,
- 69, 70, -1, 72, 73, 74, 75, 76, 77, -1,
- -1, 80, 81, 82, 83, 84, 85, -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, 47, -1, -1, -1, -1,
- -1, -1, -1, 55, -1, -1, -1, 59, -1, -1,
- -1, -1, -1, 65, 66, 67, 68, 69, 70, -1,
- 72, 73, 74, 75, 76, 77, -1, -1, 80, 81,
- 82, 83, 84, 85, -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, 76, 77, -1, -1, 80, 81, 82, 83, 84,
- -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, -1, -1, -1, -1, -1, -1, -1, 8, -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, 66, 67, -1, 69,
+ -1, 71, -1, 73, -1, 75, -1, -1, -1, -1,
+ 80, 81, 82, -1, -1, -1, -1, -1, -1, -1,
+ -1, 8, -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, 66,
+ 67, -1, 69, -1, 71, -1, 73, -1, 75, -1,
+ -1, -1, -1, 80, 81, 82, -1, -1, -1, -1,
+ -1, -1, -1, -1, 8, -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, 66, 67, -1, 69, -1, 71, -1, 73,
+ -1, 75, -1, -1, -1, -1, 80, 81, 82, -1,
+ -1, -1, -1, -1, -1, -1, -1, 8, -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, 66, 67, -1, 69, -1,
+ 71, -1, 73, -1, 75, -1, -1, -1, -1, 80,
+ 81, 82, -1, -1, -1, -1, -1, -1, -1, -1,
+ 8, -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, 59, -1, -1, -1, -1, -1, 65, 66, 67,
+ -1, 69, -1, 71, -1, 73, -1, 75, -1, -1,
+ -1, -1, 80, 81, 82, -1, -1, 85, -1, -1,
+ -1, -1, -1, 11, 12, 13, -1, -1, -1, -1,
+ -1, -1, -1, -1, 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, 76, 77,
- -1, -1, 80, 81, 82, 83, 84, -1, -1, -1,
- -1, -1, -1, 4, -1, -1, -1, -1, 9, -1,
- 11, 12, 13, 14, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 61, -1, -1, -1, 65, 66, 67,
+ -1, 69, -1, 71, -1, 73, -1, 75, -1, -1,
+ -1, -1, 80, 81, 82, -1, 84, -1, 86, -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,
- -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, 76, 77, -1, -1, 80,
- 81, 82, 83, 84, -1, 86, -1, -1, -1, -1,
- 4, 5, 6, -1, -1, 9, 10, 11, 12, 13,
+ 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, 69, 70,
+ -1, 72, 73, 74, 75, 76, 77, -1, -1, 80,
+ 81, 82, 83, 84, 85, -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, 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,
+ -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, 69, 70, -1, 72, 73,
74, 75, 76, 77, -1, -1, 80, 81, 82, 83,
- 84, 85, -1, -1, -1, -1, -1,
+ 84, 85, -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,
+ 47, -1, -1, -1, -1, -1, -1, -1, 55, -1,
+ -1, -1, 59, -1, -1, -1, -1, -1, 65, 66,
+ 67, 68, 69, 70, -1, 72, 73, 74, 75, 76,
+ 77, -1, -1, 80, 81, 82, 83, 84, 85, -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, 76, 77, -1, -1,
+ 80, 81, 82, 83, 84, -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, 76, 77, -1, -1, 80, 81, 82,
+ 83, 84, -1, -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, -1,
+ -1, -1, -1, 59, -1, 61, -1, -1, -1, 65,
+ 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
+ 76, 77, -1, -1, 80, 81, 82, 83, 84, 85,
+ -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, 76, 77, -1,
+ -1, 80, 81, 82, 83, 84, 85, -1, -1, -1,
+ -1, -1,
- 77, 25, 25, 63, 94, 63, 16, 89, 19, 77,
- 16, 16, 16, 59, 10, 14, 19, 19, 19, 14,
- 5, 19, 6, 14, 6, 25, 19, 19, 25, 19,
- 19, 25, 63, 21, 14, 16, 92, 16, 16, 14,
- 16, 63, 25, 16, 16, 19, 15, -1, 25, 16,
- 14, 16, 14, 19, 25, 25, 14, 16, 14, 19,
- 14, -1, 19, 16, 19, 16, 14, 14, 36, 14,
- 14, 39, 14, 16, 14, 27, 25, 16, 16, 25,
- 16, -1, 19, -1, 16, -1, 36, 16, 19, 14,
- 40, 14, -1, 19, -1, 36, -1, 30, 25, 40,
- 33, 36, 36, 38, 19, 32, 36, 41, 36, -1,
- 6, -1, 40, 28, 36, 36, 36, 36, 48, 41,
- 41, -1, 60, 42, 60, 36, 46, 36, 60, -1,
- 41, 60, 41, 36, 36, 38, 38, 36, 36, 38,
- -1, 36, 36, 41, 81, 39, 41, 36, 36, 38,
- 38, 36, 83, 38, 36, 36, 38, 38, 25, 36,
- 36, 38, 38, 36, 36, 32, 38, 36, 41, 95,
- 36, 96, 36, 42, 36, 36, 30, 41, 101, 33,
- 41, 36, -1, 36, 50, 36, 41, 38, 41, 36,
- 52, 38, 36, 36, -1, 36, -1, 36, 36, 42,
- 44, 42, 41, 41, -1, 36, 36, 36, 36, 38,
- 41, 41, 43, 41, 53, -1, -1, 36, 36, -1,
- 58, 51, 41, 41, 43, 17, 18, 19, 36, 36,
- 58, -1, -1, 41, 41, -1, 43, 36, 36, 47,
- 58, 36, 41, 41, 43, 8, 41, 36, 36, -1,
- 45, 49, 41, 41, 17, 18, 19, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 58,
- 58, -1, -1, -1, 19, -1, -1, -1, -1, -1,
- -1, -1, -1, 28, 29, -1, -1, -1, -1, -1,
+ 14, 93, 66, 15, 23, 29, 76, 76, 23, 20,
+ 23, 14, 29, 23, 15, 23, 23, 14, 62, 23,
+ 14, 23, 10, 29, 5, 14, 66, 66, 14, 29,
+ 14, 23, 66, 66, 29, 66, 14, 66, 66, 14,
+ 23, 23, 14, 23, 14, 14, 66, 23, 66, 23,
+ 29, 14, 29, 14, 14, 23, 23, 66, 29, 14,
+ 14, 66, 14, 29, 23, 29, 91, 66, 66, 14,
+ 66, 29, 29, 66, 30, 14, -1, 39, 29, 25,
+ -1, 23, 44, 29, 35, 23, 39, -1, 15, 39,
+ 39, 39, 45, 41, 44, 44, 39, 88, 39, 39,
+ 41, 44, 39, 39, 44, 41, 39, 39, 45, 6,
+ 39, -1, 45, 42, 39, 39, 41, 41, 39, 66,
+ 39, 42, 41, 55, 63, 39, 23, 41, 39, 39,
+ 39, 41, 41, 39, 6, 41, 39, 39, 80, 14,
+ -1, 44, 53, 39, 39, 47, 14, 23, 44, 44,
+ 39, 23, 41, 100, 39, 39, 94, 41, 39, 44,
+ 41, 39, 33, 41, 29, 36, 39, -1, 66, 39,
+ 35, 44, 39, 43, -1, 33, -1, 44, 36, 39,
+ 39, 41, 41, 39, 39, 23, 33, 43, 63, 36,
+ 39, 39, 14, 31, 43, 63, 51, 95, 39, 39,
+ 41, 49, 39, -1, 44, 39, 82, 39, 45, 39,
+ 44, 39, 44, 39, 44, 39, 44, -1, 44, -1,
+ 44, -1, -1, 39, 50, 39, 54, 61, 44, 61,
+ 44, 61, 46, -1, -1, -1, -1, 61, 39, -1,
+ 56, 63, 39, 44, 39, 46, 41, 44, 39, 46,
+ -1, 39, 39, 44, 39, 46, 44, 44, 23, 44,
+ 11, 48, -1, -1, 52, 8, 31, 32, 11, -1,
+ 21, 22, 23, -1, -1, -1, 61, -1, 21, 22,
+ 23, 14, 15, 16, 17, 18, 19, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 6, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 23, -1, -1, -1, -1, -1,
+ 29, -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, -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 70c9766..830f533 100644
--- a/src/declarative/qml/parser/javascriptgrammar_p.h
+++ b/src/declarative/qml/parser/javascriptgrammar_p.h
@@ -150,15 +150,15 @@ public:
T_XOR = 78,
T_XOR_EQ = 79,
- ACCEPT_STATE = 552,
- RULE_COUNT = 317,
- STATE_COUNT = 553,
+ ACCEPT_STATE = 588,
+ RULE_COUNT = 323,
+ STATE_COUNT = 589,
TERMINAL_COUNT = 91,
- NON_TERMINAL_COUNT = 103,
+ NON_TERMINAL_COUNT = 102,
- GOTO_INDEX_OFFSET = 553,
- GOTO_INFO_OFFSET = 1717,
- GOTO_CHECK_OFFSET = 1717
+ GOTO_INDEX_OFFSET = 589,
+ GOTO_INFO_OFFSET = 2092,
+ GOTO_CHECK_OFFSET = 2092
};
static const char *const spell [];
diff --git a/src/declarative/qml/parser/javascriptlexer.cpp b/src/declarative/qml/parser/javascriptlexer.cpp
index c0a4b63..7455b87 100644
--- a/src/declarative/qml/parser/javascriptlexer.cpp
+++ b/src/declarative/qml/parser/javascriptlexer.cpp
@@ -44,13 +44,6 @@
#endif
#include "javascriptengine_p.h"
-
-
-
-
-
-
-
#include "javascriptlexer_p.h"
#include "javascriptgrammar_p.h"
@@ -73,10 +66,12 @@ extern double qstrtod(const char *s00, char const **se, bool *ok);
while (0)
namespace JavaScript {
-extern qjsreal integerFromString(const char *buf, int size, int radix);
+extern double integerFromString(const char *buf, int size, int radix);
}
-JavaScript::Lexer::Lexer(JavaScriptEnginePrivate *eng)
+using namespace JavaScript;
+
+Lexer::Lexer(Engine *eng)
: driver(eng),
yylineno(0),
done(false),
@@ -101,6 +96,7 @@ JavaScript::Lexer::Lexer(JavaScriptEnginePrivate *eng)
parenthesesCount(0),
prohibitAutomaticSemicolon(false)
{
+ driver->setLexer(this);
// allocate space for read buffers
buffer8 = new char[size8];
buffer16 = new QChar[size16];
@@ -109,13 +105,13 @@ JavaScript::Lexer::Lexer(JavaScriptEnginePrivate *eng)
}
-JavaScript::Lexer::~Lexer()
+Lexer::~Lexer()
{
delete [] buffer8;
delete [] buffer16;
}
-void JavaScript::Lexer::setCode(const QString &c, int lineno)
+void Lexer::setCode(const QString &c, int lineno)
{
errmsg = QString();
yylineno = lineno;
@@ -135,7 +131,7 @@ void JavaScript::Lexer::setCode(const QString &c, int lineno)
next3 = (length > 3) ? code[3].unicode() : 0;
}
-void JavaScript::Lexer::shift(uint p)
+void Lexer::shift(uint p)
{
while (p--) {
++pos;
@@ -147,13 +143,13 @@ void JavaScript::Lexer::shift(uint p)
}
}
-void JavaScript::Lexer::setDone(State s)
+void Lexer::setDone(State s)
{
state = s;
done = true;
}
-int JavaScript::Lexer::findReservedWord(const QChar *c, int size) const
+int Lexer::findReservedWord(const QChar *c, int size) const
{
switch (size) {
case 2: {
@@ -454,7 +450,7 @@ int JavaScript::Lexer::findReservedWord(const QChar *c, int size) const
return -1;
}
-int JavaScript::Lexer::lex()
+int Lexer::lex()
{
int token = 0;
state = Start;
@@ -772,10 +768,10 @@ int JavaScript::Lexer::lex()
if (state == Number) {
dval = qstrtod(buffer8, 0, 0);
} else if (state == Hex) { // scan hex numbers
- dval = JavaScript::integerFromString(buffer8, pos8, 16);
+ dval = integerFromString(buffer8, pos8, 16);
state = Number;
} else if (state == Octal) { // scan octal number
- dval = JavaScript::integerFromString(buffer8, pos8, 8);
+ dval = integerFromString(buffer8, pos8, 8);
state = Number;
}
@@ -843,18 +839,18 @@ int JavaScript::Lexer::lex()
}
}
-bool JavaScript::Lexer::isWhiteSpace() const
+bool Lexer::isWhiteSpace() const
{
return (current == ' ' || current == '\t' ||
current == 0x0b || current == 0x0c);
}
-bool JavaScript::Lexer::isLineTerminator() const
+bool Lexer::isLineTerminator() const
{
return (current == '\n' || current == '\r');
}
-bool JavaScript::Lexer::isIdentLetter(ushort c)
+bool Lexer::isIdentLetter(ushort c)
{
/* TODO: allow other legitimate unicode chars */
return ((c >= 'a' && c <= 'z')
@@ -863,24 +859,24 @@ bool JavaScript::Lexer::isIdentLetter(ushort c)
|| c == '_');
}
-bool JavaScript::Lexer::isDecimalDigit(ushort c)
+bool Lexer::isDecimalDigit(ushort c)
{
return (c >= '0' && c <= '9');
}
-bool JavaScript::Lexer::isHexDigit(ushort c) const
+bool Lexer::isHexDigit(ushort c) const
{
return ((c >= '0' && c <= '9')
|| (c >= 'a' && c <= 'f')
|| (c >= 'A' && c <= 'F'));
}
-bool JavaScript::Lexer::isOctalDigit(ushort c) const
+bool Lexer::isOctalDigit(ushort c) const
{
return (c >= '0' && c <= '7');
}
-int JavaScript::Lexer::matchPunctuator(ushort c1, ushort c2,
+int Lexer::matchPunctuator(ushort c1, ushort c2,
ushort c3, ushort c4)
{
if (c1 == '>' && c2 == '>' && c3 == '>' && c4 == '=') {
@@ -987,7 +983,7 @@ int JavaScript::Lexer::matchPunctuator(ushort c1, ushort c2,
}
}
-ushort JavaScript::Lexer::singleEscape(ushort c) const
+ushort Lexer::singleEscape(ushort c) const
{
switch(c) {
case 'b':
@@ -1013,13 +1009,13 @@ ushort JavaScript::Lexer::singleEscape(ushort c) const
}
}
-ushort JavaScript::Lexer::convertOctal(ushort c1, ushort c2,
+ushort Lexer::convertOctal(ushort c1, ushort c2,
ushort c3) const
{
return ((c1 - '0') * 64 + (c2 - '0') * 8 + c3 - '0');
}
-unsigned char JavaScript::Lexer::convertHex(ushort c)
+unsigned char Lexer::convertHex(ushort c)
{
if (c >= '0' && c <= '9')
return (c - '0');
@@ -1029,19 +1025,19 @@ unsigned char JavaScript::Lexer::convertHex(ushort c)
return (c - 'A' + 10);
}
-unsigned char JavaScript::Lexer::convertHex(ushort c1, ushort c2)
+unsigned char Lexer::convertHex(ushort c1, ushort c2)
{
return ((convertHex(c1) << 4) + convertHex(c2));
}
-QChar JavaScript::Lexer::convertUnicode(ushort c1, ushort c2,
+QChar Lexer::convertUnicode(ushort c1, ushort c2,
ushort c3, ushort c4)
{
return QChar((convertHex(c3) << 4) + convertHex(c4),
(convertHex(c1) << 4) + convertHex(c2));
}
-void JavaScript::Lexer::record8(ushort c)
+void Lexer::record8(ushort c)
{
Q_ASSERT(c <= 0xff);
@@ -1057,7 +1053,7 @@ void JavaScript::Lexer::record8(ushort c)
buffer8[pos8++] = (char) c;
}
-void JavaScript::Lexer::record16(QChar c)
+void Lexer::record16(QChar c)
{
// enlarge buffer if full
if (pos16 >= size16 - 1) {
@@ -1071,14 +1067,14 @@ void JavaScript::Lexer::record16(QChar c)
buffer16[pos16++] = c;
}
-void JavaScript::Lexer::recordStartPos()
+void Lexer::recordStartPos()
{
startpos = pos;
startlineno = yylineno;
startcolumn = yycolumn;
}
-bool JavaScript::Lexer::scanRegExp(RegExpBodyPrefix prefix)
+bool Lexer::scanRegExp(RegExpBodyPrefix prefix)
{
pos16 = 0;
bool lastWasEscape = false;
@@ -1110,7 +1106,7 @@ bool JavaScript::Lexer::scanRegExp(RegExpBodyPrefix prefix)
flags = 0;
while (isIdentLetter(current)) {
- int flag = JavaScript::Ecma::RegExp::flagFromChar(current);
+ int flag = Ecma::RegExp::flagFromChar(current);
if (flag == 0) {
errmsg = QString::fromLatin1("Invalid regular expression flag '%0'")
.arg(QChar(current));
@@ -1124,7 +1120,7 @@ bool JavaScript::Lexer::scanRegExp(RegExpBodyPrefix prefix)
return true;
}
-void JavaScript::Lexer::syncProhibitAutomaticSemicolon()
+void Lexer::syncProhibitAutomaticSemicolon()
{
if (parenthesesState == BalancedParentheses) {
// we have seen something like "if (foo)", which means we should
diff --git a/src/declarative/qml/parser/javascriptlexer_p.h b/src/declarative/qml/parser/javascriptlexer_p.h
index e71c10c..092609c 100644
--- a/src/declarative/qml/parser/javascriptlexer_p.h
+++ b/src/declarative/qml/parser/javascriptlexer_p.h
@@ -59,15 +59,15 @@
QT_BEGIN_NAMESPACE
-class JavaScriptEnginePrivate;
-class JavaScriptNameIdImpl;
-
namespace JavaScript {
+class Engine;
+class NameId;
+
class Lexer
{
public:
- Lexer(JavaScriptEnginePrivate *eng);
+ Lexer(Engine *eng);
~Lexer();
void setCode(const QString &c, int lineno);
@@ -136,7 +136,7 @@ public:
bool scanRegExp(RegExpBodyPrefix prefix = NoPrefix);
- JavaScriptNameIdImpl *pattern;
+ NameId *pattern;
int flags;
State lexerState() const
@@ -155,7 +155,7 @@ public:
{ err = NoError; }
private:
- JavaScriptEnginePrivate *driver;
+ Engine *driver;
int yylineno;
bool done;
char *buffer8;
@@ -194,7 +194,7 @@ public:
inline int ival() const { return qsyylval.ival; }
inline double dval() const { return qsyylval.dval; }
- inline JavaScriptNameIdImpl *ustr() const { return qsyylval.ustr; }
+ inline NameId *ustr() const { return qsyylval.ustr; }
const QChar *characterBuffer() const { return buffer16; }
int characterCount() const { return pos16; }
@@ -219,7 +219,7 @@ private:
union {
int ival;
double dval;
- JavaScriptNameIdImpl *ustr;
+ NameId *ustr;
} qsyylval;
// current and following unicode characters
diff --git a/src/declarative/qml/parser/javascriptnodepool_p.h b/src/declarative/qml/parser/javascriptnodepool_p.h
index 3f59123..cb56fbb 100644
--- a/src/declarative/qml/parser/javascriptnodepool_p.h
+++ b/src/declarative/qml/parser/javascriptnodepool_p.h
@@ -60,8 +60,6 @@
QT_BEGIN_NAMESPACE
-class JavaScriptEnginePrivate;
-
namespace JavaScript {
namespace AST {
@@ -70,6 +68,7 @@ class Node;
class Code;
class CompilationUnit;
+class Engine;
template <typename NodeType>
inline NodeType *makeAstNode(MemoryPool *storage)
@@ -109,13 +108,13 @@ inline NodeType *makeAstNode(MemoryPool *storage, Arg1 arg1, Arg2 arg2, Arg3 arg
class NodePool : public MemoryPool
{
public:
- NodePool(const QString &fileName, JavaScriptEnginePrivate *engine);
+ NodePool(const QString &fileName, Engine *engine);
virtual ~NodePool();
Code *createCompiledCode(AST::Node *node, CompilationUnit &compilation);
inline QString fileName() const { return m_fileName; }
- inline JavaScriptEnginePrivate *engine() const { return m_engine; }
+ inline Engine *engine() const { return m_engine; }
#ifndef J_SCRIPT_NO_EVENT_NOTIFY
inline qint64 id() const { return m_id; }
#endif
@@ -123,7 +122,7 @@ public:
private:
QHash<AST::Node*, Code*> m_codeCache;
QString m_fileName;
- JavaScriptEnginePrivate *m_engine;
+ Engine *m_engine;
#ifndef J_SCRIPT_NO_EVENT_NOTIFY
qint64 m_id;
#endif
diff --git a/src/declarative/qml/parser/javascriptparser.cpp b/src/declarative/qml/parser/javascriptparser.cpp
index ed791c8..7ff438e 100644
--- a/src/declarative/qml/parser/javascriptparser.cpp
+++ b/src/declarative/qml/parser/javascriptparser.cpp
@@ -53,6 +53,7 @@
#include "javascriptparser_p.h"
+#include <QVarLengthArray>
//
// This file is automatically generated from javascript.g.
@@ -63,7 +64,7 @@ using namespace JavaScript;
QT_BEGIN_NAMESPACE
-void JavaScriptParser::reallocateStack()
+void Parser::reallocateStack()
{
if (! stack_size)
stack_size = 128;
@@ -75,7 +76,7 @@ void JavaScriptParser::reallocateStack()
location_stack = reinterpret_cast<AST::SourceLocation*> (qRealloc(location_stack, stack_size * sizeof(AST::SourceLocation)));
}
-inline static bool automatic(JavaScriptEnginePrivate *driver, int token)
+inline static bool automatic(Engine *driver, int token)
{
return token == JavaScriptGrammar::T_RBRACE
|| token == 0
@@ -83,7 +84,8 @@ inline static bool automatic(JavaScriptEnginePrivate *driver, int token)
}
-JavaScriptParser::JavaScriptParser():
+Parser::Parser(Engine *engine):
+ driver(engine),
tos(0),
stack_size(0),
sym_stack(0),
@@ -94,7 +96,7 @@ JavaScriptParser::JavaScriptParser():
{
}
-JavaScriptParser::~JavaScriptParser()
+Parser::~Parser()
{
if (stack_size) {
qFree(sym_stack);
@@ -113,7 +115,35 @@ static inline AST::SourceLocation location(Lexer *lexer)
return loc;
}
-bool JavaScriptParser::parse(JavaScriptEnginePrivate *driver)
+AST::UiQualifiedId *Parser::reparseAsQualifiedId(AST::ExpressionNode *expr)
+{
+ QVarLengthArray<NameId *, 4> nameIds;
+ QVarLengthArray<AST::SourceLocation, 4> locations;
+
+ AST::ExpressionNode *it = expr;
+ while (AST::FieldMemberExpression *m = AST::cast<AST::FieldMemberExpression *>(it)) {
+ nameIds.append(m->name);
+ locations.append(m->identifierToken);
+ it = m->base;
+ }
+
+ if (AST::IdentifierExpression *idExpr = AST::cast<AST::IdentifierExpression *>(it)) {
+ AST::UiQualifiedId *q = makeAstNode<AST::UiQualifiedId>(driver->nodePool(), idExpr->name);
+ q->identifierToken = idExpr->identifierToken;
+
+ AST::UiQualifiedId *currentId = q;
+ for (int i = nameIds.size() - 1; i != -1; --i) {
+ currentId = makeAstNode<AST::UiQualifiedId>(driver->nodePool(), currentId, nameIds[i]);
+ currentId->identifierToken = locations[i];
+ }
+
+ return currentId->finish();
+ }
+
+ return 0;
+}
+
+bool Parser::parse()
{
Lexer *lexer = driver->lexer();
bool hadErrors = false;
@@ -166,7 +196,7 @@ bool JavaScriptParser::parse(JavaScriptEnginePrivate *driver)
case 0: {
program = makeAstNode<AST::UiProgram> (driver->nodePool(), sym(1).UiImportList,
sym(2).UiObjectMemberList->finish());
- sym(1).UiProgram = program;
+ sym(1).UiProgram = program;
} break;
case 2: {
@@ -233,21 +263,12 @@ case 14: {
} break;
case 15: {
- AST::UiObjectBinding *node = makeAstNode<AST::UiObjectBinding> (driver->nodePool(), sym(1).UiQualifiedId->finish(),
- sym(3).sval, sym(4).UiObjectInitializer);
- node->colonToken = loc(2);
- node->identifierToken = loc(3);
- sym(1).Node = node;
-} break;
-
-case 16: {
- AST::UiObjectDefinition *node = makeAstNode<AST::UiObjectDefinition> (driver->nodePool(), sym(1).sval,
+ AST::UiObjectDefinition *node = makeAstNode<AST::UiObjectDefinition> (driver->nodePool(), sym(1).UiQualifiedId->finish(),
sym(2).UiObjectInitializer);
- node->identifierToken = loc(1);
sym(1).Node = node;
} break;
-case 18: {
+case 17: {
AST::UiArrayBinding *node = makeAstNode<AST::UiArrayBinding> (driver->nodePool(), sym(1).UiQualifiedId->finish(),
sym(4).UiObjectMemberList->finish());
node->colonToken = loc(2);
@@ -256,34 +277,50 @@ case 18: {
sym(1).Node = node;
} break;
-case 19: {
+case 18: {
AST::StringLiteral *node = makeAstNode<AST::StringLiteral> (driver->nodePool(), sym(1).sval);
node->literalToken = loc(1);
sym(1).Node = node;
} break;
-case 21: {
+case 20: {
AST::ExpressionStatement *node = makeAstNode<AST::ExpressionStatement> (driver->nodePool(), sym(1).Expression);
node->semicolonToken = loc(2);
sym(1).Node = node;
} break;
- case 22:
-case 23: {
+
+case 21: {
+ if (AST::UiQualifiedId *qualifiedId = reparseAsQualifiedId(sym(3).Expression)) {
+ AST::UiObjectBinding *node = makeAstNode<AST::UiObjectBinding> (driver->nodePool(),
+ sym(1).UiQualifiedId->finish(), qualifiedId, sym(4).UiObjectInitializer);
+ node->colonToken = loc(2);
+ sym(1).Node = node;
+ } else {
+ sym(1).Node = 0;
+
+ diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, loc(2),
+ QLatin1String("Expected a type name after token `:'")));
+
+ return false; // ### recover
+ }
+} break;
+case 22:case 23:case 24:case 25:case 26:case 27:
+{
AST::UiScriptBinding *node = makeAstNode<AST::UiScriptBinding> (driver->nodePool(), sym(1).UiQualifiedId->finish(),
sym(3).Statement);
node->colonToken = loc(2);
sym(1).Node = node;
} break;
-case 24:
+case 28:
-case 25: {
+case 29: {
sym(1).sval = driver->intern(lexer->characterBuffer(), lexer->characterCount());
break;
}
-case 27: {
- AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), (JavaScriptNameIdImpl *)0, sym(2).sval);
+case 31: {
+ AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), (NameId *)0, sym(2).sval);
node->type = AST::UiPublicMember::Signal;
node->propertyToken = loc(1);
node->typeToken = loc(2);
@@ -291,7 +328,7 @@ case 27: {
sym(1).Node = node;
} break;
-case 29: {
+case 33: {
AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), sym(2).sval, sym(3).sval);
node->propertyToken = loc(1);
node->typeToken = loc(2);
@@ -300,7 +337,7 @@ case 29: {
sym(1).Node = node;
} break;
-case 31: {
+case 35: {
AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), sym(3).sval, sym(4).sval);
node->isDefaultMember = true;
node->defaultToken = loc(1);
@@ -311,7 +348,7 @@ case 31: {
sym(1).Node = node;
} break;
-case 33: {
+case 37: {
AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), sym(2).sval, sym(3).sval,
sym(5).Expression);
node->propertyToken = loc(1);
@@ -322,7 +359,7 @@ case 33: {
sym(1).Node = node;
} break;
-case 35: {
+case 39: {
AST::UiPublicMember *node = makeAstNode<AST::UiPublicMember> (driver->nodePool(), sym(3).sval, sym(4).sval,
sym(6).Expression);
node->isDefaultMember = true;
@@ -335,88 +372,76 @@ case 35: {
sym(1).Node = node;
} break;
-case 36: {
+case 40: {
sym(1).Node = makeAstNode<AST::UiSourceElement>(driver->nodePool(), sym(1).Node);
} break;
-case 37: {
+case 41: {
sym(1).Node = makeAstNode<AST::UiSourceElement>(driver->nodePool(), sym(1).Node);
} break;
-case 38:
-case 39:
+case 42:
+case 43:
{
AST::UiQualifiedId *node = makeAstNode<AST::UiQualifiedId> (driver->nodePool(), driver->intern(lexer->characterBuffer(), lexer->characterCount()));
node->identifierToken = loc(1);
sym(1).Node = node;
} break;
-case 41: {
+case 45: {
QString s = QLatin1String(JavaScriptGrammar::spell[T_PROPERTY]);
sym(1).sval = driver->intern(s.constData(), s.length());
break;
}
-case 42: {
+case 46: {
QString s = QLatin1String(JavaScriptGrammar::spell[T_SIGNAL]);
sym(1).sval = driver->intern(s.constData(), s.length());
break;
}
-case 43: {
- AST::UiQualifiedId *node = makeAstNode<AST::UiQualifiedId> (driver->nodePool(), sym(1).sval);
- node->identifierToken = loc(1);
- sym(1).Node = node;
-} break;
-
-case 44: {
- AST::UiQualifiedId *node = makeAstNode<AST::UiQualifiedId> (driver->nodePool(), sym(1).UiQualifiedId, sym(3).sval);
- node->identifierToken = loc(3);
- sym(1).Node = node;
-} break;
-
-case 45: {
+case 47: {
AST::ThisExpression *node = makeAstNode<AST::ThisExpression> (driver->nodePool());
node->thisToken = loc(1);
sym(1).Node = node;
} break;
-case 46: {
+case 48: {
AST::IdentifierExpression *node = makeAstNode<AST::IdentifierExpression> (driver->nodePool(), sym(1).sval);
node->identifierToken = loc(1);
sym(1).Node = node;
} break;
-case 47: {
+case 49: {
AST::NullExpression *node = makeAstNode<AST::NullExpression> (driver->nodePool());
node->nullToken = loc(1);
sym(1).Node = node;
} break;
-case 48: {
+case 50: {
AST::TrueLiteral *node = makeAstNode<AST::TrueLiteral> (driver->nodePool());
node->trueToken = loc(1);
sym(1).Node = node;
} break;
-case 49: {
+case 51: {
AST::FalseLiteral *node = makeAstNode<AST::FalseLiteral> (driver->nodePool());
node->falseToken = loc(1);
sym(1).Node = node;
} break;
-case 50: {
+case 52: {
AST::NumericLiteral *node = makeAstNode<AST::NumericLiteral> (driver->nodePool(), sym(1).dval);
node->literalToken = loc(1);
sym(1).Node = node;
} break;
-case 51: {
+case 53: {
AST::StringLiteral *node = makeAstNode<AST::StringLiteral> (driver->nodePool(), sym(1).sval);
node->literalToken = loc(1);
sym(1).Node = node;
} break;
-case 52: {
+case 54: {
bool rx = lexer->scanRegExp(Lexer::NoPrefix);
if (!rx) {
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, location(lexer), lexer->errorMessage()));
@@ -427,7 +452,7 @@ case 52: {
sym(1).Node = node;
} break;
-case 53: {
+case 55: {
bool rx = lexer->scanRegExp(Lexer::EqualPrefix);
if (!rx) {
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, location(lexer), lexer->errorMessage()));
@@ -438,29 +463,46 @@ case 53: {
sym(1).Node = node;
} break;
-case 54: {
- AST::ArrayLiteral *node = makeAstNode<AST::ArrayLiteral> (driver->nodePool(), sym(2).Elision);
+case 56: {
+ AST::ArrayLiteral *node = makeAstNode<AST::ArrayLiteral> (driver->nodePool(), (AST::Elision *) 0);
+ node->lbracketToken = loc(1);
+ node->rbracketToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 57: {
+ AST::ArrayLiteral *node = makeAstNode<AST::ArrayLiteral> (driver->nodePool(), sym(2).Elision->finish());
node->lbracketToken = loc(1);
node->rbracketToken = loc(3);
sym(1).Node = node;
} break;
-case 55: {
+case 58: {
AST::ArrayLiteral *node = makeAstNode<AST::ArrayLiteral> (driver->nodePool(), sym(2).ElementList->finish ());
node->lbracketToken = loc(1);
node->rbracketToken = loc(3);
sym(1).Node = node;
} break;
-case 56: {
- AST::ArrayLiteral *node = makeAstNode<AST::ArrayLiteral> (driver->nodePool(), sym(2).ElementList->finish (), sym(4).Elision);
+case 59: {
+ AST::ArrayLiteral *node = makeAstNode<AST::ArrayLiteral> (driver->nodePool(), sym(2).ElementList->finish (),
+ (AST::Elision *) 0);
+ node->lbracketToken = loc(1);
+ node->commaToken = loc(3);
+ node->rbracketToken = loc(4);
+ sym(1).Node = node;
+} break;
+
+case 60: {
+ AST::ArrayLiteral *node = makeAstNode<AST::ArrayLiteral> (driver->nodePool(), sym(2).ElementList->finish (),
+ sym(4).Elision->finish());
node->lbracketToken = loc(1);
node->commaToken = loc(3);
node->rbracketToken = loc(5);
sym(1).Node = node;
} break;
-case 57: {
+case 61: {
AST::ObjectLiteral *node = 0;
if (sym(2).Node)
node = makeAstNode<AST::ObjectLiteral> (driver->nodePool(),
@@ -472,7 +514,7 @@ case 57: {
sym(1).Node = node;
} break;
-case 58: {
+case 62: {
AST::ObjectLiteral *node = makeAstNode<AST::ObjectLiteral> (driver->nodePool(),
sym(2).PropertyNameAndValueList->finish ());
node->lbraceToken = loc(1);
@@ -480,100 +522,104 @@ case 58: {
sym(1).Node = node;
} break;
-case 59: {
+case 63: {
AST::NestedExpression *node = makeAstNode<AST::NestedExpression>(driver->nodePool(), sym(2).Expression);
node->lparenToken = loc(1);
node->rparenToken = loc(3);
sym(1).Node = node;
} break;
-case 60: {
- sym(1).Node = makeAstNode<AST::ElementList> (driver->nodePool(), sym(1).Elision, sym(2).Expression);
+case 64: {
+ AST::UiQualifiedId *node = makeAstNode<AST::UiQualifiedId> (driver->nodePool(), sym(1).sval);
+ node->identifierToken = loc(1);
+ sym(1).Node = node;
+} break;
+
+case 65: {
+ AST::UiQualifiedId *node = makeAstNode<AST::UiQualifiedId> (driver->nodePool(), sym(1).UiQualifiedId, sym(3).sval);
+ node->identifierToken = loc(3);
+ sym(1).Node = node;
+} break;
+
+case 66: {
+ sym(1).Node = makeAstNode<AST::ElementList> (driver->nodePool(), (AST::Elision *) 0, sym(1).Expression);
} break;
-case 61: {
- AST::ElementList *node = makeAstNode<AST::ElementList> (driver->nodePool(), sym(1).ElementList, sym(3).Elision, sym(4).Expression);
+case 67: {
+ sym(1).Node = makeAstNode<AST::ElementList> (driver->nodePool(), sym(1).Elision->finish(), sym(2).Expression);
+} break;
+
+case 68: {
+ AST::ElementList *node = makeAstNode<AST::ElementList> (driver->nodePool(), sym(1).ElementList,
+ (AST::Elision *) 0, sym(3).Expression);
node->commaToken = loc(2);
sym(1).Node = node;
} break;
-case 62: {
+case 69: {
+ AST::ElementList *node = makeAstNode<AST::ElementList> (driver->nodePool(), sym(1).ElementList, sym(3).Elision->finish(),
+ sym(4).Expression);
+ node->commaToken = loc(2);
+ sym(1).Node = node;
+} break;
+
+case 70: {
AST::Elision *node = makeAstNode<AST::Elision> (driver->nodePool());
node->commaToken = loc(1);
sym(1).Node = node;
} break;
-case 63: {
+case 71: {
AST::Elision *node = makeAstNode<AST::Elision> (driver->nodePool(), sym(1).Elision);
node->commaToken = loc(2);
sym(1).Node = node;
} break;
-case 64: {
- sym(1).Node = 0;
-} break;
-
-case 65: {
- sym(1).Elision = sym(1).Elision->finish ();
-} break;
-
-case 66: {
+case 72: {
AST::PropertyNameAndValueList *node = makeAstNode<AST::PropertyNameAndValueList> (driver->nodePool(),
sym(1).PropertyName, sym(3).Expression);
node->colonToken = loc(2);
sym(1).Node = node;
} break;
-case 67: {
+case 73: {
AST::PropertyNameAndValueList *node = makeAstNode<AST::PropertyNameAndValueList> (driver->nodePool(),
sym(1).PropertyNameAndValueList, sym(3).PropertyName, sym(5).Expression);
node->commaToken = loc(2);
node->colonToken = loc(4);
- sym(1).Node = node;
+ sym(1).Node = node;
} break;
-case 68: {
+case 74: {
AST::IdentifierPropertyName *node = makeAstNode<AST::IdentifierPropertyName> (driver->nodePool(), sym(1).sval);
node->propertyNameToken = loc(1);
- sym(1).Node = node;
+ sym(1).Node = node;
} break;
-case 69:
-case 70: {
+case 75:
+case 76: {
AST::IdentifierPropertyName *node = makeAstNode<AST::IdentifierPropertyName> (driver->nodePool(), driver->intern(lexer->characterBuffer(), lexer->characterCount()));
node->propertyNameToken = loc(1);
- sym(1).Node = node;
+ sym(1).Node = node;
} break;
-case 71: {
+case 77: {
AST::StringLiteralPropertyName *node = makeAstNode<AST::StringLiteralPropertyName> (driver->nodePool(), sym(1).sval);
node->propertyNameToken = loc(1);
- sym(1).Node = node;
+ sym(1).Node = node;
} break;
-case 72: {
+case 78: {
AST::NumericLiteralPropertyName *node = makeAstNode<AST::NumericLiteralPropertyName> (driver->nodePool(), sym(1).dval);
node->propertyNameToken = loc(1);
- sym(1).Node = node;
+ sym(1).Node = node;
} break;
-case 73: {
+case 79: {
AST::IdentifierPropertyName *node = makeAstNode<AST::IdentifierPropertyName> (driver->nodePool(), sym(1).sval);
node->propertyNameToken = loc(1);
- sym(1).Node = node;
+ sym(1).Node = node;
} break;
-case 74:
-
-case 75:
-
-case 76:
-
-case 77:
-
-case 78:
-
-case 79:
-
case 80:
case 81:
@@ -623,25 +669,37 @@ case 102:
case 103:
case 104:
+
+case 105:
+
+case 106:
+
+case 107:
+
+case 108:
+
+case 109:
+
+case 110:
{
sym(1).sval = driver->intern(lexer->characterBuffer(), lexer->characterCount());
} break;
-case 109: {
+case 115: {
AST::ArrayMemberExpression *node = makeAstNode<AST::ArrayMemberExpression> (driver->nodePool(), sym(1).Expression, sym(3).Expression);
node->lbracketToken = loc(2);
node->rbracketToken = loc(4);
sym(1).Node = node;
} break;
-case 110: {
+case 116: {
AST::FieldMemberExpression *node = makeAstNode<AST::FieldMemberExpression> (driver->nodePool(), sym(1).Expression, sym(3).sval);
node->dotToken = loc(2);
node->identifierToken = loc(3);
sym(1).Node = node;
} break;
-case 111: {
+case 117: {
AST::NewMemberExpression *node = makeAstNode<AST::NewMemberExpression> (driver->nodePool(), sym(2).Expression, sym(4).ArgumentList);
node->newToken = loc(1);
node->lparenToken = loc(3);
@@ -649,384 +707,384 @@ case 111: {
sym(1).Node = node;
} break;
-case 113: {
+case 119: {
AST::NewExpression *node = makeAstNode<AST::NewExpression> (driver->nodePool(), sym(2).Expression);
node->newToken = loc(1);
sym(1).Node = node;
} break;
-case 114: {
+case 120: {
AST::CallExpression *node = makeAstNode<AST::CallExpression> (driver->nodePool(), sym(1).Expression, sym(3).ArgumentList);
node->lparenToken = loc(2);
node->rparenToken = loc(4);
sym(1).Node = node;
} break;
-case 115: {
+case 121: {
AST::CallExpression *node = makeAstNode<AST::CallExpression> (driver->nodePool(), sym(1).Expression, sym(3).ArgumentList);
node->lparenToken = loc(2);
node->rparenToken = loc(4);
sym(1).Node = node;
} break;
-case 116: {
+case 122: {
AST::ArrayMemberExpression *node = makeAstNode<AST::ArrayMemberExpression> (driver->nodePool(), sym(1).Expression, sym(3).Expression);
node->lbracketToken = loc(2);
node->rbracketToken = loc(4);
sym(1).Node = node;
} break;
-case 117: {
+case 123: {
AST::FieldMemberExpression *node = makeAstNode<AST::FieldMemberExpression> (driver->nodePool(), sym(1).Expression, sym(3).sval);
node->dotToken = loc(2);
node->identifierToken = loc(3);
sym(1).Node = node;
} break;
-case 118: {
+case 124: {
sym(1).Node = 0;
} break;
-case 119: {
+case 125: {
sym(1).Node = sym(1).ArgumentList->finish();
} break;
-case 120: {
+case 126: {
sym(1).Node = makeAstNode<AST::ArgumentList> (driver->nodePool(), sym(1).Expression);
} break;
-case 121: {
+case 127: {
AST::ArgumentList *node = makeAstNode<AST::ArgumentList> (driver->nodePool(), sym(1).ArgumentList, sym(3).Expression);
node->commaToken = loc(2);
sym(1).Node = node;
} break;
-case 125: {
+case 131: {
AST::PostIncrementExpression *node = makeAstNode<AST::PostIncrementExpression> (driver->nodePool(), sym(1).Expression);
node->incrementToken = loc(2);
sym(1).Node = node;
} break;
-case 126: {
+case 132: {
AST::PostDecrementExpression *node = makeAstNode<AST::PostDecrementExpression> (driver->nodePool(), sym(1).Expression);
node->decrementToken = loc(2);
sym(1).Node = node;
} break;
-case 128: {
+case 134: {
AST::DeleteExpression *node = makeAstNode<AST::DeleteExpression> (driver->nodePool(), sym(2).Expression);
node->deleteToken = loc(1);
sym(1).Node = node;
} break;
-case 129: {
+case 135: {
AST::VoidExpression *node = makeAstNode<AST::VoidExpression> (driver->nodePool(), sym(2).Expression);
node->voidToken = loc(1);
sym(1).Node = node;
} break;
-case 130: {
+case 136: {
AST::TypeOfExpression *node = makeAstNode<AST::TypeOfExpression> (driver->nodePool(), sym(2).Expression);
node->typeofToken = loc(1);
sym(1).Node = node;
} break;
-case 131: {
+case 137: {
AST::PreIncrementExpression *node = makeAstNode<AST::PreIncrementExpression> (driver->nodePool(), sym(2).Expression);
node->incrementToken = loc(1);
sym(1).Node = node;
} break;
-case 132: {
+case 138: {
AST::PreDecrementExpression *node = makeAstNode<AST::PreDecrementExpression> (driver->nodePool(), sym(2).Expression);
node->decrementToken = loc(1);
sym(1).Node = node;
} break;
-case 133: {
+case 139: {
AST::UnaryPlusExpression *node = makeAstNode<AST::UnaryPlusExpression> (driver->nodePool(), sym(2).Expression);
node->plusToken = loc(1);
sym(1).Node = node;
} break;
-case 134: {
+case 140: {
AST::UnaryMinusExpression *node = makeAstNode<AST::UnaryMinusExpression> (driver->nodePool(), sym(2).Expression);
node->minusToken = loc(1);
sym(1).Node = node;
} break;
-case 135: {
+case 141: {
AST::TildeExpression *node = makeAstNode<AST::TildeExpression> (driver->nodePool(), sym(2).Expression);
node->tildeToken = loc(1);
sym(1).Node = node;
} break;
-case 136: {
+case 142: {
AST::NotExpression *node = makeAstNode<AST::NotExpression> (driver->nodePool(), sym(2).Expression);
node->notToken = loc(1);
sym(1).Node = node;
} break;
-case 138: {
+case 144: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::Mul, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 139: {
+case 145: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::Div, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 140: {
+case 146: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::Mod, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 142: {
+case 148: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::Add, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 143: {
+case 149: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::Sub, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 145: {
+case 151: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::LShift, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 146: {
+case 152: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::RShift, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 147: {
+case 153: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::URShift, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 149: {
+case 155: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::Lt, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 150: {
+case 156: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::Gt, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 151: {
+case 157: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::Le, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 152: {
+case 158: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::Ge, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 153: {
+case 159: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::InstanceOf, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 154: {
+case 160: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::In, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 156: {
+case 162: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::Lt, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 157: {
+case 163: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::Gt, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 158: {
+case 164: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::Le, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 159: {
+case 165: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::Ge, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 160: {
+case 166: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::InstanceOf, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 162: {
+case 168: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::Equal, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 163: {
+case 169: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::NotEqual, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 164: {
+case 170: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::StrictEqual, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 165: {
+case 171: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::StrictNotEqual, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 167: {
+case 173: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::Equal, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 168: {
+case 174: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::NotEqual, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 169: {
+case 175: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::StrictEqual, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 170: {
+case 176: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::StrictNotEqual, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 172: {
+case 178: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::BitAnd, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 174: {
+case 180: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::BitAnd, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 176: {
+case 182: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::BitXor, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 178: {
+case 184: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::BitXor, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 180: {
+case 186: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::BitOr, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 182: {
+case 188: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::BitOr, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 184: {
+case 190: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::And, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 186: {
+case 192: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::And, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 188: {
+case 194: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::Or, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 190: {
+case 196: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
QSOperator::Or, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 192: {
+case 198: {
AST::ConditionalExpression *node = makeAstNode<AST::ConditionalExpression> (driver->nodePool(), sym(1).Expression,
sym(3).Expression, sym(5).Expression);
node->questionToken = loc(2);
@@ -1034,7 +1092,7 @@ case 192: {
sym(1).Node = node;
} break;
-case 194: {
+case 200: {
AST::ConditionalExpression *node = makeAstNode<AST::ConditionalExpression> (driver->nodePool(), sym(1).Expression,
sym(3).Expression, sym(5).Expression);
node->questionToken = loc(2);
@@ -1042,112 +1100,112 @@ case 194: {
sym(1).Node = node;
} break;
-case 196: {
+case 202: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
sym(2).ival, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 198: {
+case 204: {
AST::BinaryExpression *node = makeAstNode<AST::BinaryExpression> (driver->nodePool(), sym(1).Expression,
sym(2).ival, sym(3).Expression);
node->operatorToken = loc(2);
sym(1).Node = node;
} break;
-case 199: {
+case 205: {
sym(1).ival = QSOperator::Assign;
} break;
-case 200: {
+case 206: {
sym(1).ival = QSOperator::InplaceMul;
} break;
-case 201: {
+case 207: {
sym(1).ival = QSOperator::InplaceDiv;
} break;
-case 202: {
+case 208: {
sym(1).ival = QSOperator::InplaceMod;
} break;
-case 203: {
+case 209: {
sym(1).ival = QSOperator::InplaceAdd;
} break;
-case 204: {
+case 210: {
sym(1).ival = QSOperator::InplaceSub;
} break;
-case 205: {
+case 211: {
sym(1).ival = QSOperator::InplaceLeftShift;
} break;
-case 206: {
+case 212: {
sym(1).ival = QSOperator::InplaceRightShift;
} break;
-case 207: {
+case 213: {
sym(1).ival = QSOperator::InplaceURightShift;
} break;
-case 208: {
+case 214: {
sym(1).ival = QSOperator::InplaceAnd;
} break;
-case 209: {
+case 215: {
sym(1).ival = QSOperator::InplaceXor;
} break;
-case 210: {
+case 216: {
sym(1).ival = QSOperator::InplaceOr;
} break;
-case 212: {
+case 218: {
AST::Expression *node = makeAstNode<AST::Expression> (driver->nodePool(), sym(1).Expression, sym(3).Expression);
node->commaToken = loc(2);
sym(1).Node = node;
} break;
-case 213: {
+case 219: {
sym(1).Node = 0;
} break;
-case 216: {
+case 222: {
AST::Expression *node = makeAstNode<AST::Expression> (driver->nodePool(), sym(1).Expression, sym(3).Expression);
node->commaToken = loc(2);
sym(1).Node = node;
} break;
-case 217: {
+case 223: {
sym(1).Node = 0;
} break;
-case 234: {
+case 240: {
AST::Block *node = makeAstNode<AST::Block> (driver->nodePool(), sym(2).StatementList);
node->lbraceToken = loc(1);
node->rbraceToken = loc(3);
sym(1).Node = node;
} break;
-case 235: {
+case 241: {
sym(1).Node = makeAstNode<AST::StatementList> (driver->nodePool(), sym(1).Statement);
} break;
-case 236: {
+case 242: {
sym(1).Node = makeAstNode<AST::StatementList> (driver->nodePool(), sym(1).StatementList, sym(2).Statement);
} break;
-case 237: {
+case 243: {
sym(1).Node = 0;
} break;
-case 238: {
+case 244: {
sym(1).Node = sym(1).StatementList->finish ();
} break;
-case 240: {
+case 246: {
AST::VariableStatement *node = makeAstNode<AST::VariableStatement> (driver->nodePool(),
sym(2).VariableDeclarationList->finish (/*readOnly=*/sym(1).ival == T_CONST));
node->declarationKindToken = loc(1);
@@ -1155,76 +1213,76 @@ case 240: {
sym(1).Node = node;
} break;
-case 241: {
+case 247: {
sym(1).ival = T_CONST;
} break;
-case 242: {
+case 248: {
sym(1).ival = T_VAR;
} break;
-case 243: {
+case 249: {
sym(1).Node = makeAstNode<AST::VariableDeclarationList> (driver->nodePool(), sym(1).VariableDeclaration);
} break;
-case 244: {
+case 250: {
AST::VariableDeclarationList *node = makeAstNode<AST::VariableDeclarationList> (driver->nodePool(),
sym(1).VariableDeclarationList, sym(3).VariableDeclaration);
node->commaToken = loc(2);
sym(1).Node = node;
} break;
-case 245: {
+case 251: {
sym(1).Node = makeAstNode<AST::VariableDeclarationList> (driver->nodePool(), sym(1).VariableDeclaration);
} break;
-case 246: {
+case 252: {
sym(1).Node = makeAstNode<AST::VariableDeclarationList> (driver->nodePool(), sym(1).VariableDeclarationList, sym(3).VariableDeclaration);
} break;
-case 247: {
+case 253: {
AST::VariableDeclaration *node = makeAstNode<AST::VariableDeclaration> (driver->nodePool(), sym(1).sval, sym(2).Expression);
node->identifierToken = loc(1);
sym(1).Node = node;
} break;
-case 248: {
+case 254: {
AST::VariableDeclaration *node = makeAstNode<AST::VariableDeclaration> (driver->nodePool(), sym(1).sval, sym(2).Expression);
node->identifierToken = loc(1);
sym(1).Node = node;
} break;
-case 249: {
+case 255: {
// ### TODO: AST for initializer
sym(1) = sym(2);
} break;
-case 250: {
+case 256: {
sym(1).Node = 0;
} break;
-case 252: {
+case 258: {
// ### TODO: AST for initializer
sym(1) = sym(2);
} break;
-case 253: {
+case 259: {
sym(1).Node = 0;
} break;
-case 255: {
+case 261: {
AST::EmptyStatement *node = makeAstNode<AST::EmptyStatement> (driver->nodePool());
node->semicolonToken = loc(1);
sym(1).Node = node;
} break;
-case 257: {
+case 263: {
AST::ExpressionStatement *node = makeAstNode<AST::ExpressionStatement> (driver->nodePool(), sym(1).Expression);
node->semicolonToken = loc(2);
sym(1).Node = node;
} break;
-case 258: {
+case 264: {
AST::IfStatement *node = makeAstNode<AST::IfStatement> (driver->nodePool(), sym(3).Expression, sym(5).Statement, sym(7).Statement);
node->ifToken = loc(1);
node->lparenToken = loc(2);
@@ -1233,7 +1291,7 @@ case 258: {
sym(1).Node = node;
} break;
-case 259: {
+case 265: {
AST::IfStatement *node = makeAstNode<AST::IfStatement> (driver->nodePool(), sym(3).Expression, sym(5).Statement);
node->ifToken = loc(1);
node->lparenToken = loc(2);
@@ -1241,7 +1299,7 @@ case 259: {
sym(1).Node = node;
} break;
-case 261: {
+case 267: {
AST::DoWhileStatement *node = makeAstNode<AST::DoWhileStatement> (driver->nodePool(), sym(2).Statement, sym(5).Expression);
node->doToken = loc(1);
node->whileToken = loc(3);
@@ -1251,7 +1309,7 @@ case 261: {
sym(1).Node = node;
} break;
-case 262: {
+case 268: {
AST::WhileStatement *node = makeAstNode<AST::WhileStatement> (driver->nodePool(), sym(3).Expression, sym(5).Statement);
node->whileToken = loc(1);
node->lparenToken = loc(2);
@@ -1259,7 +1317,7 @@ case 262: {
sym(1).Node = node;
} break;
-case 263: {
+case 269: {
AST::ForStatement *node = makeAstNode<AST::ForStatement> (driver->nodePool(), sym(3).Expression,
sym(5).Expression, sym(7).Expression, sym(9).Statement);
node->forToken = loc(1);
@@ -1270,7 +1328,7 @@ case 263: {
sym(1).Node = node;
} break;
-case 264: {
+case 270: {
AST::LocalForStatement *node = makeAstNode<AST::LocalForStatement> (driver->nodePool(),
sym(4).VariableDeclarationList->finish (/*readOnly=*/false), sym(6).Expression,
sym(8).Expression, sym(10).Statement);
@@ -1283,7 +1341,7 @@ case 264: {
sym(1).Node = node;
} break;
-case 265: {
+case 271: {
AST:: ForEachStatement *node = makeAstNode<AST::ForEachStatement> (driver->nodePool(), sym(3).Expression,
sym(5).Expression, sym(7).Statement);
node->forToken = loc(1);
@@ -1293,7 +1351,7 @@ case 265: {
sym(1).Node = node;
} break;
-case 266: {
+case 272: {
AST::LocalForEachStatement *node = makeAstNode<AST::LocalForEachStatement> (driver->nodePool(),
sym(4).VariableDeclaration, sym(6).Expression, sym(8).Statement);
node->forToken = loc(1);
@@ -1304,14 +1362,14 @@ case 266: {
sym(1).Node = node;
} break;
-case 268: {
+case 274: {
AST::ContinueStatement *node = makeAstNode<AST::ContinueStatement> (driver->nodePool());
node->continueToken = loc(1);
node->semicolonToken = loc(2);
sym(1).Node = node;
} break;
-case 270: {
+case 276: {
AST::ContinueStatement *node = makeAstNode<AST::ContinueStatement> (driver->nodePool(), sym(2).sval);
node->continueToken = loc(1);
node->identifierToken = loc(2);
@@ -1319,14 +1377,14 @@ case 270: {
sym(1).Node = node;
} break;
-case 272: {
+case 278: {
AST::BreakStatement *node = makeAstNode<AST::BreakStatement> (driver->nodePool());
node->breakToken = loc(1);
node->semicolonToken = loc(2);
sym(1).Node = node;
} break;
-case 274: {
+case 280: {
AST::BreakStatement *node = makeAstNode<AST::BreakStatement> (driver->nodePool(), sym(2).sval);
node->breakToken = loc(1);
node->identifierToken = loc(2);
@@ -1334,14 +1392,14 @@ case 274: {
sym(1).Node = node;
} break;
-case 276: {
+case 282: {
AST::ReturnStatement *node = makeAstNode<AST::ReturnStatement> (driver->nodePool(), sym(2).Expression);
node->returnToken = loc(1);
node->semicolonToken = loc(3);
sym(1).Node = node;
} break;
-case 277: {
+case 283: {
AST::WithStatement *node = makeAstNode<AST::WithStatement> (driver->nodePool(), sym(3).Expression, sym(5).Statement);
node->withToken = loc(1);
node->lparenToken = loc(2);
@@ -1349,7 +1407,7 @@ case 277: {
sym(1).Node = node;
} break;
-case 278: {
+case 284: {
AST::SwitchStatement *node = makeAstNode<AST::SwitchStatement> (driver->nodePool(), sym(3).Expression, sym(5).CaseBlock);
node->switchToken = loc(1);
node->lparenToken = loc(2);
@@ -1357,90 +1415,90 @@ case 278: {
sym(1).Node = node;
} break;
-case 279: {
+case 285: {
AST::CaseBlock *node = makeAstNode<AST::CaseBlock> (driver->nodePool(), sym(2).CaseClauses);
node->lbraceToken = loc(1);
node->rbraceToken = loc(3);
sym(1).Node = node;
} break;
-case 280: {
+case 286: {
AST::CaseBlock *node = makeAstNode<AST::CaseBlock> (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 281: {
+case 287: {
sym(1).Node = makeAstNode<AST::CaseClauses> (driver->nodePool(), sym(1).CaseClause);
} break;
-case 282: {
+case 288: {
sym(1).Node = makeAstNode<AST::CaseClauses> (driver->nodePool(), sym(1).CaseClauses, sym(2).CaseClause);
} break;
-case 283: {
+case 289: {
sym(1).Node = 0;
} break;
-case 284: {
+case 290: {
sym(1).Node = sym(1).CaseClauses->finish ();
} break;
-case 285: {
+case 291: {
AST::CaseClause *node = makeAstNode<AST::CaseClause> (driver->nodePool(), sym(2).Expression, sym(4).StatementList);
node->caseToken = loc(1);
node->colonToken = loc(3);
sym(1).Node = node;
} break;
-case 286: {
+case 292: {
AST::DefaultClause *node = makeAstNode<AST::DefaultClause> (driver->nodePool(), sym(3).StatementList);
node->defaultToken = loc(1);
node->colonToken = loc(2);
sym(1).Node = node;
} break;
-case 287:
-case 288: {
+case 293:
+case 294: {
AST::LabelledStatement *node = makeAstNode<AST::LabelledStatement> (driver->nodePool(), driver->intern(lexer->characterBuffer(), lexer->characterCount()), sym(3).Statement);
node->identifierToken = loc(1);
node->colonToken = loc(2);
sym(1).Node = node;
} break;
-case 289: {
+case 295: {
AST::LabelledStatement *node = makeAstNode<AST::LabelledStatement> (driver->nodePool(), sym(1).sval, sym(3).Statement);
node->identifierToken = loc(1);
node->colonToken = loc(2);
sym(1).Node = node;
} break;
-case 291: {
+case 297: {
AST::ThrowStatement *node = makeAstNode<AST::ThrowStatement> (driver->nodePool(), sym(2).Expression);
node->throwToken = loc(1);
node->semicolonToken = loc(3);
sym(1).Node = node;
} break;
-case 292: {
+case 298: {
AST::TryStatement *node = makeAstNode<AST::TryStatement> (driver->nodePool(), sym(2).Statement, sym(3).Catch);
node->tryToken = loc(1);
sym(1).Node = node;
} break;
-case 293: {
+case 299: {
AST::TryStatement *node = makeAstNode<AST::TryStatement> (driver->nodePool(), sym(2).Statement, sym(3).Finally);
node->tryToken = loc(1);
sym(1).Node = node;
} break;
-case 294: {
+case 300: {
AST::TryStatement *node = makeAstNode<AST::TryStatement> (driver->nodePool(), sym(2).Statement, sym(3).Catch, sym(4).Finally);
node->tryToken = loc(1);
sym(1).Node = node;
} break;
-case 295: {
+case 301: {
AST::Catch *node = makeAstNode<AST::Catch> (driver->nodePool(), sym(3).sval, sym(5).Block);
node->catchToken = loc(1);
node->lparenToken = loc(2);
@@ -1449,20 +1507,20 @@ case 295: {
sym(1).Node = node;
} break;
-case 296: {
+case 302: {
AST::Finally *node = makeAstNode<AST::Finally> (driver->nodePool(), sym(2).Block);
node->finallyToken = loc(1);
sym(1).Node = node;
} break;
-case 298: {
+case 304: {
AST::DebuggerStatement *node = makeAstNode<AST::DebuggerStatement> (driver->nodePool());
node->debuggerToken = loc(1);
node->semicolonToken = loc(2);
sym(1).Node = node;
} break;
-case 299: {
+case 305: {
AST::FunctionDeclaration *node = makeAstNode<AST::FunctionDeclaration> (driver->nodePool(), sym(2).sval, sym(4).FormalParameterList, sym(7).FunctionBody);
node->functionToken = loc(1);
node->identifierToken = loc(2);
@@ -1473,7 +1531,7 @@ case 299: {
sym(1).Node = node;
} break;
-case 300: {
+case 306: {
AST::FunctionExpression *node = makeAstNode<AST::FunctionExpression> (driver->nodePool(), sym(2).sval, sym(4).FormalParameterList, sym(7).FunctionBody);
node->functionToken = loc(1);
if (sym(2).sval)
@@ -1485,56 +1543,56 @@ case 300: {
sym(1).Node = node;
} break;
-case 301: {
+case 307: {
AST::FormalParameterList *node = makeAstNode<AST::FormalParameterList> (driver->nodePool(), sym(1).sval);
node->identifierToken = loc(1);
sym(1).Node = node;
} break;
-case 302: {
+case 308: {
AST::FormalParameterList *node = makeAstNode<AST::FormalParameterList> (driver->nodePool(), sym(1).FormalParameterList, sym(3).sval);
node->commaToken = loc(2);
node->identifierToken = loc(3);
sym(1).Node = node;
} break;
-case 303: {
+case 309: {
sym(1).Node = 0;
} break;
-case 304: {
+case 310: {
sym(1).Node = sym(1).FormalParameterList->finish ();
} break;
-case 305: {
+case 311: {
sym(1).Node = 0;
} break;
-case 307: {
+case 313: {
sym(1).Node = makeAstNode<AST::FunctionBody> (driver->nodePool(), sym(1).SourceElements->finish ());
} break;
-case 308: {
+case 314: {
sym(1).Node = makeAstNode<AST::SourceElements> (driver->nodePool(), sym(1).SourceElement);
} break;
-case 309: {
+case 315: {
sym(1).Node = makeAstNode<AST::SourceElements> (driver->nodePool(), sym(1).SourceElements, sym(2).SourceElement);
} break;
-case 310: {
+case 316: {
sym(1).Node = makeAstNode<AST::StatementSourceElement> (driver->nodePool(), sym(1).Statement);
} break;
-case 311: {
+case 317: {
sym(1).Node = makeAstNode<AST::FunctionSourceElement> (driver->nodePool(), sym(1).FunctionDeclaration);
} break;
-case 312: {
+case 318: {
sym(1).sval = 0;
} break;
-case 314: {
+case 320: {
sym(1).Node = 0;
} break;
diff --git a/src/declarative/qml/parser/javascriptparser_p.h b/src/declarative/qml/parser/javascriptparser_p.h
index 5e68fe7..2ae4c34 100644
--- a/src/declarative/qml/parser/javascriptparser_p.h
+++ b/src/declarative/qml/parser/javascriptparser_p.h
@@ -62,86 +62,71 @@
#include "javascriptgrammar_p.h"
#include "javascriptast_p.h"
+#include "javascriptengine_p.h"
+
#include <QtCore/QList>
QT_BEGIN_NAMESPACE
class QString;
-class JavaScriptEnginePrivate;
-class JavaScriptNameIdImpl;
-class JavaScriptParser: protected JavaScriptGrammar
+namespace JavaScript {
+
+class Engine;
+class NameId;
+
+class Parser: protected JavaScriptGrammar
{
public:
union Value {
int ival;
double dval;
- JavaScriptNameIdImpl *sval;
- JavaScript::AST::ArgumentList *ArgumentList;
- JavaScript::AST::CaseBlock *CaseBlock;
- JavaScript::AST::CaseClause *CaseClause;
- JavaScript::AST::CaseClauses *CaseClauses;
- JavaScript::AST::Catch *Catch;
- JavaScript::AST::DefaultClause *DefaultClause;
- JavaScript::AST::ElementList *ElementList;
- JavaScript::AST::Elision *Elision;
- JavaScript::AST::ExpressionNode *Expression;
- JavaScript::AST::Finally *Finally;
- JavaScript::AST::FormalParameterList *FormalParameterList;
- JavaScript::AST::FunctionBody *FunctionBody;
- JavaScript::AST::FunctionDeclaration *FunctionDeclaration;
- JavaScript::AST::Node *Node;
- JavaScript::AST::PropertyName *PropertyName;
- JavaScript::AST::PropertyNameAndValueList *PropertyNameAndValueList;
- JavaScript::AST::SourceElement *SourceElement;
- JavaScript::AST::SourceElements *SourceElements;
- JavaScript::AST::Statement *Statement;
- JavaScript::AST::StatementList *StatementList;
- JavaScript::AST::Block *Block;
- JavaScript::AST::VariableDeclaration *VariableDeclaration;
- JavaScript::AST::VariableDeclarationList *VariableDeclarationList;
-
- JavaScript::AST::UiProgram *UiProgram;
- JavaScript::AST::UiImportList *UiImportList;
- JavaScript::AST::UiImport *UiImport;
- JavaScript::AST::UiPublicMember *UiPublicMember;
- JavaScript::AST::UiObjectDefinition *UiObjectDefinition;
- JavaScript::AST::UiObjectInitializer *UiObjectInitializer;
- JavaScript::AST::UiObjectBinding *UiObjectBinding;
- JavaScript::AST::UiScriptBinding *UiScriptBinding;
- JavaScript::AST::UiArrayBinding *UiArrayBinding;
- JavaScript::AST::UiObjectMember *UiObjectMember;
- JavaScript::AST::UiObjectMemberList *UiObjectMemberList;
- JavaScript::AST::UiQualifiedId *UiQualifiedId;
- };
-
- struct DiagnosticMessage {
- enum Kind { Warning, Error };
-
- DiagnosticMessage()
- : kind(Error) {}
-
- DiagnosticMessage(Kind kind, const JavaScript::AST::SourceLocation &loc, const QString &message)
- : kind(kind), loc(loc), message(message) {}
-
- bool isWarning() const
- { return kind == Warning; }
-
- bool isError() const
- { return kind == Error; }
-
- Kind kind;
- JavaScript::AST::SourceLocation loc;
- QString message;
+ NameId *sval;
+ AST::ArgumentList *ArgumentList;
+ AST::CaseBlock *CaseBlock;
+ AST::CaseClause *CaseClause;
+ AST::CaseClauses *CaseClauses;
+ AST::Catch *Catch;
+ AST::DefaultClause *DefaultClause;
+ AST::ElementList *ElementList;
+ AST::Elision *Elision;
+ AST::ExpressionNode *Expression;
+ AST::Finally *Finally;
+ AST::FormalParameterList *FormalParameterList;
+ AST::FunctionBody *FunctionBody;
+ AST::FunctionDeclaration *FunctionDeclaration;
+ AST::Node *Node;
+ AST::PropertyName *PropertyName;
+ AST::PropertyNameAndValueList *PropertyNameAndValueList;
+ AST::SourceElement *SourceElement;
+ AST::SourceElements *SourceElements;
+ AST::Statement *Statement;
+ AST::StatementList *StatementList;
+ AST::Block *Block;
+ AST::VariableDeclaration *VariableDeclaration;
+ AST::VariableDeclarationList *VariableDeclarationList;
+
+ AST::UiProgram *UiProgram;
+ AST::UiImportList *UiImportList;
+ AST::UiImport *UiImport;
+ AST::UiPublicMember *UiPublicMember;
+ AST::UiObjectDefinition *UiObjectDefinition;
+ AST::UiObjectInitializer *UiObjectInitializer;
+ AST::UiObjectBinding *UiObjectBinding;
+ AST::UiScriptBinding *UiScriptBinding;
+ AST::UiArrayBinding *UiArrayBinding;
+ AST::UiObjectMember *UiObjectMember;
+ AST::UiObjectMemberList *UiObjectMemberList;
+ AST::UiQualifiedId *UiQualifiedId;
};
public:
- JavaScriptParser();
- ~JavaScriptParser();
+ Parser(Engine *engine);
+ ~Parser();
- bool parse(JavaScriptEnginePrivate *driver);
+ bool parse();
- JavaScript::AST::UiProgram *ast()
+ AST::UiProgram *ast()
{ return program; }
QList<DiagnosticMessage> diagnosticMessages() const
@@ -172,17 +157,20 @@ protected:
inline Value &sym(int index)
{ return sym_stack [tos + index - 1]; }
- inline JavaScript::AST::SourceLocation &loc(int index)
+ inline AST::SourceLocation &loc(int index)
{ return location_stack [tos + index - 1]; }
+ AST::UiQualifiedId *reparseAsQualifiedId(AST::ExpressionNode *expr);
+
protected:
+ Engine *driver;
int tos;
int stack_size;
Value *sym_stack;
int *state_stack;
- JavaScript::AST::SourceLocation *location_stack;
+ AST::SourceLocation *location_stack;
- JavaScript::AST::UiProgram *program;
+ AST::UiProgram *program;
// error recovery
enum { TOKEN_BUFFER_SIZE = 3 };
@@ -190,12 +178,12 @@ protected:
struct SavedToken {
int token;
double dval;
- JavaScript::AST::SourceLocation loc;
+ AST::SourceLocation loc;
};
double yylval;
- JavaScript::AST::SourceLocation yylloc;
- JavaScript::AST::SourceLocation yyprevlloc;
+ AST::SourceLocation yylloc;
+ AST::SourceLocation yyprevlloc;
SavedToken token_buffer[TOKEN_BUFFER_SIZE];
SavedToken *first_token;
@@ -204,10 +192,13 @@ protected:
QList<DiagnosticMessage> diagnostic_messages;
};
+} // end of namespace JavaScript
+
+
-#define J_SCRIPT_REGEXPLITERAL_RULE1 52
+#define J_SCRIPT_REGEXPLITERAL_RULE1 54
-#define J_SCRIPT_REGEXPLITERAL_RULE2 53
+#define J_SCRIPT_REGEXPLITERAL_RULE2 55
QT_END_NAMESPACE
diff --git a/src/declarative/qml/parser/javascriptprettypretty.cpp b/src/declarative/qml/parser/javascriptprettypretty.cpp
index 6e632b7..0342b39 100644
--- a/src/declarative/qml/parser/javascriptprettypretty.cpp
+++ b/src/declarative/qml/parser/javascriptprettypretty.cpp
@@ -57,7 +57,7 @@
QT_BEGIN_NAMESPACE
namespace JavaScript {
-QString numberToString(qjsreal value);
+QString numberToString(double value);
}
using namespace JavaScript;
@@ -182,7 +182,7 @@ void PrettyPretty::endVisit(AST::ThisExpression *node)
bool PrettyPretty::visit(AST::IdentifierExpression *node)
{
- out << JavaScriptEnginePrivate::toString(node->name);
+ out << Engine::toString(node->name);
return true;
}
@@ -229,7 +229,7 @@ void PrettyPretty::endVisit(AST::FalseLiteral *node)
bool PrettyPretty::visit(AST::StringLiteral *node)
{
- QString lit = JavaScriptEnginePrivate::toString(node->value);
+ QString lit = Engine::toString(node->value);
lit.replace(QLatin1String("\\"), QLatin1String("\\\\"));
out << "\"" << lit << "\"";
return false;
@@ -253,7 +253,7 @@ void PrettyPretty::endVisit(AST::NumericLiteral *node)
bool PrettyPretty::visit(AST::RegExpLiteral *node)
{
- out << "/" << JavaScriptEnginePrivate::toString(node->pattern) << "/";
+ out << "/" << Engine::toString(node->pattern) << "/";
if (node->flags)
out << JavaScript::Ecma::RegExp::flagsToString(node->flags);
@@ -348,7 +348,7 @@ void PrettyPretty::endVisit(AST::PropertyNameAndValueList *node)
bool PrettyPretty::visit(AST::IdentifierPropertyName *node)
{
- out << JavaScriptEnginePrivate::toString(node->id);
+ out << Engine::toString(node->id);
return false;
}
@@ -359,7 +359,7 @@ void PrettyPretty::endVisit(AST::IdentifierPropertyName *node)
bool PrettyPretty::visit(AST::StringLiteralPropertyName *node)
{
- QString lit = JavaScriptEnginePrivate::toString(node->id);
+ QString lit = Engine::toString(node->id);
lit.replace(QLatin1String("\\"), QLatin1String("\\\\"));
out << lit;
return false;
@@ -398,7 +398,7 @@ void PrettyPretty::endVisit(AST::ArrayMemberExpression *node)
bool PrettyPretty::visit(AST::FieldMemberExpression *node)
{
accept(node->base);
- out << "." << JavaScriptEnginePrivate::toString(node->name);
+ out << "." << Engine::toString(node->name);
return false;
}
@@ -803,7 +803,7 @@ void PrettyPretty::endVisit(AST::VariableStatement *node)
bool PrettyPretty::visit(AST::VariableDeclaration *node)
{
- out << JavaScriptEnginePrivate::toString(node->name);
+ out << Engine::toString(node->name);
if (node->expression) {
out << " = ";
accept(node->expression);
@@ -959,7 +959,7 @@ bool PrettyPretty::visit(AST::ContinueStatement *node)
{
out << "continue";
if (node->label) {
- out << " " << JavaScriptEnginePrivate::toString(node->label);
+ out << " " << Engine::toString(node->label);
}
out << ";";
return false;
@@ -974,7 +974,7 @@ bool PrettyPretty::visit(AST::BreakStatement *node)
{
out << "break";
if (node->label) {
- out << " " << JavaScriptEnginePrivate::toString(node->label);
+ out << " " << Engine::toString(node->label);
}
out << ";";
return false;
@@ -1095,7 +1095,7 @@ void PrettyPretty::endVisit(AST::DefaultClause *node)
bool PrettyPretty::visit(AST::LabelledStatement *node)
{
- out << JavaScriptEnginePrivate::toString(node->label) << ": ";
+ out << Engine::toString(node->label) << ": ";
return true;
}
@@ -1123,7 +1123,7 @@ bool PrettyPretty::visit(AST::TryStatement *node)
out << "try ";
acceptAsBlock(node->statement);
if (node->catchExpression) {
- out << " catch (" << JavaScriptEnginePrivate::toString(node->catchExpression->name) << ") ";
+ out << " catch (" << Engine::toString(node->catchExpression->name) << ") ";
acceptAsBlock(node->catchExpression->statement);
}
if (node->finallyExpression) {
@@ -1166,13 +1166,13 @@ bool PrettyPretty::visit(AST::FunctionDeclaration *node)
out << "function";
if (node->name)
- out << " " << JavaScriptEnginePrivate::toString(node->name);
+ out << " " << Engine::toString(node->name);
// the arguments
out << "(";
for (AST::FormalParameterList *it = node->formals; it; it = it->next) {
if (it->name)
- out << JavaScriptEnginePrivate::toString(it->name);
+ out << Engine::toString(it->name);
if (it->next)
out << ", ";
@@ -1205,13 +1205,13 @@ bool PrettyPretty::visit(AST::FunctionExpression *node)
out << "function";
if (node->name)
- out << " " << JavaScriptEnginePrivate::toString(node->name);
+ out << " " << Engine::toString(node->name);
// the arguments
out << "(";
for (AST::FormalParameterList *it = node->formals; it; it = it->next) {
if (it->name)
- out << JavaScriptEnginePrivate::toString(it->name);
+ out << Engine::toString(it->name);
if (it->next)
out << ", ";
diff --git a/src/declarative/qml/parser/javascriptvalue.h b/src/declarative/qml/parser/javascriptvalue.h
deleted file mode 100644
index c68b817..0000000
--- a/src/declarative/qml/parser/javascriptvalue.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef JAVASCRIPTVALUE_H
-#define JAVASCRIPTVALUE_H
-
-typedef double qjsreal;
-
-#endif // JAVASCRIPTVALUE_H
diff --git a/src/declarative/qml/parser/parser.pri b/src/declarative/qml/parser/parser.pri
index 130aeaf..b4d226a 100644
--- a/src/declarative/qml/parser/parser.pri
+++ b/src/declarative/qml/parser/parser.pri
@@ -8,8 +8,7 @@ HEADERS += $$PWD/javascriptast_p.h \
$$PWD/javascriptmemorypool_p.h \
$$PWD/javascriptnodepool_p.h \
$$PWD/javascriptparser_p.h \
- $$PWD/javascriptprettypretty_p.h \
- $$PWD/javascriptvalue.h \
+ $$PWD/javascriptprettypretty_p.h
SOURCES += $$PWD/javascriptast.cpp \
$$PWD/javascriptastvisitor.cpp \
diff --git a/src/declarative/qml/qmlbindablevalue.h b/src/declarative/qml/qmlbindablevalue.h
index c4ef64a..7831177 100644
--- a/src/declarative/qml/qmlbindablevalue.h
+++ b/src/declarative/qml/qmlbindablevalue.h
@@ -42,10 +42,10 @@
#ifndef QMLBINDABLEVALUE_H
#define QMLBINDABLEVALUE_H
-#include <QObject>
-#include <qfxglobal.h>
-#include <qml.h>
-#include <qmlpropertyvaluesource.h>
+#include <QtCore/QObject>
+#include <QtDeclarative/qfxglobal.h>
+#include <QtDeclarative/qml.h>
+#include <QtDeclarative/qmlpropertyvaluesource.h>
#include <QtDeclarative/qmlexpression.h>
diff --git a/src/declarative/qml/qmlbindablevalue_p.h b/src/declarative/qml/qmlbindablevalue_p.h
index d9af0ef..9973bdc 100644
--- a/src/declarative/qml/qmlbindablevalue_p.h
+++ b/src/declarative/qml/qmlbindablevalue_p.h
@@ -43,8 +43,8 @@
#define QMLBINDABLEVALUE_P_H
#include <private/qobject_p.h>
-#include <qmlbindablevalue.h>
-#include <qmlmetaproperty.h>
+#include <QtDeclarative/qmlbindablevalue.h>
+#include <QtDeclarative/qmlmetaproperty.h>
QT_BEGIN_NAMESPACE
diff --git a/src/declarative/qml/qmlboundsignal_p.h b/src/declarative/qml/qmlboundsignal_p.h
index e84f0c1..2c05770 100644
--- a/src/declarative/qml/qmlboundsignal_p.h
+++ b/src/declarative/qml/qmlboundsignal_p.h
@@ -42,7 +42,7 @@
#ifndef QMLBOUNDSIGNAL_P_H
#define QMLBOUNDSIGNAL_P_H
-#include <qmlexpression.h>
+#include <QtDeclarative/qmlexpression.h>
#include <private/qobject_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/declarative/qml/qmlcompiledcomponent_p.h b/src/declarative/qml/qmlcompiledcomponent_p.h
index c5e1226..2201423 100644
--- a/src/declarative/qml/qmlcompiledcomponent_p.h
+++ b/src/declarative/qml/qmlcompiledcomponent_p.h
@@ -42,7 +42,7 @@
#ifndef QMLCOMPILEDCOMPONENT_P_H
#define QMLCOMPILEDCOMPONENT_P_H
-#include <qml.h>
+#include <QtDeclarative/qml.h>
#include <private/qmlinstruction_p.h>
#include <private/qmlcompiler_p.h>
#include <private/qmlrefcount_p.h>
diff --git a/src/declarative/qml/qmlcompiler.cpp b/src/declarative/qml/qmlcompiler.cpp
index b205efb..8990732 100644
--- a/src/declarative/qml/qmlcompiler.cpp
+++ b/src/declarative/qml/qmlcompiler.cpp
@@ -1050,8 +1050,9 @@ bool QmlCompiler::compileListProperty(QmlParser::Property *prop,
COMPILE_EXCEPTION("Can only assign one binding to lists");
assignedBinding = true;
- compileBinding(v->value.asScript(), prop, ctxt,
- obj->metaObject(), v->location.start.line);
+ COMPILE_CHECK(compileBinding(v->value.asScript(), prop, ctxt,
+ obj->metaObject(),
+ v->location.start.line));
v->type = Value::PropertyBinding;
} else {
COMPILE_EXCEPTION("Cannot assign primitives to lists");
@@ -1204,8 +1205,9 @@ bool QmlCompiler::compilePropertyLiteralAssignment(QmlParser::Property *prop,
{
if (v->value.isScript()) {
- compileBinding(v->value.asScript(), prop, ctxt, obj->metaObject(),
- v->location.start.line);
+ COMPILE_CHECK(compileBinding(v->value.asScript(), prop, ctxt,
+ obj->metaObject(),
+ v->location.start.line));
v->type = Value::PropertyBinding;
@@ -1214,37 +1216,24 @@ bool QmlCompiler::compilePropertyLiteralAssignment(QmlParser::Property *prop,
QmlInstruction assign;
assign.line = v->location.start.line;
- bool doassign = true;
if (prop->index != -1) {
QString value = v->primitive();
StoreInstructionResult r =
generateStoreInstruction(*output, assign, obj->metaObject()->property(prop->index), prop->index, -1, &value);
if (r == Ok) {
- doassign = false;
} else if (r == InvalidData) {
//### we are restricted to a rather generic message here. If we can find a way to move
// the exception into generateStoreInstruction we could potentially have better messages.
// (the problem is that both compile and run exceptions can be generated, though)
COMPILE_EXCEPTION2(v, "Cannot assign value" << v->primitive() << "to property" << obj->metaObject()->property(prop->index).name());
- doassign = false;
} else if (r == ReadOnly) {
COMPILE_EXCEPTION2(v, "Cannot assign value" << v->primitive() << "to the read-only property" << obj->metaObject()->property(prop->index).name());
} else {
- doassign = true;
+ COMPILE_EXCEPTION2(prop, "Cannot assign value to property" << obj->metaObject()->property(prop->index).name() << "of unknown type");
}
- }
-
- if (doassign) {
- assign.type = QmlInstruction::AssignConstant;
- if (prop->isDefault) {
- assign.assignConstant.property = -1;
- } else {
- assign.assignConstant.property =
- output->indexForByteArray(prop->name);
- }
- assign.assignConstant.constant =
- output->indexForString(v->primitive());
+ } else {
+ COMPILE_EXCEPTION2(prop, "Cannot assign value to non-existant property" << prop->name);
}
output->bytecode << assign;
@@ -1342,7 +1331,7 @@ bool QmlCompiler::compileDynamicMeta(QmlParser::Object *obj)
return true;
}
-void QmlCompiler::compileBinding(const QString &bind, QmlParser::Property *prop,
+bool QmlCompiler::compileBinding(const QString &bind, QmlParser::Property *prop,
int ctxt, const QMetaObject *mo, qint64 line)
{
QmlBasicScript bs;
@@ -1355,10 +1344,12 @@ void QmlCompiler::compileBinding(const QString &bind, QmlParser::Property *prop,
bref = output->indexForString(bind);
}
- QmlInstruction assign;
- assign.assignBinding.context = ctxt;
- assign.line = line;
if (prop->index != -1) {
+
+ QmlInstruction assign;
+ assign.assignBinding.context = ctxt;
+ assign.line = line;
+
if (bs.isValid())
assign.type = QmlInstruction::StoreCompiledBinding;
else
@@ -1368,20 +1359,18 @@ void QmlCompiler::compileBinding(const QString &bind, QmlParser::Property *prop,
assign.assignBinding.value = bref;
assign.assignBinding.category = QmlMetaProperty::Unknown;
if (mo) {
- //XXX we should generate an exception if the property is read-only
+ // ### we should generate an exception if the property is read-only
QMetaProperty mp = mo->property(assign.assignBinding.property);
assign.assignBinding.category = QmlMetaProperty::propertyCategory(mp);
}
+
+ output->bytecode << assign;
+
} else {
- if (bs.isValid())
- assign.type = QmlInstruction::AssignCompiledBinding;
- else
- assign.type = QmlInstruction::AssignBinding;
- assign.assignBinding.property = output->indexForByteArray(prop->name);
- assign.assignBinding.value = bref;
- assign.assignBinding.category = QmlMetaProperty::Unknown;
+ COMPILE_EXCEPTION2(prop, "Cannot assign binding to non-existant property" << prop->name);
}
- output->bytecode << assign;
+
+ return true;
}
int QmlCompiler::optimizeExpressions(int start, int end, int patch)
@@ -1414,9 +1403,7 @@ int QmlCompiler::optimizeExpressions(int start, int end, int patch)
continue;
}
- if (instr.type == QmlInstruction::AssignBinding ||
- instr.type == QmlInstruction::AssignCompiledBinding ||
- instr.type == QmlInstruction::StoreBinding ||
+ if (instr.type == QmlInstruction::StoreBinding ||
instr.type == QmlInstruction::StoreCompiledBinding) {
++bindingsCount;
} else if (instr.type == QmlInstruction::TryBeginObject ||
diff --git a/src/declarative/qml/qmlcompiler_p.h b/src/declarative/qml/qmlcompiler_p.h
index 64400c5..bc04cfa 100644
--- a/src/declarative/qml/qmlcompiler_p.h
+++ b/src/declarative/qml/qmlcompiler_p.h
@@ -44,8 +44,8 @@
#include <QtCore/qbytearray.h>
#include <QtCore/qset.h>
-#include <qml.h>
-#include <qmlerror.h>
+#include <QtDeclarative/qml.h>
+#include <QtDeclarative/qmlerror.h>
#include <private/qmlinstruction_p.h>
#include <private/qmlcompositetypemanager_p.h>
#include <private/qmlparser_p.h>
@@ -164,7 +164,7 @@ private:
int ctxt);
bool compileDynamicMeta(QmlParser::Object *obj);
- void compileBinding(const QString &, QmlParser::Property *prop,
+ bool compileBinding(const QString &, QmlParser::Property *prop,
int ctxt, const QMetaObject *, qint64);
int optimizeExpressions(int start, int end, int patch = -1);
diff --git a/src/declarative/qml/qmlcomponent_p.h b/src/declarative/qml/qmlcomponent_p.h
index 4de47c6..254d9ba 100644
--- a/src/declarative/qml/qmlcomponent_p.h
+++ b/src/declarative/qml/qmlcomponent_p.h
@@ -42,21 +42,21 @@
#ifndef QMLCOMPONENT_P_H
#define QMLCOMPONENT_P_H
-#include <QString>
-#include <QStringList>
-#include <QList>
-#include "private/qobject_p.h"
-#include "private/qmlengine_p.h"
-#include "private/qmlcompositetypemanager_p.h"
-#include <qmlerror.h>
-#include "qmlcomponent.h"
+#include <QtCore/QString>
+#include <QtCore/QStringList>
+#include <QtCore/QList>
+#include <private/qobject_p.h>
+#include <private/qmlengine_p.h>
+#include <private/qmlcompositetypemanager_p.h>
+#include <QtDeclarative/qmlerror.h>
+#include <QtDeclarative/qmlcomponent.h>
+#include <QtDeclarative/qml.h>
+
+QT_BEGIN_NAMESPACE
+
class QmlComponent;
class QmlEngine;
class QmlCompiledComponent;
-#include "qml.h"
-
-
-QT_BEGIN_NAMESPACE
class QmlComponentPrivate : public QObjectPrivate
{
diff --git a/src/declarative/qml/qmlcompositetypemanager_p.h b/src/declarative/qml/qmlcompositetypemanager_p.h
index f03b2cb..9312819 100644
--- a/src/declarative/qml/qmlcompositetypemanager_p.h
+++ b/src/declarative/qml/qmlcompositetypemanager_p.h
@@ -42,10 +42,10 @@
#ifndef QMLCOMPOSITETYPEMANAGER_P_H
#define QMLCOMPOSITETYPEMANAGER_P_H
-#include <qglobal.h>
+#include <QtCore/qglobal.h>
#include <private/qmlscriptparser_p.h>
#include <private/qmlrefcount_p.h>
-#include <qmlerror.h>
+#include <QtDeclarative/qmlerror.h>
QT_BEGIN_NAMESPACE
diff --git a/src/declarative/qml/qmlcontext.cpp b/src/declarative/qml/qmlcontext.cpp
index fa36eb1..ea72ebf 100644
--- a/src/declarative/qml/qmlcontext.cpp
+++ b/src/declarative/qml/qmlcontext.cpp
@@ -149,7 +149,7 @@ void QmlContextPrivate::addDefaultObject(QObject *object, Priority priority)
QmlContext context(engine.rootContext());
context.setContextProperty("myModel", modelData);
- QmlComponent component("ListView { model=myModel }");
+ QmlComponent component(&engine, "ListView { model=myModel }");
component.create(&context);
\endcode
@@ -176,7 +176,7 @@ void QmlContextPrivate::addDefaultObject(QObject *object, Priority priority)
QmlContext context(engine.rootContext());
context.addDefaultObject(&myDataSet);
- QmlComponent component("ListView { model=myModel }");
+ QmlComponent component(&engine, "ListView { model=myModel }");
component.create(&context);
\endcode
diff --git a/src/declarative/qml/qmlcontext_p.h b/src/declarative/qml/qmlcontext_p.h
index 6f1e486..4d88fc2 100644
--- a/src/declarative/qml/qmlcontext_p.h
+++ b/src/declarative/qml/qmlcontext_p.h
@@ -42,11 +42,11 @@
#ifndef QMLCONTEXT_P_H
#define QMLCONTEXT_P_H
-#include <qmlcontext.h>
+#include <QtDeclarative/qmlcontext.h>
#include <private/qobject_p.h>
#include <private/qmldeclarativedata_p.h>
-#include <qhash.h>
-#include <qscriptvalue.h>
+#include <QtCore/qhash.h>
+#include <QtScript/qscriptvalue.h>
#include <QtCore/qset.h>
QT_BEGIN_NAMESPACE
diff --git a/src/declarative/qml/qmlcustomparser.cpp b/src/declarative/qml/qmlcustomparser.cpp
index e864df9..a60f783 100644
--- a/src/declarative/qml/qmlcustomparser.cpp
+++ b/src/declarative/qml/qmlcustomparser.cpp
@@ -120,6 +120,7 @@ QmlCustomParserNodePrivate::fromObject(QmlParser::Object *root)
return rootNode;
}
+#include <QtCore/qdebug.h>
QmlCustomParserProperty
QmlCustomParserNodePrivate::fromProperty(QmlParser::Property *p)
{
@@ -127,20 +128,23 @@ QmlCustomParserNodePrivate::fromProperty(QmlParser::Property *p)
prop.d->name = p->name;
prop.d->isList = (p->values.count() > 1);
- for(int ii = 0; ii < p->values.count(); ++ii) {
- Value *v = p->values.at(ii);
+ if (p->value) {
+ QmlCustomParserNode node = fromObject(p->value);
+ QList<QmlCustomParserProperty> props = node.properties();
+ for (int ii = 0; ii < props.count(); ++ii)
+ prop.d->values << QVariant::fromValue(props.at(ii));
+ } else {
+ for(int ii = 0; ii < p->values.count(); ++ii) {
+ Value *v = p->values.at(ii);
+
+ if(v->object) {
+ QmlCustomParserNode node = fromObject(v->object);
+ prop.d->values << QVariant::fromValue(node);
+ } else {
+ prop.d->values << QVariant::fromValue(v->value);
+ }
- // We skip fetched properties for now
- if(v->object && v->object->type == -1)
- continue;
-
- if(v->object) {
- QmlCustomParserNode node = fromObject(v->object);
- prop.d->values << QVariant::fromValue(node);
- } else {
- prop.d->values << QVariant::fromValue(v->primitive());
}
-
}
return prop;
diff --git a/src/declarative/qml/qmlcustomparser_p.h b/src/declarative/qml/qmlcustomparser_p.h
index e4e6089..fd780d6 100644
--- a/src/declarative/qml/qmlcustomparser_p.h
+++ b/src/declarative/qml/qmlcustomparser_p.h
@@ -65,6 +65,8 @@ public:
QByteArray name() const;
bool isList() const;
+ // Will be one of QmlParser::Variant, QmlCustomParserProperty or
+ // QmlCustomParserNode
QList<QVariant> assignedValues() const;
private:
diff --git a/src/declarative/qml/qmldom.cpp b/src/declarative/qml/qmldom.cpp
index 673520e..9871fcb 100644
--- a/src/declarative/qml/qmldom.cpp
+++ b/src/declarative/qml/qmldom.cpp
@@ -477,12 +477,7 @@ QmlDomObjectPrivate::properties(QmlParser::Property *property) const
iter->second.prepend(name);
} else {
-
- // We don't display "id" sets as a property in the dom
- if (property->values.count() != 1 ||
- property->values.at(0)->type != QmlParser::Value::Id)
- rv << qMakePair(property, property->name);
-
+ rv << qMakePair(property, property->name);
}
return rv;
diff --git a/src/declarative/qml/qmlengine.cpp b/src/declarative/qml/qmlengine.cpp
index 227aeb0..c0ea463 100644
--- a/src/declarative/qml/qmlengine.cpp
+++ b/src/declarative/qml/qmlengine.cpp
@@ -193,6 +193,7 @@ void QmlEnginePrivate::clear(SimpleList<QmlParserStatus> &pss)
void QmlEnginePrivate::init()
{
+ scriptEngine.installTranslatorFunctions();
contextClass = new QmlContextScriptClass(q);
objectClass = new QmlObjectScriptClass(q);
rootContext = new QmlContext(q);
@@ -424,8 +425,8 @@ bool QmlEnginePrivate::loadCache(QmlBasicScriptNodeCache &cache, const QString &
\code
QmlEngine engine;
- QmlComponent component("Text { text: \"Hello world!\" }");
- QFxItem *item = qobject_cast<QFxItem *>(component.create(&engine));
+ QmlComponent component(&engine, "Text { text: \"Hello world!\" }");
+ QFxItem *item = qobject_cast<QFxItem *>(component.create());
//add item to view, etc
...
@@ -614,6 +615,35 @@ QUrl QmlEngine::componentUrl(const QUrl& src, const QUrl& baseUrl) const
}
/*!
+ Returns the list of base urls the engine browses to find sub-components.
+
+ The search path consists of the base of the \a url, and, in the case of local files,
+ the directories imported using the "import" statement in \a qml.
+ */
+QList<QUrl> QmlEngine::componentSearchPath(const QByteArray &qml, const QUrl &url) const
+{
+ QList<QUrl> searchPath;
+
+ searchPath << url.resolved(QUrl(QLatin1String(".")));
+
+ if (QFileInfo(url.toLocalFile()).exists()) {
+ QmlScriptParser parser;
+ if (parser.parse(qml, url)) {
+ for (int i = 0; i < parser.imports().size(); ++i) {
+ QUrl importUrl = QUrl(parser.imports().at(i).uri);
+ if (importUrl.isRelative()) {
+ searchPath << url.resolved(importUrl);
+ } else {
+ searchPath << importUrl;
+ }
+ }
+ }
+ }
+
+ return searchPath;
+}
+
+/*!
Sets the common QNetworkAccessManager, \a network, used by all QML elements instantiated
by this engine.
@@ -781,17 +811,17 @@ QmlEngine *QmlEngine::activeEngine()
QmlExpressionPrivate::QmlExpressionPrivate(QmlExpression *b)
-: q(b), ctxt(0), sseData(0), proxy(0), me(0), trackChange(false), id(0), log(0)
+: q(b), ctxt(0), sseData(0), proxy(0), me(0), trackChange(false), line(-1), id(0), log(0)
{
}
QmlExpressionPrivate::QmlExpressionPrivate(QmlExpression *b, void *expr, QmlRefCount *rc)
-: q(b), ctxt(0), sse((const char *)expr, rc), sseData(0), proxy(0), me(0), trackChange(true), id(0), log(0)
+: q(b), ctxt(0), sse((const char *)expr, rc), sseData(0), proxy(0), me(0), trackChange(true), line(-1), id(0), log(0)
{
}
QmlExpressionPrivate::QmlExpressionPrivate(QmlExpression *b, const QString &expr, bool ssecompile)
-: q(b), ctxt(0), expression(expr), sseData(0), proxy(0), me(0), trackChange(true), id(0), log(0)
+: q(b), ctxt(0), expression(expr), sseData(0), proxy(0), me(0), trackChange(true), line(-1), id(0), log(0)
{
if (ssecompile) {
#ifdef Q_ENABLE_PERFORMANCE_LOG
@@ -996,7 +1026,7 @@ QVariant QmlExpression::value()
for (int i = context()->d_func()->scopeChain.size() - 1; i > -1; --i) {
scriptEngine->currentContext()->pushScope(context()->d_func()->scopeChain.at(i));
}
- QScriptValue svalue = scriptEngine->evaluate(expression());
+ QScriptValue svalue = scriptEngine->evaluate(expression(), d->fileName, d->line);
if (scriptEngine->hasUncaughtException()) {
if (scriptEngine->uncaughtException().isError()){
QScriptValue exception = scriptEngine->uncaughtException();
@@ -1027,9 +1057,7 @@ QVariant QmlExpression::value()
}
rv = QVariant::fromValue(list);
}
- } /*else if (svalue.isVariant()) {
- rv = svalue.toVariant();
- }*/ else if (svalue.isObject()) {
+ } else if (svalue.isObject()) {
QScriptValue objValue = svalue.data();
if (objValue.isValid())
rv = objValue.toVariant();
@@ -1153,6 +1181,16 @@ void QmlExpression::setTrackChange(bool trackChange)
}
/*!
+ Set the location of this expression to \a line of \a fileName. This information
+ is used by the script engine.
+*/
+void QmlExpression::setSourceLocation(const QString &fileName, int line)
+{
+ d->fileName = fileName;
+ d->line = line;
+}
+
+/*!
Returns the expression's scope object, if provided, otherwise 0.
In addition to data provided by the expression's QmlContext, the scope
diff --git a/src/declarative/qml/qmlengine.h b/src/declarative/qml/qmlengine.h
index fde84d4..9382389 100644
--- a/src/declarative/qml/qmlengine.h
+++ b/src/declarative/qml/qmlengine.h
@@ -78,6 +78,8 @@ public:
QMap<QString,QString> nameSpacePaths() const;
QUrl componentUrl(const QUrl& src, const QUrl& baseUrl) const;
+ QList<QUrl> componentSearchPath(const QByteArray &qml, const QUrl &url) const;
+
void setNetworkAccessManager(QNetworkAccessManager *);
QNetworkAccessManager *networkAccessManager() const;
diff --git a/src/declarative/qml/qmlengine_p.h b/src/declarative/qml/qmlengine_p.h
index 7578fdf..0dc4736 100644
--- a/src/declarative/qml/qmlengine_p.h
+++ b/src/declarative/qml/qmlengine_p.h
@@ -42,9 +42,9 @@
#ifndef QMLENGINE_P_H
#define QMLENGINE_P_H
-#include <QScriptClass>
-#include <QScriptValue>
-#include <QScriptString>
+#include <QtScript/QScriptClass>
+#include <QtScript/QScriptValue>
+#include <QtScript/QScriptString>
#include <QtCore/qstring.h>
#include <QtCore/qlist.h>
#include <QtCore/qpair.h>
@@ -52,11 +52,11 @@
#include <private/qobject_p.h>
#include <private/qmlclassfactory_p.h>
#include <private/qmlcompositetypemanager_p.h>
-#include <qml.h>
-#include <qmlbasicscript.h>
-#include <qmlcontext.h>
-#include <qmlengine.h>
-#include <qmlexpression.h>
+#include <QtDeclarative/qml.h>
+#include <QtDeclarative/qmlbasicscript.h>
+#include <QtDeclarative/qmlcontext.h>
+#include <QtDeclarative/qmlengine.h>
+#include <QtDeclarative/qmlexpression.h>
#include <QtScript/qscriptengine.h>
QT_BEGIN_NAMESPACE
@@ -277,6 +277,8 @@ public:
BindExpressionProxy *proxy;
QObject *me;
bool trackChange;
+ QString fileName;
+ int line;
quint32 id;
diff --git a/src/declarative/qml/qmlexpression.h b/src/declarative/qml/qmlexpression.h
index 2c6b1ad..ea3b093 100644
--- a/src/declarative/qml/qmlexpression.h
+++ b/src/declarative/qml/qmlexpression.h
@@ -78,6 +78,8 @@ public:
bool trackChange() const;
void setTrackChange(bool);
+ void setSourceLocation(const QString &fileName, int line);
+
QObject *scopeObject() const;
quint32 id() const;
diff --git a/src/declarative/qml/qmlinstruction.cpp b/src/declarative/qml/qmlinstruction.cpp
index 6b49359..923d36f 100644
--- a/src/declarative/qml/qmlinstruction.cpp
+++ b/src/declarative/qml/qmlinstruction.cpp
@@ -124,18 +124,9 @@ void QmlCompiledComponent::dump(QmlInstruction *instr, int idx)
case QmlInstruction::StoreSignal:
qWarning() << idx << "\t" << line << "\t" << "STORE_SIGNAL\t\t" << instr->storeSignal.signalIndex << "\t" << instr->storeSignal.value << "\t\t" << primitives.at(instr->storeSignal.value);
break;
- case QmlInstruction::AssignConstant:
- qWarning() << idx << "\t" << line << "\t" << "ASSIGN_CONSTANT\t" << instr->assignConstant.property << "\t" << instr->assignConstant.constant << "\t\t" << datas.at(instr->assignConstant.property) << primitives.at(instr->assignConstant.constant);
- break;
case QmlInstruction::AssignSignalObject:
qWarning() << idx << "\t" << line << "\t" << "ASSIGN_SIGNAL_OBJECT\t" << instr->assignSignalObject.signal << "\t\t\t" << datas.at(instr->assignSignalObject.signal);
break;
- case QmlInstruction::AssignBinding:
- qWarning() << idx << "\t" << line << "\t" << "ASSIGN_BINDING\t\t" << instr->assignBinding.property << "\t" << instr->assignBinding.value << "\t\t" << instr->assignBinding.context << datas.at(instr->assignBinding.property) << primitives.at(instr->assignBinding.value);
- break;
- case QmlInstruction::AssignCompiledBinding:
- qWarning() << idx << "\t" << line << "\t" << "ASSIGN_COMPILED_BINDING\t" << instr->assignBinding.property << "\t" << instr->assignBinding.value << "\t\t" << instr->assignBinding.context << datas.at(instr->assignBinding.property);
- break;
case QmlInstruction::AssignValueSource:
qWarning() << idx << "\t" << line << "\t" << "ASSIGN_VALUE_SOURCE\t" << instr->assignValueSource.property << "\t\t\t" << datas.at(instr->assignValueSource.property);
break;
diff --git a/src/declarative/qml/qmlinstruction_p.h b/src/declarative/qml/qmlinstruction_p.h
index f06f0e6..a21ccee 100644
--- a/src/declarative/qml/qmlinstruction_p.h
+++ b/src/declarative/qml/qmlinstruction_p.h
@@ -42,7 +42,7 @@
#ifndef QMLINSTRUCTION_P_H
#define QMLINSTRUCTION_P_H
-#include <qfxglobal.h>
+#include <QtDeclarative/qfxglobal.h>
QT_BEGIN_NAMESPACE
@@ -110,14 +110,9 @@ public:
//
// Unresolved single assignment
//
- // AssignConstant - Store a value in a property. Will resolve into
- // a Store* instruction.
- AssignConstant, /* assignConstant */
AssignSignalObject, /* assignSignalObject */
AssignCustomType, /* assignCustomType */
- AssignBinding, /* assignBinding */
- AssignCompiledBinding, /* assignBinding */
AssignValueSource, /* assignValueSource */
StoreBinding, /* assignBinding */
StoreCompiledBinding, /* assignBinding */
@@ -187,10 +182,6 @@ public:
} setId;
struct {
int property;
- int constant;
- } assignConstant;
- struct {
- int property;
int castValue;
} assignObject;
struct {
diff --git a/src/declarative/qml/qmlmetaproperty.cpp b/src/declarative/qml/qmlmetaproperty.cpp
index 59d6b38..e3e9ff5 100644
--- a/src/declarative/qml/qmlmetaproperty.cpp
+++ b/src/declarative/qml/qmlmetaproperty.cpp
@@ -100,9 +100,16 @@ QmlMetaProperty::~QmlMetaProperty()
delete d; d = 0;
}
-// ### not thread safe
-static QHash<const QMetaObject *, QMetaPropertyEx> qmlCacheDefProp;
+struct CachedPropertyData {
+ CachedPropertyData(const QString &n, int pt, int ci)
+ : name(n), propType(pt), coreIdx(ci) {}
+ QString name;
+ int propType;
+ int coreIdx;
+};
+// ### not thread safe
+static QHash<const QMetaObject *, CachedPropertyData> qmlCacheDefProp;
/*!
Creates a QmlMetaProperty for the default property of \a obj. If there is no
@@ -131,23 +138,22 @@ void QmlMetaProperty::initDefault(QObject *obj)
return;
d->object = obj;
- QHash<const QMetaObject *, QMetaPropertyEx>::ConstIterator iter =
+ QHash<const QMetaObject *, CachedPropertyData>::ConstIterator iter =
qmlCacheDefProp.find(obj->metaObject());
if (iter != qmlCacheDefProp.end()) {
- d->prop = *iter;
- d->propType = iter->propertyType;
- d->coreIdx = iter->propertyType;
+ d->name = iter->name;
+ d->propType = iter->propType;
+ d->coreIdx = iter->coreIdx;
} else {
QMetaPropertyEx p(QmlMetaType::defaultProperty(obj));
- d->prop = p;
+ d->name = QLatin1String(p.name());
d->propType = p.propertyType;
- d->coreIdx = d->prop.propertyIndex();
+ d->coreIdx = p.propertyIndex();
if (!QObjectPrivate::get(obj)->metaObject)
- qmlCacheDefProp.insert(obj->metaObject(), d->prop);
+ qmlCacheDefProp.insert(obj->metaObject(), CachedPropertyData(d->name, d->propType, d->coreIdx));
}
- if (d->prop.name() != 0) {
+ if (!d->name.isEmpty()) {
d->type = Property | Default;
- d->name = QLatin1String(d->prop.name());
}
}
@@ -166,15 +172,14 @@ QmlMetaProperty::QmlMetaProperty(QObject *obj, int idx, PropertyCategory cat, Qm
d->type = Property;
d->category = cat;
QMetaPropertyEx p(obj->metaObject()->property(idx));
- d->prop = p;
d->propType = p.propertyType;
d->coreIdx = idx;
- if (d->prop.name() != 0)
- d->name = QLatin1String(d->prop.name());
+ if (p.name() != 0)
+ d->name = QLatin1String(p.name());
}
// ### Not thread safe!!!!
-static QHash<const QMetaObject *, QHash<QString, QMetaPropertyEx> > qmlCacheProps;
+static QHash<const QMetaObject *, QHash<QString, CachedPropertyData> > qmlCacheProps;
/*!
Creates a QmlMetaProperty for the property \a name of \a obj.
*/
@@ -225,21 +230,21 @@ void QmlMetaProperty::initProperty(QObject *obj, const QString &name)
}
// Property
- QHash<QString, QMetaPropertyEx> &props = qmlCacheProps[obj->metaObject()];
- QHash<QString, QMetaPropertyEx>::ConstIterator iter = props.find(name);
+ QHash<QString, CachedPropertyData> &props = qmlCacheProps[obj->metaObject()];
+ QHash<QString, CachedPropertyData>::ConstIterator iter = props.find(name);
if (iter != props.end()) {
- d->prop = *iter;
- d->propType = iter->propertyType;
- d->coreIdx = iter->propertyIndex();
+ d->name = iter->name;
+ d->propType = iter->propType;
+ d->coreIdx = iter->coreIdx;
} else {
QMetaPropertyEx p = QmlMetaType::property(obj, name.toLatin1().constData());
- d->prop = p;
+ d->name = QLatin1String(p.name());
d->propType = p.propertyType;
d->coreIdx = p.propertyIndex();
if (!QObjectPrivate::get(obj)->metaObject)
- props.insert(name, p);
+ props.insert(name, CachedPropertyData(d->name, d->propType, d->coreIdx));
}
- if (d->prop.name() != 0)
+ if (!d->name.isEmpty())
d->type = Property;
if (d->type == Invalid) {
@@ -352,8 +357,8 @@ QmlMetaProperty::propertyCategory(const QMetaProperty &prop)
*/
const char *QmlMetaProperty::propertyTypeName() const
{
- if (d->prop.name()) {
- return d->prop.typeName();
+ if (!d->name.isEmpty()) {
+ return d->object->metaObject()->property(d->coreIdx).typeName();
} else {
return 0;
}
@@ -365,7 +370,7 @@ const char *QmlMetaProperty::propertyTypeName() const
*/
bool QmlMetaProperty::operator==(const QmlMetaProperty &other) const
{
- return d->prop.name() == other.d->prop.name() &&
+ return d->name == other.d->name &&
d->signal.signature() == other.d->signal.signature() &&
d->type == other.d->type &&
d->object == other.d->object;
@@ -384,7 +389,7 @@ int QmlMetaPropertyPrivate::propertyType() const
{
int rv = QVariant::Invalid;
- if (prop.name()) {
+ if (!name.isEmpty()) {
if (propType == (int)QVariant::LastType)
rv = qMetaTypeId<QVariant>();
else
@@ -434,7 +439,6 @@ QObject *QmlMetaProperty::object() const
QmlMetaProperty &QmlMetaProperty::operator=(const QmlMetaProperty &other)
{
d->name = other.d->name;
- d->prop = other.d->prop;
d->propType = other.d->propType;
d->type = other.d->type;
d->signal = other.d->signal;
@@ -452,8 +456,8 @@ bool QmlMetaProperty::isWritable() const
{
if (propertyCategory() == List || propertyCategory() == QmlList)
return true;
- else if (d->prop.name() != 0)
- return d->prop.isWritable();
+ else if (!d->name.isEmpty())
+ return d->object->metaObject()->property(d->coreIdx).isWritable();
else if (type() & SignalProperty)
return true;
else
@@ -465,8 +469,8 @@ bool QmlMetaProperty::isWritable() const
*/
bool QmlMetaProperty::isDesignable() const
{
- if (d->prop.name() != 0)
- return d->prop.isDesignable();
+ if (!d->name.isEmpty())
+ return d->object->metaObject()->property(d->coreIdx).isDesignable();
else
return false;
}
@@ -510,9 +514,9 @@ QString QmlMetaProperty::name() const
Returns the \l{QMetaProperty} {Qt property} associated with
this QML property.
*/
-const QMetaProperty &QmlMetaProperty::property() const
+QMetaProperty QmlMetaProperty::property() const
{
- return d->prop;
+ return d->object->metaObject()->property(d->coreIdx);
}
/*!
@@ -602,7 +606,7 @@ QVariant QmlMetaProperty::read() const
if (type() & Attached)
return QVariant::fromValue(d->attachedObject());
else
- return d->prop.read(object());
+ return d->object->metaObject()->property(d->coreIdx).read(object());
}
return QVariant();
}
@@ -636,6 +640,7 @@ void QmlMetaPropertyPrivate::writeSignalProperty(const QVariant &value)
void QmlMetaPropertyPrivate::writeValueProperty(const QVariant &value)
{
+ QMetaProperty prop = object->metaObject()->property(coreIdx);
if (prop.isEnumType()) {
QVariant v = value;
if (value.type() == QVariant::Double) { //enum values come through the script engine as doubles
@@ -805,13 +810,14 @@ void QmlMetaPropertyPrivate::writeValueProperty(const QVariant &value)
*/
void QmlMetaProperty::write(const QVariant &value) const
{
+ QMetaProperty prop = d->object->metaObject()->property(d->coreIdx);
if (type() & SignalProperty) {
d->writeSignalProperty(value);
- } else if (d->prop.name()) {
+ } else if (prop.name()) {
- if (d->prop.isEnumType()) {
+ if (prop.isEnumType()) {
QVariant v = value;
if (value.type() == QVariant::Double) { //enum values come through the script engine as doubles
double integral;
@@ -819,7 +825,7 @@ void QmlMetaProperty::write(const QVariant &value) const
if (qFuzzyCompare(fractional, (double)0.0))
v.convert(QVariant::Int);
}
- d->prop.write(object(), v);
+ prop.write(object(), v);
} else {
if (!value.isValid())
return;
@@ -836,13 +842,13 @@ void QmlMetaProperty::write(const QVariant &value) const
} else if (qMetaTypeId<QVariant>() == t) {
- d->prop.write(object(), value);
+ prop.write(object(), value);
} else if (propertyCategory() == Object) {
QObject *o = QmlMetaType::toQObject(value);
if (o)
- d->prop.write(object(), QmlMetaType::fromObject(o, propertyType()));
+ prop.write(object(), QmlMetaType::fromObject(o, propertyType()));
} else if (propertyCategory() == List) {
@@ -850,7 +856,7 @@ void QmlMetaProperty::write(const QVariant &value) const
if (value.userType() == qMetaTypeId<QList<QObject *> >()) {
const QList<QObject *> &list =
qvariant_cast<QList<QObject *> >(value);
- QVariant listVar = d->prop.read(object());
+ QVariant listVar = prop.read(object());
QmlMetaType::clear(listVar);
for (int ii = 0; ii < list.count(); ++ii) {
QVariant v = QmlMetaType::fromObject(list.at(ii), listType);
@@ -859,14 +865,14 @@ void QmlMetaProperty::write(const QVariant &value) const
} else if (vt == listType ||
value.userType() == listType) {
- QVariant listVar = d->prop.read(object());
+ QVariant listVar = prop.read(object());
if (!QmlMetaType::append(listVar, value)) {
qWarning() << "QmlMetaProperty: Unable to assign object to list";
}
}
} else if (propertyCategory() == QmlList) {
// XXX - optimize!
- QVariant list = d->prop.read(object());
+ QVariant list = prop.read(object());
QmlPrivate::ListInterface *li =
*(QmlPrivate::ListInterface **)list.constData();
@@ -969,7 +975,7 @@ void QmlMetaProperty::write(const QVariant &value) const
default:
break;
}
- d->prop.write(object(), value);
+ prop.write(object(), value);
}
}
@@ -982,7 +988,7 @@ void QmlMetaProperty::write(const QVariant &value) const
bool QmlMetaProperty::hasChangedNotifier() const
{
if (type() & Property && !(type() & Attached)) {
- return d->prop.hasNotifySignal();
+ return d->object->metaObject()->property(d->coreIdx).hasNotifySignal();
}
return false;
}
@@ -1012,8 +1018,9 @@ bool QmlMetaProperty::connectNotifier(QObject *dest, int method) const
if (!(type() & Property) || type() & Attached)
return false;
- if (d->prop.hasNotifySignal()) {
- return QMetaObject::connect(d->object, d->prop.notifySignalIndex(), dest, method, Qt::DirectConnection);
+ QMetaProperty prop = d->object->metaObject()->property(d->coreIdx);
+ if (prop.hasNotifySignal()) {
+ return QMetaObject::connect(d->object, prop.notifySignalIndex(), dest, method, Qt::DirectConnection);
} else {
return false;
}
@@ -1032,8 +1039,9 @@ bool QmlMetaProperty::connectNotifier(QObject *dest, const char *slot) const
if (!(type() & Property) || type() & Attached)
return false;
- if (d->prop.hasNotifySignal()) {
- QByteArray signal(QByteArray("2") + d->prop.notifySignal().signature());
+ QMetaProperty prop = d->object->metaObject()->property(d->coreIdx);
+ if (prop.hasNotifySignal()) {
+ QByteArray signal(QByteArray("2") + prop.notifySignal().signature());
return QObject::connect(d->object, signal.constData(), dest, slot);
} else {
return false;
@@ -1098,7 +1106,7 @@ void QmlMetaProperty::restore(quint32 id, QObject *obj)
d->attachedFunc = id;
} else if (d->type & Property) {
QMetaPropertyEx p(obj->metaObject()->property(id));
- d->prop = p;
+ d->name = QLatin1String(p.name());
d->propType = p.propertyType;
d->coreIdx = id;
} else if (d->type & SignalProperty || d->type & Signal) {
diff --git a/src/declarative/qml/qmlmetaproperty.h b/src/declarative/qml/qmlmetaproperty.h
index 68b06e5..9daef59 100644
--- a/src/declarative/qml/qmlmetaproperty.h
+++ b/src/declarative/qml/qmlmetaproperty.h
@@ -43,7 +43,7 @@
#define QMLMETAPROPERTY_H
#include <QtDeclarative/qfxglobal.h>
-#include <QMetaProperty>
+#include <QtCore/QMetaProperty>
QT_BEGIN_HEADER
@@ -121,7 +121,7 @@ public:
bool operator==(const QmlMetaProperty &) const;
- const QMetaProperty &property() const;
+ QMetaProperty property() const;
QmlBindableValue *binding();
static int findSignal(const QObject *, const char *);
diff --git a/src/declarative/qml/qmlmetaproperty_p.h b/src/declarative/qml/qmlmetaproperty_p.h
index 1ea38e9..738bfec 100644
--- a/src/declarative/qml/qmlmetaproperty_p.h
+++ b/src/declarative/qml/qmlmetaproperty_p.h
@@ -54,7 +54,7 @@ public:
QmlMetaPropertyPrivate(const QmlMetaPropertyPrivate &other)
: name(other.name), signal(other.signal), context(other.context),
coreIdx(other.coreIdx), type(other.type), attachedFunc(other.attachedFunc),
- object(other.object), prop(other.prop), propType(other.propType),
+ object(other.object), propType(other.propType),
category(other.category) {}
QString name;
@@ -64,7 +64,6 @@ public:
uint type;
int attachedFunc;
QObject *object;
- QMetaProperty prop;
int propType;
mutable QmlMetaProperty::PropertyCategory category;
diff --git a/src/declarative/qml/qmlmetatype.cpp b/src/declarative/qml/qmlmetatype.cpp
index 7825e5c..2e490a4 100644
--- a/src/declarative/qml/qmlmetatype.cpp
+++ b/src/declarative/qml/qmlmetatype.cpp
@@ -95,8 +95,8 @@ struct QmlMetaTypeData
QBitArray qmllists;
QBitArray lists;
};
-Q_GLOBAL_STATIC(QmlMetaTypeData, metaTypeData);
-Q_GLOBAL_STATIC(QReadWriteLock, metaTypeDataLock);
+Q_GLOBAL_STATIC(QmlMetaTypeData, metaTypeData)
+Q_GLOBAL_STATIC(QReadWriteLock, metaTypeDataLock)
class QmlTypePrivate
{
@@ -388,7 +388,8 @@ int QmlMetaType::registerInterface(const QmlPrivate::MetaTypeIds &id,
data->idToType.insert(type->typeId(), type);
data->idToType.insert(type->qListTypeId(), type);
data->idToType.insert(type->qmlListTypeId(), type);
- data->nameToType.insert(type->qmlTypeName(), type);
+ if (!type->qmlTypeName().isEmpty())
+ data->nameToType.insert(type->qmlTypeName(), type);
if (data->interfaces.size() < id.typeId)
data->interfaces.resize(id.typeId + 16);
@@ -864,6 +865,14 @@ QmlType *QmlMetaType::qmlType(const QByteArray &name)
return data->nameToType.value(name);
}
+QmlType *QmlMetaType::qmlType(const QMetaObject *metaObject)
+{
+ QReadLocker lock(metaTypeDataLock());
+ QmlMetaTypeData *data = metaTypeData();
+
+ return data->metaObjectToType.value(metaObject);
+}
+
QList<QByteArray> QmlMetaType::qmlTypeNames()
{
QReadLocker lock(metaTypeDataLock());
diff --git a/src/declarative/qml/qmlmetatype.h b/src/declarative/qml/qmlmetatype.h
index 7ab01a5..cc3887c 100644
--- a/src/declarative/qml/qmlmetatype.h
+++ b/src/declarative/qml/qmlmetatype.h
@@ -64,9 +64,11 @@ public:
static bool copy(int type, void *data, const void *copy = 0);
- static QmlType *qmlType(const QByteArray &);
static QList<QByteArray> qmlTypeNames();
+ static QmlType *qmlType(const QByteArray &);
+ static QmlType *qmlType(const QMetaObject *);
+
static QMetaProperty defaultProperty(const QMetaObject *);
static QMetaProperty defaultProperty(QObject *);
static QMetaMethod defaultMethod(const QMetaObject *);
@@ -108,7 +110,7 @@ public:
};
class QmlTypePrivate;
-class QmlType
+class Q_DECLARATIVE_EXPORT QmlType
{
public:
QByteArray typeName() const;
diff --git a/src/declarative/qml/qmlparser_p.h b/src/declarative/qml/qmlparser_p.h
index d4f279b..add5773 100644
--- a/src/declarative/qml/qmlparser_p.h
+++ b/src/declarative/qml/qmlparser_p.h
@@ -42,10 +42,10 @@
#ifndef QMLPARSER_P_H
#define QMLPARSER_P_H
-#include <QByteArray>
-#include <QList>
+#include <QtCore/QByteArray>
+#include <QtCore/QList>
#include <QtCore/qstring.h>
-#include <qml.h>
+#include <QtDeclarative/qml.h>
#include <private/qmlrefcount_p.h>
#include <private/qobject_p.h>
@@ -272,10 +272,10 @@ namespace QmlParser
void dump(int = 0) const;
};
}
-
-#endif // QMLPARSER_P_H
-
+Q_DECLARE_METATYPE(QmlParser::Variant);
QT_END_NAMESPACE
QT_END_HEADER
+
+#endif // QMLPARSER_P_H
diff --git a/src/declarative/qml/qmlpropertyvaluesource.h b/src/declarative/qml/qmlpropertyvaluesource.h
index 6ef2e38..736b25f 100644
--- a/src/declarative/qml/qmlpropertyvaluesource.h
+++ b/src/declarative/qml/qmlpropertyvaluesource.h
@@ -42,9 +42,9 @@
#ifndef QMLPROPERTYVALUESOURCE_H
#define QMLPROPERTYVALUESOURCE_H
-#include <qfxglobal.h>
-#include <qml.h>
-#include <QObject>
+#include <QtDeclarative/qfxglobal.h>
+#include <QtDeclarative/qml.h>
+#include <QtCore/QObject>
QT_BEGIN_HEADER
diff --git a/src/declarative/qml/qmlproxymetaobject_p.h b/src/declarative/qml/qmlproxymetaobject_p.h
index 594e7a3..0ffa365 100644
--- a/src/declarative/qml/qmlproxymetaobject_p.h
+++ b/src/declarative/qml/qmlproxymetaobject_p.h
@@ -42,11 +42,11 @@
#ifndef QMLPROXYMETAOBJECT_P_H
#define QMLPROXYMETAOBJECT_P_H
-#include <QMetaObject>
+#include <QtCore/QMetaObject>
+#include <QtCore/QObject>
#include <private/qmetaobjectbuilder_p.h>
#include <private/qobject_p.h>
-#include <QObject>
-#include <qml.h>
+#include <QtDeclarative/qml.h>
QT_BEGIN_HEADER
diff --git a/src/declarative/qml/qmlrefcount_p.h b/src/declarative/qml/qmlrefcount_p.h
index 90b50a8..1355c86 100644
--- a/src/declarative/qml/qmlrefcount_p.h
+++ b/src/declarative/qml/qmlrefcount_p.h
@@ -42,7 +42,7 @@
#ifndef QMLREFCOUNT_P_H
#define QMLREFCOUNT_P_H
-#include <qglobal.h>
+#include <QtCore/qglobal.h>
QT_BEGIN_HEADER
diff --git a/src/declarative/qml/qmlscriptparser.cpp b/src/declarative/qml/qmlscriptparser.cpp
index ff19d25..ead7ee5 100644
--- a/src/declarative/qml/qmlscriptparser.cpp
+++ b/src/declarative/qml/qmlscriptparser.cpp
@@ -62,18 +62,16 @@ public:
void operator()(const QString &code, AST::Node *node);
protected:
- Object *defineObjectBinding(int line,
- AST::UiQualifiedId *propertyName,
- const QString &objectType,
- AST::SourceLocation typeLocation,
- LocationSpan location,
- AST::UiObjectInitializer *initializer = 0);
- Object *defineObjectBinding_helper(int line,
- AST::UiQualifiedId *propertyName,
- const QString &objectType,
- AST::SourceLocation typeLocation,
- LocationSpan location,
- AST::UiObjectInitializer *initializer = 0);
+ Object *defineObjectBinding(AST::UiQualifiedId *propertyName,
+ AST::UiQualifiedId *objectTypeName,
+ LocationSpan location,
+ AST::UiObjectInitializer *initializer = 0);
+
+ Object *defineObjectBinding_helper(AST::UiQualifiedId *propertyName,
+ const QString &objectType,
+ AST::SourceLocation typeLocation,
+ LocationSpan location,
+ AST::UiObjectInitializer *initializer = 0);
QmlParser::Variant getVariant(AST::ExpressionNode *expr);
@@ -199,8 +197,7 @@ QString ProcessAST::asString(AST::UiQualifiedId *node) const
}
Object *
-ProcessAST::defineObjectBinding_helper(int line,
- AST::UiQualifiedId *propertyName,
+ProcessAST::defineObjectBinding_helper(AST::UiQualifiedId *propertyName,
const QString &objectType,
AST::SourceLocation typeLocation,
LocationSpan location,
@@ -283,16 +280,17 @@ ProcessAST::defineObjectBinding_helper(int line,
}
}
-Object *ProcessAST::defineObjectBinding(int line,
- AST::UiQualifiedId *qualifiedId,
- const QString &objectType,
- AST::SourceLocation typeLocation,
- LocationSpan location,
- AST::UiObjectInitializer *initializer)
+Object *ProcessAST::defineObjectBinding(AST::UiQualifiedId *qualifiedId,
+ AST::UiQualifiedId *objectTypeName,
+ LocationSpan location,
+ AST::UiObjectInitializer *initializer)
{
+ const QString objectType = asString(objectTypeName);
+ const AST::SourceLocation typeLocation = objectTypeName->identifierToken;
+
if (objectType == QLatin1String("Connection")) {
- Object *obj = defineObjectBinding_helper(line, 0, objectType, typeLocation, location);
+ Object *obj = defineObjectBinding_helper(/*propertyName = */0, objectType, typeLocation, location);
_stateStack.pushObject(obj);
@@ -331,7 +329,7 @@ Object *ProcessAST::defineObjectBinding(int line,
return obj;
}
- return defineObjectBinding_helper(line, qualifiedId, objectType, typeLocation, location, initializer);
+ return defineObjectBinding_helper(qualifiedId, objectType, typeLocation, location, initializer);
}
LocationSpan ProcessAST::location(AST::UiQualifiedId *id)
@@ -446,16 +444,14 @@ bool ProcessAST::visit(AST::UiPublicMember *node)
}
-// UiObjectMember: T_IDENTIFIER UiObjectInitializer ;
+// UiObjectMember: UiQualifiedId UiObjectInitializer ;
bool ProcessAST::visit(AST::UiObjectDefinition *node)
{
LocationSpan l = location(node->firstSourceLocation(),
- node->lastSourceLocation());;
+ node->lastSourceLocation());
- defineObjectBinding(node->identifierToken.startLine,
- 0,
- node->name->asString(),
- node->identifierToken,
+ defineObjectBinding(/*propertyName = */ 0,
+ node->qualifiedTypeNameId,
l,
node->initializer);
@@ -463,16 +459,14 @@ bool ProcessAST::visit(AST::UiObjectDefinition *node)
}
-// UiObjectMember: UiQualifiedId T_COLON T_IDENTIFIER UiObjectInitializer ;
+// UiObjectMember: UiQualifiedId T_COLON UiQualifiedId UiObjectInitializer ;
bool ProcessAST::visit(AST::UiObjectBinding *node)
{
- LocationSpan l;
- l = location(node->identifierToken, node->initializer->rbraceToken);
+ LocationSpan l = location(node->qualifiedTypeNameId->identifierToken,
+ node->initializer->rbraceToken);
- defineObjectBinding(node->identifierToken.startLine,
- node->qualifiedId,
- node->name->asString(),
- node->identifierToken,
+ defineObjectBinding(node->qualifiedId,
+ node->qualifiedTypeNameId,
l,
node->initializer);
@@ -632,20 +626,19 @@ bool QmlScriptParser::parse(const QByteArray &data, const QUrl &url)
QTextStream stream(data, QIODevice::ReadOnly);
const QString code = stream.readAll();
- JavaScriptParser parser;
- JavaScriptEnginePrivate driver;
+ Engine engine;
- NodePool nodePool(fileName, &driver);
- driver.setNodePool(&nodePool);
+ NodePool nodePool(fileName, &engine);
- Lexer lexer(&driver);
+ Lexer lexer(&engine);
lexer.setCode(code, /*line = */ 1);
- driver.setLexer(&lexer);
- if (! parser.parse(&driver) || !_errors.isEmpty()) {
+ Parser parser(&engine);
+
+ if (! parser.parse() || !_errors.isEmpty()) {
// Extract errors from the parser
- foreach (const JavaScriptParser::DiagnosticMessage &m, parser.diagnosticMessages()) {
+ foreach (const DiagnosticMessage &m, parser.diagnosticMessages()) {
if (m.isWarning())
continue;
diff --git a/src/declarative/qml/qmlvme.cpp b/src/declarative/qml/qmlvme.cpp
index 51534e7..1552cb5 100644
--- a/src/declarative/qml/qmlvme.cpp
+++ b/src/declarative/qml/qmlvme.cpp
@@ -87,10 +87,7 @@ Q_DECLARE_PERFORMANCE_LOG(QFxCompiler) {
Q_DECLARE_PERFORMANCE_METRIC(InstrStoreObject);
Q_DECLARE_PERFORMANCE_METRIC(InstrStoreSignal);
Q_DECLARE_PERFORMANCE_METRIC(InstrStoreObjectQmlList);
- Q_DECLARE_PERFORMANCE_METRIC(InstrAssignConstant);
Q_DECLARE_PERFORMANCE_METRIC(InstrAssignSignalObject);
- Q_DECLARE_PERFORMANCE_METRIC(InstrAssignBinding);
- Q_DECLARE_PERFORMANCE_METRIC(InstrAssignCompiledBinding);
Q_DECLARE_PERFORMANCE_METRIC(InstrAssignValueSource);
Q_DECLARE_PERFORMANCE_METRIC(InstrStoreBinding);
Q_DECLARE_PERFORMANCE_METRIC(InstrStoreCompiledBinding);
@@ -136,10 +133,7 @@ Q_DEFINE_PERFORMANCE_LOG(QFxCompiler, "QFxCompiler") {
Q_DEFINE_PERFORMANCE_METRIC(InstrStoreObject, "StoreObject");
Q_DEFINE_PERFORMANCE_METRIC(InstrStoreSignal, "StoreSignal");
Q_DEFINE_PERFORMANCE_METRIC(InstrStoreObjectQmlList, "StoreObjectQmlList");
- Q_DEFINE_PERFORMANCE_METRIC(InstrAssignConstant, "AssignConstant");
Q_DEFINE_PERFORMANCE_METRIC(InstrAssignSignalObject, "AssignSignalObject");
- Q_DEFINE_PERFORMANCE_METRIC(InstrAssignBinding, "AssignBinding");
- Q_DEFINE_PERFORMANCE_METRIC(InstrAssignCompiledBinding, "AssignCompiledBinding");
Q_DEFINE_PERFORMANCE_METRIC(InstrAssignValueSource, "AssignValueSource");
Q_DEFINE_PERFORMANCE_METRIC(InstrStoreBinding, "StoreBinding");
Q_DEFINE_PERFORMANCE_METRIC(InstrStoreCompiledBinding, "StoreCompiledBinding");
@@ -409,64 +403,6 @@ QObject *QmlVME::run(QmlContext *ctxt, QmlCompiledComponent *comp, int start, in
}
break;
- case QmlInstruction::AssignConstant:
- {
-#ifdef Q_ENABLE_PERFORMANCE_LOG
- QFxCompilerTimer<QFxCompiler::InstrAssignConstant> cc;
-#endif
- // Fixup instruction
- QObject *target = stack.top();
- int propIdx = instr.assignConstant.property;
- int idx = instr.assignConstant.constant;
- QByteArray pr;
- if (propIdx == -1) {
- pr = QmlMetaType::defaultProperty(target).name();
- if (pr.isEmpty())
- VME_EXCEPTION("Cannot resolve defalt property on type" << target->metaObject()->className());
- } else {
- pr = datas.at(propIdx);
- }
-
- int coreIdx = qIndexOfProperty(target, pr);
-
- if (coreIdx != -1) {
- QMetaProperty prop =
- target->metaObject()->property(coreIdx);
- bool replace = !prop.isDynamic();
-
- QmlInstruction *writeInstr = 0;
- QmlInstruction dummy;
- if (replace) {
- writeInstr = &instr;
- } else {
- writeInstr = &dummy;
- dummy = instr;
- }
-
- QmlCompiler::StoreInstructionResult r = QmlCompiler::generateStoreInstruction(*comp, *writeInstr, prop,
- coreIdx, idx, &primitives.at(idx));
- if (r != QmlCompiler::Ok) {
- if (prop.isEnumType()){
- VME_EXCEPTION(primitives.at(idx) << "is not a valid enumeration value");
- } else if (r == QmlCompiler::UnknownType) {
- VME_EXCEPTION("Property" << prop.name() << "is of an unknown type");
- } else if (r == QmlCompiler::InvalidData) {
- VME_EXCEPTION("Cannot assign value" << primitives.at(idx) << "to property" << prop.name());
- } else if (r == QmlCompiler::ReadOnly) {
- VME_EXCEPTION("Cannot assign value" << primitives.at(idx) << "to read-only property" << prop.name());
- } else {
- VME_EXCEPTION("Invalid property assignment for property" << prop.name());
- }
- } else {
- runStoreInstruction(stack, *writeInstr, comp);
- }
-
- } else {
- VME_EXCEPTION("Unknown property" << pr);
- }
- }
- break;
-
case QmlInstruction::TryBeginObject:
{
#ifdef Q_ENABLE_PERFORMANCE_LOG
@@ -530,31 +466,6 @@ QObject *QmlVME::run(QmlContext *ctxt, QmlCompiledComponent *comp, int start, in
}
break;
- case QmlInstruction::AssignCompiledBinding:
- case QmlInstruction::AssignBinding:
- {
-#ifdef Q_ENABLE_PERFORMANCE_LOG
- QFxCompilerTimer<QFxCompiler::InstrAssignBinding> cc;
-#endif
- QObject *target = stack.top();
- const QByteArray &pr = datas.at(instr.fetch.property);
- int idx = qIndexOfProperty(target, pr);
-
- // XXX - need to check if the type is QmlBindableValue*
- if (idx == -1) {
- VME_EXCEPTION("Unknown property" << pr);
- } else {
- if (QmlInstruction::AssignCompiledBinding == instr.type)
- instr.type = QmlInstruction::StoreCompiledBinding;
- else
- instr.type = QmlInstruction::StoreBinding;
- instr.assignBinding.property = idx;
- instr.assignBinding.category = QmlMetaProperty::Unknown;
- }
- ii--;
- }
- break;
-
case QmlInstruction::AssignValueSource:
{
QObject *target = stack.at(stack.count() - 2);
@@ -613,6 +524,7 @@ QObject *QmlVME::run(QmlContext *ctxt, QmlCompiledComponent *comp, int start, in
QFx_setParent_noEvent(bind, target);
bind->setTarget(mp);
+ bind->setSourceLocation(comp->url.toString(), instr.line);
}
break;
@@ -638,6 +550,7 @@ QObject *QmlVME::run(QmlContext *ctxt, QmlCompiledComponent *comp, int start, in
QFx_setParent_noEvent(bind, target);
bind->setTarget(mp);
+ bind->setSourceLocation(comp->url.toString(), instr.line);
}
break;
diff --git a/src/declarative/qml/qmlvme_p.h b/src/declarative/qml/qmlvme_p.h
index f7e13d6..4e5c6c1 100644
--- a/src/declarative/qml/qmlvme_p.h
+++ b/src/declarative/qml/qmlvme_p.h
@@ -42,12 +42,12 @@
#ifndef QMLVME_P_H
#define QMLVME_P_H
-#include <QString>
-#include <QStack>
-#include <qmlerror.h>
-class QObject;
+#include <QtCore/QString>
+#include <QtCore/QStack>
+#include <QtDeclarative/qmlerror.h>
QT_BEGIN_NAMESPACE
+class QObject;
class QmlInstruction;
class QmlCompiledComponent;
class QmlCompiledData;
diff --git a/src/declarative/qml/qmlvmemetaobject_p.h b/src/declarative/qml/qmlvmemetaobject_p.h
index d8ed242..6f1e31b 100644
--- a/src/declarative/qml/qmlvmemetaobject_p.h
+++ b/src/declarative/qml/qmlvmemetaobject_p.h
@@ -42,9 +42,9 @@
#ifndef QMLVMEMETAOBJECT_P_H
#define QMLVMEMETAOBJECT_P_H
-#include <qml.h>
-#include <QMetaObject>
-#include <QBitArray>
+#include <QtDeclarative/qml.h>
+#include <QtCore/QMetaObject>
+#include <QtCore/QBitArray>
#include <private/qobject_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/declarative/qml/script/lexer.h b/src/declarative/qml/script/lexer.h
index 7781ee8..9de4afd 100644
--- a/src/declarative/qml/script/lexer.h
+++ b/src/declarative/qml/script/lexer.h
@@ -11,7 +11,7 @@
#ifndef LEXER_H
#define LEXER_H
-#include <QList>
+#include <QtCore/QList>
#include "tokens.h"
diff --git a/src/declarative/qml/script/qmlbasicscript.h b/src/declarative/qml/script/qmlbasicscript.h
index d465f04..5ef2148 100644
--- a/src/declarative/qml/script/qmlbasicscript.h
+++ b/src/declarative/qml/script/qmlbasicscript.h
@@ -13,10 +13,10 @@
#define QMLBASICSCRIPT_H
#include "instructions.h"
-#include <QList>
-#include <QByteArray>
+#include <QtCore/QList>
+#include <QtCore/QByteArray>
#include "lexer.h"
-#include <QVariant>
+#include <QtCore/QVariant>
QT_BEGIN_HEADER