From 03e18459dbe8dabc6b504ea675260e23c9540f6c Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Wed, 29 Apr 2009 14:32:41 +1000 Subject: Re-enable property syntax and add a "default" specifier --- src/declarative/qml/parser/javascript.g | 26 + src/declarative/qml/parser/javascriptast_p.h | 5 +- src/declarative/qml/parser/javascriptgrammar.cpp | 1035 +++++++++++----------- src/declarative/qml/parser/javascriptgrammar_p.h | 10 +- src/declarative/qml/parser/javascriptlexer.cpp | 2 +- src/declarative/qml/parser/javascriptparser.cpp | 380 ++++---- src/declarative/qml/parser/javascriptparser_p.h | 4 +- src/declarative/qml/qmlcompiler.cpp | 4 +- src/declarative/qml/qmlscriptparser.cpp | 5 + 9 files changed, 768 insertions(+), 703 deletions(-) diff --git a/src/declarative/qml/parser/javascript.g b/src/declarative/qml/parser/javascript.g index 961041e..2284e93 100644 --- a/src/declarative/qml/parser/javascript.g +++ b/src/declarative/qml/parser/javascript.g @@ -630,6 +630,18 @@ case $rule_number: { } break; ./ +UiObjectMember: T_PUBLIC T_DEFAULT T_IDENTIFIER T_IDENTIFIER ; +/. +case $rule_number: { + AST::UiPublicMember *node = makeAstNode (driver->nodePool(), sym(3).sval, sym(4).sval); + node->isDefaultMember = true; + node->publicToken = loc(1); + node->attributeTypeToken = loc(3); + node->identifierToken = loc(4); + sym(1).Node = node; +} break; +./ + UiObjectMember: T_PUBLIC T_IDENTIFIER T_IDENTIFIER T_COLON Expression ; /. case $rule_number: { @@ -643,6 +655,20 @@ case $rule_number: { } break; ./ +UiObjectMember: T_PUBLIC T_DEFAULT T_IDENTIFIER T_IDENTIFIER T_COLON Expression ; +/. +case $rule_number: { + AST::UiPublicMember *node = makeAstNode (driver->nodePool(), sym(3).sval, sym(4).sval, + sym(6).Expression); + node->isDefaultMember = true; + node->publicToken = loc(1); + node->attributeTypeToken = loc(3); + node->identifierToken = loc(4); + node->colonToken = loc(5); + sym(1).Node = node; +} break; +./ + UiObjectMember: FunctionDeclaration ; /. case $rule_number: { diff --git a/src/declarative/qml/parser/javascriptast_p.h b/src/declarative/qml/parser/javascriptast_p.h index 69958e5..dabc0e0 100644 --- a/src/declarative/qml/parser/javascriptast_p.h +++ b/src/declarative/qml/parser/javascriptast_p.h @@ -2236,13 +2236,13 @@ public: UiPublicMember(JavaScriptNameIdImpl *memberType, JavaScriptNameIdImpl *name) - : memberType(memberType), name(name), expression(0) + : memberType(memberType), name(name), expression(0), isDefaultMember(false) { kind = K; } UiPublicMember(JavaScriptNameIdImpl *memberType, JavaScriptNameIdImpl *name, ExpressionNode *expression) - : memberType(memberType), name(name), expression(expression) + : memberType(memberType), name(name), expression(expression), isDefaultMember(false) { kind = K; } virtual void accept0(Visitor *visitor); @@ -2251,6 +2251,7 @@ public: JavaScriptNameIdImpl *memberType; JavaScriptNameIdImpl *name; ExpressionNode *expression; + bool isDefaultMember; SourceLocation publicToken; SourceLocation attributeTypeToken; SourceLocation identifierToken; diff --git a/src/declarative/qml/parser/javascriptgrammar.cpp b/src/declarative/qml/parser/javascriptgrammar.cpp index b06fd32..afbec36 100644 --- a/src/declarative/qml/parser/javascriptgrammar.cpp +++ b/src/declarative/qml/parser/javascriptgrammar.cpp @@ -56,312 +56,335 @@ const char *const JavaScriptGrammar::spell [] = { const int JavaScriptGrammar::lhs [] = { 88, 89, 89, 92, 92, 93, 93, 91, 90, 90, 95, 95, 97, 97, 96, 94, 96, 94, 96, 94, - 96, 94, 94, 94, 94, 94, 98, 98, 103, 103, + 96, 94, 94, 94, 94, 94, 94, 94, 98, 98, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, - 103, 103, 103, 105, 105, 109, 109, 104, 104, 107, - 107, 110, 110, 110, 110, 111, 111, 111, 111, 111, + 103, 103, 103, 103, 103, 105, 105, 109, 109, 104, + 104, 107, 107, 110, 110, 110, 110, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, - 111, 111, 111, 111, 111, 111, 112, 112, 113, 113, - 113, 113, 113, 116, 116, 117, 117, 117, 117, 115, - 115, 118, 118, 119, 119, 120, 120, 120, 121, 121, - 121, 121, 121, 121, 121, 121, 121, 121, 122, 122, - 122, 122, 123, 123, 123, 124, 124, 124, 124, 125, - 125, 125, 125, 125, 125, 125, 126, 126, 126, 126, - 126, 126, 127, 127, 127, 127, 127, 128, 128, 128, - 128, 128, 129, 129, 130, 130, 131, 131, 132, 132, - 133, 133, 134, 134, 135, 135, 136, 136, 137, 137, - 138, 138, 139, 139, 140, 140, 108, 108, 141, 141, - 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, - 142, 142, 100, 100, 143, 143, 144, 144, 145, 145, - 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 146, 161, 161, 160, 160, - 102, 102, 162, 162, 163, 163, 165, 165, 164, 166, - 169, 167, 167, 170, 168, 168, 147, 148, 148, 149, - 149, 150, 150, 150, 150, 150, 150, 150, 151, 151, - 151, 151, 152, 152, 152, 152, 153, 153, 154, 156, - 171, 171, 174, 174, 172, 172, 175, 173, 155, 157, - 157, 158, 158, 158, 176, 177, 159, 159, 101, 114, - 181, 181, 178, 178, 179, 179, 182, 183, 183, 184, - 184, 180, 180, 106, 106, 185}; + 111, 111, 111, 111, 111, 111, 111, 111, 112, 112, + 113, 113, 113, 113, 113, 116, 116, 117, 117, 117, + 117, 115, 115, 118, 118, 119, 119, 120, 120, 120, + 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, + 122, 122, 122, 122, 123, 123, 123, 124, 124, 124, + 124, 125, 125, 125, 125, 125, 125, 125, 126, 126, + 126, 126, 126, 126, 127, 127, 127, 127, 127, 128, + 128, 128, 128, 128, 129, 129, 130, 130, 131, 131, + 132, 132, 133, 133, 134, 134, 135, 135, 136, 136, + 137, 137, 138, 138, 139, 139, 140, 140, 108, 108, + 141, 141, 142, 142, 142, 142, 142, 142, 142, 142, + 142, 142, 142, 142, 100, 100, 143, 143, 144, 144, + 145, 145, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 146, 161, 161, + 160, 160, 102, 102, 162, 162, 163, 163, 165, 165, + 164, 166, 169, 167, 167, 170, 168, 168, 147, 148, + 148, 149, 149, 150, 150, 150, 150, 150, 150, 150, + 151, 151, 151, 151, 152, 152, 152, 152, 153, 153, + 154, 156, 171, 171, 174, 174, 172, 172, 175, 173, + 155, 157, 157, 158, 158, 158, 176, 177, 159, 159, + 101, 114, 181, 181, 178, 178, 179, 179, 182, 183, + 183, 184, 184, 180, 180, 106, 106, 185}; const int JavaScriptGrammar:: rhs[] = { 2, 1, 1, 1, 2, 3, 3, 0, 1, 2, 1, 3, 2, 3, 4, 4, 2, 2, 5, 5, - 3, 3, 3, 5, 1, 1, 1, 3, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 3, 3, 5, - 3, 4, 3, 2, 4, 1, 2, 0, 1, 3, - 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 3, 3, 3, 4, 5, 6, 1, 1, 1, 3, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, + 3, 5, 3, 4, 3, 2, 4, 1, 2, 0, + 1, 3, 5, 1, 1, 1, 1, 1, 1, 1, 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, 1, 4, 3, 5, 1, 2, 4, 4, 4, + 3, 0, 1, 1, 3, 1, 1, 1, 2, 2, + 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 1, 3, 3, 3, 1, 3, 3, 1, 3, 3, + 3, 1, 3, 3, 3, 3, 3, 3, 1, 3, + 3, 3, 3, 3, 1, 3, 3, 3, 3, 1, + 3, 3, 3, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, - 1, 3, 1, 5, 1, 5, 1, 3, 1, 3, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 3, 0, 1, 1, 3, 0, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 3, 1, 2, 0, 1, - 3, 3, 1, 1, 1, 3, 1, 3, 2, 2, - 2, 0, 1, 2, 0, 1, 1, 2, 2, 7, - 5, 7, 7, 5, 9, 10, 7, 8, 2, 2, - 3, 3, 2, 2, 3, 3, 3, 3, 5, 5, - 3, 5, 1, 2, 0, 1, 4, 3, 3, 3, - 3, 3, 3, 4, 5, 2, 2, 2, 8, 8, - 1, 3, 0, 1, 0, 1, 1, 1, 2, 1, - 1, 0, 1, 0, 1, 2}; + 1, 3, 1, 3, 1, 5, 1, 5, 1, 3, + 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 3, 0, 1, 1, 3, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 3, 1, 2, + 0, 1, 3, 3, 1, 1, 1, 3, 1, 3, + 2, 2, 2, 0, 1, 2, 0, 1, 1, 2, + 2, 7, 5, 7, 7, 5, 9, 10, 7, 8, + 2, 2, 3, 3, 2, 2, 3, 3, 3, 3, + 5, 5, 3, 5, 1, 2, 0, 1, 4, 3, + 3, 3, 3, 3, 3, 4, 5, 2, 2, 2, + 8, 8, 1, 3, 0, 1, 0, 1, 1, 1, + 2, 1, 1, 0, 1, 0, 1, 2}; const int JavaScriptGrammar::action_default [] = { - 8, 2, 0, 0, 4, 3, 0, 296, 0, 6, - 7, 5, 25, 223, 0, 27, 0, 224, 9, 1, - 0, 0, 26, 0, 283, 284, 0, 281, 0, 282, - 0, 285, 126, 193, 157, 165, 161, 201, 208, 105, - 177, 207, 215, 203, 153, 0, 204, 286, 0, 291, - 90, 205, 206, 211, 106, 169, 173, 94, 123, 104, - 109, 89, 143, 209, 130, 288, 287, 290, 212, 0, - 0, 0, 0, 36, 37, 0, 33, 0, 292, 30, - 0, 294, 48, 0, 0, 0, 0, 0, 31, 34, - 0, 0, 195, 237, 35, 0, 29, 0, 0, 32, - 0, 0, 0, 0, 0, 213, 214, 119, 202, 210, - 0, 0, 106, 125, 292, 30, 294, 108, 107, 0, - 0, 0, 121, 122, 120, 0, 293, 283, 0, 0, - 285, 0, 280, 0, 295, 0, 55, 56, 57, 58, - 83, 59, 84, 60, 61, 62, 63, 64, 65, 66, - 67, 52, 68, 69, 70, 71, 72, 54, 85, 73, - 53, 74, 75, 76, 77, 78, 79, 80, 81, 82, - 86, 0, 50, 0, 0, 42, 0, 51, 41, 124, - 0, 154, 0, 0, 0, 0, 144, 0, 0, 0, - 0, 0, 0, 134, 0, 0, 0, 128, 129, 127, - 132, 136, 135, 133, 131, 146, 145, 147, 0, 162, - 0, 158, 0, 0, 100, 99, 88, 87, 0, 0, - 98, 194, 101, 0, 102, 0, 103, 97, 238, 239, - 279, 0, 190, 183, 181, 188, 189, 187, 186, 192, - 185, 184, 182, 191, 178, 0, 166, 0, 0, 170, - 0, 0, 174, 0, 0, 100, 92, 0, 91, 0, - 96, 289, 253, 0, 254, 255, 256, 249, 0, 250, - 251, 252, 277, 278, 110, 0, 0, 0, 0, 0, - 242, 243, 199, 197, 159, 167, 163, 179, 155, 200, - 0, 106, 171, 175, 148, 137, 0, 0, 156, 0, - 0, 0, 0, 149, 0, 0, 0, 0, 0, 141, - 139, 142, 140, 138, 151, 150, 152, 0, 164, 0, - 160, 0, 198, 106, 0, 180, 195, 196, 0, 195, - 0, 0, 245, 0, 0, 0, 247, 0, 168, 0, - 0, 172, 0, 0, 176, 235, 0, 227, 236, 230, - 0, 234, 0, 195, 228, 0, 195, 0, 0, 246, - 0, 0, 0, 248, 293, 0, 269, 0, 0, 0, - 241, 0, 240, 217, 220, 0, 56, 83, 59, 84, - 61, 62, 33, 66, 67, 30, 68, 71, 31, 34, - 195, 35, 74, 29, 76, 32, 78, 79, 80, 81, - 82, 86, 218, 216, 94, 95, 100, 0, 93, 0, - 257, 258, 0, 0, 0, 260, 265, 263, 266, 0, - 0, 264, 265, 0, 261, 0, 262, 219, 268, 0, - 219, 267, 0, 270, 271, 0, 219, 272, 273, 0, - 0, 274, 0, 0, 0, 275, 276, 112, 111, 0, - 0, 0, 244, 0, 0, 0, 259, 0, 49, 0, - 46, 48, 39, 0, 45, 40, 47, 44, 38, 0, - 43, 116, 114, 118, 115, 113, 117, 0, 18, 13, - 0, 14, 10, 0, 23, 0, 24, 0, 0, 22, - 30, 48, 16, 27, 0, 11, 0, 17, 0, 20, - 12, 0, 21, 30, 48, 15, 0, 19, 28, 232, - 225, 0, 233, 229, 0, 231, 221, 0, 222, 226}; + 8, 2, 0, 0, 4, 3, 0, 298, 0, 6, + 7, 5, 27, 225, 0, 29, 0, 226, 9, 1, + 0, 0, 28, 0, 285, 286, 0, 283, 0, 284, + 0, 287, 128, 195, 159, 167, 163, 203, 210, 107, + 179, 209, 217, 205, 155, 0, 206, 288, 0, 293, + 92, 207, 208, 213, 108, 171, 175, 96, 125, 106, + 111, 91, 145, 211, 132, 290, 289, 292, 214, 0, + 0, 0, 0, 38, 39, 0, 35, 0, 294, 32, + 0, 296, 50, 0, 0, 0, 0, 0, 33, 36, + 0, 0, 197, 239, 37, 0, 31, 0, 0, 34, + 0, 0, 0, 0, 0, 215, 216, 121, 204, 212, + 0, 0, 108, 127, 294, 32, 296, 110, 109, 0, + 0, 0, 123, 124, 122, 0, 295, 285, 0, 0, + 287, 0, 282, 0, 297, 0, 57, 58, 59, 60, + 85, 61, 86, 62, 63, 64, 65, 66, 67, 68, + 69, 54, 70, 71, 72, 73, 74, 56, 87, 75, + 55, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 88, 0, 52, 0, 0, 44, 0, 53, 43, 126, + 0, 156, 0, 0, 0, 0, 146, 0, 0, 0, + 0, 0, 0, 136, 0, 0, 0, 130, 131, 129, + 134, 138, 137, 135, 133, 148, 147, 149, 0, 164, + 0, 160, 0, 0, 102, 101, 90, 89, 0, 0, + 100, 196, 103, 0, 104, 0, 105, 99, 240, 241, + 281, 0, 192, 185, 183, 190, 191, 189, 188, 194, + 187, 186, 184, 193, 180, 0, 168, 0, 0, 172, + 0, 0, 176, 0, 0, 102, 94, 0, 93, 0, + 98, 291, 255, 0, 256, 257, 258, 251, 0, 252, + 253, 254, 279, 280, 112, 0, 0, 0, 0, 0, + 244, 245, 201, 199, 161, 169, 165, 181, 157, 202, + 0, 108, 173, 177, 150, 139, 0, 0, 158, 0, + 0, 0, 0, 151, 0, 0, 0, 0, 0, 143, + 141, 144, 142, 140, 153, 152, 154, 0, 166, 0, + 162, 0, 200, 108, 0, 182, 197, 198, 0, 197, + 0, 0, 247, 0, 0, 0, 249, 0, 170, 0, + 0, 174, 0, 0, 178, 237, 0, 229, 238, 232, + 0, 236, 0, 197, 230, 0, 197, 0, 0, 248, + 0, 0, 0, 250, 295, 0, 271, 0, 0, 0, + 243, 0, 242, 219, 222, 0, 58, 85, 61, 86, + 63, 64, 35, 68, 69, 32, 70, 73, 33, 36, + 197, 37, 76, 31, 78, 34, 80, 81, 82, 83, + 84, 88, 220, 218, 96, 97, 102, 0, 95, 0, + 259, 260, 0, 0, 0, 262, 267, 265, 268, 0, + 0, 266, 267, 0, 263, 0, 264, 221, 270, 0, + 221, 269, 0, 272, 273, 0, 221, 274, 275, 0, + 0, 276, 0, 0, 0, 277, 278, 114, 113, 0, + 0, 0, 246, 0, 0, 0, 261, 0, 51, 0, + 48, 50, 41, 0, 47, 42, 49, 46, 40, 0, + 45, 118, 116, 120, 117, 115, 119, 0, 18, 13, + 0, 14, 10, 0, 0, 0, 24, 0, 26, 23, + 0, 25, 0, 0, 22, 32, 50, 16, 29, 0, + 11, 0, 17, 0, 20, 12, 0, 21, 32, 50, + 15, 0, 19, 30, 234, 227, 0, 235, 231, 0, + 233, 223, 0, 224, 228}; const int JavaScriptGrammar::goto_default [] = { - 2, 6, 19, 1, 5, 4, 18, 494, 495, 478, + 2, 6, 19, 1, 5, 4, 18, 499, 500, 478, 20, 373, 45, 12, 108, 61, 459, 457, 135, 134, 33, 458, 133, 136, 215, 57, 50, 223, 59, 39, 222, 54, 60, 107, 58, 32, 64, 62, 294, 44, 288, 34, 284, 36, 286, 35, 285, 55, 292, 56, 293, 40, 287, 283, 324, 409, 289, 290, 37, 43, 46, 51, 52, 41, 38, 63, 109, 53, 68, 105, - 106, 42, 375, 374, 21, 511, 510, 346, 347, 513, - 349, 512, 348, 415, 419, 422, 418, 417, 437, 438, + 106, 42, 375, 374, 21, 516, 515, 346, 347, 518, + 349, 517, 348, 415, 419, 422, 418, 417, 437, 438, 26, 48, 125, 25, 47, 66, 65, 0}; const int JavaScriptGrammar::action_index [] = { - -25, -88, 89, 70, -88, -15, 251, -88, 85, -88, - -88, -88, -88, -88, 56, 48, 46, -88, -88, 262, - 127, 72, -88, -17, -9, 20, -29, -88, -3, -88, - -6, 1289, 112, -88, 13, -44, -76, -88, -88, 212, - -88, -88, -88, -88, 253, 228, -88, -88, -10, -88, - -88, -88, -88, -88, 347, 53, 87, 154, 274, -88, - -88, -88, 287, -88, 191, -88, 1289, -88, -88, 199, - 194, 115, 557, -88, -88, 1205, -88, 66, 71, 77, - 63, 1541, 79, 557, 557, 557, 480, 557, -88, -88, - 557, 557, 557, -88, -88, 60, -88, 557, 557, -88, - 41, 557, 557, 42, 44, -88, -88, -88, -88, -88, - 557, 557, 83, 177, -24, -88, 1037, -88, -88, 557, - 557, 557, -88, -88, -88, 25, -88, -18, -58, -8, - 1289, -26, -88, 58, 64, 67, -88, -88, -88, -88, + -8, -88, 76, 23, -88, 35, 267, -88, 62, -88, + -88, -88, -88, -88, 49, 58, 122, -88, -88, 257, + 124, -17, -88, -22, -16, 12, -39, -88, 0, -88, + -2, 1331, 132, -88, 8, -47, -69, -88, -88, 209, + -88, -88, -88, -88, 255, 177, -88, -88, -10, -88, + -88, -88, -88, -88, 522, 45, 92, 236, 224, -88, + -88, -88, 437, -88, 215, -88, 1331, -88, -88, 164, + 206, 107, 599, -88, -88, 1247, -88, 78, 77, 87, + 69, 1583, 60, 599, 599, 599, 398, 599, -88, -88, + 599, 599, 599, -88, -88, 80, -88, 599, 599, -88, + 63, 599, 599, 66, 59, -88, -88, -88, -88, -88, + 599, 599, 123, 174, -1, -88, 1079, -88, -88, 599, + 599, 599, -88, -88, -88, 16, -88, -24, -54, -11, + 1331, 18, -88, 86, 84, 20, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, - -88, 557, -88, 1121, 55, -88, 557, -88, -88, 175, - 557, 250, 557, 557, 557, 557, 404, 557, 557, 557, - 557, 557, 557, 158, 557, 557, 557, 80, 73, 81, - 197, 238, 220, 159, 167, 277, 404, 317, 557, 14, - 557, 90, 953, 557, 557, -88, -88, -88, 108, 557, - -88, -88, 65, 49, -88, 557, -88, -88, -88, -88, - -88, 557, -88, -88, -88, -88, -88, -88, -88, -88, - -88, -88, -88, -88, -88, 557, 45, 557, 557, 75, - 69, 557, -88, 953, 557, 557, -88, 153, -88, 6, - -88, -88, -88, 105, -88, -88, -88, -88, 111, -88, - -88, -88, -88, -88, -88, 21, 62, 557, 122, 95, - -88, -88, 634, -88, 39, -30, -59, -88, 259, 8, - -46, 417, 19, 125, 339, 188, -7, 557, 248, 557, - 557, 557, 557, 339, 557, 557, 557, 557, 557, 187, - 166, 192, 206, 232, 339, 339, 339, 557, -59, 557, - 39, 557, -88, 380, 557, -88, 557, -5, -60, 557, - -48, 1205, -88, 557, 142, 1205, -88, 557, -38, 557, - 557, 7, 0, 557, -88, 17, 84, 22, -88, -88, - 557, -88, 27, 557, -88, -13, 557, 52, 1205, -88, - 557, 102, 1205, -88, 28, 1205, -88, 557, 100, 1205, - 34, 1205, -88, -88, 1205, -19, 139, 9, 149, 82, - 557, 1205, 23, 1, 119, 36, 10, 480, 40, 120, - 869, 35, 5, 26, 557, 37, -1, 557, 29, 557, - 31, 33, -88, -88, 205, -88, 557, -11, -88, 78, - -88, -88, 557, 98, 38, -88, 47, -88, 54, 198, - 557, -88, 30, 32, -88, -4, -88, 1205, -88, 107, - 1205, -88, 213, -88, -88, 113, 1205, 43, -88, 18, - 24, -88, -21, -54, -20, -88, -88, -88, -88, 557, - 143, 1205, -88, 557, 110, 1205, -88, 118, 16, 788, - -88, 15, -88, 711, -88, -88, -88, -88, -88, 121, - -88, -88, -88, -88, -88, -88, -88, 298, -88, -88, - 284, -88, -88, 59, 76, 557, 74, 1373, 57, -88, - 147, 130, -88, 61, 97, -88, 96, -88, 50, -88, - -88, 1457, -88, 116, 99, -88, 109, -88, -88, 51, - -88, 190, -88, -88, 557, -88, -88, 68, -88, -88, + -88, 599, -88, 1163, 52, -88, 599, -88, -88, 191, + 599, 266, 599, 599, 599, 599, 329, 599, 599, 599, + 599, 599, 599, 157, 599, 599, 599, 120, 103, 90, + 196, 192, 175, 163, 195, 345, 366, 312, 599, 22, + 599, 73, 995, 599, 599, -88, -88, -88, 148, 599, + -88, -88, 64, 48, -88, 599, -88, -88, -88, -88, + -88, 599, -88, -88, -88, -88, -88, -88, -88, -88, + -88, -88, -88, -88, -88, 599, 34, 599, 599, 171, + 74, 599, -88, 995, 599, 599, -88, 154, -88, 40, + -88, -88, -88, 116, -88, -88, -88, -88, 88, -88, + -88, -88, -88, -88, -88, 37, 65, 599, 129, 97, + -88, -88, 676, -88, 53, -33, -59, -88, 258, 11, + -43, 478, 85, 113, 282, 225, -13, 599, 247, 599, + 599, 599, 599, 286, 599, 599, 599, 599, 599, 219, + 222, 231, 307, 237, 372, 372, 372, 599, -46, 599, + 24, 599, -88, 522, 599, -88, 599, 15, -50, 599, + -60, 1247, -88, 599, 156, 1247, -88, 599, -44, 599, + 599, 85, 1, 599, -88, -14, 119, -29, -88, -88, + 599, -88, 6, 599, -88, -3, 599, -5, 1247, -88, + 599, 101, 1247, -88, 26, 1247, -88, 599, 95, 1247, + 51, 1247, -88, -88, 1247, 14, 146, 31, 150, 72, + 599, 1247, 57, 27, 81, 54, 29, 406, 44, 43, + 834, 30, 7, 32, 599, 25, 5, 599, 4, 599, + 10, 13, -88, -88, 244, -88, 599, -12, -88, 83, + -88, -88, 599, 139, 9, -88, 36, -88, 21, 126, + 599, -88, 39, 33, -88, -21, -88, 1247, -88, 118, + 1247, -88, 221, -88, -88, 109, 1247, 46, -88, 17, + 3, -88, 28, -4, -9, -88, -88, -88, -88, 599, + 145, 1247, -88, 599, 149, 1247, -88, 162, 2, 753, + -88, 19, -88, 911, -88, -88, -88, -88, -88, 127, + -88, -88, -88, -88, -88, -88, -88, 302, -88, -88, + 291, -88, -88, 41, 42, 61, 79, 599, 75, 82, + 599, 71, 1499, 56, -88, 115, 111, -88, 47, 110, + -88, 106, -88, 70, -88, -88, 1415, -88, 105, 99, + -88, 96, -88, -88, 67, -88, 166, -88, -88, 599, + -88, -88, 68, -88, -88, - -98, -98, -98, -98, -98, 30, 13, -98, -98, -98, - -98, -98, -98, -98, -98, -98, -98, -98, -98, 87, + -98, -98, -98, -98, -98, 2, 9, -98, -98, -98, + -98, -98, -98, -98, -98, -98, -98, -98, -98, 70, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, - -98, 83, -98, -98, -98, -98, -98, -98, -98, -98, + -98, 157, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, - -98, -98, -98, -98, -43, -98, -98, -98, -98, -98, - -98, -98, -98, -98, -98, -98, 184, -98, -98, -98, - -98, -98, 113, -98, -98, -9, -98, -98, -98, -98, - -98, -98, -98, 42, 116, 112, 127, 146, -98, -98, - 151, 147, 40, -98, -98, -98, -98, 37, 89, -98, - -10, 90, 86, -98, -98, -98, -98, -98, -98, -98, - 77, 94, -98, -98, -98, -98, -98, -98, -98, 106, - 103, 98, -98, -98, -98, -98, -98, -47, -98, -98, - 253, -98, -98, -98, -98, -98, -98, -98, -98, -98, + -98, -98, -98, -98, -39, -98, -98, -98, -98, -98, + -98, -98, -98, -98, -98, -98, 258, -98, -98, -98, + -98, -98, 100, -98, -98, 15, -98, -98, -98, -98, + -98, -98, -98, 51, 81, 90, 91, 103, -98, -98, + 76, 60, 44, -98, -98, -98, -98, 50, 114, -98, + -13, 133, 125, -98, -98, -98, -98, -98, -98, -98, + 171, 128, -98, -98, -98, -98, -98, -98, -98, 107, + 120, 117, -98, -98, -98, -98, -98, -61, -98, -98, + 173, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, - -98, -7, -98, 0, -98, -98, -3, -98, -98, -98, - 136, -98, 117, 119, 132, 134, -98, 130, 49, 36, - 35, 61, 64, -98, 47, 46, 38, -98, -98, -98, - -98, -98, -98, -98, -98, -98, -98, -98, 59, -98, - 58, -98, 24, 32, 17, -98, -98, -98, -98, 21, - -98, -98, -98, -98, -98, 8, -98, -98, -98, -98, - -98, 4, -98, -98, -98, -98, -98, -98, -98, -98, - -98, -98, -98, -98, -98, 60, -98, 57, -19, -98, - -98, -17, -98, 118, 44, 133, -98, -98, -98, -98, + -98, 34, -98, 36, -98, -98, 40, -98, -98, -98, + 63, -98, 55, 64, 66, 68, -98, 54, 42, 43, + 46, 52, 93, -98, 97, 95, 69, -98, -98, -98, + -98, -98, -98, -98, -98, -98, -98, -98, 75, -98, + 79, -98, 19, 32, 16, -98, -98, -98, -98, 12, + -98, -98, -98, -98, -98, 27, -98, -98, -98, -98, + -98, 33, -98, -98, -98, -98, -98, -98, -98, -98, + -98, -98, -98, -98, -98, 80, -98, 96, 35, -98, + -98, 39, -98, 47, 37, 48, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, - -98, -98, -98, -98, -98, -98, -98, 3, -98, -98, - -98, -98, 67, -98, -98, -98, -98, -98, -98, -98, - -98, -98, -98, -98, -98, -98, -98, 186, -98, 196, - 183, 177, 187, -98, 82, 76, 79, 96, 99, -98, - -98, -98, -98, -98, -98, -98, -98, 168, -98, 158, - -98, 156, -98, -98, 175, -98, 102, -98, -98, 104, - -98, 25, -98, 27, -98, 29, -98, 155, -98, 154, - 157, -98, -98, 167, -98, -98, -98, -98, -98, -98, - 193, -98, -48, 126, -98, -98, 128, -98, 15, -98, - 19, -98, 22, -98, -98, 23, -98, 20, -98, 18, - -98, 34, -98, -98, 53, -98, -98, -98, -98, -98, - 93, 52, -98, -98, -98, -98, -98, 81, -98, -98, - 45, -98, -98, -98, 43, -98, -35, 137, -98, 141, - -98, -98, -98, -98, -98, -98, 131, -98, -98, -98, - -98, -98, -8, -98, -98, -98, -98, -98, -77, -98, - 6, -98, -76, -98, -98, -98, -98, -52, -98, -98, - -51, -98, -98, -98, -98, -98, -98, -75, -98, -98, - -46, -98, -98, -98, -49, -98, -98, -98, -98, 7, - -98, 5, -98, -12, -98, 75, -98, -98, -98, -14, - -98, -11, -98, -13, -98, -98, -98, -98, -98, -98, - -98, -98, -98, -98, -98, -98, -98, 73, -98, -98, - 56, -98, -98, -98, -98, 41, -98, 39, -98, -98, - 50, 48, -98, 51, -98, -98, -98, -98, 66, -98, - -98, 31, -98, 16, 166, -98, -98, -98, -98, -98, - -98, -98, -98, -98, 26, -98, -98, -38, -98, -98}; + -98, -98, -98, -98, -98, -98, -98, 31, -98, -98, + -98, -98, 86, -98, -98, -98, -98, -98, -98, -98, + -98, -98, -98, -98, -98, -98, -98, 190, -98, 176, + 172, 180, 168, -98, 124, 136, 138, 106, 121, -98, + -98, -98, -98, -98, -98, -98, -98, 152, -98, 159, + -98, 186, -98, -98, 192, -98, 134, -98, -98, 137, + -98, 30, -98, 18, -98, 22, -98, 196, -98, 188, + 184, -98, -98, 145, -98, -98, -98, -98, -98, -98, + 144, -98, -51, 127, -98, -98, 123, -98, 23, -98, + 25, -98, 28, -98, -98, 29, -98, 26, -98, 24, + -98, 17, -98, -98, 41, -98, -98, -98, -98, -98, + 130, 53, -98, -98, -98, -98, -98, 116, -98, -98, + 45, -98, -98, -98, 49, -98, -12, 65, -98, 56, + -98, -98, -98, -98, -98, -98, 88, -98, -98, -98, + -98, -98, 38, -98, -98, -98, -98, -98, -81, -98, + -7, -98, -83, -98, -98, -98, -98, -72, -98, -98, + -64, -98, -98, -98, -98, -98, -98, -70, -98, -98, + -42, -98, -98, -98, -33, -98, -98, -98, -98, -2, + -98, 0, -98, 5, -98, 7, -98, -98, -98, -6, + -98, 6, -98, 11, -98, -98, -98, -98, -98, -98, + -98, -98, -98, -98, -98, -98, -98, 163, -98, -98, + 165, -98, -98, -98, -98, -98, -98, -8, -98, -98, + 8, -98, 10, -98, -98, 4, -1, -98, 3, -98, + -98, -98, -98, 57, -98, -98, 13, -98, 104, 59, + -98, -98, -98, -98, -98, -98, -98, -98, -98, -17, + -98, -98, -74, -98, -98}; const int JavaScriptGrammar::action_info [] = { - 210, 329, 129, 219, 208, 126, 444, 343, 443, 337, - 317, 27, 331, 436, 180, 326, 321, 319, 317, 24, - 27, 337, 345, 460, 466, 130, 29, 31, 28, 132, - -64, 30, 436, -75, 350, 420, 403, 282, -223, 427, - 297, 412, -53, -52, -77, 230, 367, -72, 356, 408, - 371, 426, 420, 360, 442, 245, 345, 436, -224, 420, - 3, 127, 176, 440, 24, 171, 260, 449, 514, 453, - 3, 416, 173, 225, 436, 483, 251, 245, 449, 493, - 453, 477, 219, 485, 365, 23, 508, 460, 484, 7, - 210, 180, 352, 208, 477, 276, 412, 509, 277, 367, - 364, 509, 282, 501, 0, 498, 219, 460, 219, 227, - 219, 488, 358, 110, 430, 219, 219, 498, 219, 439, - 110, 110, 178, 365, 111, 117, 461, -54, 493, 219, - 219, 111, 111, 440, 487, 8, 118, 247, 460, 411, - 410, 248, 488, 273, 272, 353, 10, 9, 126, 477, - 219, 219, 110, 499, 365, -292, 281, 280, 414, 493, - 369, 219, 362, 111, 220, 507, 266, 265, 263, 253, - 455, 0, 271, 270, 462, 339, 273, 272, 268, 340, - 477, 470, 279, 194, 194, 195, 195, 119, 254, 119, - 255, 194, 194, 195, 195, 0, 196, 196, 517, 0, - 264, 262, 335, 451, 196, 196, 0, 0, 423, 258, - 269, 267, 194, 194, 195, 195, 194, 194, 195, 195, - 253, 219, 194, 268, 195, 196, 196, 212, 263, 196, - 196, 194, 120, 195, 120, 196, 219, 0, 121, 254, - 121, 406, 0, 0, 196, 194, 213, 195, 214, 0, - 0, 518, 516, 424, 0, 269, 267, 194, 196, 195, - 264, 262, 0, 194, 0, 195, 299, 300, 182, 183, - 196, 182, 183, 14, 434, 433, 196, 299, 300, 0, - 15, 0, 0, 0, 14, 0, 119, 0, 0, 229, - 228, 15, 0, 301, 302, 184, 185, 0, 184, 185, - 187, 188, 0, 0, 301, 302, 14, 0, 189, 190, - 187, 188, 191, 15, 192, 0, 0, 0, 189, 190, - 14, 0, 191, 17, 192, 0, 0, 15, 0, 0, - 0, 120, 13, 0, 17, 16, 0, 121, 0, 481, - 187, 188, 0, 13, 0, 0, 16, 0, 189, 190, - 232, 0, 191, 479, 192, 0, 17, 0, 0, 0, - 233, 0, 304, 305, 234, 13, 0, 0, 16, 0, - 17, 306, 0, 235, 307, 236, 308, 0, 0, 13, - 0, 0, 16, 232, 0, 0, 237, 0, 238, 117, - 0, 0, 0, 233, 0, 0, 239, 234, 0, 240, - 118, 0, 0, 0, 0, 241, 235, 0, 236, 0, - 0, 242, 0, 0, 0, 0, 0, 0, 0, 237, - 232, 238, 117, 0, 243, 0, 0, 187, 188, 239, - 233, 0, 240, 118, 234, 189, 190, 0, 241, 191, - 0, 192, 0, 235, 242, 236, 0, 0, 333, 0, - 0, 0, 0, 0, 0, 0, 237, 243, 238, 117, - 0, 0, 0, 0, 0, 0, 239, 0, 0, 240, - 118, 0, 0, 0, 0, 241, 0, 0, 0, 0, - 0, 242, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 73, 74, 243, 0, 0, 0, 0, 0, - 0, 0, 114, 0, 0, 0, 0, 0, 0, 115, - 0, 0, 0, 116, 82, 0, 83, 0, 0, 0, - 0, 0, 0, 86, 0, 0, 0, 89, 0, 0, + 331, 208, 360, 350, 317, 27, 129, 210, 343, 180, + 466, 329, 514, 27, 24, 317, 345, 319, 326, 321, + 28, 30, 130, 219, 436, 297, 420, 460, 126, 29, + 319, 31, -79, -226, 426, 345, 436, -55, 436, -77, + 427, 420, 416, 412, 420, 230, 449, 245, 408, 453, + -56, -74, 127, 442, 297, 358, 444, 443, 356, 176, + -225, -54, 24, 282, -66, 367, 440, 371, 460, 403, + 485, 489, 225, 132, 180, 178, 7, 3, 23, 219, + 477, 251, 208, 219, 519, 513, 487, 337, 8, 490, + 486, 477, 173, 171, 365, 453, 436, 514, 210, 498, + 260, 277, 449, 219, 503, 367, 364, 460, 227, 219, + 126, 276, 365, 506, 282, 439, 412, -294, 503, 460, + 3, 493, 365, 10, 9, 430, 219, 352, 498, 440, + 110, 492, 483, 273, 272, 219, 423, 219, 477, 493, + 498, 111, 247, 110, 411, 410, 248, 219, 477, 271, + 270, 484, 512, 219, 111, 369, 219, 219, 281, 280, + 110, 362, 219, 339, 219, 117, 504, 340, 273, 272, + 461, 111, 110, 245, 522, 263, 118, 266, 265, 268, + 353, 424, 194, 111, 195, 219, 119, 470, 194, 279, + 195, 0, 0, 263, 0, 196, 0, 0, 0, 414, + 194, 196, 195, 119, 220, 451, 0, 264, 262, 455, + 258, 269, 267, 196, 0, 0, 335, 194, 462, 195, + 194, 194, 195, 195, 212, 264, 262, 523, 521, 219, + 196, 120, 0, 196, 196, 268, 119, 121, 229, 228, + 194, 0, 195, 213, 194, 214, 195, 194, 120, 195, + 194, 253, 195, 196, 121, 0, 194, 196, 195, 253, + 196, 0, 194, 196, 195, 299, 300, 269, 267, 196, + 254, 0, 255, 182, 183, 196, 299, 300, 254, 14, + 406, 120, 434, 433, 182, 183, 15, 121, 0, 14, + 0, 0, 301, 302, 0, 0, 15, 0, 0, 0, + 184, 185, 0, 301, 302, 304, 305, 0, 0, 304, + 305, 184, 185, 14, 306, 0, 0, 307, 306, 308, + 15, 307, 0, 308, 14, 0, 0, 0, 0, 17, + 0, 15, 194, 0, 195, 187, 188, 0, 13, 17, + 0, 16, 0, 189, 190, 196, 481, 191, 13, 192, + 0, 16, 187, 188, 0, 0, 0, 479, 0, 0, + 189, 190, 0, 17, 191, 0, 192, 0, 187, 188, + 0, 0, 13, 0, 17, 16, 189, 190, 0, 0, + 191, 0, 192, 13, 0, 0, 16, 0, 0, 187, + 188, 0, 0, 0, 0, 304, 305, 189, 190, 0, + 0, 191, 0, 192, 306, 0, 0, 307, 0, 308, + 73, 74, 0, 0, 0, 0, 0, 0, 73, 74, + 114, 0, 0, 0, 0, 0, 0, 115, 114, 0, + 0, 116, 82, 0, 83, 115, 0, 0, 0, 116, + 82, 86, 83, 0, 0, 89, 0, 0, 0, 86, + 0, 0, 0, 89, 0, 0, 0, 0, 0, 0, + 187, 188, 0, 94, 0, 96, 0, 0, 189, 190, + 0, 94, 191, 96, 192, 0, 88, 99, 76, 0, + 0, 232, 0, 0, 88, 99, 76, 0, 0, 0, + 0, 233, 0, 0, 0, 234, 0, 0, 0, 0, + 0, 0, 0, 0, 235, 0, 236, 0, 0, 333, + 0, 0, 0, 0, 0, 0, 0, 237, 0, 238, + 117, 0, 0, 0, 0, 232, 0, 239, 0, 0, + 240, 118, 0, 0, 0, 233, 241, 0, 0, 234, + 0, 0, 242, 0, 0, 0, 0, 0, 235, 0, + 236, 0, 0, 0, 0, 243, 0, 0, 0, 0, + 0, 237, 0, 238, 117, 0, 0, 0, 0, 0, + 0, 239, 0, 0, 240, 118, 0, 0, 0, 0, + 241, 0, 0, 0, 0, 0, 242, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 243, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 94, 0, 96, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 88, 99, - 76, 0, 0, 0, 0, 0, 0, 0, 72, 73, - 74, 0, 0, 0, 0, 0, 0, 0, 0, 114, - 0, 0, 0, 0, 0, 0, 115, 0, 0, 0, - 116, 82, 0, 83, 0, 0, 0, 84, 0, 85, - 86, 87, 0, 0, 89, 0, 0, 0, 90, 0, - 91, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 94, 0, 96, 0, 98, 0, 101, 0, - 102, 0, 0, 0, 0, 88, 99, 76, 0, 0, - 0, 0, 0, 0, 0, 72, 73, 74, 0, 0, + 72, 73, 74, 0, 0, 0, 0, 0, 0, 0, + 0, 114, 0, 0, 0, 0, 0, 0, 115, 0, + 0, 0, 116, 82, 0, 83, 0, 0, 0, 84, + 0, 85, 86, 87, 0, 0, 89, 0, 0, 0, + 90, 0, 91, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 94, 0, 96, 0, 98, 0, + 101, 0, 102, 0, 0, 0, 0, 88, 99, 76, + 0, 0, 0, 0, 0, 0, 0, 72, 73, 74, + 0, 0, 0, 0, 0, 0, 0, 0, 114, 0, + 0, 0, 0, 0, 0, 115, 0, 0, 0, 116, + 82, 0, 83, 0, 0, 0, 84, 0, 85, 86, + 87, 0, 0, 89, 0, 0, 0, 90, 0, 91, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 94, 0, 96, 0, 98, 0, 101, 296, 102, + 0, 0, 0, 0, 88, 99, 76, 0, 0, 0, + 0, 0, 0, 0, 72, 73, 74, 0, 0, 0, + 0, 0, 0, 0, 0, 114, 0, 0, 0, 0, + 0, 0, 115, 0, 0, 0, 116, 82, 0, 83, + 0, 0, 0, 84, 0, 85, 86, 87, 0, 0, + 89, 0, 0, 0, 90, 0, 91, 0, 0, 468, + 0, 0, 0, 0, 0, 0, 0, 0, 94, 0, + 96, 0, 98, 0, 101, 0, 102, 0, 0, 0, + 0, 88, 99, 76, 0, 0, 0, 0, 0, 0, + 0, -75, 0, 0, 0, 72, 73, 74, 0, 0, 0, 0, 0, 0, 0, 0, 114, 0, 0, 0, 0, 0, 0, 115, 0, 0, 0, 116, 82, 0, 83, 0, 0, 0, 84, 0, 85, 86, 87, 0, 0, 89, 0, 0, 0, 90, 0, 91, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94, - 0, 96, 0, 98, 0, 101, 296, 102, 0, 0, + 0, 96, 0, 98, 0, 101, 0, 102, 0, 0, 0, 0, 88, 99, 76, 0, 0, 0, 0, 0, 0, 0, 72, 73, 74, 0, 0, 0, 0, 0, 0, 0, 0, 114, 0, 0, 0, 0, 0, 0, @@ -370,51 +393,52 @@ const int JavaScriptGrammar::action_info [] = { 0, 0, 90, 0, 91, 0, 0, 465, 0, 0, 0, 0, 0, 0, 0, 0, 94, 0, 96, 0, 98, 0, 101, 0, 102, 0, 0, 0, 0, 88, - 99, 76, 0, 0, 0, 0, 0, 0, 0, 72, - 73, 74, 0, 0, 0, 0, 0, 0, 0, 0, - 114, 0, 0, 0, 0, 0, 0, 115, 0, 0, - 0, 116, 82, 0, 83, 0, 0, 0, 84, 0, - 85, 86, 87, 0, 0, 89, 0, 0, 0, 90, - 0, 91, 0, 0, 468, 0, 0, 0, 0, 0, - 0, 0, 0, 94, 0, 96, 0, 98, 0, 101, - 0, 102, 0, 0, 0, 0, 88, 99, 76, 0, - 0, 0, 0, 0, 0, 0, -73, 0, 0, 0, - 72, 73, 74, 0, 0, 0, 0, 0, 0, 0, - 0, 114, 0, 0, 0, 0, 0, 0, 115, 0, - 0, 0, 116, 82, 0, 83, 0, 0, 0, 84, - 0, 85, 86, 87, 0, 0, 89, 0, 0, 0, - 90, 0, 91, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 94, 0, 96, 0, 98, 0, - 101, 0, 102, 0, 0, 0, 0, 88, 99, 76, - 0, 0, 0, 0, 0, 0, 0, 137, 138, 139, + 99, 76, 0, 0, 0, 0, 0, 0, 0, 137, + 138, 139, 0, 0, 141, 143, 144, 0, 0, 145, + 0, 146, 0, 0, 0, 148, 149, 150, 0, 0, + 0, 0, 0, 0, 217, 152, 153, 154, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 155, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 159, 0, 0, 0, 0, 0, + 0, 161, 162, 163, 0, 165, 166, 167, 168, 169, + 170, 0, 0, 156, 164, 147, 140, 142, 158, 0, + 0, 0, 0, 137, 138, 139, 0, 0, 141, 143, + 144, 0, 0, 145, 0, 146, 0, 0, 0, 148, + 149, 150, 0, 0, 0, 0, 0, 0, 151, 152, + 153, 154, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 155, 0, 0, 0, 157, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 159, 0, + 0, 0, 0, 0, 160, 161, 162, 163, 0, 165, + 166, 167, 168, 169, 170, 0, 0, 156, 164, 147, + 140, 142, 158, 0, 0, 0, 0, 137, 138, 139, 0, 0, 141, 143, 144, 0, 0, 145, 0, 146, 0, 0, 0, 148, 149, 150, 0, 0, 0, 0, - 0, 0, 217, 152, 153, 154, 0, 0, 0, 0, + 0, 0, 151, 152, 153, 154, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 155, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 159, 0, 0, 0, 0, 0, 0, 161, + 157, 0, 0, 0, 0, 0, 0, 0, 175, 0, + 0, 0, 159, 0, 0, 0, 0, 0, 160, 161, 162, 163, 0, 165, 166, 167, 168, 169, 170, 0, 0, 156, 164, 147, 140, 142, 158, 0, 0, 0, - 0, 137, 138, 139, 0, 0, 141, 143, 144, 0, - 0, 145, 0, 146, 0, 0, 0, 148, 149, 150, - 0, 0, 0, 0, 0, 0, 151, 152, 153, 154, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 155, 0, 0, 0, 157, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 159, 0, 0, 0, - 0, 0, 160, 161, 162, 163, 0, 165, 166, 167, - 168, 169, 170, 0, 0, 156, 164, 147, 140, 142, - 158, 0, 0, 0, 0, 137, 138, 139, 0, 0, - 141, 143, 144, 0, 0, 145, 0, 146, 0, 0, - 0, 148, 149, 150, 0, 0, 0, 0, 0, 0, - 151, 152, 153, 154, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 155, 0, 0, 0, 157, 0, - 0, 0, 0, 0, 0, 0, 175, 0, 0, 0, - 159, 0, 0, 0, 0, 0, 160, 161, 162, 163, - 0, 165, 166, 167, 168, 169, 170, 0, 0, 156, - 164, 147, 140, 142, 158, 0, 0, 0, 0, 69, + 0, 69, 0, 0, 0, 0, 70, 0, 72, 73, + 74, 75, 0, 0, 0, 0, 0, 0, 77, 114, + 0, 0, 0, 0, 0, 0, 79, 80, 0, 0, + 81, 82, 0, 83, 0, 0, 0, 84, 0, 85, + 86, 87, 0, 0, 89, 0, 0, 0, 90, 0, + 91, 0, 0, 0, 0, 0, 92, 0, 93, 0, + 0, 0, 94, 95, 96, 97, 98, 100, 101, 17, + 102, 103, 104, 0, 0, 88, 99, 76, 13, 71, + 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, + 70, 0, 72, 73, 74, 75, 0, 0, 0, 0, + 0, 0, 77, 78, 0, 0, 0, 0, 0, 0, + 79, 80, 0, 0, 81, 82, 0, 83, 0, 0, + 0, 84, 0, 85, 86, 87, 0, 0, 89, 0, + 0, 0, 90, 0, 91, 0, 0, 0, 0, 0, + 92, 0, 93, 0, 0, 0, 94, 95, 96, 97, + 98, 100, 101, 17, 102, 103, 104, 0, 0, 88, + 99, 76, 13, 71, 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, 70, 0, 72, 73, 74, 75, 0, 0, 0, 0, 0, 0, 77, 114, 0, 0, - 0, 0, 0, 0, 79, 80, 0, 0, 81, 82, + 0, 0, 0, 0, 508, 80, 0, 0, 81, 509, 0, 83, 0, 0, 0, 84, 0, 85, 86, 87, 0, 0, 89, 0, 0, 0, 90, 0, 91, 0, 0, 0, 0, 0, 92, 0, 93, 0, 0, 0, @@ -422,148 +446,152 @@ const int JavaScriptGrammar::action_info [] = { 104, 0, 0, 88, 99, 76, 13, 71, 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, 70, 0, 72, 73, 74, 75, 0, 0, 0, 0, 0, 0, - 77, 78, 0, 0, 0, 0, 0, 0, 79, 80, - 0, 0, 81, 82, 0, 83, 0, 0, 0, 84, + 77, 114, 0, 0, 0, 0, 0, 0, 495, 80, + 0, 0, 81, 496, 0, 83, 0, 0, 0, 84, 0, 85, 86, 87, 0, 0, 89, 0, 0, 0, 90, 0, 91, 0, 0, 0, 0, 0, 92, 0, 93, 0, 0, 0, 94, 95, 96, 97, 98, 100, 101, 17, 102, 103, 104, 0, 0, 88, 99, 76, - 13, 71, 0, 0, 0, 0, 0, 69, 0, 0, - 0, 0, 70, 0, 72, 73, 74, 75, 0, 0, - 0, 0, 0, 0, 77, 114, 0, 0, 0, 0, - 0, 0, 490, 80, 0, 0, 81, 491, 0, 83, - 0, 0, 0, 84, 0, 85, 86, 87, 0, 0, - 89, 0, 0, 0, 90, 0, 91, 0, 0, 0, - 0, 0, 92, 0, 93, 0, 0, 0, 94, 95, - 96, 97, 98, 100, 101, 17, 102, 103, 104, 0, - 0, 88, 99, 76, 13, 71, 0, 0, 0, 0, - 0, 69, 0, 0, 0, 0, 70, 0, 72, 73, - 74, 75, 0, 0, 0, 0, 0, 0, 77, 114, - 0, 0, 0, 0, 0, 0, 503, 80, 0, 0, - 81, 504, 0, 83, 0, 0, 0, 84, 0, 85, - 86, 87, 0, 0, 89, 0, 0, 0, 90, 0, - 91, 0, 0, 0, 0, 0, 92, 0, 93, 0, - 0, 0, 94, 95, 96, 97, 98, 100, 101, 17, - 102, 103, 104, 0, 0, 88, 99, 76, 13, 71, - 0, 0, 0, 0, 0, 376, 138, 139, 0, 0, - 378, 143, 380, 73, 74, 381, 0, 146, 0, 0, - 0, 148, 383, 384, 0, 0, 0, 0, 0, 0, - 385, 386, 153, 154, 81, 82, 0, 83, 0, 0, - 0, 84, 0, 85, 387, 87, 0, 0, 389, 0, - 0, 0, 90, 0, 91, 0, -219, 0, 0, 0, - 390, 0, 93, 0, 0, 0, 391, 392, 393, 394, - 98, 396, 397, 398, 399, 400, 401, 0, 0, 388, - 395, 382, 377, 379, 158, 0, 0, 0, 0, + 13, 71, 0, 0, 0, 0, 0, 376, 138, 139, + 0, 0, 378, 143, 380, 73, 74, 381, 0, 146, + 0, 0, 0, 148, 383, 384, 0, 0, 0, 0, + 0, 0, 385, 386, 153, 154, 81, 82, 0, 83, + 0, 0, 0, 84, 0, 85, 387, 87, 0, 0, + 389, 0, 0, 0, 90, 0, 91, 0, -221, 0, + 0, 0, 390, 0, 93, 0, 0, 0, 391, 392, + 393, 394, 98, 396, 397, 398, 399, 400, 401, 0, + 0, 388, 395, 382, 377, 379, 158, 0, 0, 0, + 0, - 454, 250, 275, 252, 413, 463, 467, 464, 425, 445, - 421, 231, 446, 172, 441, 278, 452, 177, 429, 450, - 428, 431, 174, 435, 244, 505, 359, 22, 226, 370, - 354, 361, 368, 363, 366, 11, 332, 224, 519, 334, - 336, 221, 502, 128, 218, 372, 515, 216, 435, 432, - 489, 0, 327, 486, 469, 432, 257, 327, 496, 492, - 497, 0, 482, 275, 402, 0, 112, 112, 0, 112, - 22, 202, 201, 199, 500, 480, 496, 112, 112, 0, - 112, 198, 197, 0, 0, 200, 456, 22, 112, 112, - 112, 112, 112, 482, 67, 112, 49, 203, 291, 211, - 204, 22, 209, 295, 249, 246, 404, 112, 112, 405, - 112, 113, 310, 112, 327, 311, 327, 112, 309, 448, - 112, 112, 476, 447, 112, 112, 274, 112, 179, 112, - 112, 124, 312, 0, 112, 313, 123, 112, 327, 122, - 327, 216, 256, 112, 112, 472, 274, 112, 112, 471, - 112, 224, 404, 224, 186, 405, 205, 328, 407, 330, - 259, 112, 0, 112, 0, 112, 193, 112, 112, 206, - 447, 207, 112, 506, 448, 181, 496, 112, 112, 473, - 475, 355, 112, 357, 474, 112, 112, 323, 323, 112, - 295, 295, 295, 295, 295, 67, 0, 49, 323, 112, - 320, 338, 341, 295, 295, 0, 323, 0, 112, 322, - 342, 295, 318, 295, 112, 315, 0, 112, 112, 295, - 344, 314, 295, 295, 323, 316, 298, 112, 325, 295, - 0, 0, 295, 0, 303, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 351, 0, 0, 0, + 428, 425, 524, 520, 488, 429, 421, 11, 431, 501, + 450, 452, 502, 497, 467, 231, 446, 454, 456, 441, + 491, 494, 463, 22, 507, 445, 275, 354, 372, 128, + 334, 464, 221, 336, 359, 370, 224, 361, 368, 363, + 366, 332, 216, 278, 218, 435, 435, 226, 0, 257, + 413, 0, 402, 244, 172, 250, 327, 327, 174, 252, + 177, 432, 432, 469, 275, 505, 511, 501, 224, 501, + 216, 256, 0, 112, 112, 259, 482, 112, 200, 201, + 0, 0, 202, 112, 22, 112, 112, 112, 203, 448, + 193, 112, 186, 475, 112, 112, 112, 112, 447, 112, + 112, 205, 181, 206, 199, 207, 112, 112, 224, 474, + 112, 112, 112, 510, 471, 407, 404, 291, 209, 405, + 211, 112, 295, 472, 112, 246, 112, 112, 112, 204, + 198, 112, 197, 274, 112, 327, 473, 112, 112, 327, + 122, 404, 312, 249, 405, 112, 327, 476, 112, 327, + 124, 112, 112, 123, 0, 112, 112, 313, 448, 112, + 309, 112, 179, 274, 112, 480, 447, 112, 67, 112, + 49, 482, 310, 0, 311, 323, 323, 22, 357, 22, + 295, 295, 355, 112, 67, 0, 49, 0, 295, 328, + 112, 0, 330, 0, 0, 295, 318, 351, 344, 112, + 0, 320, 112, 112, 295, 113, 316, 112, 295, 0, + 314, 112, 295, 0, 303, 323, 295, 323, 315, 112, + 295, 112, 295, 323, 295, 0, 295, 112, 295, 0, + 298, 0, 295, 0, 0, 0, 341, 342, 0, 322, + 0, 0, 338, 0, 0, 325, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 131, 0, 0, 0, 0, 67, + 0, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 67, 0, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 261, 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, 131, 0, 0, 0, 0, 0, - 0}; + 0, 0, 0, 0, 261, 0}; const int JavaScriptGrammar::action_check [] = { - 76, 61, 60, 8, 48, 29, 60, 7, 29, 2, - 48, 29, 60, 33, 1, 61, 8, 76, 48, 36, - 29, 2, 29, 8, 8, 33, 29, 33, 8, 55, - 7, 60, 33, 7, 17, 5, 55, 36, 29, 7, - 1, 36, 7, 7, 7, 55, 36, 7, 61, 60, - 16, 55, 5, 31, 36, 2, 29, 33, 29, 5, - 85, 36, 7, 20, 36, 7, 60, 36, 17, 36, - 85, 33, 8, 8, 33, 29, 7, 2, 36, 29, - 36, 33, 8, 7, 7, 29, 29, 8, 29, 0, - 76, 1, 8, 48, 33, 74, 36, 29, 36, 36, - 29, 29, 36, 7, -1, 8, 8, 8, 8, 60, - 8, 15, 60, 40, 7, 8, 8, 8, 8, 6, - 40, 40, 55, 7, 51, 42, 8, 7, 29, 8, - 8, 51, 51, 20, 7, 65, 53, 50, 8, 61, - 62, 54, 15, 61, 62, 61, 61, 62, 29, 33, - 8, 8, 40, 56, 7, 36, 61, 62, 60, 29, - 60, 8, 60, 51, 56, 56, 61, 62, 29, 15, - 60, -1, 61, 62, 56, 50, 61, 62, 29, 54, - 33, 60, 60, 25, 25, 27, 27, 12, 34, 12, - 36, 25, 25, 27, 27, -1, 38, 38, 8, -1, - 61, 62, 60, 60, 38, 38, -1, -1, 10, 56, - 61, 62, 25, 25, 27, 27, 25, 25, 27, 27, - 15, 8, 25, 29, 27, 38, 38, 15, 29, 38, - 38, 25, 57, 27, 57, 38, 8, -1, 63, 34, - 63, 36, -1, -1, 38, 25, 34, 27, 36, -1, - -1, 61, 62, 55, -1, 61, 62, 25, 38, 27, - 61, 62, -1, 25, -1, 27, 18, 19, 18, 19, - 38, 18, 19, 22, 61, 62, 38, 18, 19, -1, - 29, -1, -1, -1, 22, -1, 12, -1, -1, 61, - 62, 29, -1, 45, 46, 45, 46, -1, 45, 46, - 23, 24, -1, -1, 45, 46, 22, -1, 31, 32, - 23, 24, 35, 29, 37, -1, -1, -1, 31, 32, - 22, -1, 35, 72, 37, -1, -1, 29, -1, -1, - -1, 57, 81, -1, 72, 84, -1, 63, -1, 55, - 23, 24, -1, 81, -1, -1, 84, -1, 31, 32, - 3, -1, 35, 55, 37, -1, 72, -1, -1, -1, - 13, -1, 23, 24, 17, 81, -1, -1, 84, -1, - 72, 32, -1, 26, 35, 28, 37, -1, -1, 81, - -1, -1, 84, 3, -1, -1, 39, -1, 41, 42, - -1, -1, -1, 13, -1, -1, 49, 17, -1, 52, - 53, -1, -1, -1, -1, 58, 26, -1, 28, -1, - -1, 64, -1, -1, -1, -1, -1, -1, -1, 39, - 3, 41, 42, -1, 77, -1, -1, 23, 24, 49, - 13, -1, 52, 53, 17, 31, 32, -1, 58, 35, - -1, 37, -1, 26, 64, 28, -1, -1, 31, -1, - -1, -1, -1, -1, -1, -1, 39, 77, 41, 42, - -1, -1, -1, -1, -1, -1, 49, -1, -1, 52, - 53, -1, -1, -1, -1, 58, -1, -1, -1, -1, - -1, 64, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 12, 13, 77, -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, - -1, -1, -1, 43, -1, -1, -1, 47, -1, -1, + 60, 48, 31, 17, 48, 29, 60, 76, 7, 1, + 8, 61, 29, 29, 36, 48, 29, 76, 61, 8, + 8, 60, 33, 8, 33, 1, 5, 8, 29, 29, + 76, 33, 7, 29, 55, 29, 33, 7, 33, 7, + 7, 5, 33, 36, 5, 55, 36, 2, 60, 36, + 7, 7, 36, 36, 1, 60, 60, 29, 61, 7, + 29, 7, 36, 36, 7, 36, 20, 16, 8, 55, + 29, 29, 8, 55, 1, 55, 0, 85, 29, 8, + 33, 7, 48, 8, 17, 29, 7, 2, 65, 7, + 29, 33, 8, 7, 7, 36, 33, 29, 76, 29, + 60, 36, 36, 8, 8, 36, 29, 8, 60, 8, + 29, 74, 7, 7, 36, 6, 36, 36, 8, 8, + 85, 15, 7, 61, 62, 7, 8, 8, 29, 20, + 40, 7, 10, 61, 62, 8, 10, 8, 33, 15, + 29, 51, 50, 40, 61, 62, 54, 8, 33, 61, + 62, 29, 56, 8, 51, 60, 8, 8, 61, 62, + 40, 60, 8, 50, 8, 42, 56, 54, 61, 62, + 8, 51, 40, 2, 8, 29, 53, 61, 62, 29, + 61, 55, 25, 51, 27, 8, 12, 60, 25, 60, + 27, -1, -1, 29, -1, 38, -1, -1, -1, 60, + 25, 38, 27, 12, 56, 60, -1, 61, 62, 60, + 56, 61, 62, 38, -1, -1, 60, 25, 56, 27, + 25, 25, 27, 27, 15, 61, 62, 61, 62, 8, + 38, 57, -1, 38, 38, 29, 12, 63, 61, 62, + 25, -1, 27, 34, 25, 36, 27, 25, 57, 27, + 25, 15, 27, 38, 63, -1, 25, 38, 27, 15, + 38, -1, 25, 38, 27, 18, 19, 61, 62, 38, + 34, -1, 36, 18, 19, 38, 18, 19, 34, 22, + 36, 57, 61, 62, 18, 19, 29, 63, -1, 22, + -1, -1, 45, 46, -1, -1, 29, -1, -1, -1, + 45, 46, -1, 45, 46, 23, 24, -1, -1, 23, + 24, 45, 46, 22, 32, -1, -1, 35, 32, 37, + 29, 35, -1, 37, 22, -1, -1, -1, -1, 72, + -1, 29, 25, -1, 27, 23, 24, -1, 81, 72, + -1, 84, -1, 31, 32, 38, 55, 35, 81, 37, + -1, 84, 23, 24, -1, -1, -1, 55, -1, -1, + 31, 32, -1, 72, 35, -1, 37, -1, 23, 24, + -1, -1, 81, -1, 72, 84, 31, 32, -1, -1, + 35, -1, 37, 81, -1, -1, 84, -1, -1, 23, + 24, -1, -1, -1, -1, 23, 24, 31, 32, -1, + -1, 35, -1, 37, 32, -1, -1, 35, -1, 37, + 12, 13, -1, -1, -1, -1, -1, -1, 12, 13, + 22, -1, -1, -1, -1, -1, -1, 29, 22, -1, + -1, 33, 34, -1, 36, 29, -1, -1, -1, 33, + 34, 43, 36, -1, -1, 47, -1, -1, -1, 43, + -1, -1, -1, 47, -1, -1, -1, -1, -1, -1, + 23, 24, -1, 65, -1, 67, -1, -1, 31, 32, + -1, 65, 35, 67, 37, -1, 78, 79, 80, -1, + -1, 3, -1, -1, 78, 79, 80, -1, -1, -1, + -1, 13, -1, -1, -1, 17, -1, -1, -1, -1, + -1, -1, -1, -1, 26, -1, 28, -1, -1, 31, + -1, -1, -1, -1, -1, -1, -1, 39, -1, 41, + 42, -1, -1, -1, -1, 3, -1, 49, -1, -1, + 52, 53, -1, -1, -1, 13, 58, -1, -1, 17, + -1, -1, 64, -1, -1, -1, -1, -1, 26, -1, + 28, -1, -1, -1, -1, 77, -1, -1, -1, -1, + -1, 39, -1, 41, 42, -1, -1, -1, -1, -1, + -1, 49, -1, -1, 52, 53, -1, -1, -1, -1, + 58, -1, -1, -1, -1, -1, 64, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 77, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 65, -1, 67, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 78, 79, - 80, -1, -1, -1, -1, -1, -1, -1, 11, 12, - 13, -1, -1, -1, -1, -1, -1, -1, -1, 22, - -1, -1, -1, -1, -1, -1, 29, -1, -1, -1, - 33, 34, -1, 36, -1, -1, -1, 40, -1, 42, - 43, 44, -1, -1, 47, -1, -1, -1, 51, -1, - 53, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 65, -1, 67, -1, 69, -1, 71, -1, - 73, -1, -1, -1, -1, 78, 79, 80, -1, -1, - -1, -1, -1, -1, -1, 11, 12, 13, -1, -1, + 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, + -1, 22, -1, -1, -1, -1, -1, -1, 29, -1, + -1, -1, 33, 34, -1, 36, -1, -1, -1, 40, + -1, 42, 43, 44, -1, -1, 47, -1, -1, -1, + 51, -1, 53, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 65, -1, 67, -1, 69, -1, + 71, -1, 73, -1, -1, -1, -1, 78, 79, 80, + -1, -1, -1, -1, -1, -1, -1, 11, 12, 13, + -1, -1, -1, -1, -1, -1, -1, -1, 22, -1, + -1, -1, -1, -1, -1, 29, -1, -1, -1, 33, + 34, -1, 36, -1, -1, -1, 40, -1, 42, 43, + 44, -1, -1, 47, -1, -1, -1, 51, -1, 53, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 65, -1, 67, -1, 69, -1, 71, 72, 73, + -1, -1, -1, -1, 78, 79, 80, -1, -1, -1, + -1, -1, -1, -1, 11, 12, 13, -1, -1, -1, + -1, -1, -1, -1, -1, 22, -1, -1, -1, -1, + -1, -1, 29, -1, -1, -1, 33, 34, -1, 36, + -1, -1, -1, 40, -1, 42, 43, 44, -1, -1, + 47, -1, -1, -1, 51, -1, 53, -1, -1, 56, + -1, -1, -1, -1, -1, -1, -1, -1, 65, -1, + 67, -1, 69, -1, 71, -1, 73, -1, -1, -1, + -1, 78, 79, 80, -1, -1, -1, -1, -1, -1, + -1, 7, -1, -1, -1, 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, 22, -1, -1, -1, -1, -1, -1, 29, -1, -1, -1, 33, 34, -1, 36, -1, -1, -1, 40, -1, 42, 43, 44, -1, -1, 47, -1, -1, -1, 51, -1, 53, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 65, - -1, 67, -1, 69, -1, 71, 72, 73, -1, -1, + -1, 67, -1, 69, -1, 71, -1, 73, -1, -1, -1, -1, 78, 79, 80, -1, -1, -1, -1, -1, -1, -1, 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, 22, -1, -1, -1, -1, -1, -1, @@ -572,48 +600,49 @@ const int JavaScriptGrammar::action_check [] = { -1, -1, 51, -1, 53, -1, -1, 56, -1, -1, -1, -1, -1, -1, -1, -1, 65, -1, 67, -1, 69, -1, 71, -1, 73, -1, -1, -1, -1, 78, - 79, 80, -1, -1, -1, -1, -1, -1, -1, 11, - 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, - 22, -1, -1, -1, -1, -1, -1, 29, -1, -1, - -1, 33, 34, -1, 36, -1, -1, -1, 40, -1, - 42, 43, 44, -1, -1, 47, -1, -1, -1, 51, - -1, 53, -1, -1, 56, -1, -1, -1, -1, -1, - -1, -1, -1, 65, -1, 67, -1, 69, -1, 71, - -1, 73, -1, -1, -1, -1, 78, 79, 80, -1, - -1, -1, -1, -1, -1, -1, 7, -1, -1, -1, - 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, - -1, 22, -1, -1, -1, -1, -1, -1, 29, -1, - -1, -1, 33, 34, -1, 36, -1, -1, -1, 40, - -1, 42, 43, 44, -1, -1, 47, -1, -1, -1, - 51, -1, 53, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 65, -1, 67, -1, 69, -1, - 71, -1, 73, -1, -1, -1, -1, 78, 79, 80, - -1, -1, -1, -1, -1, -1, -1, 4, 5, 6, + 79, 80, -1, -1, -1, -1, -1, -1, -1, 4, + 5, 6, -1, -1, 9, 10, 11, -1, -1, 14, + -1, 16, -1, -1, -1, 20, 21, 22, -1, -1, + -1, -1, -1, -1, 29, 30, 31, 32, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 43, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 59, -1, -1, -1, -1, -1, + -1, 66, 67, 68, -1, 70, 71, 72, 73, 74, + 75, -1, -1, 78, 79, 80, 81, 82, 83, -1, + -1, -1, -1, 4, 5, 6, -1, -1, 9, 10, + 11, -1, -1, 14, -1, 16, -1, -1, -1, 20, + 21, 22, -1, -1, -1, -1, -1, -1, 29, 30, + 31, 32, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 43, -1, -1, -1, 47, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 59, -1, + -1, -1, -1, -1, 65, 66, 67, 68, -1, 70, + 71, 72, 73, 74, 75, -1, -1, 78, 79, 80, + 81, 82, 83, -1, -1, -1, -1, 4, 5, 6, -1, -1, 9, 10, 11, -1, -1, 14, -1, 16, -1, -1, -1, 20, 21, 22, -1, -1, -1, -1, -1, -1, 29, 30, 31, 32, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 43, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 59, -1, -1, -1, -1, -1, -1, 66, + 47, -1, -1, -1, -1, -1, -1, -1, 55, -1, + -1, -1, 59, -1, -1, -1, -1, -1, 65, 66, 67, 68, -1, 70, 71, 72, 73, 74, 75, -1, -1, 78, 79, 80, 81, 82, 83, -1, -1, -1, - -1, 4, 5, 6, -1, -1, 9, 10, 11, -1, - -1, 14, -1, 16, -1, -1, -1, 20, 21, 22, - -1, -1, -1, -1, -1, -1, 29, 30, 31, 32, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 43, -1, -1, -1, 47, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 59, -1, -1, -1, - -1, -1, 65, 66, 67, 68, -1, 70, 71, 72, + -1, 4, -1, -1, -1, -1, 9, -1, 11, 12, + 13, 14, -1, -1, -1, -1, -1, -1, 21, 22, + -1, -1, -1, -1, -1, -1, 29, 30, -1, -1, + 33, 34, -1, 36, -1, -1, -1, 40, -1, 42, + 43, 44, -1, -1, 47, -1, -1, -1, 51, -1, + 53, -1, -1, -1, -1, -1, 59, -1, 61, -1, + -1, -1, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, -1, -1, 78, 79, 80, 81, 82, - 83, -1, -1, -1, -1, 4, 5, 6, -1, -1, - 9, 10, 11, -1, -1, 14, -1, 16, -1, -1, - -1, 20, 21, 22, -1, -1, -1, -1, -1, -1, - 29, 30, 31, 32, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 43, -1, -1, -1, 47, -1, - -1, -1, -1, -1, -1, -1, 55, -1, -1, -1, - 59, -1, -1, -1, -1, -1, 65, 66, 67, 68, - -1, 70, 71, 72, 73, 74, 75, -1, -1, 78, - 79, 80, 81, 82, 83, -1, -1, -1, -1, 4, + -1, -1, -1, -1, -1, 4, -1, -1, -1, -1, + 9, -1, 11, 12, 13, 14, -1, -1, -1, -1, + -1, -1, 21, 22, -1, -1, -1, -1, -1, -1, + 29, 30, -1, -1, 33, 34, -1, 36, -1, -1, + -1, 40, -1, 42, 43, 44, -1, -1, 47, -1, + -1, -1, 51, -1, 53, -1, -1, -1, -1, -1, + 59, -1, 61, -1, -1, -1, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, -1, -1, 78, + 79, 80, 81, 82, -1, -1, -1, -1, -1, 4, -1, -1, -1, -1, 9, -1, 11, 12, 13, 14, -1, -1, -1, -1, -1, -1, 21, 22, -1, -1, -1, -1, -1, -1, 29, 30, -1, -1, 33, 34, @@ -630,67 +659,51 @@ const int JavaScriptGrammar::action_check [] = { 51, -1, 53, -1, -1, -1, -1, -1, 59, -1, 61, -1, -1, -1, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, -1, -1, 78, 79, 80, - 81, 82, -1, -1, -1, -1, -1, 4, -1, -1, - -1, -1, 9, -1, 11, 12, 13, 14, -1, -1, - -1, -1, -1, -1, 21, 22, -1, -1, -1, -1, - -1, -1, 29, 30, -1, -1, 33, 34, -1, 36, + 81, 82, -1, -1, -1, -1, -1, 4, 5, 6, + -1, -1, 9, 10, 11, 12, 13, 14, -1, 16, + -1, -1, -1, 20, 21, 22, -1, -1, -1, -1, + -1, -1, 29, 30, 31, 32, 33, 34, -1, 36, -1, -1, -1, 40, -1, 42, 43, 44, -1, -1, - 47, -1, -1, -1, 51, -1, 53, -1, -1, -1, + 47, -1, -1, -1, 51, -1, 53, -1, 55, -1, -1, -1, 59, -1, 61, -1, -1, -1, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, -1, - -1, 78, 79, 80, 81, 82, -1, -1, -1, -1, - -1, 4, -1, -1, -1, -1, 9, -1, 11, 12, - 13, 14, -1, -1, -1, -1, -1, -1, 21, 22, - -1, -1, -1, -1, -1, -1, 29, 30, -1, -1, - 33, 34, -1, 36, -1, -1, -1, 40, -1, 42, - 43, 44, -1, -1, 47, -1, -1, -1, 51, -1, - 53, -1, -1, -1, -1, -1, 59, -1, 61, -1, - -1, -1, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 75, -1, -1, 78, 79, 80, 81, 82, - -1, -1, -1, -1, -1, 4, 5, 6, -1, -1, - 9, 10, 11, 12, 13, 14, -1, 16, -1, -1, - -1, 20, 21, 22, -1, -1, -1, -1, -1, -1, - 29, 30, 31, 32, 33, 34, -1, 36, -1, -1, - -1, 40, -1, 42, 43, 44, -1, -1, 47, -1, - -1, -1, 51, -1, 53, -1, 55, -1, -1, -1, - 59, -1, 61, -1, -1, -1, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, -1, -1, 78, - 79, 80, 81, 82, 83, -1, -1, -1, -1, + -1, 78, 79, 80, 81, 82, 83, -1, -1, -1, + -1, - 12, 20, 11, 20, 12, 16, 20, 20, 84, 58, - 87, 54, 58, 20, 89, 12, 11, 20, 12, 12, - 72, 72, 22, 58, 20, 9, 11, 14, 20, 11, - 78, 12, 12, 11, 11, 5, 11, 20, 76, 12, - 11, 20, 11, 90, 12, 11, 20, 23, 58, 12, - 11, -1, 12, 12, 12, 12, 12, 12, 10, 9, - 9, -1, 6, 11, 11, -1, 31, 31, -1, 31, - 14, 36, 36, 35, 8, 2, 10, 31, 31, -1, - 31, 35, 35, -1, -1, 36, 11, 14, 31, 31, - 31, 31, 31, 6, 11, 31, 13, 36, 31, 41, - 36, 14, 43, 36, 47, 45, 25, 31, 31, 28, - 31, 34, 36, 31, 12, 36, 12, 31, 36, 33, - 31, 31, 33, 33, 31, 31, 33, 31, 34, 31, - 31, 33, 36, -1, 31, 36, 33, 31, 12, 33, - 12, 23, 24, 31, 31, 33, 33, 31, 31, 33, - 31, 20, 25, 20, 37, 28, 37, 55, 27, 55, - 27, 31, -1, 31, -1, 31, 36, 31, 31, 37, - 33, 37, 31, 7, 33, 39, 10, 31, 31, 33, - 33, 55, 31, 55, 33, 31, 31, 31, 31, 31, - 36, 36, 36, 36, 36, 11, -1, 13, 31, 31, - 42, 46, 48, 36, 36, -1, 31, -1, 31, 53, - 53, 36, 44, 36, 31, 38, -1, 31, 31, 36, - 53, 38, 36, 36, 31, 38, 40, 31, 53, 36, - -1, -1, 36, -1, 38, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 53, -1, -1, -1, + 72, 84, 76, 20, 12, 12, 87, 5, 72, 10, + 12, 11, 9, 9, 20, 54, 58, 12, 11, 89, + 12, 11, 16, 14, 11, 58, 11, 78, 11, 90, + 12, 20, 20, 11, 11, 11, 20, 12, 12, 11, + 11, 11, 23, 12, 12, 58, 58, 20, -1, 12, + 12, -1, 11, 20, 20, 20, 12, 12, 22, 20, + 20, 12, 12, 12, 11, 8, 7, 10, 20, 10, + 23, 24, -1, 31, 31, 27, 6, 31, 36, 36, + -1, -1, 36, 31, 14, 31, 31, 31, 36, 33, + 36, 31, 37, 33, 31, 31, 31, 31, 33, 31, + 31, 37, 39, 37, 35, 37, 31, 31, 20, 33, + 31, 31, 31, 9, 33, 27, 25, 31, 43, 28, + 41, 31, 36, 33, 31, 45, 31, 31, 31, 36, + 35, 31, 35, 33, 31, 12, 33, 31, 31, 12, + 33, 25, 36, 47, 28, 31, 12, 33, 31, 12, + 33, 31, 31, 33, -1, 31, 31, 36, 33, 31, + 36, 31, 34, 33, 31, 2, 33, 31, 11, 31, + 13, 6, 36, -1, 36, 31, 31, 14, 55, 14, + 36, 36, 55, 31, 11, -1, 13, -1, 36, 55, + 31, -1, 55, -1, -1, 36, 44, 53, 53, 31, + -1, 42, 31, 31, 36, 34, 38, 31, 36, -1, + 38, 31, 36, -1, 38, 31, 36, 31, 38, 31, + 36, 31, 36, 31, 36, -1, 36, 31, 36, -1, + 40, -1, 36, -1, -1, -1, 48, 53, -1, 53, + -1, -1, 46, -1, -1, 53, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 91, -1, -1, -1, -1, 11, + -1, 13, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 11, -1, 13, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 91, -1, -1, -1, -1, -1, - -1}; + -1, -1, -1, -1, 96, -1}; diff --git a/src/declarative/qml/parser/javascriptgrammar_p.h b/src/declarative/qml/parser/javascriptgrammar_p.h index 490acb2..22d3d76 100644 --- a/src/declarative/qml/parser/javascriptgrammar_p.h +++ b/src/declarative/qml/parser/javascriptgrammar_p.h @@ -148,14 +148,14 @@ public: T_XOR_EQ = 77, ACCEPT_STATE = 7, - RULE_COUNT = 296, - STATE_COUNT = 520, + RULE_COUNT = 298, + STATE_COUNT = 525, TERMINAL_COUNT = 88, NON_TERMINAL_COUNT = 98, - GOTO_INDEX_OFFSET = 520, - GOTO_INFO_OFFSET = 1629, - GOTO_CHECK_OFFSET = 1629 + GOTO_INDEX_OFFSET = 525, + GOTO_INFO_OFFSET = 1671, + GOTO_CHECK_OFFSET = 1671 }; static const char *const spell []; diff --git a/src/declarative/qml/parser/javascriptlexer.cpp b/src/declarative/qml/parser/javascriptlexer.cpp index 80a558d..81f0983 100644 --- a/src/declarative/qml/parser/javascriptlexer.cpp +++ b/src/declarative/qml/parser/javascriptlexer.cpp @@ -311,7 +311,7 @@ int JavaScript::Lexer::findReservedWord(const QChar *c, int size) const else if (c[0] == QLatin1Char('p') && c[1] == QLatin1Char('u') && c[2] == QLatin1Char('b') && c[3] == QLatin1Char('l') && c[4] == QLatin1Char('i') && c[5] == QLatin1Char('c')) - return JavaScriptGrammar::T_RESERVED_WORD; + return JavaScriptGrammar::T_PUBLIC; else if (c[0] == QLatin1Char('n') && c[1] == QLatin1Char('a') && c[2] == QLatin1Char('t') && c[3] == QLatin1Char('i') && c[4] == QLatin1Char('v') && c[5] == QLatin1Char('e')) diff --git a/src/declarative/qml/parser/javascriptparser.cpp b/src/declarative/qml/parser/javascriptparser.cpp index 6221386..81a7e7b 100644 --- a/src/declarative/qml/parser/javascriptparser.cpp +++ b/src/declarative/qml/parser/javascriptparser.cpp @@ -266,6 +266,15 @@ case 22: { } break; case 23: { + AST::UiPublicMember *node = makeAstNode (driver->nodePool(), sym(3).sval, sym(4).sval); + node->isDefaultMember = true; + node->publicToken = loc(1); + node->attributeTypeToken = loc(3); + node->identifierToken = loc(4); + sym(1).Node = node; +} break; + +case 24: { AST::UiPublicMember *node = makeAstNode (driver->nodePool(), sym(2).sval, sym(3).sval, sym(5).Expression); node->publicToken = loc(1); @@ -275,69 +284,80 @@ case 23: { sym(1).Node = node; } break; -case 24: { +case 25: { + AST::UiPublicMember *node = makeAstNode (driver->nodePool(), sym(3).sval, sym(4).sval, + sym(6).Expression); + node->isDefaultMember = true; + node->publicToken = loc(1); + node->attributeTypeToken = loc(3); + node->identifierToken = loc(4); + node->colonToken = loc(5); + sym(1).Node = node; +} break; + +case 26: { sym(1).Node = makeAstNode(driver->nodePool(), sym(1).Node); } break; -case 25: { +case 27: { sym(1).Node = makeAstNode(driver->nodePool(), sym(1).Node); } break; -case 26: { +case 28: { AST::UiQualifiedId *node = makeAstNode (driver->nodePool(), sym(1).sval); node->identifierToken = loc(1); sym(1).Node = node; } break; -case 27: { +case 29: { AST::UiQualifiedId *node = makeAstNode (driver->nodePool(), sym(1).UiQualifiedId, sym(3).sval); node->identifierToken = loc(3); sym(1).Node = node; } break; -case 28: { +case 30: { AST::ThisExpression *node = makeAstNode (driver->nodePool()); node->thisToken = loc(1); sym(1).Node = node; } break; -case 29: { +case 31: { AST::IdentifierExpression *node = makeAstNode (driver->nodePool(), sym(1).sval); node->identifierToken = loc(1); sym(1).Node = node; } break; -case 30: { +case 32: { AST::NullExpression *node = makeAstNode (driver->nodePool()); node->nullToken = loc(1); sym(1).Node = node; } break; -case 31: { +case 33: { AST::TrueLiteral *node = makeAstNode (driver->nodePool()); node->trueToken = loc(1); sym(1).Node = node; } break; -case 32: { +case 34: { AST::FalseLiteral *node = makeAstNode (driver->nodePool()); node->falseToken = loc(1); sym(1).Node = node; } break; -case 33: { +case 35: { AST::NumericLiteral *node = makeAstNode (driver->nodePool(), sym(1).dval); node->literalToken = loc(1); sym(1).Node = node; } break; -case 34: { +case 36: { AST::StringLiteral *node = makeAstNode (driver->nodePool(), sym(1).sval); node->literalToken = loc(1); sym(1).Node = node; } break; -case 35: { +case 37: { bool rx = lexer->scanRegExp(Lexer::NoPrefix); if (!rx) { diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, lexer->startLineNo(), @@ -349,7 +369,7 @@ case 35: { sym(1).Node = node; } break; -case 36: { +case 38: { bool rx = lexer->scanRegExp(Lexer::EqualPrefix); if (!rx) { diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, lexer->startLineNo(), @@ -361,21 +381,21 @@ case 36: { sym(1).Node = node; } break; -case 37: { +case 39: { AST::ArrayLiteral *node = makeAstNode (driver->nodePool(), sym(2).Elision); node->lbracketToken = loc(1); node->rbracketToken = loc(3); sym(1).Node = node; } break; -case 38: { +case 40: { AST::ArrayLiteral *node = makeAstNode (driver->nodePool(), sym(2).ElementList->finish ()); node->lbracketToken = loc(1); node->rbracketToken = loc(3); sym(1).Node = node; } break; -case 39: { +case 41: { AST::ArrayLiteral *node = makeAstNode (driver->nodePool(), sym(2).ElementList->finish (), sym(4).Elision); node->lbracketToken = loc(1); node->commaToken = loc(3); @@ -383,7 +403,7 @@ case 39: { sym(1).Node = node; } break; -case 40: { +case 42: { AST::ObjectLiteral *node = 0; if (sym(2).Node) node = makeAstNode (driver->nodePool(), @@ -395,7 +415,7 @@ case 40: { sym(1).Node = node; } break; -case 41: { +case 43: { AST::ObjectLiteral *node = makeAstNode (driver->nodePool(), sym(2).PropertyNameAndValueList->finish ()); node->lbraceToken = loc(1); @@ -403,51 +423,51 @@ case 41: { sym(1).Node = node; } break; -case 42: { +case 44: { AST::NestedExpression *node = makeAstNode(driver->nodePool(), sym(2).Expression); node->lparenToken = loc(1); node->rparenToken = loc(3); sym(1).Node = node; } break; -case 43: { +case 45: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).Elision, sym(2).Expression); } break; -case 44: { +case 46: { AST::ElementList *node = makeAstNode (driver->nodePool(), sym(1).ElementList, sym(3).Elision, sym(4).Expression); node->commaToken = loc(2); sym(1).Node = node; } break; -case 45: { +case 47: { AST::Elision *node = makeAstNode (driver->nodePool()); node->commaToken = loc(1); sym(1).Node = node; } break; -case 46: { +case 48: { AST::Elision *node = makeAstNode (driver->nodePool(), sym(1).Elision); node->commaToken = loc(2); sym(1).Node = node; } break; -case 47: { +case 49: { sym(1).Node = 0; } break; -case 48: { +case 50: { sym(1).Elision = sym(1).Elision->finish (); } break; -case 49: { +case 51: { AST::PropertyNameAndValueList *node = makeAstNode (driver->nodePool(), sym(1).PropertyName, sym(3).Expression); node->colonToken = loc(2); sym(1).Node = node; } break; -case 50: { +case 52: { AST::PropertyNameAndValueList *node = makeAstNode (driver->nodePool(), sym(1).PropertyNameAndValueList, sym(3).PropertyName, sym(5).Expression); node->commaToken = loc(2); @@ -455,34 +475,30 @@ case 50: { sym(1).Node = node; } break; -case 51: { +case 53: { AST::IdentifierPropertyName *node = makeAstNode (driver->nodePool(), sym(1).sval); node->propertyNameToken = loc(1); sym(1).Node = node; } break; -case 52: { +case 54: { AST::StringLiteralPropertyName *node = makeAstNode (driver->nodePool(), sym(1).sval); node->propertyNameToken = loc(1); sym(1).Node = node; } break; -case 53: { +case 55: { AST::NumericLiteralPropertyName *node = makeAstNode (driver->nodePool(), sym(1).dval); node->propertyNameToken = loc(1); sym(1).Node = node; } break; -case 54: { +case 56: { AST::IdentifierPropertyName *node = makeAstNode (driver->nodePool(), sym(1).sval); node->propertyNameToken = loc(1); sym(1).Node = node; } break; -case 55: - -case 56: - case 57: case 58: @@ -540,25 +556,29 @@ case 83: case 84: case 85: + +case 86: + +case 87: { sym(1).sval = driver->intern(lexer->characterBuffer(), lexer->characterCount()); } break; -case 90: { +case 92: { AST::ArrayMemberExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).Expression); node->lbracketToken = loc(2); node->rbracketToken = loc(4); sym(1).Node = node; } break; -case 91: { +case 93: { AST::FieldMemberExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).sval); node->dotToken = loc(2); node->identifierToken = loc(3); sym(1).Node = node; } break; -case 92: { +case 94: { AST::NewMemberExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression, sym(4).ArgumentList); node->newToken = loc(1); node->lparenToken = loc(3); @@ -566,316 +586,309 @@ case 92: { sym(1).Node = node; } break; -case 94: { +case 96: { AST::NewExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->newToken = loc(1); sym(1).Node = node; } break; -case 95: { +case 97: { AST::CallExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).ArgumentList); node->lparenToken = loc(2); node->rparenToken = loc(4); sym(1).Node = node; } break; -case 96: { +case 98: { AST::CallExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).ArgumentList); node->lparenToken = loc(2); node->rparenToken = loc(4); sym(1).Node = node; } break; -case 97: { +case 99: { AST::ArrayMemberExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).Expression); node->lbracketToken = loc(2); node->rbracketToken = loc(4); sym(1).Node = node; } break; -case 98: { +case 100: { AST::FieldMemberExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).sval); node->dotToken = loc(2); node->identifierToken = loc(3); sym(1).Node = node; } break; -case 99: { +case 101: { sym(1).Node = 0; } break; -case 100: { +case 102: { sym(1).Node = sym(1).ArgumentList->finish(); } break; -case 101: { +case 103: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).Expression); } break; -case 102: { +case 104: { AST::ArgumentList *node = makeAstNode (driver->nodePool(), sym(1).ArgumentList, sym(3).Expression); node->commaToken = loc(2); sym(1).Node = node; } break; -case 106: { +case 108: { AST::PostIncrementExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression); node->incrementToken = loc(2); sym(1).Node = node; } break; -case 107: { +case 109: { AST::PostDecrementExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression); node->decrementToken = loc(2); sym(1).Node = node; } break; -case 109: { +case 111: { AST::DeleteExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->deleteToken = loc(1); sym(1).Node = node; } break; -case 110: { +case 112: { AST::VoidExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->voidToken = loc(1); sym(1).Node = node; } break; -case 111: { +case 113: { AST::TypeOfExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->typeofToken = loc(1); sym(1).Node = node; } break; -case 112: { +case 114: { AST::PreIncrementExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->incrementToken = loc(1); sym(1).Node = node; } break; -case 113: { +case 115: { AST::PreDecrementExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->decrementToken = loc(1); sym(1).Node = node; } break; -case 114: { +case 116: { AST::UnaryPlusExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->plusToken = loc(1); sym(1).Node = node; } break; -case 115: { +case 117: { AST::UnaryMinusExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->minusToken = loc(1); sym(1).Node = node; } break; -case 116: { +case 118: { AST::TildeExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->tildeToken = loc(1); sym(1).Node = node; } break; -case 117: { +case 119: { AST::NotExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->notToken = loc(1); sym(1).Node = node; } break; -case 119: { +case 121: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Mul, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 120: { +case 122: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Div, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 121: { +case 123: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Mod, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 123: { +case 125: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Add, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 124: { +case 126: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Sub, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 126: { +case 128: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::LShift, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 127: { +case 129: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::RShift, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 128: { +case 130: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::URShift, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 130: { +case 132: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Lt, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 131: { +case 133: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Gt, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 132: { +case 134: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Le, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 133: { +case 135: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Ge, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 134: { +case 136: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::InstanceOf, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 135: { +case 137: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::In, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 137: { +case 139: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Lt, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 138: { +case 140: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Gt, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 139: { +case 141: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Le, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 140: { +case 142: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Ge, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 141: { +case 143: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::InstanceOf, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 143: { +case 145: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Equal, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 144: { +case 146: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::NotEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 145: { +case 147: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::StrictEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 146: { +case 148: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::StrictNotEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 148: { +case 150: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Equal, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 149: { +case 151: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::NotEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 150: { +case 152: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::StrictEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 151: { - AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, - QSOperator::StrictNotEqual, sym(3).Expression); - node->operatorToken = loc(2); - sym(1).Node = node; -} break; - case 153: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, - QSOperator::BitAnd, sym(3).Expression); + QSOperator::StrictNotEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; @@ -889,7 +902,7 @@ case 155: { case 157: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, - QSOperator::BitXor, sym(3).Expression); + QSOperator::BitAnd, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; @@ -903,7 +916,7 @@ case 159: { case 161: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, - QSOperator::BitOr, sym(3).Expression); + QSOperator::BitXor, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; @@ -917,7 +930,7 @@ case 163: { case 165: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, - QSOperator::And, sym(3).Expression); + QSOperator::BitOr, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; @@ -931,7 +944,7 @@ case 167: { case 169: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, - QSOperator::Or, sym(3).Expression); + QSOperator::And, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; @@ -944,6 +957,13 @@ case 171: { } break; case 173: { + AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, + QSOperator::Or, sym(3).Expression); + node->operatorToken = loc(2); + sym(1).Node = node; +} break; + +case 175: { AST::ConditionalExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).Expression, sym(5).Expression); node->questionToken = loc(2); @@ -951,7 +971,7 @@ case 173: { sym(1).Node = node; } break; -case 175: { +case 177: { AST::ConditionalExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).Expression, sym(5).Expression); node->questionToken = loc(2); @@ -959,112 +979,112 @@ case 175: { sym(1).Node = node; } break; -case 177: { +case 179: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(2).ival, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 179: { +case 181: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(2).ival, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 180: { +case 182: { sym(1).ival = QSOperator::Assign; } break; -case 181: { +case 183: { sym(1).ival = QSOperator::InplaceMul; } break; -case 182: { +case 184: { sym(1).ival = QSOperator::InplaceDiv; } break; -case 183: { +case 185: { sym(1).ival = QSOperator::InplaceMod; } break; -case 184: { +case 186: { sym(1).ival = QSOperator::InplaceAdd; } break; -case 185: { +case 187: { sym(1).ival = QSOperator::InplaceSub; } break; -case 186: { +case 188: { sym(1).ival = QSOperator::InplaceLeftShift; } break; -case 187: { +case 189: { sym(1).ival = QSOperator::InplaceRightShift; } break; -case 188: { +case 190: { sym(1).ival = QSOperator::InplaceURightShift; } break; -case 189: { +case 191: { sym(1).ival = QSOperator::InplaceAnd; } break; -case 190: { +case 192: { sym(1).ival = QSOperator::InplaceXor; } break; -case 191: { +case 193: { sym(1).ival = QSOperator::InplaceOr; } break; -case 193: { +case 195: { AST::Expression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).Expression); node->commaToken = loc(2); sym(1).Node = node; } break; -case 194: { +case 196: { sym(1).Node = 0; } break; -case 197: { +case 199: { AST::Expression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).Expression); node->commaToken = loc(2); sym(1).Node = node; } break; -case 198: { +case 200: { sym(1).Node = 0; } break; -case 215: { +case 217: { AST::Block *node = makeAstNode (driver->nodePool(), sym(2).StatementList); node->lbraceToken = loc(1); node->rbraceToken = loc(3); sym(1).Node = node; } break; -case 216: { +case 218: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).Statement); } break; -case 217: { +case 219: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).StatementList, sym(2).Statement); } break; -case 218: { +case 220: { sym(1).Node = 0; } break; -case 219: { +case 221: { sym(1).Node = sym(1).StatementList->finish (); } break; -case 221: { +case 223: { AST::VariableStatement *node = makeAstNode (driver->nodePool(), sym(2).VariableDeclarationList->finish (/*readOnly=*/sym(1).ival == T_CONST)); node->declarationKindToken = loc(1); @@ -1072,76 +1092,76 @@ case 221: { sym(1).Node = node; } break; -case 222: { +case 224: { sym(1).ival = T_CONST; } break; -case 223: { +case 225: { sym(1).ival = T_VAR; } break; -case 224: { +case 226: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).VariableDeclaration); } break; -case 225: { +case 227: { AST::VariableDeclarationList *node = makeAstNode (driver->nodePool(), sym(1).VariableDeclarationList, sym(3).VariableDeclaration); node->commaToken = loc(2); sym(1).Node = node; } break; -case 226: { +case 228: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).VariableDeclaration); } break; -case 227: { +case 229: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).VariableDeclarationList, sym(3).VariableDeclaration); } break; -case 228: { +case 230: { AST::VariableDeclaration *node = makeAstNode (driver->nodePool(), sym(1).sval, sym(2).Expression); node->identifierToken = loc(1); sym(1).Node = node; } break; -case 229: { +case 231: { AST::VariableDeclaration *node = makeAstNode (driver->nodePool(), sym(1).sval, sym(2).Expression); node->identifierToken = loc(1); sym(1).Node = node; } break; -case 230: { +case 232: { // ### TODO: AST for initializer sym(1) = sym(2); } break; -case 231: { +case 233: { sym(1).Node = 0; } break; -case 233: { +case 235: { // ### TODO: AST for initializer sym(1) = sym(2); } break; -case 234: { +case 236: { sym(1).Node = 0; } break; -case 236: { +case 238: { AST::EmptyStatement *node = makeAstNode (driver->nodePool()); node->semicolonToken = loc(1); sym(1).Node = node; } break; -case 238: { +case 240: { AST::ExpressionStatement *node = makeAstNode (driver->nodePool(), sym(1).Expression); node->semicolonToken = loc(2); sym(1).Node = node; } break; -case 239: { +case 241: { AST::IfStatement *node = makeAstNode (driver->nodePool(), sym(3).Expression, sym(5).Statement, sym(7).Statement); node->ifToken = loc(1); node->lparenToken = loc(2); @@ -1150,7 +1170,7 @@ case 239: { sym(1).Node = node; } break; -case 240: { +case 242: { AST::IfStatement *node = makeAstNode (driver->nodePool(), sym(3).Expression, sym(5).Statement); node->ifToken = loc(1); node->lparenToken = loc(2); @@ -1158,7 +1178,7 @@ case 240: { sym(1).Node = node; } break; -case 242: { +case 244: { AST::DoWhileStatement *node = makeAstNode (driver->nodePool(), sym(2).Statement, sym(5).Expression); node->doToken = loc(1); node->whileToken = loc(3); @@ -1168,7 +1188,7 @@ case 242: { sym(1).Node = node; } break; -case 243: { +case 245: { AST::WhileStatement *node = makeAstNode (driver->nodePool(), sym(3).Expression, sym(5).Statement); node->whileToken = loc(1); node->lparenToken = loc(2); @@ -1176,7 +1196,7 @@ case 243: { sym(1).Node = node; } break; -case 244: { +case 246: { AST::ForStatement *node = makeAstNode (driver->nodePool(), sym(3).Expression, sym(5).Expression, sym(7).Expression, sym(9).Statement); node->forToken = loc(1); @@ -1187,7 +1207,7 @@ case 244: { sym(1).Node = node; } break; -case 245: { +case 247: { AST::LocalForStatement *node = makeAstNode (driver->nodePool(), sym(4).VariableDeclarationList->finish (/*readOnly=*/false), sym(6).Expression, sym(8).Expression, sym(10).Statement); @@ -1200,7 +1220,7 @@ case 245: { sym(1).Node = node; } break; -case 246: { +case 248: { AST:: ForEachStatement *node = makeAstNode (driver->nodePool(), sym(3).Expression, sym(5).Expression, sym(7).Statement); node->forToken = loc(1); @@ -1210,7 +1230,7 @@ case 246: { sym(1).Node = node; } break; -case 247: { +case 249: { AST::LocalForEachStatement *node = makeAstNode (driver->nodePool(), sym(4).VariableDeclaration, sym(6).Expression, sym(8).Statement); node->forToken = loc(1); @@ -1221,14 +1241,14 @@ case 247: { sym(1).Node = node; } break; -case 249: { +case 251: { AST::ContinueStatement *node = makeAstNode (driver->nodePool()); node->continueToken = loc(1); node->semicolonToken = loc(2); sym(1).Node = node; } break; -case 251: { +case 253: { AST::ContinueStatement *node = makeAstNode (driver->nodePool(), sym(2).sval); node->continueToken = loc(1); node->identifierToken = loc(2); @@ -1236,14 +1256,14 @@ case 251: { sym(1).Node = node; } break; -case 253: { +case 255: { AST::BreakStatement *node = makeAstNode (driver->nodePool()); node->breakToken = loc(1); node->semicolonToken = loc(2); sym(1).Node = node; } break; -case 255: { +case 257: { AST::BreakStatement *node = makeAstNode (driver->nodePool(), sym(2).sval); node->breakToken = loc(1); node->identifierToken = loc(2); @@ -1251,14 +1271,14 @@ case 255: { sym(1).Node = node; } break; -case 257: { +case 259: { AST::ReturnStatement *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->returnToken = loc(1); node->semicolonToken = loc(3); sym(1).Node = node; } break; -case 258: { +case 260: { AST::WithStatement *node = makeAstNode (driver->nodePool(), sym(3).Expression, sym(5).Statement); node->withToken = loc(1); node->lparenToken = loc(2); @@ -1266,7 +1286,7 @@ case 258: { sym(1).Node = node; } break; -case 259: { +case 261: { AST::SwitchStatement *node = makeAstNode (driver->nodePool(), sym(3).Expression, sym(5).CaseBlock); node->switchToken = loc(1); node->lparenToken = loc(2); @@ -1274,83 +1294,83 @@ case 259: { sym(1).Node = node; } break; -case 260: { +case 262: { AST::CaseBlock *node = makeAstNode (driver->nodePool(), sym(2).CaseClauses); node->lbraceToken = loc(1); node->rbraceToken = loc(3); sym(1).Node = node; } break; -case 261: { +case 263: { AST::CaseBlock *node = makeAstNode (driver->nodePool(), sym(2).CaseClauses, sym(3).DefaultClause, sym(4).CaseClauses); node->lbraceToken = loc(1); node->rbraceToken = loc(5); sym(1).Node = node; } break; -case 262: { +case 264: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).CaseClause); } break; -case 263: { +case 265: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).CaseClauses, sym(2).CaseClause); } break; -case 264: { +case 266: { sym(1).Node = 0; } break; -case 265: { +case 267: { sym(1).Node = sym(1).CaseClauses->finish (); } break; -case 266: { +case 268: { AST::CaseClause *node = makeAstNode (driver->nodePool(), sym(2).Expression, sym(4).StatementList); node->caseToken = loc(1); node->colonToken = loc(3); sym(1).Node = node; } break; -case 267: { +case 269: { AST::DefaultClause *node = makeAstNode (driver->nodePool(), sym(3).StatementList); node->defaultToken = loc(1); node->colonToken = loc(2); sym(1).Node = node; } break; -case 268: { +case 270: { AST::LabelledStatement *node = makeAstNode (driver->nodePool(), sym(1).sval, sym(3).Statement); node->identifierToken = loc(1); node->colonToken = loc(2); sym(1).Node = node; } break; -case 270: { +case 272: { AST::ThrowStatement *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->throwToken = loc(1); node->semicolonToken = loc(3); sym(1).Node = node; } break; -case 271: { +case 273: { AST::TryStatement *node = makeAstNode (driver->nodePool(), sym(2).Statement, sym(3).Catch); node->tryToken = loc(1); sym(1).Node = node; } break; -case 272: { +case 274: { AST::TryStatement *node = makeAstNode (driver->nodePool(), sym(2).Statement, sym(3).Finally); node->tryToken = loc(1); sym(1).Node = node; } break; -case 273: { +case 275: { AST::TryStatement *node = makeAstNode (driver->nodePool(), sym(2).Statement, sym(3).Catch, sym(4).Finally); node->tryToken = loc(1); sym(1).Node = node; } break; -case 274: { +case 276: { AST::Catch *node = makeAstNode (driver->nodePool(), sym(3).sval, sym(5).Block); node->catchToken = loc(1); node->lparenToken = loc(2); @@ -1359,20 +1379,20 @@ case 274: { sym(1).Node = node; } break; -case 275: { +case 277: { AST::Finally *node = makeAstNode (driver->nodePool(), sym(2).Block); node->finallyToken = loc(1); sym(1).Node = node; } break; -case 277: { +case 279: { AST::DebuggerStatement *node = makeAstNode (driver->nodePool()); node->debuggerToken = loc(1); node->semicolonToken = loc(2); sym(1).Node = node; } break; -case 278: { +case 280: { AST::FunctionDeclaration *node = makeAstNode (driver->nodePool(), sym(2).sval, sym(4).FormalParameterList, sym(7).FunctionBody); node->functionToken = loc(1); node->identifierToken = loc(2); @@ -1383,7 +1403,7 @@ case 278: { sym(1).Node = node; } break; -case 279: { +case 281: { AST::FunctionExpression *node = makeAstNode (driver->nodePool(), sym(2).sval, sym(4).FormalParameterList, sym(7).FunctionBody); node->functionToken = loc(1); if (sym(2).sval) @@ -1395,56 +1415,56 @@ case 279: { sym(1).Node = node; } break; -case 280: { +case 282: { AST::FormalParameterList *node = makeAstNode (driver->nodePool(), sym(1).sval); node->identifierToken = loc(1); sym(1).Node = node; } break; -case 281: { +case 283: { AST::FormalParameterList *node = makeAstNode (driver->nodePool(), sym(1).FormalParameterList, sym(3).sval); node->commaToken = loc(2); node->identifierToken = loc(3); sym(1).Node = node; } break; -case 282: { +case 284: { sym(1).Node = 0; } break; -case 283: { +case 285: { sym(1).Node = sym(1).FormalParameterList->finish (); } break; -case 284: { +case 286: { sym(1).Node = 0; } break; -case 286: { +case 288: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).SourceElements->finish ()); } break; -case 287: { +case 289: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).SourceElement); } break; -case 288: { +case 290: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).SourceElements, sym(2).SourceElement); } break; -case 289: { +case 291: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).Statement); } break; -case 290: { +case 292: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).FunctionDeclaration); } break; -case 291: { +case 293: { sym(1).sval = 0; } break; -case 293: { +case 295: { sym(1).Node = 0; } break; diff --git a/src/declarative/qml/parser/javascriptparser_p.h b/src/declarative/qml/parser/javascriptparser_p.h index c08a14a..226ad8b 100644 --- a/src/declarative/qml/parser/javascriptparser_p.h +++ b/src/declarative/qml/parser/javascriptparser_p.h @@ -204,9 +204,9 @@ protected: }; -#define J_SCRIPT_REGEXPLITERAL_RULE1 35 +#define J_SCRIPT_REGEXPLITERAL_RULE1 37 -#define J_SCRIPT_REGEXPLITERAL_RULE2 36 +#define J_SCRIPT_REGEXPLITERAL_RULE2 38 QT_END_NAMESPACE diff --git a/src/declarative/qml/qmlcompiler.cpp b/src/declarative/qml/qmlcompiler.cpp index fae0f43..4cfe1e8 100644 --- a/src/declarative/qml/qmlcompiler.cpp +++ b/src/declarative/qml/qmlcompiler.cpp @@ -1351,7 +1351,7 @@ bool QmlCompiler::findDynamicProperties(QmlParser::Property *prop, definedProperties << propDef; } - obj->dynamicProperties = definedProperties; + obj->dynamicProperties << definedProperties; return true; } @@ -1407,7 +1407,7 @@ bool QmlCompiler::findDynamicSignals(QmlParser::Property *sigs, definedSignals << sigDef; } - obj->dynamicSignals = definedSignals; + obj->dynamicSignals << definedSignals; return true; } diff --git a/src/declarative/qml/qmlscriptparser.cpp b/src/declarative/qml/qmlscriptparser.cpp index 317a3bf..adc30dd 100644 --- a/src/declarative/qml/qmlscriptparser.cpp +++ b/src/declarative/qml/qmlscriptparser.cpp @@ -326,6 +326,8 @@ bool ProcessAST::visit(AST::UiImport *node) return false; } +// UiObjectMember: T_PUBLIC T_DEFAULT UiMemberType T_IDENTIFIER T_COLON Expression +// UiObjectMember: T_PUBLIC T_DEFAULT UiMemberType T_IDENTIFIER // UiObjectMember: T_PUBLIC UiMemberType T_IDENTIFIER T_COLON Expression // UiObjectMember: T_PUBLIC UiMemberType T_IDENTIFIER // @@ -335,6 +337,9 @@ bool ProcessAST::visit(AST::UiPublicMember *node) const QString memberType = node->memberType->asString(); const QString name = node->name->asString(); + if (node->isDefaultMember) + qWarning() << "default-ness not implemented"; + if (memberType == QLatin1String("property")) { _stateStack.pushProperty(QLatin1String("properties"), node->publicToken.startLine); -- cgit v0.12 From ffef88ee5aa653ed0d15996057a7521f179d6f3b Mon Sep 17 00:00:00 2001 From: Yann Bodson Date: Thu, 30 Apr 2009 10:31:36 +1000 Subject: Rename the mediabrowser demo to match the content. --- .../mediabrowser/content/LikeOMeter.qml | 13 -- .../mediabrowser/content/MediaButton.qml | 21 ---- .../mediabrowser/content/PhoneInfoContainer.qml | 66 ---------- .../mediabrowser/content/PhonesPathView.qml | 79 ------------ .../declarative/mediabrowser/content/ScrollBar.qml | 18 --- demos/declarative/mediabrowser/content/Star.qml | 25 ---- .../mediabrowser/content/pics/background.png | Bin 60504 -> 0 bytes .../mediabrowser/content/pics/button-pressed.png | Bin 571 -> 0 bytes .../mediabrowser/content/pics/button.png | Bin 564 -> 0 bytes .../mediabrowser/content/pics/ghns_star.png | Bin 891 -> 0 bytes .../mediabrowser/content/pics/reflection.png | Bin 4839 -> 0 bytes .../mediabrowser/content/pics/shadow-bottom.png | Bin 656 -> 0 bytes .../mediabrowser/content/pics/shadow-corner.png | Bin 405 -> 0 bytes .../content/pics/shadow-right-screen.png | Bin 227 -> 0 bytes .../mediabrowser/content/pics/shadow-right.png | Bin 635 -> 0 bytes .../mediabrowser/dummydata/PhonesModel.qml | 137 --------------------- demos/declarative/mediabrowser/mediabrowser.qml | 36 ------ .../phonebrowser/content/LikeOMeter.qml | 13 ++ .../phonebrowser/content/MediaButton.qml | 21 ++++ .../phonebrowser/content/PhoneInfoContainer.qml | 66 ++++++++++ .../phonebrowser/content/PhonesPathView.qml | 79 ++++++++++++ .../declarative/phonebrowser/content/ScrollBar.qml | 18 +++ demos/declarative/phonebrowser/content/Star.qml | 25 ++++ .../phonebrowser/content/pics/background.png | Bin 0 -> 60504 bytes .../phonebrowser/content/pics/button-pressed.png | Bin 0 -> 571 bytes .../phonebrowser/content/pics/button.png | Bin 0 -> 564 bytes .../phonebrowser/content/pics/ghns_star.png | Bin 0 -> 891 bytes .../phonebrowser/content/pics/reflection.png | Bin 0 -> 4839 bytes .../phonebrowser/content/pics/shadow-bottom.png | Bin 0 -> 656 bytes .../phonebrowser/content/pics/shadow-corner.png | Bin 0 -> 405 bytes .../content/pics/shadow-right-screen.png | Bin 0 -> 227 bytes .../phonebrowser/content/pics/shadow-right.png | Bin 0 -> 635 bytes .../phonebrowser/dummydata/PhonesModel.qml | 137 +++++++++++++++++++++ demos/declarative/phonebrowser/phonebrowser.qml | 36 ++++++ 34 files changed, 395 insertions(+), 395 deletions(-) delete mode 100644 demos/declarative/mediabrowser/content/LikeOMeter.qml delete mode 100644 demos/declarative/mediabrowser/content/MediaButton.qml delete mode 100644 demos/declarative/mediabrowser/content/PhoneInfoContainer.qml delete mode 100644 demos/declarative/mediabrowser/content/PhonesPathView.qml delete mode 100644 demos/declarative/mediabrowser/content/ScrollBar.qml delete mode 100644 demos/declarative/mediabrowser/content/Star.qml delete mode 100644 demos/declarative/mediabrowser/content/pics/background.png delete mode 100644 demos/declarative/mediabrowser/content/pics/button-pressed.png delete mode 100644 demos/declarative/mediabrowser/content/pics/button.png delete mode 100644 demos/declarative/mediabrowser/content/pics/ghns_star.png delete mode 100644 demos/declarative/mediabrowser/content/pics/reflection.png delete mode 100644 demos/declarative/mediabrowser/content/pics/shadow-bottom.png delete mode 100644 demos/declarative/mediabrowser/content/pics/shadow-corner.png delete mode 100644 demos/declarative/mediabrowser/content/pics/shadow-right-screen.png delete mode 100644 demos/declarative/mediabrowser/content/pics/shadow-right.png delete mode 100644 demos/declarative/mediabrowser/dummydata/PhonesModel.qml delete mode 100644 demos/declarative/mediabrowser/mediabrowser.qml create mode 100644 demos/declarative/phonebrowser/content/LikeOMeter.qml create mode 100644 demos/declarative/phonebrowser/content/MediaButton.qml create mode 100644 demos/declarative/phonebrowser/content/PhoneInfoContainer.qml create mode 100644 demos/declarative/phonebrowser/content/PhonesPathView.qml create mode 100644 demos/declarative/phonebrowser/content/ScrollBar.qml create mode 100644 demos/declarative/phonebrowser/content/Star.qml create mode 100644 demos/declarative/phonebrowser/content/pics/background.png create mode 100644 demos/declarative/phonebrowser/content/pics/button-pressed.png create mode 100644 demos/declarative/phonebrowser/content/pics/button.png create mode 100644 demos/declarative/phonebrowser/content/pics/ghns_star.png create mode 100644 demos/declarative/phonebrowser/content/pics/reflection.png create mode 100644 demos/declarative/phonebrowser/content/pics/shadow-bottom.png create mode 100644 demos/declarative/phonebrowser/content/pics/shadow-corner.png create mode 100644 demos/declarative/phonebrowser/content/pics/shadow-right-screen.png create mode 100644 demos/declarative/phonebrowser/content/pics/shadow-right.png create mode 100644 demos/declarative/phonebrowser/dummydata/PhonesModel.qml create mode 100644 demos/declarative/phonebrowser/phonebrowser.qml diff --git a/demos/declarative/mediabrowser/content/LikeOMeter.qml b/demos/declarative/mediabrowser/content/LikeOMeter.qml deleted file mode 100644 index 68584a5..0000000 --- a/demos/declarative/mediabrowser/content/LikeOMeter.qml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/demos/declarative/mediabrowser/content/MediaButton.qml b/demos/declarative/mediabrowser/content/MediaButton.qml deleted file mode 100644 index 6c672ea..0000000 --- a/demos/declarative/mediabrowser/content/MediaButton.qml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - {Image.width} - - - - - - - diff --git a/demos/declarative/mediabrowser/content/PhoneInfoContainer.qml b/demos/declarative/mediabrowser/content/PhoneInfoContainer.qml deleted file mode 100644 index 34fd889..0000000 --- a/demos/declarative/mediabrowser/content/PhoneInfoContainer.qml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/demos/declarative/mediabrowser/content/PhonesPathView.qml b/demos/declarative/mediabrowser/content/PhonesPathView.qml deleted file mode 100644 index df7e742..0000000 --- a/demos/declarative/mediabrowser/content/PhonesPathView.qml +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/demos/declarative/mediabrowser/content/ScrollBar.qml b/demos/declarative/mediabrowser/content/ScrollBar.qml deleted file mode 100644 index 974f4d0..0000000 --- a/demos/declarative/mediabrowser/content/ScrollBar.qml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/demos/declarative/mediabrowser/content/Star.qml b/demos/declarative/mediabrowser/content/Star.qml deleted file mode 100644 index 37d314b..0000000 --- a/demos/declarative/mediabrowser/content/Star.qml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/demos/declarative/mediabrowser/content/pics/background.png b/demos/declarative/mediabrowser/content/pics/background.png deleted file mode 100644 index 5b37072..0000000 Binary files a/demos/declarative/mediabrowser/content/pics/background.png and /dev/null differ diff --git a/demos/declarative/mediabrowser/content/pics/button-pressed.png b/demos/declarative/mediabrowser/content/pics/button-pressed.png deleted file mode 100644 index e434d32..0000000 Binary files a/demos/declarative/mediabrowser/content/pics/button-pressed.png and /dev/null differ diff --git a/demos/declarative/mediabrowser/content/pics/button.png b/demos/declarative/mediabrowser/content/pics/button.png deleted file mode 100644 index 56a63ce..0000000 Binary files a/demos/declarative/mediabrowser/content/pics/button.png and /dev/null differ diff --git a/demos/declarative/mediabrowser/content/pics/ghns_star.png b/demos/declarative/mediabrowser/content/pics/ghns_star.png deleted file mode 100644 index 4ad43cc..0000000 Binary files a/demos/declarative/mediabrowser/content/pics/ghns_star.png and /dev/null differ diff --git a/demos/declarative/mediabrowser/content/pics/reflection.png b/demos/declarative/mediabrowser/content/pics/reflection.png deleted file mode 100644 index c143a48..0000000 Binary files a/demos/declarative/mediabrowser/content/pics/reflection.png and /dev/null differ diff --git a/demos/declarative/mediabrowser/content/pics/shadow-bottom.png b/demos/declarative/mediabrowser/content/pics/shadow-bottom.png deleted file mode 100644 index 523f6e7..0000000 Binary files a/demos/declarative/mediabrowser/content/pics/shadow-bottom.png and /dev/null differ diff --git a/demos/declarative/mediabrowser/content/pics/shadow-corner.png b/demos/declarative/mediabrowser/content/pics/shadow-corner.png deleted file mode 100644 index ef8c856..0000000 Binary files a/demos/declarative/mediabrowser/content/pics/shadow-corner.png and /dev/null differ diff --git a/demos/declarative/mediabrowser/content/pics/shadow-right-screen.png b/demos/declarative/mediabrowser/content/pics/shadow-right-screen.png deleted file mode 100644 index 9856c4f..0000000 Binary files a/demos/declarative/mediabrowser/content/pics/shadow-right-screen.png and /dev/null differ diff --git a/demos/declarative/mediabrowser/content/pics/shadow-right.png b/demos/declarative/mediabrowser/content/pics/shadow-right.png deleted file mode 100644 index f534a35..0000000 Binary files a/demos/declarative/mediabrowser/content/pics/shadow-right.png and /dev/null differ diff --git a/demos/declarative/mediabrowser/dummydata/PhonesModel.qml b/demos/declarative/mediabrowser/dummydata/PhonesModel.qml deleted file mode 100644 index d4f6269..0000000 --- a/demos/declarative/mediabrowser/dummydata/PhonesModel.qml +++ /dev/null @@ -1,137 +0,0 @@ - - - Nokia N97 - http://www.forum.nokia.com/devices/pics/N97_main.jpg - - The Nokia N97 is a S60 5th Edition mobile computer with a large 3,5?, bright nHD (640 x 360 pixels and 16:9 aspect ratio) TFT color display with resistive touch screen and tactile feedback. The device provides excellent user experience for internet and entertainment by combining qwerty keyboard with touch UI and Home screen functionality. Use the N97 to connect to mobile broadband using WLAN or HSDPA (3.5G). Find directions and locations with the integrated A-GPS and included maps. Additional features include game titles with N-Gage, a 5 mega pixel camera with dual LED flash and automatic geotagging of images and videos. - - - - Resolution 360 x 640 - Color Depth 24 bit - Device Size 117.2 x 55.3 x 15.9 mm - Volume 88 cc - Weight 150 g - - ]]> - - http://www.forum.nokia.com/devices/N97 - 5 - - - Nokia 5800 XpressMusic - http://www.forum.nokia.com/devices/pics/5800_main.jpg - - The Nokia 5800 XpressMusic is a S60 5th Edition device with a resistive touch screen and tactile feedback. The device has a large 3,2?, bright nHD (640 x 360 pixels and 16:9 aspect ratio) color display. The device has variety of input methods: stylus, plectrum and finger touch support for text input and UI control (alphanumeric keypad, full and mini qwerty keyboard, handwriting recognition). Use the Nokia 5800 XpressMusic to connect to mobile broadband using WLAN or HSDPA (3.5G). Find directions and locations with the integrated A-GPS and included maps. Additional features include a 3.2 megapixel camera with dual LED flash, Bluetooth 2.0 +EDR, and USB 2.0 High-Speed. Supported WCDMA frequencies depend on the region where the device is available. - - - - Resolution 360 x 640 - Color Depth 24 bit - Device Size 111 x 51.7 x 15.5 mm - Volume 83 cc - Weight 109 g - - ]]> - - http://www.forum.nokia.com/devices/5800_XpressMusic - 5 - - - E75 - http://www.forum.nokia.com/devices/pics/E75_main.jpg - The Nokia E75 is a GSM/WCDMA dual-mode business smartphone supporting WCDMA/HSDPA, EGSM, and WLAN. The device features a side slider qwerty keyboard for optimal email experience. Enjoy videos, music, and graphics on the 2.4? QVGA display and orientation sensor. Find directions and locations with the integrated A-GPS and included maps. Take photos with a 3.2-megapixel autofocus camera. Additional features include USB charging with simultaneous data transfer, Bluetooth 2.0 +EDR, and USB 2.0 High-Speed. Supported WCDMA frequencies depend on the region where the device is available. - - - Resolution 240 x 320 - Color Depth 24 bit - Device Size 111.8 x 501 x 14.4 mm - Volume 69 cc - Weight 139 g - - ]]> - - http://www.forum.nokia.com/devices/E75 - 5 - - - Nokia N810 - http://www.forum.nokia.com/devices/pics/n810_main.jpg - - The Nokia N810 features include Voice-over-IP (VoIP) Internet and video calling, Instant Messaging, an integrated slide-out QWERTY keyboard and touch screen. The N810 lets you stay connected on the go with WLAN or Bluetooth 2.0 +EDR and a Bluetooth enabled mobile phone. The hi-resolution 4.13", 800 x 480 screen and the integrated web cam add to the internet experience. Use the Nokia N810 to play music and videos with the built-in stereo speakers or use the 3.5mm stereo plug with headphones. The Nokia N810 also has an integrated GPS receiver which allows you to pinpoint your position and find points-of-interests using pre-loaded maps. - - - - Resolution 800 x 480 - Color Depth 16 bit - Device Size 128 x 72 x 14 mm - Weight 225 g - - ]]> - - http://www.forum.nokia.com/devices/N810 - 5 - - - Nokia 6260 slide - http://www.forum.nokia.com/devices/pics/6260slide_main.jpg - - The Nokia 6260 slide is a Series 40 6th Edition phone, supporting quad-band GSM 850/900/1800/1900, triple-band WCDMA 900/1900/2100 and WLAN. Other key features include integrated A-GPS with included maps, a 5.0 megapixel camera with LED flash and Carl Zeiss optics, WebKit Open Source Browser, Flash Lite 3.0, Bluetooth 2.1 + EDR and MIDP Java 2.1 with additional Java APIs. Supported WCDMA frequencies depend on the region where the device is available. - - - - Resolution 320 x 480 - Color Depth 24 bit - Device Size 99.4 x 46.5 x 15.4 mm - Volume 64.5 cc - Weight 114 g - - ]]> - - http://www.forum.nokia.com/devices/6260_slide - 5 - - - Nokia 2330 classic - http://www.forum.nokia.com/devices/pics/2330_main.jpg - - The Nokia 2330 classic is a Dual-band GPRS phone for EGSM 900/1800 or GSM 850/1900 (for some markets) that includes a VGA camera, Stereo FM radio with recording feature, Bluetooth 2.0, Mail on Ovi and MIDP 2.1 APIs for application creation. - - - - Resolution 128 x 160 - Color Depth 16 bit - Device Size 107 x 46 x 13.8 mm - Weight 80 g - - ]]> - - http://www.forum.nokia.com/devices/2330_classic - 5 - - - Nokia 2355 - http://www.forum.nokia.com/devices/pics/2355_main.jpg - - The Nokia 2355 CDMA phone features a 64K color display, FM radio, integrated flashlight, WAP 2.0 browsing, MMS, Java(tm) and Brew. It's stylishly polished fold design will keep you in the spotlight. - - - - Resolution 128 x 128 - Color Depth 16 bit - Device Size 81 x 43 x 22 mm - Weight 78 g - - ]]> - - http://www.forum.nokia.com/devices/2355 - 5 - - diff --git a/demos/declarative/mediabrowser/mediabrowser.qml b/demos/declarative/mediabrowser/mediabrowser.qml deleted file mode 100644 index be87fa7..0000000 --- a/demos/declarative/mediabrowser/mediabrowser.qml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/demos/declarative/phonebrowser/content/LikeOMeter.qml b/demos/declarative/phonebrowser/content/LikeOMeter.qml new file mode 100644 index 0000000..68584a5 --- /dev/null +++ b/demos/declarative/phonebrowser/content/LikeOMeter.qml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/demos/declarative/phonebrowser/content/MediaButton.qml b/demos/declarative/phonebrowser/content/MediaButton.qml new file mode 100644 index 0000000..6c672ea --- /dev/null +++ b/demos/declarative/phonebrowser/content/MediaButton.qml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + {Image.width} + + + + + + + diff --git a/demos/declarative/phonebrowser/content/PhoneInfoContainer.qml b/demos/declarative/phonebrowser/content/PhoneInfoContainer.qml new file mode 100644 index 0000000..34fd889 --- /dev/null +++ b/demos/declarative/phonebrowser/content/PhoneInfoContainer.qml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/demos/declarative/phonebrowser/content/PhonesPathView.qml b/demos/declarative/phonebrowser/content/PhonesPathView.qml new file mode 100644 index 0000000..df7e742 --- /dev/null +++ b/demos/declarative/phonebrowser/content/PhonesPathView.qml @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/demos/declarative/phonebrowser/content/ScrollBar.qml b/demos/declarative/phonebrowser/content/ScrollBar.qml new file mode 100644 index 0000000..974f4d0 --- /dev/null +++ b/demos/declarative/phonebrowser/content/ScrollBar.qml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + diff --git a/demos/declarative/phonebrowser/content/Star.qml b/demos/declarative/phonebrowser/content/Star.qml new file mode 100644 index 0000000..37d314b --- /dev/null +++ b/demos/declarative/phonebrowser/content/Star.qml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/demos/declarative/phonebrowser/content/pics/background.png b/demos/declarative/phonebrowser/content/pics/background.png new file mode 100644 index 0000000..5b37072 Binary files /dev/null and b/demos/declarative/phonebrowser/content/pics/background.png differ diff --git a/demos/declarative/phonebrowser/content/pics/button-pressed.png b/demos/declarative/phonebrowser/content/pics/button-pressed.png new file mode 100644 index 0000000..e434d32 Binary files /dev/null and b/demos/declarative/phonebrowser/content/pics/button-pressed.png differ diff --git a/demos/declarative/phonebrowser/content/pics/button.png b/demos/declarative/phonebrowser/content/pics/button.png new file mode 100644 index 0000000..56a63ce Binary files /dev/null and b/demos/declarative/phonebrowser/content/pics/button.png differ diff --git a/demos/declarative/phonebrowser/content/pics/ghns_star.png b/demos/declarative/phonebrowser/content/pics/ghns_star.png new file mode 100644 index 0000000..4ad43cc Binary files /dev/null and b/demos/declarative/phonebrowser/content/pics/ghns_star.png differ diff --git a/demos/declarative/phonebrowser/content/pics/reflection.png b/demos/declarative/phonebrowser/content/pics/reflection.png new file mode 100644 index 0000000..c143a48 Binary files /dev/null and b/demos/declarative/phonebrowser/content/pics/reflection.png differ diff --git a/demos/declarative/phonebrowser/content/pics/shadow-bottom.png b/demos/declarative/phonebrowser/content/pics/shadow-bottom.png new file mode 100644 index 0000000..523f6e7 Binary files /dev/null and b/demos/declarative/phonebrowser/content/pics/shadow-bottom.png differ diff --git a/demos/declarative/phonebrowser/content/pics/shadow-corner.png b/demos/declarative/phonebrowser/content/pics/shadow-corner.png new file mode 100644 index 0000000..ef8c856 Binary files /dev/null and b/demos/declarative/phonebrowser/content/pics/shadow-corner.png differ diff --git a/demos/declarative/phonebrowser/content/pics/shadow-right-screen.png b/demos/declarative/phonebrowser/content/pics/shadow-right-screen.png new file mode 100644 index 0000000..9856c4f Binary files /dev/null and b/demos/declarative/phonebrowser/content/pics/shadow-right-screen.png differ diff --git a/demos/declarative/phonebrowser/content/pics/shadow-right.png b/demos/declarative/phonebrowser/content/pics/shadow-right.png new file mode 100644 index 0000000..f534a35 Binary files /dev/null and b/demos/declarative/phonebrowser/content/pics/shadow-right.png differ diff --git a/demos/declarative/phonebrowser/dummydata/PhonesModel.qml b/demos/declarative/phonebrowser/dummydata/PhonesModel.qml new file mode 100644 index 0000000..d4f6269 --- /dev/null +++ b/demos/declarative/phonebrowser/dummydata/PhonesModel.qml @@ -0,0 +1,137 @@ + + + Nokia N97 + http://www.forum.nokia.com/devices/pics/N97_main.jpg + + The Nokia N97 is a S60 5th Edition mobile computer with a large 3,5?, bright nHD (640 x 360 pixels and 16:9 aspect ratio) TFT color display with resistive touch screen and tactile feedback. The device provides excellent user experience for internet and entertainment by combining qwerty keyboard with touch UI and Home screen functionality. Use the N97 to connect to mobile broadband using WLAN or HSDPA (3.5G). Find directions and locations with the integrated A-GPS and included maps. Additional features include game titles with N-Gage, a 5 mega pixel camera with dual LED flash and automatic geotagging of images and videos. + + + + Resolution 360 x 640 + Color Depth 24 bit + Device Size 117.2 x 55.3 x 15.9 mm + Volume 88 cc + Weight 150 g + + ]]> + + http://www.forum.nokia.com/devices/N97 + 5 + + + Nokia 5800 XpressMusic + http://www.forum.nokia.com/devices/pics/5800_main.jpg + + The Nokia 5800 XpressMusic is a S60 5th Edition device with a resistive touch screen and tactile feedback. The device has a large 3,2?, bright nHD (640 x 360 pixels and 16:9 aspect ratio) color display. The device has variety of input methods: stylus, plectrum and finger touch support for text input and UI control (alphanumeric keypad, full and mini qwerty keyboard, handwriting recognition). Use the Nokia 5800 XpressMusic to connect to mobile broadband using WLAN or HSDPA (3.5G). Find directions and locations with the integrated A-GPS and included maps. Additional features include a 3.2 megapixel camera with dual LED flash, Bluetooth 2.0 +EDR, and USB 2.0 High-Speed. Supported WCDMA frequencies depend on the region where the device is available. + + + + Resolution 360 x 640 + Color Depth 24 bit + Device Size 111 x 51.7 x 15.5 mm + Volume 83 cc + Weight 109 g + + ]]> + + http://www.forum.nokia.com/devices/5800_XpressMusic + 5 + + + E75 + http://www.forum.nokia.com/devices/pics/E75_main.jpg + The Nokia E75 is a GSM/WCDMA dual-mode business smartphone supporting WCDMA/HSDPA, EGSM, and WLAN. The device features a side slider qwerty keyboard for optimal email experience. Enjoy videos, music, and graphics on the 2.4? QVGA display and orientation sensor. Find directions and locations with the integrated A-GPS and included maps. Take photos with a 3.2-megapixel autofocus camera. Additional features include USB charging with simultaneous data transfer, Bluetooth 2.0 +EDR, and USB 2.0 High-Speed. Supported WCDMA frequencies depend on the region where the device is available. + + + Resolution 240 x 320 + Color Depth 24 bit + Device Size 111.8 x 501 x 14.4 mm + Volume 69 cc + Weight 139 g + + ]]> + + http://www.forum.nokia.com/devices/E75 + 5 + + + Nokia N810 + http://www.forum.nokia.com/devices/pics/n810_main.jpg + + The Nokia N810 features include Voice-over-IP (VoIP) Internet and video calling, Instant Messaging, an integrated slide-out QWERTY keyboard and touch screen. The N810 lets you stay connected on the go with WLAN or Bluetooth 2.0 +EDR and a Bluetooth enabled mobile phone. The hi-resolution 4.13", 800 x 480 screen and the integrated web cam add to the internet experience. Use the Nokia N810 to play music and videos with the built-in stereo speakers or use the 3.5mm stereo plug with headphones. The Nokia N810 also has an integrated GPS receiver which allows you to pinpoint your position and find points-of-interests using pre-loaded maps. + + + + Resolution 800 x 480 + Color Depth 16 bit + Device Size 128 x 72 x 14 mm + Weight 225 g + + ]]> + + http://www.forum.nokia.com/devices/N810 + 5 + + + Nokia 6260 slide + http://www.forum.nokia.com/devices/pics/6260slide_main.jpg + + The Nokia 6260 slide is a Series 40 6th Edition phone, supporting quad-band GSM 850/900/1800/1900, triple-band WCDMA 900/1900/2100 and WLAN. Other key features include integrated A-GPS with included maps, a 5.0 megapixel camera with LED flash and Carl Zeiss optics, WebKit Open Source Browser, Flash Lite 3.0, Bluetooth 2.1 + EDR and MIDP Java 2.1 with additional Java APIs. Supported WCDMA frequencies depend on the region where the device is available. + + + + Resolution 320 x 480 + Color Depth 24 bit + Device Size 99.4 x 46.5 x 15.4 mm + Volume 64.5 cc + Weight 114 g + + ]]> + + http://www.forum.nokia.com/devices/6260_slide + 5 + + + Nokia 2330 classic + http://www.forum.nokia.com/devices/pics/2330_main.jpg + + The Nokia 2330 classic is a Dual-band GPRS phone for EGSM 900/1800 or GSM 850/1900 (for some markets) that includes a VGA camera, Stereo FM radio with recording feature, Bluetooth 2.0, Mail on Ovi and MIDP 2.1 APIs for application creation. + + + + Resolution 128 x 160 + Color Depth 16 bit + Device Size 107 x 46 x 13.8 mm + Weight 80 g + + ]]> + + http://www.forum.nokia.com/devices/2330_classic + 5 + + + Nokia 2355 + http://www.forum.nokia.com/devices/pics/2355_main.jpg + + The Nokia 2355 CDMA phone features a 64K color display, FM radio, integrated flashlight, WAP 2.0 browsing, MMS, Java(tm) and Brew. It's stylishly polished fold design will keep you in the spotlight. + + + + Resolution 128 x 128 + Color Depth 16 bit + Device Size 81 x 43 x 22 mm + Weight 78 g + + ]]> + + http://www.forum.nokia.com/devices/2355 + 5 + + diff --git a/demos/declarative/phonebrowser/phonebrowser.qml b/demos/declarative/phonebrowser/phonebrowser.qml new file mode 100644 index 0000000..be87fa7 --- /dev/null +++ b/demos/declarative/phonebrowser/phonebrowser.qml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v0.12 From dc8e57918e0ea3cd4d8f2dafc79ebf999953bf98 Mon Sep 17 00:00:00 2001 From: Yann Bodson Date: Thu, 30 Apr 2009 11:31:48 +1000 Subject: Convert phonebrowser. --- .../phonebrowser/content/LikeOMeter.qml | 47 +++-- .../phonebrowser/content/MediaButton.qml | 61 ++++--- .../phonebrowser/content/PhoneInfoContainer.qml | 179 ++++++++++++------- .../phonebrowser/content/PhonesPathView.qml | 197 +++++++++++++-------- .../declarative/phonebrowser/content/ScrollBar.qml | 56 ++++-- demos/declarative/phonebrowser/content/Star.qml | 68 ++++--- demos/declarative/phonebrowser/phonebrowser.qml | 93 ++++++---- 7 files changed, 447 insertions(+), 254 deletions(-) diff --git a/demos/declarative/phonebrowser/content/LikeOMeter.qml b/demos/declarative/phonebrowser/content/LikeOMeter.qml index 68584a5..31b8195 100644 --- a/demos/declarative/phonebrowser/content/LikeOMeter.qml +++ b/demos/declarative/phonebrowser/content/LikeOMeter.qml @@ -1,13 +1,34 @@ - - - - - - - - - - - - - +Item { + id: Container + properties: Property { + name: "rating" + value: 2 + } + HorizontalLayout { + Star { + rating: 0 + onClicked: { Container.rating = rating } + on: Container.rating >= 0 + } + Star { + rating: 1 + onClicked: { Container.rating = rating } + on: Container.rating >= 1 + } + Star { + rating: 2 + onClicked: { Container.rating = rating } + on: Container.rating >= 2 + } + Star { + rating: 3 + onClicked: { Container.rating = rating } + on: Container.rating >= 3 + } + Star { + rating: 4 + onClicked: { Container.rating = rating } + on: Container.rating >= 4 + } + } +} diff --git a/demos/declarative/phonebrowser/content/MediaButton.qml b/demos/declarative/phonebrowser/content/MediaButton.qml index 6c672ea..bb2510a 100644 --- a/demos/declarative/phonebrowser/content/MediaButton.qml +++ b/demos/declarative/phonebrowser/content/MediaButton.qml @@ -1,21 +1,40 @@ - - - - - - - - - - - - - - {Image.width} - - - - - - - +Item { + id: Container + signals: Signal { + name: "clicked" + } + properties: Property { + name: "text" + } + Image { + id: Image + source: "pics/button.png" + } + Image { + id: Pressed + source: "pics/button-pressed.png" + opacity: 0 + } + MouseRegion { + id: MouseRegion + anchors.fill: Image + onClicked: { Container.clicked.emit(); } + } + Text { + font.bold: true + color: "white" + anchors.centeredIn: Image + text: Container.text + } + width: Image.width + states: [ + State { + name: "Pressed" + when: MouseRegion.pressed == true + SetProperties { + target: Pressed + opacity: 1 + } + } + ] +} diff --git a/demos/declarative/phonebrowser/content/PhoneInfoContainer.qml b/demos/declarative/phonebrowser/content/PhoneInfoContainer.qml index 34fd889..da475b1 100644 --- a/demos/declarative/phonebrowser/content/PhoneInfoContainer.qml +++ b/demos/declarative/phonebrowser/content/PhoneInfoContainer.qml @@ -1,66 +1,113 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Flipable { + id: Container + + properties: [ + Property { name: "frontContainer"; value: ContainerFront }, + Property { name: "flickableArea"; value: Flickable }, + Property { name: "phoneTitle"; value: "N/A" }, + Property { name: "phoneDescription"; value: "..." }, + Property { name: "phoneSpecifications"; value: "" }, + Property { name: "phoneUrl"; value: "" }, + Property { name: "rating"; value: 2 } + ] + + signals: Signal { name: "closed" } + + axis: Axis { startX: Container.width / 2; endX: Container.width / 2; endY: 1 } + + front: Item { + id: ContainerFront; anchors.fill: Container + + Rect { + anchors.fill: parent + color: "black"; opacity: 0.4 + pen.color: "white"; pen.width: 2 + } + + MediaButton { + id: BackButton; x: 630; y: 400; text: "Back" + onClicked: { Container.closed.emit() } + } + + MediaButton { + id: MoreButton; x: 530; y: 400; text: "More..." + onClicked: { Container.state='Back' } + } + + Text { + id: TitleText + style: Raised; styleColor: "black" + color: "white" + x: 420; y: 30; width: parent.width + text: Container.phoneTitle; font.size: 22 + } + + LikeOMeter { x: 420; y: 75; rating: Container.rating } + + Flickable { + id: Flickable + x: 420; width: 280; height: 260; y: 120; clip: true + viewportWidth: 280; viewportHeight: DescriptionText.height + + Text { + id: DescriptionText + wrap: true + color: "white" + width: parent.width + text: Container.phoneDescription + font.size: 12 + } + } + + Text { + color: "white"; width: 300; x: 50; y: 300 + text: Container.phoneSpecifications + } + + ScrollBar { + id: ScrollBar + x: 720; y: Flickable.y; width: 7 + height: Flickable.height; opacity: 0 + flickableArea: Flickable; clip: true + } + } + + back: Item { + anchors.fill: Container + + Rect { + anchors.fill: parent + color: "black" + opacity: 0.4 + pen.color: "white" + pen.width: 2 + } + + Flickable { + width: Container.width-20 + height: Container.height-20 + x: 10; y: 10; clip: true + viewportWidth: UrlView.width + viewportHeight: UrlView.height + + WebView { id: UrlView; url: Container.phoneUrl; idealWidth: parent.width } + } + + MediaButton { + id: BackButton2; x: 630; y: 400; text: "Back"; onClicked: { Container.state='' } + } + } + + states: [ + State { + name: "Back" + SetProperty { target: Container; property: "rotation"; value: 180 } + } + ] + + transitions: [ + Transition { + NumericAnimation { easing: "easeInOutQuad"; properties: "rotation"; duration: 500 } + } + ] +} diff --git a/demos/declarative/phonebrowser/content/PhonesPathView.qml b/demos/declarative/phonebrowser/content/PhonesPathView.qml index df7e742..acef6c3 100644 --- a/demos/declarative/phonebrowser/content/PhonesPathView.qml +++ b/demos/declarative/phonebrowser/content/PhonesPathView.qml @@ -1,79 +1,120 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + } + + Image { source: "pics/shadow-right.png"; x: Dvd.width; height: Dvd.height } + Image { source: "pics/shadow-bottom.png"; y: Dvd.height; width: Dvd.width } + + Image { + id: Corner + source: "pics/shadow-corner.png" + x: Dvd.width; y: Dvd.height + } + } + + MouseRegion { anchors.fill: Wrapper; onClicked: { phoneClicked() } } + + states: [ + State { + name: "Details" + ParentChange { target: Wrapper; parent: PhoneInfoContainer.frontContainer } + SetProperties { target: Wrapper; x: 50; y: 60; scale: 1 } + SetProperties { target: PhoneInfoContainer; y: 20 } + SetProperties { target: Container; y: "-480" } + SetProperties { target: CloseButton; opacity: 0 } + SetProperties { target: CategoryText; y: "-50" } + }, + + State { + name: "Stacked" + when: MainWindow.minimized == true + ParentChange { target: Wrapper; parent: Stack } + SetProperties {target: Wrapper; x: 0; y: 0; scale: 0.2 } + SetProperties { target: CloseButton; opacity: 0 } + SetProperties { target: CategoryText; y: "-50" } + } + ] + + transitions: [ + Transition { + fromState: ""; toState: "Details,Stacked" + ParentChangeAction { } + NumericAnimation { properties: "x,y,scale,opacity"; duration: 500; easing: "easeInOutQuad" } + }, + + Transition { + fromState: "Details,Stacked" + toState: "" + ParentChangeAction { } + NumericAnimation { properties: "x,y,scale,opacity"; duration: 500; easing: "easeInOutQuad" } + } + ] + + } + } +} diff --git a/demos/declarative/phonebrowser/content/ScrollBar.qml b/demos/declarative/phonebrowser/content/ScrollBar.qml index 974f4d0..a0f2925 100644 --- a/demos/declarative/phonebrowser/content/ScrollBar.qml +++ b/demos/declarative/phonebrowser/content/ScrollBar.qml @@ -1,18 +1,38 @@ - - - - - - - - - - - - - - - - - +Item { + id: Container + properties: Property { + name: "flickableArea" + } + Rect { + radius: 5 + color: "black" + opacity: 0.3 + pen.color: "white" + pen.width: 2 + x: 0 + y: flickableArea.pageYPosition * Container.height + width: parent.width + height: flickableArea.pageHeight * Container.height + } + states: [ + State { + name: "show" + when: flickableArea.moving + SetProperties { + target: Container + opacity: 1 + } + } + ] + transitions: [ + Transition { + fromState: "*" + toState: "*" + NumericAnimation { + target: Container + properties: "opacity" + duration: 400 + } + } + ] +} diff --git a/demos/declarative/phonebrowser/content/Star.qml b/demos/declarative/phonebrowser/content/Star.qml index 37d314b..ebcd78b 100644 --- a/demos/declarative/phonebrowser/content/Star.qml +++ b/demos/declarative/phonebrowser/content/Star.qml @@ -1,25 +1,47 @@ - - - - - +Item { + id: Container + width: 24 + height: 24 - - - + properties: [ + Property { name: "rating" }, + Property { name: "on" } + ] - - - - - - - - - - - - - - - + signals: Signal { + name: "clicked" + } + Image { + id: Image + source: "pics/ghns_star.png" + x: 6 + y: 7 + opacity: 0.4 + scale: 0.5 + } + MouseRegion { + anchors.fill: Container + onClicked: { Container.clicked.emit() } + } + states: [ + State { + name: "on" + when: Container.on == true + SetProperties { + target: Image + opacity: 1 + scale: 1 + x: 1 + y: 0 + } + } + ] + transitions: [ + Transition { + NumericAnimation { + properties: "opacity,scale,x,y" + easing: "easeOutBounce" + } + } + ] +} diff --git a/demos/declarative/phonebrowser/phonebrowser.qml b/demos/declarative/phonebrowser/phonebrowser.qml index be87fa7..85d352d 100644 --- a/demos/declarative/phonebrowser/phonebrowser.qml +++ b/demos/declarative/phonebrowser/phonebrowser.qml @@ -1,36 +1,59 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +import "content" +Item { + id: MainWindow; width: 800; height: 480 + + properties: Property { name: "minimized"; value: false } + + Item { + id: Background + + Image { source: "content/pics/background.png"; opaque: true } + + Rect { + id: Menu; x: -150; width: 150; height: 480; color: "#232323" + + Text { + id: IconText; x: 40; y: 110 + font.bold: true; font.size: 9; text: "Nokia Devices" + color: "white"; style: Raised; styleColor: "black" + } + + Image { + source: "content/pics/shadow-right-screen.png" + x: 150; height: 480; tile: true + } + } + + PhonesPathView { id: PhonesPathView; model: PhonesModel; y: 60; width: 800; height: 360 } + PhoneInfoContainer { id: PhoneInfoContainer; width: 750; x: 25; y: 500; height: 440 } + + MediaButton { + id: CloseButton; x: 680; y: 440; text: "Close" + onClicked: { MainWindow.minimized = true } + } + + states: [ + State { + name: "Minimized" + when: MainWindow.minimized == true + SetProperties { target: Background; x: 75 } + SetProperties { target: Menu; x: -75 } + } + ] + + transitions: [ + Transition { + fromState: "*"; toState: "*" + NumericAnimation { properties: "x,y,size"; duration: 500; easing: "easeInOutQuad" } + } + ] + } + + Text { + id: CategoryText; x: 300; y: 15; text: "Nokia Devices" + font.size: 22; color: "white"; style: Raised; styleColor: "black" + } + + Item { id: Stack; x: 45; y: 50 } +} -- cgit v0.12 From bab72866f444443632528fadd240eea6f79d66e2 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Thu, 30 Apr 2009 12:46:45 +1000 Subject: Compress sizeChanged signal to give width and height. --- src/declarative/util/qfxview.cpp | 16 ++++++++++++++-- src/declarative/util/qfxview.h | 1 + 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/declarative/util/qfxview.cpp b/src/declarative/util/qfxview.cpp index e285890..42047b6 100644 --- a/src/declarative/util/qfxview.cpp +++ b/src/declarative/util/qfxview.cpp @@ -49,6 +49,7 @@ #include "qicon.h" #include "qurl.h" #include "qboxlayout.h" +#include "qbasictimer.h" #include "qmlbindablevalue.h" #include "qml.h" @@ -100,6 +101,8 @@ public: QmlEngine engine; QmlComponent *component; + QBasicTimer resizetimer; + void init(); }; @@ -282,8 +285,17 @@ void QFxView::continueExecute() void QFxView::sizeChanged() { - if (d->root) - emit sceneResized(QSize(d->root->width(),d->root->height())); + // delay, so we catch both width and height changing. + d->resizetimer.start(0,this); +} + +void QFxView::timerEvent(QTimerEvent* e) +{ + if (e->timerId() == d->resizetimer.timerId()) { + if (d->root) + emit sceneResized(QSize(d->root->width(),d->root->height())); + d->resizetimer.stop(); + } } QFxItem* QFxView::addItem(const QString &xml, QFxItem* parent) diff --git a/src/declarative/util/qfxview.h b/src/declarative/util/qfxview.h index 3c4be20..c658f07 100644 --- a/src/declarative/util/qfxview.h +++ b/src/declarative/util/qfxview.h @@ -95,6 +95,7 @@ protected: virtual void resizeEvent(QResizeEvent *); void focusInEvent(QFocusEvent *); void focusOutEvent(QFocusEvent *); + void timerEvent(QTimerEvent*); private: friend class QFxViewPrivate; -- cgit v0.12 From d7fe5cb94577c56a9fb656f6e61ec0b13f6f0a8f Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Thu, 30 Apr 2009 12:48:07 +1000 Subject: Resizable. Resizing is not propagated to canvas view and root item. Examples may or may not resize meaningfully. Skins are device-oriented and so do not resize. --- tools/duiviewer/qfxviewer.cpp | 12 +++++++++--- tools/duiviewer/qfxviewer.h | 1 + 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/tools/duiviewer/qfxviewer.cpp b/tools/duiviewer/qfxviewer.cpp index 7b39f53..b15a8bf 100644 --- a/tools/duiviewer/qfxviewer.cpp +++ b/tools/duiviewer/qfxviewer.cpp @@ -55,7 +55,7 @@ QFxViewer::QFxViewer(QFxTestEngine::TestMode testMode, const QString &testDir, Q QObject::connect(canvas, SIGNAL(sceneResized(QSize)), this, SLOT(sceneResized(QSize))); canvas->setFixedSize(width, height); - setFixedSize(width, height); + resize(width, height); } void QFxViewer::reload() @@ -217,15 +217,21 @@ void QFxViewer::setRecordPeriod(int ms) void QFxViewer::sceneResized(QSize size) { - if(size.width() > 0 && size.height() > 0) { + if (size.width() > 0 && size.height() > 0) { canvas->setFixedSize(size.width(), size.height()); if (skin) skin->setScreenSize(size); else - setFixedSize(size); + resize(size); } } +void QFxViewer::resizeEvent(QResizeEvent *) +{ + if (!skin) + canvas->setFixedSize(width(),height()); +} + void QFxViewer::keyPressEvent(QKeyEvent *event) { if (event->key() == Qt::Key_0 && devicemode) diff --git a/tools/duiviewer/qfxviewer.h b/tools/duiviewer/qfxviewer.h index 5733591..7a190c5 100644 --- a/tools/duiviewer/qfxviewer.h +++ b/tools/duiviewer/qfxviewer.h @@ -49,6 +49,7 @@ public slots: protected: virtual void keyPressEvent(QKeyEvent *); virtual void timerEvent(QTimerEvent *); + virtual void resizeEvent(QResizeEvent *); private: QString currentFileName; -- cgit v0.12 From e3c91e87a06b73a06c86f93c69951768874bbaf6 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Thu, 30 Apr 2009 12:51:44 +1000 Subject: Fix crash Continues d62bc81491b4b3ef76d626fd56f736427ee1e20c --- src/declarative/fx/qfxwebview.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/declarative/fx/qfxwebview.cpp b/src/declarative/fx/qfxwebview.cpp index b2ad06c..7c05088 100644 --- a/src/declarative/fx/qfxwebview.cpp +++ b/src/declarative/fx/qfxwebview.cpp @@ -1018,11 +1018,11 @@ QString QFxWebView::html() const void QFxWebView::setHtml(const QString &html, const QUrl &baseUrl) { Q_D(QFxWebView); - d->page->setViewportSize(QSize( + page()->setViewportSize(QSize( d->idealwidth>0 ? d->idealwidth : width(), d->idealheight>0 ? d->idealheight : height())); if (isComponentComplete()) - d->page->mainFrame()->setHtml(html, baseUrl); + page()->mainFrame()->setHtml(html, baseUrl); else { d->pending = d->PendingHtml; d->pending_url = baseUrl; @@ -1033,12 +1033,12 @@ void QFxWebView::setHtml(const QString &html, const QUrl &baseUrl) void QFxWebView::setContent(const QByteArray &data, const QString &mimeType, const QUrl &baseUrl) { Q_D(QFxWebView); - d->page->setViewportSize(QSize( + page()->setViewportSize(QSize( d->idealwidth>0 ? d->idealwidth : width(), d->idealheight>0 ? d->idealheight : height())); if (isComponentComplete()) - d->page->mainFrame()->setContent(data,mimeType,baseUrl); + page()->mainFrame()->setContent(data,mimeType,baseUrl); else { d->pending = d->PendingContent; d->pending_url = baseUrl; -- cgit v0.12 From d85c0c07b72476d801db3f1cb622cb32ab50dcc4 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Thu, 30 Apr 2009 13:01:04 +1000 Subject: Prototype custom parsers for non-xml qml language ListModel has been ported (under the name ListModel2) to demonstrate. ListModel2 behaves the same as ListModel, except that list "objects" must be called "ListElement" instead of a freeform name. --- .../mediabrowser/dummydata/PhonesModel.qml | 236 ++++++------- src/declarative/qml/qml.pri | 1 + src/declarative/qml/qmlcompiler.cpp | 128 ++++--- src/declarative/qml/qmlcompiler_p.h | 1 + src/declarative/qml/qmlcustomparser.cpp | 129 ++++++- src/declarative/qml/qmlcustomparser.h | 46 +++ src/declarative/qml/qmlcustomparser_p.h | 79 +++++ src/declarative/qml/qmlinstruction_p.h | 1 + src/declarative/qml/qmlmetatype.cpp | 17 +- src/declarative/qml/qmlmetatype.h | 32 +- src/declarative/qml/qmlvme.cpp | 5 + src/declarative/util/qmllistmodel.cpp | 387 ++++++++++----------- src/declarative/util/qmllistmodel.h | 34 +- 13 files changed, 658 insertions(+), 438 deletions(-) create mode 100644 src/declarative/qml/qmlcustomparser_p.h diff --git a/demos/declarative/mediabrowser/dummydata/PhonesModel.qml b/demos/declarative/mediabrowser/dummydata/PhonesModel.qml index d4f6269..eb68fdb 100644 --- a/demos/declarative/mediabrowser/dummydata/PhonesModel.qml +++ b/demos/declarative/mediabrowser/dummydata/PhonesModel.qml @@ -1,137 +1,99 @@ - - - Nokia N97 - http://www.forum.nokia.com/devices/pics/N97_main.jpg - - The Nokia N97 is a S60 5th Edition mobile computer with a large 3,5?, bright nHD (640 x 360 pixels and 16:9 aspect ratio) TFT color display with resistive touch screen and tactile feedback. The device provides excellent user experience for internet and entertainment by combining qwerty keyboard with touch UI and Home screen functionality. Use the N97 to connect to mobile broadband using WLAN or HSDPA (3.5G). Find directions and locations with the integrated A-GPS and included maps. Additional features include game titles with N-Gage, a 5 mega pixel camera with dual LED flash and automatic geotagging of images and videos. - - - - Resolution 360 x 640 - Color Depth 24 bit - Device Size 117.2 x 55.3 x 15.9 mm - Volume 88 cc - Weight 150 g - - ]]> - - http://www.forum.nokia.com/devices/N97 - 5 - - - Nokia 5800 XpressMusic - http://www.forum.nokia.com/devices/pics/5800_main.jpg - - The Nokia 5800 XpressMusic is a S60 5th Edition device with a resistive touch screen and tactile feedback. The device has a large 3,2?, bright nHD (640 x 360 pixels and 16:9 aspect ratio) color display. The device has variety of input methods: stylus, plectrum and finger touch support for text input and UI control (alphanumeric keypad, full and mini qwerty keyboard, handwriting recognition). Use the Nokia 5800 XpressMusic to connect to mobile broadband using WLAN or HSDPA (3.5G). Find directions and locations with the integrated A-GPS and included maps. Additional features include a 3.2 megapixel camera with dual LED flash, Bluetooth 2.0 +EDR, and USB 2.0 High-Speed. Supported WCDMA frequencies depend on the region where the device is available. - - - - Resolution 360 x 640 - Color Depth 24 bit - Device Size 111 x 51.7 x 15.5 mm - Volume 83 cc - Weight 109 g - - ]]> - - http://www.forum.nokia.com/devices/5800_XpressMusic - 5 - - - E75 - http://www.forum.nokia.com/devices/pics/E75_main.jpg - The Nokia E75 is a GSM/WCDMA dual-mode business smartphone supporting WCDMA/HSDPA, EGSM, and WLAN. The device features a side slider qwerty keyboard for optimal email experience. Enjoy videos, music, and graphics on the 2.4? QVGA display and orientation sensor. Find directions and locations with the integrated A-GPS and included maps. Take photos with a 3.2-megapixel autofocus camera. Additional features include USB charging with simultaneous data transfer, Bluetooth 2.0 +EDR, and USB 2.0 High-Speed. Supported WCDMA frequencies depend on the region where the device is available. - - - Resolution 240 x 320 - Color Depth 24 bit - Device Size 111.8 x 501 x 14.4 mm - Volume 69 cc - Weight 139 g - - ]]> - - http://www.forum.nokia.com/devices/E75 - 5 - - - Nokia N810 - http://www.forum.nokia.com/devices/pics/n810_main.jpg - - The Nokia N810 features include Voice-over-IP (VoIP) Internet and video calling, Instant Messaging, an integrated slide-out QWERTY keyboard and touch screen. The N810 lets you stay connected on the go with WLAN or Bluetooth 2.0 +EDR and a Bluetooth enabled mobile phone. The hi-resolution 4.13", 800 x 480 screen and the integrated web cam add to the internet experience. Use the Nokia N810 to play music and videos with the built-in stereo speakers or use the 3.5mm stereo plug with headphones. The Nokia N810 also has an integrated GPS receiver which allows you to pinpoint your position and find points-of-interests using pre-loaded maps. - - - - Resolution 800 x 480 - Color Depth 16 bit - Device Size 128 x 72 x 14 mm - Weight 225 g - - ]]> - - http://www.forum.nokia.com/devices/N810 - 5 - - - Nokia 6260 slide - http://www.forum.nokia.com/devices/pics/6260slide_main.jpg - - The Nokia 6260 slide is a Series 40 6th Edition phone, supporting quad-band GSM 850/900/1800/1900, triple-band WCDMA 900/1900/2100 and WLAN. Other key features include integrated A-GPS with included maps, a 5.0 megapixel camera with LED flash and Carl Zeiss optics, WebKit Open Source Browser, Flash Lite 3.0, Bluetooth 2.1 + EDR and MIDP Java 2.1 with additional Java APIs. Supported WCDMA frequencies depend on the region where the device is available. - - - - Resolution 320 x 480 - Color Depth 24 bit - Device Size 99.4 x 46.5 x 15.4 mm - Volume 64.5 cc - Weight 114 g - - ]]> - - http://www.forum.nokia.com/devices/6260_slide - 5 - - - Nokia 2330 classic - http://www.forum.nokia.com/devices/pics/2330_main.jpg - - The Nokia 2330 classic is a Dual-band GPRS phone for EGSM 900/1800 or GSM 850/1900 (for some markets) that includes a VGA camera, Stereo FM radio with recording feature, Bluetooth 2.0, Mail on Ovi and MIDP 2.1 APIs for application creation. - - - - Resolution 128 x 160 - Color Depth 16 bit - Device Size 107 x 46 x 13.8 mm - Weight 80 g - - ]]> - - http://www.forum.nokia.com/devices/2330_classic - 5 - - - Nokia 2355 - http://www.forum.nokia.com/devices/pics/2355_main.jpg - - The Nokia 2355 CDMA phone features a 64K color display, FM radio, integrated flashlight, WAP 2.0 browsing, MMS, Java(tm) and Brew. It's stylishly polished fold design will keep you in the spotlight. - - - - Resolution 128 x 128 - Color Depth 16 bit - Device Size 81 x 43 x 22 mm - Weight 78 g - - ]]> - - http://www.forum.nokia.com/devices/2355 - 5 - - +ListModel2 { + id: "PhonesModel" + + ListElement { + title: "Nokia N97" + thumb: "http://www.forum.nokia.com/devices/pics/N97_main.jpg" + description: "The Nokia N97 is a S60 5th Edition mobile computer with a large 3,5?, bright nHD (640 x 360 pixels and 16:9 aspect ratio) TFT color display with resistive touch screen and tactile feedback. The device provides excellent user experience for internet and entertainment by combining qwerty keyboard with touch UI and Home screen functionality. Use the N97 to connect to mobile broadband using WLAN or HSDPA (3.5G). Find directions and locations with the integrated A-GPS and included maps. Additional features include game titles with N-Gage, a 5 mega pixel camera with dual LED flash and automatic geotagging of images and videos." + specifications: "\ +
Resolution 360 x 640 \ +
Color Depth 24 bit \ +
Device Size 117.2 x 55.3 x 15.9 mm \ +
Volume 88 cc \ +
Weight 150 g \ +
" + url: "http://www.forum.nokia.com/devices/N97" + rating: 5 + } + ListElement { + title: "Nokia 5800 XpressMusic" + thumb: "http://www.forum.nokia.com/devices/pics/5800_main.jpg" + description: "The Nokia 5800 XpressMusic is a S60 5th Edition device with a resistive touch screen and tactile feedback. The device has a large 3,2?, bright nHD (640 x 360 pixels and 16:9 aspect ratio) color display. The device has variety of input methods: stylus, plectrum and finger touch support for text input and UI control (alphanumeric keypad, full and mini qwerty keyboard, handwriting recognition). Use the Nokia 5800 XpressMusic to connect to mobile broadband using WLAN or HSDPA (3.5G). Find directions and locations with the integrated A-GPS and included maps. Additional features include a 3.2 megapixel camera with dual LED flash, Bluetooth 2.0 +EDR, and USB 2.0 High-Speed. Supported WCDMA frequencies depend on the region where the device is available." + specifications: " \ +
Resolution 360 x 640 \ +
Color Depth 24 bit \ +
Device Size 111 x 51.7 x 15.5 mm \ +
Volume 83 cc \ +
Weight 109 g \ +
" + url: "http://www.forum.nokia.com/devices/5800_XpressMusic" + rating: 5 + } + ListElement { + title: "E75" + thumb: "http://www.forum.nokia.com/devices/pics/E75_main.jpg" + description: "The Nokia E75 is a GSM/WCDMA dual-mode business smartphone supporting WCDMA/HSDPA, EGSM, and WLAN. The device features a side slider qwerty keyboard for optimal email experience. Enjoy videos, music, and graphics on the 2.4? QVGA display and orientation sensor. Find directions and locations with the integrated A-GPS and included maps. Take photos with a 3.2-megapixel autofocus camera. Additional features include USB charging with simultaneous data transfer, Bluetooth 2.0 +EDR, and USB 2.0 High-Speed. Supported WCDMA frequencies depend on the region where the device is available." + specifications: " \ +
Resolution 240 x 320 \ +
Color Depth 24 bit \ +
Device Size 111.8 x 501 x 14.4 mm \ +
Volume 69 cc \ +
Weight 139 g \ +
" + url: "http://www.forum.nokia.com/devices/E75" + rating: 5 + } + ListElement { + title: "Nokia N810" + thumb: "http://www.forum.nokia.com/devices/pics/n810_main.jpg" + description: "The Nokia N810 features include Voice-over-IP (VoIP) Internet and video calling, Instant Messaging, an integrated slide-out QWERTY keyboard and touch screen. The N810 lets you stay connected on the go with WLAN or Bluetooth 2.0 +EDR and a Bluetooth enabled mobile phone. The hi-resolution 4.13\", 800 x 480 screen and the integrated web cam add to the internet experience. Use the Nokia N810 to play music and videos with the built-in stereo speakers or use the 3.5mm stereo plug with headphones. The Nokia N810 also has an integrated GPS receiver which allows you to pinpoint your position and find points-of-interests using pre-loaded maps." + specifications: " \ +
Resolution 800 x 480 \ +
Color Depth 16 bit \ +
Device Size 128 x 72 x 14 mm \ +
Weight 225 g \ +
" + url: "http://www.forum.nokia.com/devices/N810" + rating: 5 + } + ListElement { + title: "Nokia 6260 slide" + thumb: "http://www.forum.nokia.com/devices/pics/6260slide_main.jpg" + description: "The Nokia 6260 slide is a Series 40 6th Edition phone, supporting quad-band GSM 850/900/1800/1900, triple-band WCDMA 900/1900/2100 and WLAN. Other key features include integrated A-GPS with included maps, a 5.0 megapixel camera with LED flash and Carl Zeiss optics, WebKit Open Source Browser, Flash Lite 3.0, Bluetooth 2.1 + EDR and MIDP Java 2.1 with additional Java APIs. Supported WCDMA frequencies depend on the region where the device is available." + specifications: "\ +
Resolution 320 x 480 \ +
Color Depth 24 bit \ +
Device Size 99.4 x 46.5 x 15.4 mm \ +
Volume 64.5 cc \ +
Weight 114 g \ +
" + url: "http://www.forum.nokia.com/devices/6260_slide" + rating: 5 + } + ListElement { + title: "Nokia 2330 classic" + thumb: "http://www.forum.nokia.com/devices/pics/2330_main.jpg" + description: "The Nokia 2330 classic is a Dual-band GPRS phone for EGSM 900/1800 or GSM 850/1900 (for some markets) that includes a VGA camera, Stereo FM radio with recording feature, Bluetooth 2.0, Mail on Ovi and MIDP 2.1 APIs for application creation." + specifications: "\ +
Resolution 128 x 160 \ +
Color Depth 16 bit \ +
Device Size 107 x 46 x 13.8 mm\ +
Weight 80 g\ +
" + url: "http://www.forum.nokia.com/devices/2330_classic" + rating: 5 + } + ListElement { + title: "Nokia 2355" + thumb: "http://www.forum.nokia.com/devices/pics/2355_main.jpg" + description: "The Nokia 2355 CDMA phone features a 64K color display, FM radio, integrated flashlight, WAP 2.0 browsing, MMS, Java(tm) and Brew. It's stylishly polished fold design will keep you in the spotlight." + specifications: " \ +
Resolution 128 x 128 \ +
Color Depth 16 bit \ +
Device Size 81 x 43 x 22 mm \ +
Weight 78 g \ +
" + url: "http://www.forum.nokia.com/devices/2355" + rating: 5 + } +} diff --git a/src/declarative/qml/qml.pri b/src/declarative/qml/qml.pri index 00e3ccb..40b854f 100644 --- a/src/declarative/qml/qml.pri +++ b/src/declarative/qml/qml.pri @@ -33,6 +33,7 @@ HEADERS += qml/qmlparser_p.h \ qml/qmlcomponent.h \ qml/qmlcomponent_p.h \ qml/qmlcustomparser.h \ + qml/qmlcustomparser_p.h \ qml/qmlpropertyvaluesource.h \ qml/qmlboundsignal_p.h \ qml/qmlxmlparser_p.h \ diff --git a/src/declarative/qml/qmlcompiler.cpp b/src/declarative/qml/qmlcompiler.cpp index 4cfe1e8..4433286 100644 --- a/src/declarative/qml/qmlcompiler.cpp +++ b/src/declarative/qml/qmlcompiler.cpp @@ -59,6 +59,7 @@ #include #include #include +#include "private/qmlcustomparser_p.h" #include "qmlscriptparser_p.h" @@ -552,6 +553,7 @@ bool QmlCompiler::compileObject(Object *obj, int ctxt) obj->properties.remove(SIGNALS_NAME); } + int createInstrIdx = output->bytecode.count(); if (obj->type != -1 && output->types.at(obj->type).parser) { QByteArray data = obj->custom; int ref = output->indexForByteArray(data); @@ -567,6 +569,7 @@ bool QmlCompiler::compileObject(Object *obj, int ctxt) QmlInstruction create; create.type = QmlInstruction::CreateObject; create.line = obj->line; + create.create.data = -1; create.create.type = obj->type; output->bytecode << create; } @@ -591,19 +594,48 @@ bool QmlCompiler::compileObject(Object *obj, int ctxt) } } + bool isCustomParser = output->types.at(obj->type).type && + output->types.at(obj->type).type->customParser() != 0; + QList customProps; + foreach(Property *prop, obj->properties) { if (!ignoreProperties && prop->name == PROPERTIES_NAME) { } else if (!ignoreSignals && prop->name == SIGNALS_NAME) { } else if (prop->name.length() >= 3 && prop->name.startsWith("on") && ('A' <= prop->name.at(2) && 'Z' >= prop->name.at(2))) { - COMPILE_CHECK(compileSignal(prop, obj)); + if (!isCustomParser) { + COMPILE_CHECK(compileSignal(prop, obj)); + } else { + customProps << QmlCustomParserNodePrivate::fromProperty(prop); + } } else { - COMPILE_CHECK(compileProperty(prop, obj, ctxt)); + if (!isCustomParser || (isCustomParser && testProperty(prop, obj))) { + COMPILE_CHECK(compileProperty(prop, obj, ctxt)); + } else { + customProps << QmlCustomParserNodePrivate::fromProperty(prop); + } } } - if (obj->defaultProperty) - COMPILE_CHECK(compileProperty(obj->defaultProperty, obj, ctxt)); + if (obj->defaultProperty) { + if(!isCustomParser || (isCustomParser && testProperty(obj->defaultProperty, obj))) { + COMPILE_CHECK(compileProperty(obj->defaultProperty, obj, ctxt)); + } else { + customProps << QmlCustomParserNodePrivate::fromProperty(obj->defaultProperty); + } + } + + if (isCustomParser && !customProps.isEmpty()) { + // ### Check for failure + bool ok = false; + QmlCustomParser *cp = output->types.at(obj->type).type->customParser(); + QByteArray customData = cp->compile(customProps, &ok); + if(!ok) + COMPILE_EXCEPTION("Failure compiling custom type"); + if(!customData.isEmpty()) + output->bytecode[createInstrIdx].create.data = + output->indexForByteArray(customData); + } if (obj->type != -1) { if (output->types.at(obj->type).component) { @@ -764,65 +796,61 @@ bool QmlCompiler::compileSignal(Property *prop, Object *obj) return true; } +// Returns true if prop exists on obj, false otherwise +bool QmlCompiler::testProperty(QmlParser::Property *prop, + QmlParser::Object *obj) +{ + if(isAttachedProperty(prop->name) || prop->name == "id") + return true; + + const QMetaObject *mo = obj->metaObject(); + if (mo) { + if (prop->isDefault) { + QMetaProperty p = QmlMetaType::defaultProperty(mo); + return p.name() != 0; + } else { + int idx = mo->indexOfProperty(prop->name.constData()); + return idx != -1; + } + } + + return false; +} + bool QmlCompiler::compileProperty(Property *prop, Object *obj, int ctxt) { if (prop->values.isEmpty() && !prop->value) return true; // First we're going to need a reference to this property - if (obj->type != -1) { + const QMetaObject *mo = obj->metaObject(); + if (mo && !isAttachedProperty(prop->name)) { + if (prop->isDefault) { + QMetaProperty p = QmlMetaType::defaultProperty(mo); + // XXX + // Currently we don't handle enums in the static analysis + // so we let them drop through to generateStoreInstruction() + if (p.name() && !p.isEnumType()) { + prop->index = mo->indexOfProperty(p.name()); + prop->name = p.name(); - const QMetaObject *mo = obj->metaObject(); - if (mo) { - if (prop->isDefault) { - QMetaProperty p = QmlMetaType::defaultProperty(mo); - // XXX - // Currently we don't handle enums in the static analysis - // so we let them drop through to generateStoreInstruction() - if (p.name() && !p.isEnumType()) { - prop->index = mo->indexOfProperty(p.name()); - prop->name = p.name(); - - int t = p.type(); - if (t == QVariant::UserType) - t = p.userType(); - - prop->type = t; - } - } else { - prop->index = mo->indexOfProperty(prop->name.constData()); - QMetaProperty p = mo->property(prop->index); - // XXX - // Currently we don't handle enums in the static analysis - // so we let them drop through to generateStoreInstruction() - if (p.name() && !p.isEnumType()) { - int t = p.type(); - if (t == QVariant::UserType) - t = p.userType(); - - prop->type = t; - } - } - } - } else { - const QMetaObject *mo = obj->metaObject(); - if (mo) { - if (prop->isDefault) { - QMetaProperty p = QmlMetaType::defaultProperty(mo); - if (p.name()) { - prop->index = mo->indexOfProperty(p.name()); - prop->name = p.name(); - } int t = p.type(); if (t == QVariant::UserType) t = p.userType(); + prop->type = t; - } else { - prop->index = mo->indexOfProperty(prop->name.constData()); - QMetaProperty p = mo->property(prop->index); + } + } else { + prop->index = mo->indexOfProperty(prop->name.constData()); + QMetaProperty p = mo->property(prop->index); + // XXX + // Currently we don't handle enums in the static analysis + // so we let them drop through to generateStoreInstruction() + if (p.name() && !p.isEnumType()) { int t = p.type(); if (t == QVariant::UserType) t = p.userType(); + prop->type = t; } } @@ -841,7 +869,7 @@ bool QmlCompiler::compileProperty(Property *prop, Object *obj, int ctxt) COMPILE_CHECK(compileNestedProperty(prop, ctxt)); } else if (QmlMetaType::isQmlList(prop->type) || - QmlMetaType::isList(prop->type)) { + QmlMetaType::isList(prop->type)) { COMPILE_CHECK(compileListProperty(prop, obj, ctxt)); diff --git a/src/declarative/qml/qmlcompiler_p.h b/src/declarative/qml/qmlcompiler_p.h index 2a06f73..9a0ce1c 100644 --- a/src/declarative/qml/qmlcompiler_p.h +++ b/src/declarative/qml/qmlcompiler_p.h @@ -139,6 +139,7 @@ private: bool compileComponentFromRoot(QmlParser::Object *obj, int); bool compileFetchedObject(QmlParser::Object *obj, int); bool compileSignal(QmlParser::Property *prop, QmlParser::Object *obj); + bool testProperty(QmlParser::Property *prop, QmlParser::Object *obj); bool compileProperty(QmlParser::Property *prop, QmlParser::Object *obj, int); bool compileIdProperty(QmlParser::Property *prop, QmlParser::Object *obj); diff --git a/src/declarative/qml/qmlcustomparser.cpp b/src/declarative/qml/qmlcustomparser.cpp index a342ca8..fe0c3a8 100644 --- a/src/declarative/qml/qmlcustomparser.cpp +++ b/src/declarative/qml/qmlcustomparser.cpp @@ -40,10 +40,13 @@ ****************************************************************************/ #include "qmlcustomparser.h" - +#include "qmlcustomparser_p.h" +#include "qmlparser_p.h" QT_BEGIN_NAMESPACE +using namespace QmlParser; + /*! \class QmlCustomParser \brief The QmlCustomParser class allows you to add new arbitrary types to QML. @@ -92,5 +95,129 @@ QT_BEGIN_NAMESPACE the same-named type as this custom parser is defined for). */ +QmlCustomParserNode +QmlCustomParserNodePrivate::fromObject(QmlParser::Object *root) +{ + QmlCustomParserNode rootNode; + rootNode.d->name = root->typeName; + + for(QHash::Iterator iter = root->properties.begin(); + iter != root->properties.end(); + ++iter) { + + Property *p = *iter; + + rootNode.d->properties << fromProperty(p); + } + + return rootNode; +} + +QmlCustomParserProperty +QmlCustomParserNodePrivate::fromProperty(QmlParser::Property *p) +{ + QmlCustomParserProperty prop; + 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); + + // 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; +} + +QmlCustomParserNode::QmlCustomParserNode() +: d(new QmlCustomParserNodePrivate) +{ +} + +QmlCustomParserNode::QmlCustomParserNode(const QmlCustomParserNode &other) +: d(new QmlCustomParserNodePrivate) +{ + *this = other; +} + +QmlCustomParserNode &QmlCustomParserNode::operator=(const QmlCustomParserNode &other) +{ + d->name = other.d->name; + d->properties = other.d->properties; + return *this; +} + +QmlCustomParserNode::~QmlCustomParserNode() +{ + delete d; d = 0; +} + +QByteArray QmlCustomParserNode::name() const +{ + return d->name; +} + +QList QmlCustomParserNode::properties() const +{ + return d->properties; +} + +QmlCustomParserProperty::QmlCustomParserProperty() +: d(new QmlCustomParserPropertyPrivate) +{ +} + +QmlCustomParserProperty::QmlCustomParserProperty(const QmlCustomParserProperty &other) +: d(new QmlCustomParserPropertyPrivate) +{ + *this = other; +} + +QmlCustomParserProperty &QmlCustomParserProperty::operator=(const QmlCustomParserProperty &other) +{ + d->name = other.d->name; + d->isList = other.d->isList; + d->values = other.d->values; + return *this; +} + +QmlCustomParserProperty::~QmlCustomParserProperty() +{ + delete d; d = 0; +} + +QByteArray QmlCustomParserProperty::name() const +{ + return d->name; +} + +bool QmlCustomParserProperty::isList() const +{ + return d->isList; +} + +QList QmlCustomParserProperty::assignedValues() const +{ + return d->values; +} + +QByteArray QmlCustomParser::compile(const QList &, bool *ok) +{ + return QByteArray(); +} + +void QmlCustomParser::setCustomData(QObject *, const QByteArray &) +{ +} QT_END_NAMESPACE diff --git a/src/declarative/qml/qmlcustomparser.h b/src/declarative/qml/qmlcustomparser.h index 9de1be4..0e6a619 100644 --- a/src/declarative/qml/qmlcustomparser.h +++ b/src/declarative/qml/qmlcustomparser.h @@ -53,13 +53,55 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) +class QmlCustomParserPropertyPrivate; +class Q_DECLARATIVE_EXPORT QmlCustomParserProperty +{ +public: + QmlCustomParserProperty(); + QmlCustomParserProperty(const QmlCustomParserProperty &); + QmlCustomParserProperty &operator=(const QmlCustomParserProperty &); + ~QmlCustomParserProperty(); + + QByteArray name() const; + + bool isList() const; + QList assignedValues() const; + +private: + friend class QmlCustomParserNodePrivate; + friend class QmlCustomParserPropertyPrivate; + QmlCustomParserPropertyPrivate *d; +}; +Q_DECLARE_METATYPE(QmlCustomParserProperty); + +class QmlCustomParserNodePrivate; +class Q_DECLARATIVE_EXPORT QmlCustomParserNode +{ +public: + QmlCustomParserNode(); + QmlCustomParserNode(const QmlCustomParserNode &); + QmlCustomParserNode &operator=(const QmlCustomParserNode &); + ~QmlCustomParserNode(); + + QByteArray name() const; + + QList properties() const; + +private: + friend class QmlCustomParserNodePrivate; + QmlCustomParserNodePrivate *d; +}; +Q_DECLARE_METATYPE(QmlCustomParserNode); + class Q_DECLARATIVE_EXPORT QmlCustomParser { public: virtual ~QmlCustomParser() {} virtual QByteArray compile(QXmlStreamReader&, bool *ok)=0; + virtual QByteArray compile(const QList &, bool *ok); virtual QVariant create(const QByteArray &)=0; + virtual void setCustomData(QObject *, const QByteArray &); struct Register { Register(const char *name, QmlCustomParser *parser) { @@ -76,7 +118,11 @@ public: #define QML_DEFINE_CUSTOM_PARSER_NS(namespacestring, name, parserClass) \ template<> QmlCustomParser::Register QmlCustomParser::Define::instance(namespacestring "/" # name, new parserClass); +#define QML_DEFINE_CUSTOM_TYPE(TYPE, NAME, CUSTOMTYPE) \ + template<> QmlPrivate::InstanceType QmlPrivate::Define::instance(qmlRegisterCustomType(#NAME, #TYPE, new CUSTOMTYPE)); + QT_END_NAMESPACE QT_END_HEADER + #endif diff --git a/src/declarative/qml/qmlcustomparser_p.h b/src/declarative/qml/qmlcustomparser_p.h new file mode 100644 index 0000000..63d148c --- /dev/null +++ b/src/declarative/qml/qmlcustomparser_p.h @@ -0,0 +1,79 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QMLCUSTOMPARSER_P_H +#define QMLCUSTOMPARSER_P_H + +#include +#include "qmlcustomparser.h" + +QT_BEGIN_NAMESPACE + +namespace QmlParser +{ + class Object; + class Property; +}; + +class QmlCustomParserNodePrivate +{ +public: + QByteArray name; + QList properties; + + static QmlCustomParserNode fromObject(QmlParser::Object *); + static QmlCustomParserProperty fromProperty(QmlParser::Property *); +}; + +class QmlCustomParserPropertyPrivate +{ +public: + QmlCustomParserPropertyPrivate() + : isList(false) {} + + QByteArray name; + bool isList; + QList values; +}; + +QT_END_NAMESPACE + +#endif // QMLCUSTOMPARSER_P_H diff --git a/src/declarative/qml/qmlinstruction_p.h b/src/declarative/qml/qmlinstruction_p.h index 440b54a..922fc61 100644 --- a/src/declarative/qml/qmlinstruction_p.h +++ b/src/declarative/qml/qmlinstruction_p.h @@ -174,6 +174,7 @@ public: } init; struct { int type; + int data; } create; struct { int data; diff --git a/src/declarative/qml/qmlmetatype.cpp b/src/declarative/qml/qmlmetatype.cpp index 9b99917..fbfeca0 100644 --- a/src/declarative/qml/qmlmetatype.cpp +++ b/src/declarative/qml/qmlmetatype.cpp @@ -118,6 +118,7 @@ public: QmlPrivate::CreateFunc m_extFunc; const QMetaObject *m_extMetaObject; int m_index; + QmlCustomParser *m_customParser; mutable volatile bool m_isSetup:1; mutable QList m_metaObjects; mutable QByteArray m_hash; @@ -126,7 +127,8 @@ public: QmlTypePrivate::QmlTypePrivate() : m_isInterface(false), m_iid(0), m_typeId(0), m_listId(0), m_qmlListId(0), m_opFunc(0), m_baseMetaObject(0), m_attachedPropertiesFunc(0), - m_parserStatusCast(-1), m_extFunc(0), m_extMetaObject(0), m_index(-1), m_isSetup(false) + m_parserStatusCast(-1), m_extFunc(0), m_extMetaObject(0), m_index(-1), + m_customParser(0), m_isSetup(false) { } @@ -150,7 +152,8 @@ QmlType::QmlType(int type, int listType, int qmlListType, const QMetaObject *metaObject, QmlAttachedPropertiesFunc attachedPropertiesFunc, int parserStatusCast, QmlPrivate::CreateFunc extFunc, - const QMetaObject *extMetaObject, int index) + const QMetaObject *extMetaObject, int index, + QmlCustomParser *customParser) : d(new QmlTypePrivate) { d->m_name = qmlName; @@ -163,6 +166,7 @@ QmlType::QmlType(int type, int listType, int qmlListType, d->m_parserStatusCast = parserStatusCast; d->m_extFunc = extFunc; d->m_index = index; + d->m_customParser = customParser; if (extMetaObject) d->m_extMetaObject = extMetaObject; @@ -272,6 +276,11 @@ QObject *QmlType::create() const return rv; } +QmlCustomParser *QmlType::customParser() const +{ + return d->m_customParser; +} + bool QmlType::isInterface() const { return d->m_isInterface; @@ -396,7 +405,7 @@ int QmlMetaType::registerInterface(const QmlPrivate::MetaTypeIds &id, return index; } -int QmlMetaType::registerType(const QmlPrivate::MetaTypeIds &id, QmlPrivate::Func func, const char *cname, const QMetaObject *mo, QmlAttachedPropertiesFunc attach, int pStatus, int object, QmlPrivate::CreateFunc extFunc, const QMetaObject *extmo) +int QmlMetaType::registerType(const QmlPrivate::MetaTypeIds &id, QmlPrivate::Func func, const char *cname, const QMetaObject *mo, QmlAttachedPropertiesFunc attach, int pStatus, int object, QmlPrivate::CreateFunc extFunc, const QMetaObject *extmo, QmlCustomParser *parser) { Q_UNUSED(object); QWriteLocker lock(metaTypeDataLock()); @@ -414,7 +423,7 @@ int QmlMetaType::registerType(const QmlPrivate::MetaTypeIds &id, QmlPrivate::Fun QmlType *type = new QmlType(id.typeId, id.listId, id.qmlListId, func, cname, mo, attach, pStatus, extFunc, - extmo, index); + extmo, index, parser); data->types.append(type); data->idToType.insert(type->typeId(), type); diff --git a/src/declarative/qml/qmlmetatype.h b/src/declarative/qml/qmlmetatype.h index 83fb60b..99f8e93 100644 --- a/src/declarative/qml/qmlmetatype.h +++ b/src/declarative/qml/qmlmetatype.h @@ -59,7 +59,7 @@ class QmlCustomParser; class Q_DECLARATIVE_EXPORT QmlMetaType { public: - static int registerType(const QmlPrivate::MetaTypeIds &, QmlPrivate::Func, const char *, const QMetaObject *, QmlAttachedPropertiesFunc, int pStatus, int object, QmlPrivate::CreateFunc extFunc, const QMetaObject *extmo); + static int registerType(const QmlPrivate::MetaTypeIds &, QmlPrivate::Func, const char *, const QMetaObject *, QmlAttachedPropertiesFunc, int pStatus, int object, QmlPrivate::CreateFunc extFunc, const QMetaObject *extmo, QmlCustomParser *); static int registerInterface(const QmlPrivate::MetaTypeIds &, QmlPrivate::Func, const char *); static void registerCustomParser(const char *, QmlCustomParser *); @@ -121,6 +121,8 @@ public: QObject *create() const; + QmlCustomParser *customParser() const; + bool isInterface() const; int typeId() const; int qListTypeId() const; @@ -145,7 +147,7 @@ private: friend class QmlMetaType; friend class QmlTypePrivate; QmlType(int, int, int, QmlPrivate::Func, const char *, int); - QmlType(int, int, int, QmlPrivate::Func, const char *, const QMetaObject *, QmlAttachedPropertiesFunc, int, QmlPrivate::CreateFunc, const QMetaObject *, int); + QmlType(int, int, int, QmlPrivate::Func, const char *, const QMetaObject *, QmlAttachedPropertiesFunc, int, QmlPrivate::CreateFunc, const QMetaObject *, int, QmlCustomParser *); ~QmlType(); QmlTypePrivate *d; @@ -166,7 +168,7 @@ int qmlRegisterType(const char *typeName) QmlPrivate::attachedPropertiesFunc(), QmlPrivate::StaticCastSelector::cast(), QmlPrivate::StaticCastSelector::cast(), - 0, 0); + 0, 0, 0); } template @@ -184,7 +186,7 @@ int qmlRegisterType(const char *qmlName, const char *typeName) QmlPrivate::attachedPropertiesFunc(), QmlPrivate::StaticCastSelector::cast(), QmlPrivate::StaticCastSelector::cast(), - 0, 0); + 0, 0, 0); } template @@ -206,7 +208,7 @@ int qmlRegisterExtendedType(const char *typeName) &T::staticMetaObject, attached, QmlPrivate::StaticCastSelector::cast(), QmlPrivate::StaticCastSelector::cast(), - &QmlPrivate::CreateParent::create, &E::staticMetaObject); + &QmlPrivate::CreateParent::create, &E::staticMetaObject, 0); } template @@ -231,7 +233,7 @@ int qmlRegisterExtendedType(const char *qmlName, const char *typeName) QmlPrivate::StaticCastSelector::cast(), QmlPrivate::StaticCastSelector::cast(), &QmlPrivate::CreateParent::create, - &E::staticMetaObject); + &E::staticMetaObject, 0); } template @@ -249,6 +251,24 @@ int qmlRegisterInterface(const char *typeName) qobject_interface_iid()); } +template +int qmlRegisterCustomType(const char *qmlName, const char *typeName, QmlCustomParser *parser) +{ + QByteArray name(typeName); + QmlPrivate::MetaTypeIds ids = { + qRegisterMetaType(QByteArray(name + "*").constData()), + qRegisterMetaType(QByteArray("QList<" + name + "*>*").constData()), + qRegisterMetaType(QByteArray("QmlList<" + name + "*>*").constData()) + }; + + return QmlMetaType::registerType(ids, QmlPrivate::list_op, qmlName, + &T::staticMetaObject, + QmlPrivate::attachedPropertiesFunc(), + QmlPrivate::StaticCastSelector::cast(), + QmlPrivate::StaticCastSelector::cast(), + 0, 0, parser); +} + void qmlRegisterCustomParser(const char *qmlName, QmlCustomParser *); QT_END_NAMESPACE diff --git a/src/declarative/qml/qmlvme.cpp b/src/declarative/qml/qmlvme.cpp index 253e9a7..7b3291e 100644 --- a/src/declarative/qml/qmlvme.cpp +++ b/src/declarative/qml/qmlvme.cpp @@ -257,6 +257,11 @@ QObject *QmlVME::run(QmlContext *ctxt, QmlCompiledComponent *comp, int start, in if (!o) VME_EXCEPTION("Unable to create object of type" << types.at(instr.create.type).className); + if (instr.create.data != -1) { + QmlCustomParser *customParser = + types.at(instr.create.type).type->customParser(); + customParser->setCustomData(o, datas.at(instr.create.data)); + } if (!stack.isEmpty()) { QObject *parent = stack.top(); o->setParent(parent); diff --git a/src/declarative/util/qmllistmodel.cpp b/src/declarative/util/qmllistmodel.cpp index 54aea2c..968e17b 100644 --- a/src/declarative/util/qmllistmodel.cpp +++ b/src/declarative/util/qmllistmodel.cpp @@ -53,55 +53,23 @@ QT_BEGIN_NAMESPACE #define DATA_ROLE_ID 1 #define DATA_ROLE_NAME "data" -Q_DECLARE_METATYPE(QListModelInterface *); -class QmlListModelPrivate +struct ListInstruction { -public: - QmlListModelPrivate(QmlListModel *m) - : q(m), - type(QmlListModel::Invalid), - listModelInterface(0), - singleObject(0), - roleCacheValid(false) - { - } - - void clear() - { - type = QmlListModel::Invalid; - model = QVariant(); - if (listModelInterface) - listModelInterface->disconnect(q); - listModelInterface = 0; - singleObject = 0; - roleCacheValid = false; - roleCache.clear(); - } - - void updateRoleCache() - { - if (roleCacheValid) - return; - - roleCacheValid = true; - if (type == QmlListModel::SingleObject) - roleCache = QmlMetaProperty::properties(singleObject); - } - - QmlListModel *q; - - QmlListModel::ModelType type; - - QVariant model; - QListModelInterface *listModelInterface; - QObject *singleObject; + enum { Push, Pop, Value, Set } type; + int dataIdx; +}; - bool roleCacheValid; - QStringList roleCache; +struct ListModelData +{ + int dataOffset; + int instrCount; + ListInstruction *instructions() const { return (ListInstruction *)((char *)this + sizeof(ListModelData)); } }; +Q_DECLARE_METATYPE(QListModelInterface *); + /*! - \qmlclass ListModel QmlListModel + \qmlclass ListModel \brief The ListModel element defines a free-form list data source. The ListModel is a simple XML heirarchy of items containing data roles. @@ -140,157 +108,6 @@ public: \endcode */ -/*! - \internal - \class QmlListModel -*/ -QmlListModel::QmlListModel(QObject *parent) -: QListModelInterface(parent), d(new QmlListModelPrivate(this)) -{ -} - -QmlListModel::~QmlListModel() -{ - delete d; d = 0; -} - -QmlListModel::ModelType QmlListModel::modelType() const -{ - return d->type; -} - -bool QmlListModel::setModel(const QVariant &model) -{ - d->clear(); - - QListModelInterface *iface = qvariant_cast(model); - if (iface) { - QObject::connect(iface, SIGNAL(itemsInserted(int,int)), - this, SIGNAL(itemsInserted(int,int))); - QObject::connect(iface, SIGNAL(itemsRemoved(int,int)), - this, SIGNAL(itemsRemoved(int,int))); - QObject::connect(iface, SIGNAL(itemsMoved(int,int,int)), - this, SIGNAL(itemsMoved(int,int,int))); - QObject::connect(iface, SIGNAL(itemsChanged(int,int,QList)), - this, SIGNAL(itemsChanged(int,int,QList))); - d->listModelInterface = iface; - d->type = ListInterface; - d->model = model; - return true; - } - - QObject *object = qvariant_cast(model); - if (object) { - d->singleObject = object; - d->type = SingleObject; - d->model = model; - return true; - } - - if (QmlMetaType::isList(model)) { - d->type = SimpleList; - d->model = model; - return true; - } - - return false; -} - -QVariant QmlListModel::model() const -{ - return d->model; -} - -QList QmlListModel::roles() const -{ - d->updateRoleCache(); - switch(modelType()) { - case Invalid: - return QList(); - case SimpleList: - return QList() << DATA_ROLE_ID; - case ListInterface: - return d->listModelInterface->roles(); - case SingleObject: - { - QList rv; - for (int ii = 0; ii < d->roleCache.count(); ++ii) - rv << ii; - return rv; - } - break; - }; - return QList(); -} - -QString QmlListModel::toString(int role) const -{ - d->updateRoleCache(); - switch(modelType()) { - case Invalid: - return QString(); - case SimpleList: - if (role == DATA_ROLE_ID) - return QLatin1String(DATA_ROLE_NAME); - else - return QString(); - case ListInterface: - return d->listModelInterface->toString(role); - case SingleObject: - if (role >= d->roleCache.count()) - return QString(); - else - return d->roleCache.at(role); - }; - return QString(); -} - -/*! - \qmlproperty int ListModel::count - This property holds the number of items in the list. -*/ -int QmlListModel::count() const -{ - switch(modelType()) { - case Invalid: - return 0; - case SimpleList: - return QmlMetaType::listCount(model()); - case ListInterface: - return d->listModelInterface->count(); - case SingleObject: - return 1; - } - return 0; -} - -QHash QmlListModel::data(int index, const QList &roles) const -{ - d->updateRoleCache(); - QHash rv; - switch(modelType()) { - case Invalid: - break; - case SimpleList: - if (roles.contains(DATA_ROLE_ID)) - rv.insert(DATA_ROLE_ID, QmlMetaType::listAt(d->model, index)); - break; - case ListInterface: - return d->listModelInterface->data(index, roles); - case SingleObject: - { - for (int ii = 0; ii < roles.count(); ++ii) { - QmlMetaProperty prop(d->singleObject, toString(roles.at(ii))); - rv.insert(roles.at(ii), prop.read()); - } - } - break; - }; - - return rv; -} - - struct ModelNode; class ListModel : public QListModelInterface @@ -484,20 +301,181 @@ int ListModel::count() const return _root->values.count(); } -struct ListInstruction -{ - enum { Push, Pop, Value, Set } type; - int dataIdx; -}; - class ListModelParser : public QmlCustomParser { public: virtual QByteArray compile(QXmlStreamReader& reader, bool *); + QByteArray compile(const QList &, bool *ok); virtual QVariant create(const QByteArray &); + + bool compileProperty(const QmlCustomParserProperty &prop, QList &instr, QByteArray &data); + void setCustomData(QObject *, const QByteArray &); }; QML_DEFINE_CUSTOM_PARSER(ListModel, ListModelParser); +bool ListModelParser::compileProperty(const QmlCustomParserProperty &prop, QList &instr, QByteArray &data) +{ + QList values = prop.assignedValues(); + for(int ii = 0; ii < values.count(); ++ii) { + const QVariant &value = values.at(ii); + + if(value.userType() == qMetaTypeId()) { + QmlCustomParserNode node = + qvariant_cast(value); + + { + ListInstruction li; + li.type = ListInstruction::Push; + li.dataIdx = -1; + instr << li; + } + + QList props = node.properties(); + for(int jj = 0; jj < props.count(); ++jj) { + const QmlCustomParserProperty &nodeProp = props.at(jj); + if(nodeProp.name() == "") + return false; + + ListInstruction li; + int ref = data.count(); + data.append(nodeProp.name()); + data.append('\0'); + li.type = ListInstruction::Set; + li.dataIdx = ref; + instr << li; + + if(!compileProperty(nodeProp, instr, data)) + return false; + + li.type = ListInstruction::Pop; + li.dataIdx = -1; + instr << li; + } + + { + ListInstruction li; + li.type = ListInstruction::Pop; + li.dataIdx = -1; + instr << li; + } + + } else { + + int ref = data.count(); + QByteArray d = value.toString().toLatin1(); + d.append('\0'); + data.append(d); + + ListInstruction li; + li.type = ListInstruction::Value; + li.dataIdx = ref; + instr << li; + + } + } + + return true; +} + +QByteArray ListModelParser::compile(const QList &customProps, bool *ok) +{ + *ok = true; + QList instr; + QByteArray data; + + for(int ii = 0; ii < customProps.count(); ++ii) { + const QmlCustomParserProperty &prop = customProps.at(ii); + if(prop.name() != "") { // isn't default property + *ok = false; + return QByteArray(); + } + + if(!compileProperty(prop, instr, data)) { + *ok = false; + return QByteArray(); + } + } + + int size = sizeof(ListModelData) + + instr.count() * sizeof(ListInstruction) + + data.count(); + + QByteArray rv; + rv.resize(size); + + ListModelData *lmd = (ListModelData *)rv.data(); + lmd->dataOffset = sizeof(ListModelData) + + instr.count() * sizeof(ListInstruction); + lmd->instrCount = instr.count(); + for (int ii = 0; ii < instr.count(); ++ii) + lmd->instructions()[ii] = instr.at(ii); + ::memcpy(rv.data() + lmd->dataOffset, data.constData(), data.count()); + + return rv; +} + +void ListModelParser::setCustomData(QObject *obj, const QByteArray &d) +{ + ListModel *rv = static_cast(obj); + + ModelNode *root = new ModelNode; + rv->_root = root; + QStack nodes; + nodes << root; + + const ListModelData *lmd = (const ListModelData *)d.constData(); + const char *data = ((const char *)lmd) + lmd->dataOffset; + + for (int ii = 0; ii < lmd->instrCount; ++ii) { + const ListInstruction &instr = lmd->instructions()[ii]; + + switch(instr.type) { + case ListInstruction::Push: + { + ModelNode *n = nodes.top(); + ModelNode *n2 = new ModelNode; + n->values << qVariantFromValue(n2); + nodes.push(n2); + } + break; + + case ListInstruction::Pop: + nodes.pop(); + break; + + case ListInstruction::Value: + { + ModelNode *n = nodes.top(); + n->values.append(QByteArray(data + instr.dataIdx)); + } + break; + + case ListInstruction::Set: + { + ModelNode *n = nodes.top(); + ModelNode *n2 = new ModelNode; + n->properties.insert(QLatin1String(data + instr.dataIdx), n2); + nodes.push(n2); + } + break; + } + } +} + +class ListModel2 : public ListModel +{ +Q_OBJECT +}; +QML_DECLARE_TYPE(ListModel2); +QML_DEFINE_CUSTOM_TYPE(ListModel2, ListModel2, ListModelParser); + +class ListElement : public QObject +{ +Q_OBJECT +}; +QML_DECLARE_TYPE(ListElement); +QML_DEFINE_TYPE(ListElement,ListElement); + static void dump(ModelNode *node, int ind) { QByteArray indentBa(ind * 4, ' '); @@ -534,13 +512,6 @@ ModelNode::~ModelNode() if (modelCache) { delete modelCache; modelCache = 0; } } -struct ListModelData -{ - int dataOffset; - int instrCount; - ListInstruction *instructions() const { return (ListInstruction *)((char *)this + sizeof(ListModelData)); } -}; - QByteArray ListModelParser::compile(QXmlStreamReader& reader, bool *ok) { *ok = true; diff --git a/src/declarative/util/qmllistmodel.h b/src/declarative/util/qmllistmodel.h index 3dcac4f..36aa009 100644 --- a/src/declarative/util/qmllistmodel.h +++ b/src/declarative/util/qmllistmodel.h @@ -57,40 +57,10 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE QT_MODULE(Declarative) -class QmlListModelPrivate; -class Q_DECLARATIVE_EXPORT QmlListModel : public QListModelInterface -{ -Q_OBJECT -public: - QmlListModel(QObject *parent = 0); - virtual ~QmlListModel(); - - enum ModelType { - Invalid, - SimpleList, - ListInterface, - SingleObject - }; - - ModelType modelType() const; - bool setModel(const QVariant &); - QVariant model() const; - - virtual QList roles() const; - virtual QString toString(int role) const; - - Q_PROPERTY(int count READ count); - virtual int count() const; - virtual QHash - data(int index, const QList &roles = (QList())) const; -private: - QmlListModelPrivate *d; -}; -QML_DECLARE_TYPE(QmlListModel); - -#endif // QMLLISTMODEL_H QT_END_NAMESPACE QT_END_HEADER + +#endif // QMLLISTMODEL_H -- cgit v0.12 From cc73c1e80b480e378a54ad976933f477ee7a5b9c Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Thu, 30 Apr 2009 13:08:22 +1000 Subject: Fix smooth scaling --- src/declarative/fx/qfxwebview.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/declarative/fx/qfxwebview.cpp b/src/declarative/fx/qfxwebview.cpp index 7c05088..05730f9 100644 --- a/src/declarative/fx/qfxwebview.cpp +++ b/src/declarative/fx/qfxwebview.cpp @@ -589,7 +589,8 @@ void QFxWebView::paintGLContents(GLPainter &p) #if defined(QFX_RENDER_QPAINTER) bool wasAA = p.testRenderHint(QPainter::Antialiasing); - p.setRenderHints(QPainter::Antialiasing, d->smooth); + bool wasSM = p.testRenderHint(QPainter::SmoothPixmapTransform); + p.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform, d->smooth); QRectF clipf = p.clipRegion().boundingRect(); const QRect clip = p.clipRegion().isEmpty() ? content : clipf.toRect(); #elif defined(QFX_RENDER_OPENGL) @@ -656,6 +657,7 @@ void QFxWebView::paintGLContents(GLPainter &p) } #if defined(QFX_RENDER_QPAINTER) p.setRenderHints(QPainter::Antialiasing, wasAA); + p.setRenderHints(QPainter::SmoothPixmapTransform, wasSM); #endif } -- cgit v0.12 From 0a4b78de06b60a5fc0a9182687ded099968c4055 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Thu, 30 Apr 2009 13:19:10 +1000 Subject: Documentation for ListView Convert to new format, use \snippet. --- doc/src/declarative/pics/ListViewHorizontal.png | Bin 2519 -> 5802 bytes doc/src/declarative/pics/ListViewSections.png | Bin 0 -> 7596 bytes doc/src/declarative/pics/trivialListView.png | Bin 2387 -> 6160 bytes .../listview/dummydata/ContactModel.qml | 18 +++ .../snippets/declarative/listview/highlight.qml | 59 +++++++++ doc/src/snippets/declarative/listview/listview.qml | 55 ++++++++ .../declarative/listview/dummydata/MyPetsModel.qml | 47 ++++--- examples/declarative/listview/sections.qml | 69 ++++++++++ src/declarative/fx/qfxlistview.cpp | 143 +++++++-------------- src/declarative/util/qmlstateoperations.cpp | 1 + 10 files changed, 275 insertions(+), 117 deletions(-) create mode 100644 doc/src/declarative/pics/ListViewSections.png create mode 100644 doc/src/snippets/declarative/listview/dummydata/ContactModel.qml create mode 100644 doc/src/snippets/declarative/listview/highlight.qml create mode 100644 doc/src/snippets/declarative/listview/listview.qml create mode 100644 examples/declarative/listview/sections.qml diff --git a/doc/src/declarative/pics/ListViewHorizontal.png b/doc/src/declarative/pics/ListViewHorizontal.png index 63c7c86..4633a0e 100644 Binary files a/doc/src/declarative/pics/ListViewHorizontal.png and b/doc/src/declarative/pics/ListViewHorizontal.png differ diff --git a/doc/src/declarative/pics/ListViewSections.png b/doc/src/declarative/pics/ListViewSections.png new file mode 100644 index 0000000..9270126 Binary files /dev/null and b/doc/src/declarative/pics/ListViewSections.png differ diff --git a/doc/src/declarative/pics/trivialListView.png b/doc/src/declarative/pics/trivialListView.png index 175e455..3782570 100644 Binary files a/doc/src/declarative/pics/trivialListView.png and b/doc/src/declarative/pics/trivialListView.png differ diff --git a/doc/src/snippets/declarative/listview/dummydata/ContactModel.qml b/doc/src/snippets/declarative/listview/dummydata/ContactModel.qml new file mode 100644 index 0000000..302dfd2 --- /dev/null +++ b/doc/src/snippets/declarative/listview/dummydata/ContactModel.qml @@ -0,0 +1,18 @@ + + + + Bill Smith + 555 3264 + + + John Brown + 555 8426 + + + Sam Wise + 555 0473 + + diff --git a/doc/src/snippets/declarative/listview/highlight.qml b/doc/src/snippets/declarative/listview/highlight.qml new file mode 100644 index 0000000..d8bbb22 --- /dev/null +++ b/doc/src/snippets/declarative/listview/highlight.qml @@ -0,0 +1,59 @@ +Rect { + width: 180 + height: 200 + color: "white" + // ContactModel model is defined in dummydata/ContactModel.qml + // The viewer automatically loads files in dummydata/* to assist + // development without a real data source. + + // Define a delegate component. A component will be + // instantiated for each visible item in the list. +//! [0] + Component { + id: Delegate + Item { + id: Wrapper + width: 180 + height: 40 + VerticalLayout { + x: 5; y: 5 + Text { + text: 'Name: ' + name + } + Text { + text: 'Number: ' + number + } + } + } + } +//! [0] + // Specify a highlight with custom movement. Note that autoHighlight + // is set to false in the ListView so that we can control how the + // highlight moves to the current item. +//! [1] + Component { + id: Highlight + Rect { + width: 180 + height: 40 + color: "lightsteelblue" + radius: 5 + y: Follow { + source: List.current.y + spring: 3 + damping: 0.1 + } + } + } + ListView { + id: List + width: 180 + height: parent.height + model: ContactModel + delegate: Delegate + highlight: Highlight + autoHighlight: false + focus: true + } +//! [1] +} diff --git a/doc/src/snippets/declarative/listview/listview.qml b/doc/src/snippets/declarative/listview/listview.qml new file mode 100644 index 0000000..5b99bbd --- /dev/null +++ b/doc/src/snippets/declarative/listview/listview.qml @@ -0,0 +1,55 @@ +//! [3] +Rect { + width: 480 + height: 40 + color: "white" + // ContactModel model is defined in dummydata/ContactModel.qml + // The viewer automatically loads files in dummydata/* to assist + // development without a real data source. + + // Define a delegate component. A component will be + // instantiated for each visible item in the list. +//! [0] + Component { + id: Delegate + Item { + id: Wrapper + width: 180 + height: 40 + VerticalLayout { + x: 5; y: 5 + Text { + text: 'Name: ' + name + } + Text { + text: 'Number: ' + number + } + } + } + } +//! [0] + // Define a highlight component. Just one of these will be instantiated + // by each ListView and placed behind the current item. +//! [1] + Component { + id: Highlight + Rect { + color: "lightsteelblue" + radius: 5 + } + } +//! [1] + // The actual list +//! [2] + ListView { + width: 480 + height: parent.height + model: ContactModel + delegate: Delegate + highlight: Highlight + focus: true + orientation: 'Horizontal' + } +//! [2] +} +//! [3] diff --git a/examples/declarative/listview/dummydata/MyPetsModel.qml b/examples/declarative/listview/dummydata/MyPetsModel.qml index 5af7fbf..e1617a3 100644 --- a/examples/declarative/listview/dummydata/MyPetsModel.qml +++ b/examples/declarative/listview/dummydata/MyPetsModel.qml @@ -4,48 +4,57 @@ Be sure to name the file the same as the id. --> - Rover - Dog - 5 + Polly + Parrot + 12 + Small - Whiskers - Cat - 2 + Penny + Turtle + 4 + Small Warren Rabbit 2 - - - Polly - Parrot - 12 + Small Spot Dog 9 + Medium - Tiny - Elephant - 15 - - - Penny - Turtle - 4 + Whiskers + Cat + 2 + Medium Joey Kangaroo 1 + Medium Kimba Bunny 65 + Large + + + Rover + Dog + 5 + Large + + + Tiny + Elephant + 15 + Large diff --git a/examples/declarative/listview/sections.qml b/examples/declarative/listview/sections.qml new file mode 100644 index 0000000..60acd62 --- /dev/null +++ b/examples/declarative/listview/sections.qml @@ -0,0 +1,69 @@ +//! [0] +Rect { + width: 200 + height: 240 + color: "white" + // MyPets model is defined in dummydata/MyPetsModel.qml + // The viewer automatically loads files in dummydata/* to assist + // development without a real data source. + // This one contains my pets. + + // Define a delegate component that includes a separator for sections. + Component { + id: PetDelegate + Item { + id: Wrapper + width: 200 + // My height is the combined height of the description and the section separator + height: Separator.height + Desc.height + Rect { + id: Separator + color: "lightsteelblue" + width: parent.width + // Only show the section separator when we are the beginning of a new section + // Note that for this to work nicely, the list must be ordered by section. + height: Wrapper.ListView.prevSection != Wrapper.ListView.section ? 20 : 0 + opacity: Wrapper.ListView.prevSection != Wrapper.ListView.section ? 1 : 0 + Text { + text: Wrapper.ListView.section; font.bold: true + x: 2; height: parent.height; vAlign: 'AlignVCenter' + } + } + Item { + id: Desc + x: 5 + height: Layout.height + 4 + anchors.top: Separator.bottom + VerticalLayout { + id: Layout + y: 2 + Text { text: 'Name: ' + name } + Text { text: 'Type: ' + type } + Text { text: 'Age: ' + age } + } + } + } + } + // Define a highlight component. Just one of these will be instantiated + // by each ListView and placed behind the current item. + Component { + id: PetHighlight + Rect { + color: "#FFFF88" + } + } + // The list + ListView { + id: List + width: 200 + height: parent.height + model: MyPetsModel + delegate: PetDelegate + highlight: PetHighlight + // The sectionExpression is simply the size of the pet. + // We use this to determine which section we are in above. + sectionExpression: "size" + focus: true + } +} +//! [0] diff --git a/src/declarative/fx/qfxlistview.cpp b/src/declarative/fx/qfxlistview.cpp index 0724e3a..13e5b21 100644 --- a/src/declarative/fx/qfxlistview.cpp +++ b/src/declarative/fx/qfxlistview.cpp @@ -798,37 +798,23 @@ void QFxListViewPrivate::fixupX() \brief The ListView element provides a list view of items provided by a model. The model is typically provided by a QAbstractListModel "C++ model object", but can also be created directly in XML. - The items are laid out vertically or horizontally and may be flicked to scroll. The below example creates a very simple vertical list, using an XML model. \image trivialListView.png - \code - - - - John - Smith - - - Bill - Jones - - - Jane - Doe - - - - - - - - - - - \endcode + + The user interface defines a delegate to display an item, a highlight, + and the ListView which uses the above. + + \snippet doc/src/snippets/declarative/listview/listview.qml 3 + + The model is defined as a ListModel using XML: + \quotefromfile doc/src/snippets/declarative/listview/dummydata/ContactModel.qml + \skipto - - John - Smith - - - Bill - Jones - - - Jane - Doe - - - - - \endcode + Models can also be created directly in XML, using the \l ListModel element. */ QVariant QFxListView::model() const { @@ -922,17 +890,7 @@ void QFxListView::setModel(const QVariant &model) The delegate provides a template describing what each item in the view should look and act like. Here is an example delegate: - \code - - - - - - - ... - - \endcode + \snippet doc/src/snippets/declarative/listview/listview.qml 0 */ QmlComponent *QFxListView::delegate() const { @@ -1012,13 +970,9 @@ int QFxListView::count() const The below example demonstrates how to make a simple highlight for a vertical list. - \code - - - - - \endcode - \image ListViewHighlight.png + + \snippet doc/src/snippets/declarative/listview/listview.qml 1 + \image trivialListView.png \sa autoHighlight */ @@ -1043,17 +997,12 @@ void QFxListView::setHighlight(QmlComponent *highlight) If autoHighlight is true, the highlight will be moved smoothly to follow the current item. If autoHighlight is false, the highlight will not be moved by the view, and must be implemented - by the highlight, for example: - - \code - - - - - - - - \endcode + by the highlight. The following example creates a highlight with + its motion defined by the spring \l {Follow}: + + \snippet doc/src/snippets/declarative/listview/highlight.qml 1 + + \sa highlight */ bool QFxListView::autoHighlight() const { @@ -1079,11 +1028,18 @@ void QFxListView::setAutoHighlight(bool autoHighlight) The modes supported are: \list \i Free - For Mouse, the current item may be positioned anywhere, - whether within the visible area, or outside. during Keyboard interaction, + whether within the visible area, or outside. During Keyboard interaction, the current item can move within the visible area, and the view will scroll to keep the highlight visible. - \i Snap - - \i SnapAuto - + \i Snap - For mouse, the current item may be positioned anywhere, + whether within the visible area, or outside. During keyboard interaction, + the current item will be kept in the visible area and will prefer to be + positioned at the \l snapPosition, however the view will never scroll + beyond the beginning or end of the view. + \i SnapAuto - For both mouse and keyboard, the current item will be + kept at the \l {snapPosition}. Additionally, if the view is dragged or + flicked, the current item will be automatically updated to be the item + currently at the snapPosition. \endlist */ QFxListView::CurrentItemPositioning QFxListView::currentItemPositioning() const @@ -1121,10 +1077,10 @@ void QFxListView::setSnapPosition(int pos) \qmlproperty enumeration ListView::orientation This property holds the orientation of the list. - Possible values are \c Qt::Vertical (default) and \c Qt::Horizontal. + Possible values are \c Vertical (default) and \c Horizontal. Vertical Example: - \image ListViewVertical.png + \image trivialListView.png Horizontal Example: \image ListViewHorizontal.png */ @@ -1205,24 +1161,15 @@ void QFxListView::setCacheBuffer(int b) \qmlproperty string ListView::sectionExpression This property holds the expression to be evaluated for the section attached property. - Each item in the list has attached properties named \c section and - \c prevSection. These may be used to place a section header for - related items. The example below assumes that the model is alphabetically - sorted. The section expression is the first character of the \c description - property. If \c section and \c prevSection differ, the item will - display a section header. - - \code - - - - - - - - - - \endcode + Each item in the list has attached properties named \c ListView.section and + \c ListView.prevSection. These may be used to place a section header for + related items. The example below assumes that the model is sorted by size of + pet. The section expression is the size property. If \c ListView.section and + \c ListView.prevSection differ, the item will display a section header. + + \snippet examples/declarative/listview/sections.qml 0 + + \image ListViewSections.png */ QString QFxListView::sectionExpression() const { diff --git a/src/declarative/util/qmlstateoperations.cpp b/src/declarative/util/qmlstateoperations.cpp index 8a10ca3..755befe 100644 --- a/src/declarative/util/qmlstateoperations.cpp +++ b/src/declarative/util/qmlstateoperations.cpp @@ -59,6 +59,7 @@ public: }; /*! + \preliminary \qmlclass ParentChange \brief The ParentChange element allows you to reparent an object in a state. */ -- cgit v0.12 From 63fd040014fa21a9e59466781b835d4188965559 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Thu, 30 Apr 2009 13:42:33 +1000 Subject: Don't delay initial resize (otherwise "default" widget size happens first) --- src/declarative/util/qfxview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/declarative/util/qfxview.cpp b/src/declarative/util/qfxview.cpp index 42047b6..5611bca 100644 --- a/src/declarative/util/qfxview.cpp +++ b/src/declarative/util/qfxview.cpp @@ -265,7 +265,7 @@ void QFxView::continueExecute() d->root = item; connect(item, SIGNAL(widthChanged()), this, SLOT(sizeChanged())); connect(item, SIGNAL(heightChanged()), this, SLOT(sizeChanged())); - sizeChanged(); + emit sceneResized(QSize(d->root->width(),d->root->height())); } else if (QWidget *wid = qobject_cast(obj)) { window()->setAttribute(Qt::WA_OpaquePaintEvent, false); window()->setAttribute(Qt::WA_NoSystemBackground, false); -- cgit v0.12 From 4e01e6107c4228912fba90ba682a7c0620d92dcb Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Thu, 30 Apr 2009 13:47:01 +1000 Subject: fix --- examples/declarative/slideswitch/Switch.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/declarative/slideswitch/Switch.qml b/examples/declarative/slideswitch/Switch.qml index a3f75e8..5862646 100644 --- a/examples/declarative/slideswitch/Switch.qml +++ b/examples/declarative/slideswitch/Switch.qml @@ -46,7 +46,7 @@ Item { MouseRegion { anchors.fill: Knob onClicked: { toggle() } - onReleased: { if (!isClick) dorelease() } + onReleased: { dorelease() } drag.target: Knob drag.axis: "x" drag.xmin: 1 -- cgit v0.12 From 26a6905e8feed42c0886b9ceef96456f2375deee Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Thu, 30 Apr 2009 13:47:41 +1000 Subject: Change syntax --- examples/declarative/webview/autosize.qml | 101 +++++++++++++++----------- examples/declarative/webview/inline-html.qml | 25 +++---- examples/declarative/webview/inline-xhtml.qml | 14 ---- examples/declarative/webview/qml-in-html.qml | 50 ++++++++----- examples/declarative/webview/transparent.qml | 17 +++-- 5 files changed, 112 insertions(+), 95 deletions(-) delete mode 100644 examples/declarative/webview/inline-xhtml.qml diff --git a/examples/declarative/webview/autosize.qml b/examples/declarative/webview/autosize.qml index fedd497..c32b752 100644 --- a/examples/declarative/webview/autosize.qml +++ b/examples/declarative/webview/autosize.qml @@ -1,42 +1,59 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// The WebView size is determined by the width, height, +// idealWidth, and idealHeight properties. +Rect { + id: Rect + color: "white" + width: 200 + height: Layout.height + VerticalLayout { + id: Layout + spacing: 2 + WebView { + html: "No width defined." + Rect { + color: "#10000000" + anchors.fill: parent + } + } + WebView { + width: Rect.width + html: "The width is full." + Rect { + color: "#10000000" + anchors.fill: parent + } + } + WebView { + width: Rect.width/2 + html: "The width is half." + Rect { + color: "#10000000" + anchors.fill: parent + } + } + WebView { + idealWidth: Rect.width/2 + html: "The idealWidth is half." + Rect { + color: "#10000000" + anchors.fill: parent + } + } + WebView { + idealWidth: Rect.width/2 + html: "The_idealWidth_is_half." + Rect { + color: "#10000000" + anchors.fill: parent + } + } + WebView { + width: Rect.width/2 + html: "The_width_is_half." + Rect { + color: "#10000000" + anchors.fill: parent + } + } + } +} diff --git a/examples/declarative/webview/inline-html.qml b/examples/declarative/webview/inline-html.qml index 701db41..5f6d410 100644 --- a/examples/declarative/webview/inline-html.qml +++ b/examples/declarative/webview/inline-html.qml @@ -1,13 +1,12 @@ - - - - -
OneTwoThree -
1X1X -
20X0 -
3X1X -
- ]]> -
+// Inline HTML with loose formatting can be +// set on the html property. +WebView { + html:"\ + \ + \ +
OneTwoThree\ +
1X1X\ +
20X0\ +
3X1X\ +
" +} diff --git a/examples/declarative/webview/inline-xhtml.qml b/examples/declarative/webview/inline-xhtml.qml deleted file mode 100644 index 4acb417..0000000 --- a/examples/declarative/webview/inline-xhtml.qml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - -
OneTwoThree
1X1X
20X0
3X1X
- - -
diff --git a/examples/declarative/webview/qml-in-html.qml b/examples/declarative/webview/qml-in-html.qml index 8c1c06f..29dded5 100644 --- a/examples/declarative/webview/qml-in-html.qml +++ b/examples/declarative/webview/qml-in-html.qml @@ -1,20 +1,30 @@ - - - - - - These are QML plugins, shown in a QML WebView via HTML OBJECT tags, all scaled to 75% - and placed in a Flickable area... - -
Duration Color Plugin -
500 red -
2000 blue -
1000 green -
- - - ]]> -
-
+// The WebView supports QML data through the HTML OBJECT tag +Rect { + color:"blue" + Flickable { + width: parent.width + height: parent.height/2 + viewportWidth: Web.width*Web.scale + viewportHeight: Web.height*Web.scale + WebView { + id: Web + width: 250 + height: 420 + scale: 0.75 + smooth: true + settings.pluginsEnabled: true + html: "\ + \ + These are QML plugins, shown in a QML WebView via HTML OBJECT tags, all scaled to 75%\ + and placed in a Flickable area...\ + \ +
Duration Color Plugin\ +
500 red \ +
2000 blue \ +
1000 green \ +
\ + \ + " + } + } +} diff --git a/examples/declarative/webview/transparent.qml b/examples/declarative/webview/transparent.qml index 71e1621..8614822 100644 --- a/examples/declarative/webview/transparent.qml +++ b/examples/declarative/webview/transparent.qml @@ -1,6 +1,11 @@ - - - - - +// The WebView background is transparent +// if the HTML does not specify a background +Rect { + color: "green" + width: Web.width + height: Web.height + WebView { + id: Web + html: "Hello World!" + } +} -- cgit v0.12 From 7ab8748f4b95c257dc5aebeb9f83a568aeca9910 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Thu, 30 Apr 2009 13:52:14 +1000 Subject: Port syntax --- examples/declarative/follow/pong.qml | 180 +++++++++++++++++++++++++---------- 1 file changed, 128 insertions(+), 52 deletions(-) diff --git a/examples/declarative/follow/pong.qml b/examples/declarative/follow/pong.qml index 4fbf323..b6695bd 100644 --- a/examples/declarative/follow/pong.qml +++ b/examples/declarative/follow/pong.qml @@ -1,55 +1,131 @@ - - - - - - - - - - - - - - - - - - - - - - - - if (y <= 0) +Rect { + id: Page + width: 640 + height: 480 + color: "#000000" + + // Make a ball to bounce + Rect { + id: Ball + x: 20 + width: 20 + height: 20 + color: "#00ee00" + z: 1 + + // Add a property for the target y coordinate + properties: Property { + name: "targetY" + value: Page.height-10 + } + properties: Property { + name: "direction" + value: "right" + } + + // Move the ball to the right and back to the left repeatedly + x: SequentialAnimation { + running: true + repeat: true + NumericAnimation { + to: Page.width-40 + duration: 2000 + } + SetPropertyAction { + target: Ball + property: "direction" + value: "left" + } + NumericAnimation { + to: 20 + duration: 2000 + } + SetPropertyAction { + target: Ball + property: "direction" + value: "right" + } + } + + // Make y follow the target y coordinate, with a velocity of 200 + y: Follow { + source: Ball.targetY + velocity: 200 + } + + // Detect the ball hitting the top or bottom of the view and bounce it + onTopChanged: { + if (y <= 0) targetY = Page.height-20; - else if (y >= Page.height-20) + else if (y >= Page.height-20) targetY = 0; - - - - - - - - - - - - - + } + } + + // Place bats to the left and right of the view, following the y + // coordinates of the ball. + Rect { + id: LeftBat + color: "#00ee00" + x: 2 + width: 20 + height: 90 + y: Follow { + source: Ball.y-45 + velocity: 300 + enabled: Ball.direction == 'left' + } + } + Rect { + id: RightBat + x: Page.width-22 + color: "#00ee00" + width: 20 + height: 90 + y: Follow { + source: Ball.y-45 + velocity: 300 + enabled: Ball.direction == 'right' + } + } - - - - - - - - - + // The rest, to make it look realistic, if neither ever scores... + Rect { + color: "#00ee00" + x: 320-80 + y: 0 + width: 40 + height: 60 + } + Rect { + color: "#000000" + x: 320-70 + y: 10 + width: 20 + height: 40 + } + Rect { + color: "#00ee00" + x: 320+40 + y: 0 + width: 40 + height: 60 + } + Rect { + color: "#000000" + x: 320+50 + y: 10 + width: 20 + height: 40 + } + Repeater { + dataSource: 24 + Rect { + color: "#00ee00" + x: 320-5 + y: index*20 + width: 10 + height: 10 + } + } +} -- cgit v0.12 From 5ddb12ac5babbdabe9375fa79f80655e987f459d Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Thu, 30 Apr 2009 13:57:02 +1000 Subject: Port syntax --- .../declarative/webview/content/SpinSquare.qml | 41 +++++++++++++++------- 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/examples/declarative/webview/content/SpinSquare.qml b/examples/declarative/webview/content/SpinSquare.qml index ced45d5..5c14506 100644 --- a/examples/declarative/webview/content/SpinSquare.qml +++ b/examples/declarative/webview/content/SpinSquare.qml @@ -1,12 +1,29 @@ - - - - - - - - - - - - +Item { + id: Root + properties: Property { + name: "period" + value: 250 + } + properties: Property { + name: "color" + value: "black" + } + Item { + x: Root.width/2 + y: Root.height/2 + Rect { + color: Root.color + x: -width/2 + y: -height/2 + width: Root.width + height: width + } + rotation: NumericAnimation { + from: 0 + to: 360 + repeat: true + running: true + duration: Root.period + } + } +} -- cgit v0.12 From 9b08198a1bac0347767a426ddc53d5ebe903b1a7 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Thu, 30 Apr 2009 13:57:20 +1000 Subject: Namespaces not needed in new syntax. --- examples/declarative/namespaces/BlueStuff/Rect.qml | 1 - examples/declarative/namespaces/Local.qml | 1 - examples/declarative/namespaces/components.qml | 17 ----------------- examples/declarative/namespaces/lib/Chronos/Clock.qml | 15 --------------- examples/declarative/namespaces/lib/Chronos/Hand.qml | 9 --------- .../namespaces/lib/Chronos/pics/clockface.png | Bin 46895 -> 0 bytes .../declarative/namespaces/lib/Path/PathLabel.qml | 1 - examples/declarative/namespaces/lib/RedStuff/Rect.qml | 1 - examples/declarative/namespaces/lib/Wrong/Wrong.qml | 3 --- examples/declarative/namespaces/library.qml | 12 ------------ examples/declarative/namespaces/path.qml | 18 ------------------ examples/declarative/namespaces/simple.qml | 5 ----- examples/declarative/namespaces/wrong1.qml | 4 ---- 13 files changed, 87 deletions(-) delete mode 100644 examples/declarative/namespaces/BlueStuff/Rect.qml delete mode 100644 examples/declarative/namespaces/Local.qml delete mode 100644 examples/declarative/namespaces/components.qml delete mode 100644 examples/declarative/namespaces/lib/Chronos/Clock.qml delete mode 100644 examples/declarative/namespaces/lib/Chronos/Hand.qml delete mode 100644 examples/declarative/namespaces/lib/Chronos/pics/clockface.png delete mode 100644 examples/declarative/namespaces/lib/Path/PathLabel.qml delete mode 100644 examples/declarative/namespaces/lib/RedStuff/Rect.qml delete mode 100644 examples/declarative/namespaces/lib/Wrong/Wrong.qml delete mode 100644 examples/declarative/namespaces/library.qml delete mode 100644 examples/declarative/namespaces/path.qml delete mode 100644 examples/declarative/namespaces/simple.qml delete mode 100644 examples/declarative/namespaces/wrong1.qml diff --git a/examples/declarative/namespaces/BlueStuff/Rect.qml b/examples/declarative/namespaces/BlueStuff/Rect.qml deleted file mode 100644 index 94e066c..0000000 --- a/examples/declarative/namespaces/BlueStuff/Rect.qml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/examples/declarative/namespaces/Local.qml b/examples/declarative/namespaces/Local.qml deleted file mode 100644 index 5fb2aef..0000000 --- a/examples/declarative/namespaces/Local.qml +++ /dev/null @@ -1 +0,0 @@ -This is a local component diff --git a/examples/declarative/namespaces/components.qml b/examples/declarative/namespaces/components.qml deleted file mode 100644 index ea5e2d9..0000000 --- a/examples/declarative/namespaces/components.qml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/examples/declarative/namespaces/lib/Chronos/Clock.qml b/examples/declarative/namespaces/lib/Chronos/Clock.qml deleted file mode 100644 index 959d193..0000000 --- a/examples/declarative/namespaces/lib/Chronos/Clock.qml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/examples/declarative/namespaces/lib/Chronos/Hand.qml b/examples/declarative/namespaces/lib/Chronos/Hand.qml deleted file mode 100644 index 3662e74..0000000 --- a/examples/declarative/namespaces/lib/Chronos/Hand.qml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/examples/declarative/namespaces/lib/Chronos/pics/clockface.png b/examples/declarative/namespaces/lib/Chronos/pics/clockface.png deleted file mode 100644 index a885950..0000000 Binary files a/examples/declarative/namespaces/lib/Chronos/pics/clockface.png and /dev/null differ diff --git a/examples/declarative/namespaces/lib/Path/PathLabel.qml b/examples/declarative/namespaces/lib/Path/PathLabel.qml deleted file mode 100644 index c4b08b0..0000000 --- a/examples/declarative/namespaces/lib/Path/PathLabel.qml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/examples/declarative/namespaces/lib/RedStuff/Rect.qml b/examples/declarative/namespaces/lib/RedStuff/Rect.qml deleted file mode 100644 index 3429b09..0000000 --- a/examples/declarative/namespaces/lib/RedStuff/Rect.qml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/examples/declarative/namespaces/lib/Wrong/Wrong.qml b/examples/declarative/namespaces/lib/Wrong/Wrong.qml deleted file mode 100644 index 3af55f6..0000000 --- a/examples/declarative/namespaces/lib/Wrong/Wrong.qml +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/examples/declarative/namespaces/library.qml b/examples/declarative/namespaces/library.qml deleted file mode 100644 index ae10ed8..0000000 --- a/examples/declarative/namespaces/library.qml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - diff --git a/examples/declarative/namespaces/path.qml b/examples/declarative/namespaces/path.qml deleted file mode 100644 index 795447b..0000000 --- a/examples/declarative/namespaces/path.qml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/examples/declarative/namespaces/simple.qml b/examples/declarative/namespaces/simple.qml deleted file mode 100644 index 16d9815..0000000 --- a/examples/declarative/namespaces/simple.qml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/examples/declarative/namespaces/wrong1.qml b/examples/declarative/namespaces/wrong1.qml deleted file mode 100644 index 721c45a..0000000 --- a/examples/declarative/namespaces/wrong1.qml +++ /dev/null @@ -1,4 +0,0 @@ - - - - -- cgit v0.12 From 0204346fb91eaf73893b651438980cb9ca5f1f51 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Thu, 30 Apr 2009 14:06:50 +1000 Subject: Make custom parsers internal. Custom parsers still have a way to go before they fully fit the QML 2.0 language. --- src/declarative/qml/qml.pri | 2 +- src/declarative/qml/qmlcompiler.cpp | 2 +- src/declarative/qml/qmlcustomparser.cpp | 3 +- src/declarative/qml/qmlcustomparser.h | 128 ------------------------------ src/declarative/qml/qmlcustomparser_p.h | 87 +++++++++++++++----- src/declarative/qml/qmlcustomparser_p_p.h | 79 ++++++++++++++++++ src/declarative/qml/qmlmetatype.cpp | 2 +- src/declarative/qml/qmlvme.cpp | 2 +- src/declarative/qml/qmlxmlparser.cpp | 2 +- src/declarative/util/qmllistmodel.cpp | 2 +- 10 files changed, 155 insertions(+), 154 deletions(-) delete mode 100644 src/declarative/qml/qmlcustomparser.h create mode 100644 src/declarative/qml/qmlcustomparser_p_p.h diff --git a/src/declarative/qml/qml.pri b/src/declarative/qml/qml.pri index 40b854f..9067039 100644 --- a/src/declarative/qml/qml.pri +++ b/src/declarative/qml/qml.pri @@ -32,8 +32,8 @@ HEADERS += qml/qmlparser_p.h \ qml/qmlmetaproperty.h \ qml/qmlcomponent.h \ qml/qmlcomponent_p.h \ - qml/qmlcustomparser.h \ qml/qmlcustomparser_p.h \ + qml/qmlcustomparser_p_p.h \ qml/qmlpropertyvaluesource.h \ qml/qmlboundsignal_p.h \ qml/qmlxmlparser_p.h \ diff --git a/src/declarative/qml/qmlcompiler.cpp b/src/declarative/qml/qmlcompiler.cpp index 4433286..c9bdfec 100644 --- a/src/declarative/qml/qmlcompiler.cpp +++ b/src/declarative/qml/qmlcompiler.cpp @@ -59,7 +59,7 @@ #include #include #include -#include "private/qmlcustomparser_p.h" +#include "private/qmlcustomparser_p_p.h" #include "qmlscriptparser_p.h" diff --git a/src/declarative/qml/qmlcustomparser.cpp b/src/declarative/qml/qmlcustomparser.cpp index fe0c3a8..544c469 100644 --- a/src/declarative/qml/qmlcustomparser.cpp +++ b/src/declarative/qml/qmlcustomparser.cpp @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#include "qmlcustomparser.h" #include "qmlcustomparser_p.h" +#include "qmlcustomparser_p_p.h" #include "qmlparser_p.h" QT_BEGIN_NAMESPACE @@ -50,6 +50,7 @@ using namespace QmlParser; /*! \class QmlCustomParser \brief The QmlCustomParser class allows you to add new arbitrary types to QML. + \internal By subclassing QmlCustomParser, you can add an XML parser for building a particular type. diff --git a/src/declarative/qml/qmlcustomparser.h b/src/declarative/qml/qmlcustomparser.h deleted file mode 100644 index 0e6a619..0000000 --- a/src/declarative/qml/qmlcustomparser.h +++ /dev/null @@ -1,128 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QMLCUSTOMPARSER_H -#define QMLCUSTOMPARSER_H - -#include -#include -#include -#include - -QT_BEGIN_HEADER - -QT_BEGIN_NAMESPACE - -QT_MODULE(Declarative) - -class QmlCustomParserPropertyPrivate; -class Q_DECLARATIVE_EXPORT QmlCustomParserProperty -{ -public: - QmlCustomParserProperty(); - QmlCustomParserProperty(const QmlCustomParserProperty &); - QmlCustomParserProperty &operator=(const QmlCustomParserProperty &); - ~QmlCustomParserProperty(); - - QByteArray name() const; - - bool isList() const; - QList assignedValues() const; - -private: - friend class QmlCustomParserNodePrivate; - friend class QmlCustomParserPropertyPrivate; - QmlCustomParserPropertyPrivate *d; -}; -Q_DECLARE_METATYPE(QmlCustomParserProperty); - -class QmlCustomParserNodePrivate; -class Q_DECLARATIVE_EXPORT QmlCustomParserNode -{ -public: - QmlCustomParserNode(); - QmlCustomParserNode(const QmlCustomParserNode &); - QmlCustomParserNode &operator=(const QmlCustomParserNode &); - ~QmlCustomParserNode(); - - QByteArray name() const; - - QList properties() const; - -private: - friend class QmlCustomParserNodePrivate; - QmlCustomParserNodePrivate *d; -}; -Q_DECLARE_METATYPE(QmlCustomParserNode); - -class Q_DECLARATIVE_EXPORT QmlCustomParser -{ -public: - virtual ~QmlCustomParser() {} - - virtual QByteArray compile(QXmlStreamReader&, bool *ok)=0; - virtual QByteArray compile(const QList &, bool *ok); - virtual QVariant create(const QByteArray &)=0; - virtual void setCustomData(QObject *, const QByteArray &); - - struct Register { - Register(const char *name, QmlCustomParser *parser) { - qmlRegisterCustomParser(name, parser); - } - }; - template - struct Define { - static Register instance; - }; -}; -#define QML_DEFINE_CUSTOM_PARSER(name, parserClass) \ - template<> QmlCustomParser::Register QmlCustomParser::Define::instance(# name, new parserClass); -#define QML_DEFINE_CUSTOM_PARSER_NS(namespacestring, name, parserClass) \ - template<> QmlCustomParser::Register QmlCustomParser::Define::instance(namespacestring "/" # name, new parserClass); - -#define QML_DEFINE_CUSTOM_TYPE(TYPE, NAME, CUSTOMTYPE) \ - template<> QmlPrivate::InstanceType QmlPrivate::Define::instance(qmlRegisterCustomType(#NAME, #TYPE, new CUSTOMTYPE)); - -QT_END_NAMESPACE - -QT_END_HEADER - -#endif diff --git a/src/declarative/qml/qmlcustomparser_p.h b/src/declarative/qml/qmlcustomparser_p.h index 63d148c..0e6a619 100644 --- a/src/declarative/qml/qmlcustomparser_p.h +++ b/src/declarative/qml/qmlcustomparser_p.h @@ -39,41 +39,90 @@ ** ****************************************************************************/ -#ifndef QMLCUSTOMPARSER_P_H -#define QMLCUSTOMPARSER_P_H +#ifndef QMLCUSTOMPARSER_H +#define QMLCUSTOMPARSER_H -#include -#include "qmlcustomparser.h" +#include +#include +#include +#include + +QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -namespace QmlParser +QT_MODULE(Declarative) + +class QmlCustomParserPropertyPrivate; +class Q_DECLARATIVE_EXPORT QmlCustomParserProperty { - class Object; - class Property; +public: + QmlCustomParserProperty(); + QmlCustomParserProperty(const QmlCustomParserProperty &); + QmlCustomParserProperty &operator=(const QmlCustomParserProperty &); + ~QmlCustomParserProperty(); + + QByteArray name() const; + + bool isList() const; + QList assignedValues() const; + +private: + friend class QmlCustomParserNodePrivate; + friend class QmlCustomParserPropertyPrivate; + QmlCustomParserPropertyPrivate *d; }; +Q_DECLARE_METATYPE(QmlCustomParserProperty); -class QmlCustomParserNodePrivate +class QmlCustomParserNodePrivate; +class Q_DECLARATIVE_EXPORT QmlCustomParserNode { public: - QByteArray name; - QList properties; + QmlCustomParserNode(); + QmlCustomParserNode(const QmlCustomParserNode &); + QmlCustomParserNode &operator=(const QmlCustomParserNode &); + ~QmlCustomParserNode(); - static QmlCustomParserNode fromObject(QmlParser::Object *); - static QmlCustomParserProperty fromProperty(QmlParser::Property *); + QByteArray name() const; + + QList properties() const; + +private: + friend class QmlCustomParserNodePrivate; + QmlCustomParserNodePrivate *d; }; +Q_DECLARE_METATYPE(QmlCustomParserNode); -class QmlCustomParserPropertyPrivate +class Q_DECLARATIVE_EXPORT QmlCustomParser { public: - QmlCustomParserPropertyPrivate() - : isList(false) {} + virtual ~QmlCustomParser() {} + + virtual QByteArray compile(QXmlStreamReader&, bool *ok)=0; + virtual QByteArray compile(const QList &, bool *ok); + virtual QVariant create(const QByteArray &)=0; + virtual void setCustomData(QObject *, const QByteArray &); - QByteArray name; - bool isList; - QList values; + struct Register { + Register(const char *name, QmlCustomParser *parser) { + qmlRegisterCustomParser(name, parser); + } + }; + template + struct Define { + static Register instance; + }; }; +#define QML_DEFINE_CUSTOM_PARSER(name, parserClass) \ + template<> QmlCustomParser::Register QmlCustomParser::Define::instance(# name, new parserClass); +#define QML_DEFINE_CUSTOM_PARSER_NS(namespacestring, name, parserClass) \ + template<> QmlCustomParser::Register QmlCustomParser::Define::instance(namespacestring "/" # name, new parserClass); + +#define QML_DEFINE_CUSTOM_TYPE(TYPE, NAME, CUSTOMTYPE) \ + template<> QmlPrivate::InstanceType QmlPrivate::Define::instance(qmlRegisterCustomType(#NAME, #TYPE, new CUSTOMTYPE)); QT_END_NAMESPACE -#endif // QMLCUSTOMPARSER_P_H +QT_END_HEADER + +#endif diff --git a/src/declarative/qml/qmlcustomparser_p_p.h b/src/declarative/qml/qmlcustomparser_p_p.h new file mode 100644 index 0000000..96e9b32 --- /dev/null +++ b/src/declarative/qml/qmlcustomparser_p_p.h @@ -0,0 +1,79 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QMLCUSTOMPARSER_P_H +#define QMLCUSTOMPARSER_P_H + +#include +#include "qmlcustomparser_p.h" + +QT_BEGIN_NAMESPACE + +namespace QmlParser +{ + class Object; + class Property; +}; + +class QmlCustomParserNodePrivate +{ +public: + QByteArray name; + QList properties; + + static QmlCustomParserNode fromObject(QmlParser::Object *); + static QmlCustomParserProperty fromProperty(QmlParser::Property *); +}; + +class QmlCustomParserPropertyPrivate +{ +public: + QmlCustomParserPropertyPrivate() + : isList(false) {} + + QByteArray name; + bool isList; + QList values; +}; + +QT_END_NAMESPACE + +#endif // QMLCUSTOMPARSER_P_H diff --git a/src/declarative/qml/qmlmetatype.cpp b/src/declarative/qml/qmlmetatype.cpp index fbfeca0..63e5c58 100644 --- a/src/declarative/qml/qmlmetatype.cpp +++ b/src/declarative/qml/qmlmetatype.cpp @@ -57,7 +57,7 @@ #include #include #include -#include +#include QT_BEGIN_NAMESPACE #ifdef QT_BOOTSTRAPPED diff --git a/src/declarative/qml/qmlvme.cpp b/src/declarative/qml/qmlvme.cpp index 7b3291e..e6235e4 100644 --- a/src/declarative/qml/qmlvme.cpp +++ b/src/declarative/qml/qmlvme.cpp @@ -45,7 +45,7 @@ #include #include "private/qmetaobjectbuilder_p.h" #include -#include +#include #include #include #include diff --git a/src/declarative/qml/qmlxmlparser.cpp b/src/declarative/qml/qmlxmlparser.cpp index b3565a0..35d2c0e 100644 --- a/src/declarative/qml/qmlxmlparser.cpp +++ b/src/declarative/qml/qmlxmlparser.cpp @@ -40,7 +40,7 @@ ****************************************************************************/ #include "qmlxmlparser_p.h" -#include "qmlcustomparser.h" +#include "qmlcustomparser_p.h" #include #include #include diff --git a/src/declarative/util/qmllistmodel.cpp b/src/declarative/util/qmllistmodel.cpp index 968e17b..4837180 100644 --- a/src/declarative/util/qmllistmodel.cpp +++ b/src/declarative/util/qmllistmodel.cpp @@ -42,7 +42,7 @@ #include #include #include -#include "qmlcustomparser.h" +#include #include "qmlopenmetaobject.h" #include #include -- cgit v0.12 From d107f39df40990d4cbd1fc5983c5de7ae46bb374 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Thu, 30 Apr 2009 14:09:20 +1000 Subject: More work on transform elements. AxisRotation/AxisTranslation have been renamed Rotation3D/Translation3D. Squish has gained a raster implementation and basic docs. --- doc/src/declarative/pics/squish.png | Bin 0 -> 8590 bytes src/declarative/fx/qfxflipable.cpp | 2 +- src/declarative/fx/qfxtransform.cpp | 202 +++++++++++++++++++++++------------- src/declarative/fx/qfxtransform.h | 22 ++-- 4 files changed, 137 insertions(+), 89 deletions(-) create mode 100644 doc/src/declarative/pics/squish.png diff --git a/doc/src/declarative/pics/squish.png b/doc/src/declarative/pics/squish.png new file mode 100644 index 0000000..73bf292 Binary files /dev/null and b/doc/src/declarative/pics/squish.png differ diff --git a/src/declarative/fx/qfxflipable.cpp b/src/declarative/fx/qfxflipable.cpp index 1d15827..81ed750 100644 --- a/src/declarative/fx/qfxflipable.cpp +++ b/src/declarative/fx/qfxflipable.cpp @@ -58,7 +58,7 @@ public: QFxItem *front; QFxItem *back; QFxAxis *axis; - QFxRotation axisRotation; + QFxRotation3D axisRotation; qreal rotation; }; diff --git a/src/declarative/fx/qfxtransform.cpp b/src/declarative/fx/qfxtransform.cpp index c355158..2bed170 100644 --- a/src/declarative/fx/qfxtransform.cpp +++ b/src/declarative/fx/qfxtransform.cpp @@ -178,8 +178,8 @@ void QFxAxis::setEndZ(qreal z) } /*! - \qmlclass AxisRotation - \brief The AxisRotation element provides a way to rotate an Item around an axis. + \qmlclass Rotation3D + \brief The Rotation3D element provides a way to rotate an Item around an axis. Here is an example of various rotations applied to an \l Image. \code @@ -187,22 +187,22 @@ void QFxAxis::setEndZ(qreal z) - + - + - + - + @@ -211,58 +211,58 @@ void QFxAxis::setEndZ(qreal z) \image axisrotation.png */ -QML_DEFINE_TYPE(QFxRotation,AxisRotation); +QML_DEFINE_TYPE(QFxRotation3D,Rotation3D); -QFxRotation::QFxRotation(QObject *parent) -: QFxTransform(parent), _angle(0), _distanceToPlane(1024.), _dirty(true) +QFxRotation3D::QFxRotation3D(QObject *parent) +: QFxTransform(parent), _angle(0), _dirty(true) { connect(&_axis, SIGNAL(updated()), this, SLOT(update())); } -QFxRotation::~QFxRotation() +QFxRotation3D::~QFxRotation3D() { } /*! - \qmlproperty real AxisRotation::axis.startX - \qmlproperty real AxisRotation::axis.startY - \qmlproperty real AxisRotation::axis.endX - \qmlproperty real AxisRotation::axis.endY - \qmlproperty real AxisRotation::axis.endZ + \qmlproperty real Rotation3D::axis.startX + \qmlproperty real Rotation3D::axis.startY + \qmlproperty real Rotation3D::axis.endX + \qmlproperty real Rotation3D::axis.endY + \qmlproperty real Rotation3D::axis.endZ A rotation axis is specified by 2 points in 3D space: a start point and an end point. The z-position of the start point is assumed to be 0, and cannot be changed. */ -QFxAxis *QFxRotation::axis() +QFxAxis *QFxRotation3D::axis() { return &_axis; } /*! - \qmlproperty real AxisRotation::angle + \qmlproperty real Rotation3D::angle The angle, in degrees, to rotate around the specified axis. */ -qreal QFxRotation::angle() const +qreal QFxRotation3D::angle() const { return _angle; } -void QFxRotation::setAngle(qreal angle) +void QFxRotation3D::setAngle(qreal angle) { _angle = angle; update(); } -bool QFxRotation::isIdentity() const +bool QFxRotation3D::isIdentity() const { return (_angle == 0.) || (_axis.endZ() == 0. && _axis.endY() == _axis.startY() && _axis.endX() == _axis.startX()); } #if defined(QFX_RENDER_QPAINTER) const qreal inv_dist_to_plane = 1. / 1024.; -QTransform QFxRotation::transform() const +QTransform QFxRotation3D::transform() const { if (_dirty) { _transform = QTransform(); @@ -282,10 +282,6 @@ QTransform QFxRotation::transform() const qreal y = _axis.endY() - _axis.startY(); qreal z = _axis.endZ(); - qreal idtp = inv_dist_to_plane; - if (distanceToPlane() != 1024.) - idtp = 1. / distanceToPlane(); - qreal len = x * x + y * y + z * z; if (len != 1.) { len = ::sqrt(len); @@ -294,8 +290,8 @@ QTransform QFxRotation::transform() const z /= len; } - QTransform rot(x*x*(1-c)+c, x*y*(1-c)-z*s, x*z*(1-c)+y*s*idtp, - y*x*(1-c)+z*s, y*y*(1-c)+c, y*z*(1-c)-x*s*idtp, + QTransform rot(x*x*(1-c)+c, x*y*(1-c)-z*s, x*z*(1-c)+y*s*inv_dist_to_plane, + y*x*(1-c)+z*s, y*y*(1-c)+c, y*z*(1-c)-x*s*inv_dist_to_plane, 0, 0, 1); _transform *= rotTrans; @@ -310,7 +306,7 @@ QTransform QFxRotation::transform() const return _transform; } #elif defined(QFX_RENDER_OPENGL) -QMatrix4x4 QFxRotation::transform() const +QMatrix4x4 QFxRotation3D::transform() const { if (_dirty) { _dirty = false; @@ -333,21 +329,7 @@ QMatrix4x4 QFxRotation::transform() const } #endif -/*! - \qmlproperty real AxisRotation::distanceToPlane -*/ -qreal QFxRotation::distanceToPlane() const -{ - return _distanceToPlane; -} - -void QFxRotation::setDistanceToPlane(qreal d) -{ - _distanceToPlane = d; - update(); -} - -void QFxRotation::update() +void QFxRotation3D::update() { _dirty = true; QFxItem *item = qobject_cast(parent()); @@ -356,77 +338,77 @@ void QFxRotation::update() } /*! - \qmlclass AxisTranslation - \brief The AxisTranslation element provides a way to move an Item along an axis. + \qmlclass Translation3D + \brief The Translation3D element provides a way to move an Item along an axis. The following example translates the image to 10, 3. \code - + \endcode */ -QML_DEFINE_TYPE(QFxTranslation,AxisTranslation); +QML_DEFINE_TYPE(QFxTranslation3D,Translation3D); -QFxTranslation::QFxTranslation(QObject *parent) +QFxTranslation3D::QFxTranslation3D(QObject *parent) : QFxTransform(parent), _distance(0), _dirty(true) { connect(&_axis, SIGNAL(updated()), this, SLOT(update())); } -QFxTranslation::~QFxTranslation() +QFxTranslation3D::~QFxTranslation3D() { } /*! - \qmlproperty real AxisTranslation::axis.startX - \qmlproperty real AxisTranslation::axis.startY - \qmlproperty real AxisTranslation::axis.endX - \qmlproperty real AxisTranslation::axis.endY - \qmlproperty real AxisTranslation::axis.endZ + \qmlproperty real Translation3D::axis.startX + \qmlproperty real Translation3D::axis.startY + \qmlproperty real Translation3D::axis.endX + \qmlproperty real Translation3D::axis.endY + \qmlproperty real Translation3D::axis.endZ A translation axis is specified by 2 points in 3D space: a start point and an end point. The z-position of the start point is assumed to be 0, and cannot be changed. Changing the z-position of the end point is only valid when running under OpenGL. */ -QFxAxis *QFxTranslation::axis() +QFxAxis *QFxTranslation3D::axis() { return &_axis; } /*! - \qmlproperty real AxisTranslation::distance + \qmlproperty real Translation3D::distance The distance to translate along the specified axis. distance is a multiplier; in the example below, a distance of 1 would translate to 100, 50, while a distance of 0.5 would translate to 50, 25. \code - + \endcode */ -qreal QFxTranslation::distance() const +qreal QFxTranslation3D::distance() const { return _distance; } -void QFxTranslation::setDistance(qreal distance) +void QFxTranslation3D::setDistance(qreal distance) { _distance = distance; update(); } -bool QFxTranslation::isIdentity() const +bool QFxTranslation3D::isIdentity() const { return (_distance == 0.) || (_axis.endZ() == 0. && _axis.endY() == _axis.startY() && _axis.endX() == _axis.startX()); } #if defined(QFX_RENDER_QPAINTER) -QTransform QFxTranslation::transform() const +QTransform QFxTranslation3D::transform() const { if (_dirty) { _transform = QTransform(); @@ -446,7 +428,7 @@ QTransform QFxTranslation::transform() const return _transform; } #elif defined(QFX_RENDER_OPENGL) -QMatrix4x4 QFxRotation::transform() const +QMatrix4x4 QFxTranslation3D::transform() const { if (_dirty) { _dirty = false; @@ -465,7 +447,7 @@ QMatrix4x4 QFxRotation::transform() const } #endif -void QFxTranslation::update() +void QFxTranslation3D::update() { _dirty = true; @@ -541,8 +523,62 @@ QMatrix4x4 QFxPerspective::transform() const \qmlclass Squish \brief The Squish element allows you to distort an items appearance by 'squishing' it. - A Squish transform only affects an item when running under OpenGL; when running under software - rasterization it has no effect. + Here is an example of various \l Image squishes. + \code + Rect { + id: Screen + width: 360; height: 80 + color: "white" + + HorizontalLayout { + margin: 10 + spacing: 10 + Image { src: "qt.png" } + Image { + src: "qt.png" + transform: Squish { + x:0; y:0; width:60; height:60 + topLeftX:0; topLeftY:0 + topRightX:50; topRightY:10 + bottomLeftX:0; bottomLeftY:60 + bottomRightX: 60; bottomRightY:60 + } + } + Image { + src: "qt.png" + transform: Squish { + x:0; y:0; width:60; height:60 + topLeftX:0; topLeftY:0 + topRightX:50; topRightY:0 + bottomLeftX:10; bottomLeftY:50 + bottomRightX: 60; bottomRightY:60 + } + } + Image { + src: "qt.png" + transform: Squish { + x:0; y:0; width:60; height:60 + topLeftX:0; topLeftY:10 + topRightX:60; topRightY:10 + bottomLeftX:0; bottomLeftY:50 + bottomRightX: 60; bottomRightY:50 + } + } + Image { + src: "qt.png" + transform: Squish { + x:0; y:0; width:60; height:60 + topLeftX:10; topLeftY:0 + topRightX:50; topRightY:0 + bottomLeftX:10; bottomLeftY:60 + bottomRightX: 50; bottomRightY:60 + } + } + } + } + \endcode + + \image squish.png */ QML_DEFINE_TYPE(QFxSquish,Squish); @@ -557,6 +593,11 @@ QFxSquish::~QFxSquish() /*! \qmlproperty real Squish::x + \qmlproperty real Squish::y + \qmlproperty real Squish::width + \qmlproperty real Squish::height + + This is usually set to the original geometry of the item being squished. */ qreal QFxSquish::x() const { @@ -569,9 +610,6 @@ void QFxSquish::setX(qreal v) update(); } -/*! - \qmlproperty real Squish::y -*/ qreal QFxSquish::y() const { return p.y(); @@ -583,9 +621,6 @@ void QFxSquish::setY(qreal v) update(); } -/*! - \qmlproperty real Squish::width -*/ qreal QFxSquish::width() const { return s.width(); @@ -597,9 +632,6 @@ void QFxSquish::setWidth(qreal v) update(); } -/*! - \qmlproperty real Squish::height -*/ qreal QFxSquish::height() const { return s.height(); @@ -614,6 +646,8 @@ void QFxSquish::setHeight(qreal v) /*! \qmlproperty real Squish::topLeftX \qmlproperty real Squish::topLeftY + + The top left point for the squish. */ qreal QFxSquish::topLeft_x() const { @@ -640,6 +674,8 @@ void QFxSquish::settopLeft_y(qreal v) /*! \qmlproperty real Squish::topRightX \qmlproperty real Squish::topRightY + + The top right point for the squish. */ qreal QFxSquish::topRight_x() const { @@ -666,6 +702,8 @@ void QFxSquish::settopRight_y(qreal v) /*! \qmlproperty real Squish::bottomLeftX \qmlproperty real Squish::bottomLeftY + + The bottom left point for the squish. */ qreal QFxSquish::bottomLeft_x() const { @@ -692,6 +730,8 @@ void QFxSquish::setbottomLeft_y(qreal v) /*! \qmlproperty real Squish::bottomRightX \qmlproperty real Squish::bottomRightY + + The bottom right point for the squish. */ qreal QFxSquish::bottomRight_x() const { @@ -722,12 +762,24 @@ void QFxSquish::update() item->updateTransform(); } -#if defined(QFX_RENDER_OPENGL) bool QFxSquish::isIdentity() const { return false; } +#if defined(QFX_RENDER_QPAINTER) +QTransform QFxSquish::transform() const +{ + QPolygonF poly; + poly << p << QPointF(p.x() + s.width(), p.y()) << QPointF(p.x() + s.width(), p.y() + s.height()) << QPointF(p.x(), p.y() + s.height()); + QPolygonF poly2; + poly2 << p1 << p2 << p4 << p3; + + QTransform t; + QTransform::quadToQuad(poly, poly2, t); + return t; +} +#elif defined(QFX_RENDER_OPENGL) QMatrix4x4 QFxSquish::transform() const { QPolygonF poly; diff --git a/src/declarative/fx/qfxtransform.h b/src/declarative/fx/qfxtransform.h index 8a4eab1..14bce9b 100644 --- a/src/declarative/fx/qfxtransform.h +++ b/src/declarative/fx/qfxtransform.h @@ -109,16 +109,15 @@ private: }; QML_DECLARE_TYPE(QFxAxis); -class Q_DECLARATIVE_EXPORT QFxRotation : public QFxTransform +class Q_DECLARATIVE_EXPORT QFxRotation3D : public QFxTransform { Q_OBJECT Q_PROPERTY(QFxAxis *axis READ axis) Q_PROPERTY(qreal angle READ angle WRITE setAngle) - Q_PROPERTY(qreal distanceToPlane READ distanceToPlane WRITE setDistanceToPlane) public: - QFxRotation(QObject *parent=0); - ~QFxRotation(); + QFxRotation3D(QObject *parent=0); + ~QFxRotation3D(); QFxAxis *axis(); @@ -136,22 +135,21 @@ private Q_SLOTS: private: QFxAxis _axis; qreal _angle; - qreal _distanceToPlane; mutable bool _dirty; mutable QSimpleCanvas::Matrix _transform; }; -QML_DECLARE_TYPE(QFxRotation); +QML_DECLARE_TYPE(QFxRotation3D); -class Q_DECLARATIVE_EXPORT QFxTranslation : public QFxTransform +class Q_DECLARATIVE_EXPORT QFxTranslation3D : public QFxTransform { Q_OBJECT Q_PROPERTY(QFxAxis *axis READ axis) Q_PROPERTY(qreal distance READ distance WRITE setDistance) public: - QFxTranslation(QObject *parent=0); - ~QFxTranslation(); + QFxTranslation3D(QObject *parent=0); + ~QFxTranslation3D(); QFxAxis *axis(); @@ -170,7 +168,7 @@ private: mutable bool _dirty; mutable QSimpleCanvas::Matrix _transform; }; -QML_DECLARE_TYPE(QFxTranslation); +QML_DECLARE_TYPE(QFxTranslation3D); class Q_DECLARATIVE_EXPORT QFxPerspective : public QFxTransform { @@ -269,10 +267,8 @@ public: qreal bottomRight_x() const; void setbottomRight_x(qreal); -#if defined(QFX_RENDER_OPENGL) virtual bool isIdentity() const; - virtual QMatrix4x4 transform() const; -#endif + virtual QSimpleCanvas::Matrix transform() const; private: void update(); -- cgit v0.12 From 4eefc8ada9e6849bb9383d75b04cad835f2f9cbf Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Thu, 30 Apr 2009 14:26:37 +1000 Subject: Port syntax --- .../webbrowser/content/RectSoftShadow.qml | 40 +- demos/declarative/webbrowser/webbrowser.qml | 612 +++++++++++++++------ 2 files changed, 479 insertions(+), 173 deletions(-) diff --git a/demos/declarative/webbrowser/content/RectSoftShadow.qml b/demos/declarative/webbrowser/content/RectSoftShadow.qml index 2b39422..5817f00 100644 --- a/demos/declarative/webbrowser/content/RectSoftShadow.qml +++ b/demos/declarative/webbrowser/content/RectSoftShadow.qml @@ -1,10 +1,30 @@ - - - - - - +Item { + Image { + source: "pics/softshadow-left.sci" + x: -16 + y: -16 + width: 16 + height: parent.height+32 + } + Image { + source: "pics/softshadow-right.sci" + x: parent.width + y: -16 + width: 16 + height: parent.height+32 + } + Image { + source: "pics/softshadow-top.png" + x: 0 + y: -16 + width: parent.width + height: 16 + } + Image { + source: "pics/softshadow-bottom.png" + x: 0 + y: parent.height + width: webview.width*webview.scale + height: 16 + } +} diff --git a/demos/declarative/webbrowser/webbrowser.qml b/demos/declarative/webbrowser/webbrowser.qml index cf96b3f..79fd1cd 100644 --- a/demos/declarative/webbrowser/webbrowser.qml +++ b/demos/declarative/webbrowser/webbrowser.qml @@ -1,7 +1,17 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + } + + Item { + id: WebPanel + anchors.fill: parent + clip: true + Rect { + color: "#555555" + anchors.fill: parent + } + Image { + source: "content/pics/softshadow-bottom.png" + width: WebPanel.width + height: 16 + } + Image { + source: "content/pics/softshadow-top.png" + width: WebPanel.width + height: 16 + anchors.bottom: Footer.top + } + RectSoftShadow { + x: -Flick.xPosition + y: -Flick.yPosition + width: WebView.width*WebView.scale + height: Flick.y+WebView.height*WebView.scale + } + Item { + id: HeaderSpace + width: parent.width + height: 60 + z: 1 + + Image { + id: Header + source: "content/pics/header.png" + width: parent.width + height: 64 + state: "Normal" + x: Flick.xPosition < 0 ? -Flick.xPosition : Flick.xPosition > Flick.viewportWidth-Flick.width + ? -Flick.xPosition+Flick.viewportWidth-Flick.width : 0 + y: Flick.yPosition < 0 ? -Flick.yPosition : progressOff* + (Flick.yPosition>height?-height:-Flick.yPosition) + Text { + id: HeaderText + + text: WebView.title!='' || WebView.progress == 1.0 ? WebView.title : 'Loading...' + elide: "ElideRight" + + color: "white" + styleColor: "black" + style: Raised + + font.family: "Helvetica" + font.size: 10 + font.bold: true + + anchors.left: Header.left + anchors.right: Header.right + anchors.leftMargin: 4 + anchors.rightMargin: 4 + anchors.top: Header.top + anchors.topMargin: 4 + hAlign: AlignHCenter + } + Item { + width: parent.width + anchors.top: HeaderText.bottom + anchors.topMargin: 2 + anchors.bottom: parent.bottom + + Item { + id: UrlBox + height: 31 + anchors.left: parent.left + anchors.leftMargin: 12 + anchors.right: parent.right + anchors.rightMargin: 12 + anchors.top: parent.top + clip: true + Image { + source: "content/pics/addressbar.sci" + anchors.fill: UrlBox + } + Image { + id: UrlBoxhl + source: "content/pics/addressbar-filled.sci" + width: parent.width*WebView.progress + height: parent.height + opacity: 1-Header.progressOff + clip: true + } + /* + KeyProxy { + id: proxy + anchors.left: UrlBox.left + anchors.fill: UrlBox + focusable: true + targets: [keyActions,EditUrl] + } + KeyActions { + id: keyActions + return: "WebBrowser.url = EditUrl.text; proxy.focus=false;" + } + */ + TextEdit { + id: EditUrl + + text: WebView.url == '' ? ' ' : WebView.url + wrap: false + font.size: 11 + color: "#555555" + + anchors.left: UrlBox.left + anchors.right: UrlBox.right + anchors.leftMargin: 6 + anchors.verticalCenter: UrlBox.verticalCenter + anchors.verticalCenterOffset: 1 + + opacity: 0 + } + Text { + id: ShowUrl + text: WebView.url == '' ? ' ' : WebView.url + font.size: 11 + color: "#555555" + anchors.left: UrlBox.left + anchors.right: UrlBox.right + anchors.leftMargin: 6 + anchors.verticalCenter: UrlBox.verticalCenter + anchors.verticalCenterOffset: 1 + } + } + MouseRegion { + anchors.fill: UrlBox + onClicked: { proxy.focus=true } + } + } + properties: Property { + name: "progressOff" + value: 1 + type: "Real" + } + states: [ + State { + name: "Normal" + when: WebView.progress == 1.0 + SetProperty { + target: Header + property: "progressOff" + value: 1 + } + }, + State { + name: "ProgressShown" + when: WebView.progress < 1.0 + SetProperty { + target: Header + property: "progressOff" + value: 0 + } + } + ] + transitions: [ + Transition { + NumericAnimation { + target: Header + properties: "progressOff" + easing: "easeInOutQuad" + duration: 300 + } + } + ] + } + } + Flickable { + id: Flick + width: parent.width + viewportWidth: Math.max(parent.width,WebView.width*WebView.scale) + viewportHeight: Math.max(parent.height,WebView.height*WebView.scale) + anchors.top: HeaderSpace.bottom + anchors.bottom: Footer.top + anchors.left: parent.left + anchors.right: parent.right + + properties: Property { + name: "centerX" + value: 0 + type: "Real" + } + properties: Property { + name: "centerY" + value: 0 + type: "Real" + } + + WebView { + id: WebView + cacheSize: 4000000 + + url: WebBrowser.url + smooth: true + focusable: true + focus: true + + idealWidth: Flick.width + idealHeight: Flick.height/scale + scale: (width > 0) ? Flick.width/width*zoomedOut+(1-zoomedOut) : 1 + + onUrlChanged: { Flick.xPosition=0; Flick.yPosition=0; zoomOut() } + onDoubleClick: { toggleZoom() } + + properties: Property { + name: "zoomedOut" + type: "real" + value: 1 + } + } + Rect { + id: WebViewTint + color: "black" + opacity: 0 + anchors.fill: WebView + MouseRegion { + anchors.fill: WebViewTint + onClicked: { proxy.focus=false } + } + } + } + Image { + id: Footer + source: "content/pics/footer.sci" + width: parent.width + height: 43 + anchors.bottom: parent.bottom + Rect { + y: -1 + width: parent.width + height: 1 + color: "#555555" + } + Item { + id: backbutton + width: back_e.width + height: back_e.height + anchors.right: reload.left + anchors.rightMargin: 10 + anchors.verticalCenter: parent.verticalCenter + Image { + id: back_e + source: "content/pics/back.png" + anchors.fill: parent + } + Image { + id: back_d + source: "content/pics/back-disabled.png" + anchors.fill: parent + } + states: [ + State { + name: "Enabled" + when: WebView.back.enabled==true + SetProperty { + target: back_e + property: "opacity" + value: 1 + } + SetProperty { + target: back_d + property: "opacity" + value: 0 + } + }, + State { + name: "Disabled" + when: WebView.back.enabled==false + SetProperty { + target: back_e + property: "opacity" + value: 0 + } + SetProperty { + target: back_d + property: "opacity" + value: 1 + } + } + ] + transitions: [ + Transition { + NumericAnimation { + properties: "opacity" + easing: "easeInOutQuad" + duration: 300 + } + } + ] + MouseRegion { + anchors.fill: back_e + onClicked: { if (WebView.back.enabled) WebView.back.trigger() } + } + } + Image { + id: reload + source: "content/pics/reload.png" + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter + } + MouseRegion { + anchors.fill: reload + onClicked: { WebView.reload.trigger() } + } + Item { + id: forwardbutton + width: forward_e.width + height: forward_e.height + anchors.left: reload.right + anchors.leftMargin: 10 + anchors.verticalCenter: parent.verticalCenter + Image { + id: forward_e + source: "content/pics/forward.png" + anchors.fill: parent + anchors.verticalCenter: parent.verticalCenter + } + Image { + id: forward_d + source: "content/pics/forward-disabled.png" + anchors.fill: parent + } + states: [ + State { + name: "Enabled" + when: WebView.forward.enabled==true + SetProperty { + target: forward_e + property: "opacity" + value: 1 + } + SetProperty { + target: forward_d + property: "opacity" + value: 0 + } + }, + State { + name: "Disabled" + when: WebView.forward.enabled==false + SetProperty { + target: forward_e + property: "opacity" + value: 0 + } + SetProperty { + target: forward_d + property: "opacity" + value: 1 + } + } + ] + transitions: [ + Transition { + NumericAnimation { + properties: "opacity" + easing: "easeInOutQuad" + duration: 320 + } + } + ] + MouseRegion { + anchors.fill: parent + onClicked: { if (WebView.forward.enabled) WebView.forward.trigger() } + } + } + } + } + states: [ + State { + name: "Normal" + SetProperty { + target: WebView + property: "zoomedOut" + value: 0 + } + SetProperty { + target: Flick + property: "xPosition" + value: Math.min(WebView.width-Flick.width,Math.max(0,Flick.centerX-Flick.width/2)) + } + SetProperty { + target: Flick + property: "yPosition" + value: Math.min(WebView.height-Flick.height,Math.max(0,Flick.centerY-Flick.height/2)) + } + }, + State { + name: "ZoomedOut" + SetProperty { + target: WebView + property: "zoomedOut" + value: 1 + } + } + ] + transitions: [ + Transition { + SequentialAnimation { + SetPropertyAction { + target: WebView + property: "smooth" + value: false + } + ParallelAnimation { + NumericAnimation { + target: WebView + properties: "zoomedOut" + easing: "easeInOutQuad" + duration: 200 + } + NumericAnimation { + target: Flick + properties: "xPosition,yPosition" + easing: "easeInOutQuad" + duration: 200 + } + } + SetPropertyAction { + target: WebView + property: "smooth" + value: true + } + } + } + ] +} -- cgit v0.12 From f2fb6b63c6e5572d02245c64da652f13174588b9 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Thu, 30 Apr 2009 14:54:49 +1000 Subject: Convert all examples and demos from XML format --- .../webbrowser/content/RectSoftShadow.qml | 40 +- demos/declarative/webbrowser/webbrowser.qml | 591 +++++++++++++++------ .../contacts/dummydata/contactModel.qml | 206 +++---- examples/declarative/easing/easing.qml | 157 +++--- examples/declarative/follow/pong.qml | 173 ++++-- .../declarative/listview/dummydata/MyPetsModel.qml | 101 ++-- .../declarative/listview/dummydata/Recipies.qml | 199 +++---- examples/declarative/minehunt/minehunt.qml | 239 ++++++--- examples/declarative/mouseregion/mouse.qml | 72 ++- examples/declarative/velocity/Day.qml | 156 ++++-- examples/declarative/velocity/velocity.qml | 194 ++++--- examples/declarative/xmldata/daringfireball.qml | 84 ++- examples/declarative/xmldata/yahoonews.qml | 149 ++++-- src/declarative/fx/qfxkeyactions.cpp | 2 +- src/declarative/fx/qfxkeyactions.h | 2 +- 15 files changed, 1522 insertions(+), 843 deletions(-) diff --git a/demos/declarative/webbrowser/content/RectSoftShadow.qml b/demos/declarative/webbrowser/content/RectSoftShadow.qml index 2b39422..5817f00 100644 --- a/demos/declarative/webbrowser/content/RectSoftShadow.qml +++ b/demos/declarative/webbrowser/content/RectSoftShadow.qml @@ -1,10 +1,30 @@ - - - - - - +Item { + Image { + source: "pics/softshadow-left.sci" + x: -16 + y: -16 + width: 16 + height: parent.height+32 + } + Image { + source: "pics/softshadow-right.sci" + x: parent.width + y: -16 + width: 16 + height: parent.height+32 + } + Image { + source: "pics/softshadow-top.png" + x: 0 + y: -16 + width: parent.width + height: 16 + } + Image { + source: "pics/softshadow-bottom.png" + x: 0 + y: parent.height + width: webview.width*webview.scale + height: 16 + } +} diff --git a/demos/declarative/webbrowser/webbrowser.qml b/demos/declarative/webbrowser/webbrowser.qml index cf96b3f..2b49c11 100644 --- a/demos/declarative/webbrowser/webbrowser.qml +++ b/demos/declarative/webbrowser/webbrowser.qml @@ -1,7 +1,15 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + } + Item { + id: WebPanel + anchors.fill: parent + clip: true + Rect { + color: "#555555" + anchors.fill: parent + } + Image { + source: "content/pics/softshadow-bottom.png" + width: WebPanel.width + height: 16 + } + Image { + source: "content/pics/softshadow-top.png" + width: WebPanel.width + anchors.bottom: Footer.top + height: 16 + } + RectSoftShadow { + x: -Flick.xPosition + y: -Flick.yPosition + width: WebView.width*WebView.scale + height: Flick.y+WebView.height*WebView.scale + } + Item { + id: HeaderSpace + width: parent.width + height: 60 + z: 1 + Image { + id: Header + width: parent.width + state: "Normal" + x: Flick.xPosition < 0 ? -Flick.xPosition : Flick.xPosition > Flick.viewportWidth-Flick.width ? -Flick.xPosition+Flick.viewportWidth-Flick.width : 0 + y: Flick.yPosition < 0 ? -Flick.yPosition : progressOff*(Flick.yPosition>height?-height:-Flick.yPosition) + height: 64 + source: "content/pics/header.png" + Text { + id: HeaderText + text: WebView.title!='' || WebView.progress == 1.0 ? WebView.title : 'Loading...' + color: "white" + styleColor: "black" + style: Raised + font.family: "Helvetica" + font.size: 10 + font.bold: true + elide: "ElideRight" + anchors.left: Header.left + anchors.right: Header.right + anchors.leftMargin: 4 + anchors.rightMargin: 4 + anchors.top: Header.top + anchors.topMargin: 4 + hAlign: AlignHCenter + } + Item { + anchors.top: HeaderText.bottom + anchors.topMargin: 2 + anchors.bottom: parent.bottom + width: parent.width + Item { + id: UrlBox + anchors.left: parent.left + anchors.leftMargin: 12 + anchors.right: parent.right + anchors.rightMargin: 12 + height: 31 + anchors.top: parent.top + clip: true + Image { + source: "content/pics/addressbar.sci" + anchors.fill: UrlBox + } + Image { + id: UrlBoxhl + source: "content/pics/addressbar-filled.sci" + opacity: 1-Header.progressOff + clip: true + width: parent.width*WebView.progress + height: parent.height + } + KeyProxy { + id: proxy + anchors.left: UrlBox.left + anchors.fill: UrlBox + focusable: true + targets: {[keyActions,EditUrl]} + } + KeyActions { + id: keyActions + keyReturn: "WebBrowser.url = EditUrl.text; proxy.focus=false;" + } + TextEdit { + id: EditUrl + color: "#555555" + text: WebView.url == '' ? ' ' : WebView.url + anchors.left: UrlBox.left + anchors.right: UrlBox.right + anchors.leftMargin: 6 + anchors.verticalCenter: UrlBox.verticalCenter + anchors.verticalCenterOffset: 1 + font.size: 11 + wrap: false + opacity: 0 + } + Text { + id: ShowUrl + color: "#555555" + text: WebView.url == '' ? ' ' : WebView.url + anchors.left: UrlBox.left + anchors.right: UrlBox.right + anchors.leftMargin: 6 + anchors.verticalCenter: UrlBox.verticalCenter + anchors.verticalCenterOffset: 1 + font.size: 11 + } + } + MouseRegion { + anchors.fill: UrlBox + onClicked: { proxy.focus=true } + } + } + properties: Property { + name: "progressOff" + value: 1 + type: "Real" + } + states: [ + State { + name: "Normal" + when: WebView.progress == 1.0 + SetProperty { + target: Header + property: "progressOff" + value: 1 + } + }, + State { + name: "ProgressShown" + when: WebView.progress < 1.0 + SetProperty { + target: Header + property: "progressOff" + value: 0 + } + } + ] + transitions: [ + Transition { + NumericAnimation { + target: Header + properties: "progressOff" + easing: "easeInOutQuad" + duration: 300 + } + } + ] + } + } + Flickable { + id: Flick + anchors.top: HeaderSpace.bottom + anchors.bottom: Footer.top + anchors.left: parent.left + anchors.right: parent.right + width: parent.width + viewportWidth: Math.max(parent.width,WebView.width*WebView.scale) + viewportHeight: Math.max(parent.height,WebView.height*WebView.scale) + properties: Property { + name: "centerX" + value: 0 + type: "Real" + } + properties: Property { + name: "centerY" + value: 0 + type: "Real" + } + WebView { + id: WebView + cacheSize: 4000000 + smooth: true + url: WebBrowser.url + onDoubleClick: { toggleZoom() } + focusable: true + focus: true + idealWidth: Flick.width + idealHeight: Flick.height/scale + onUrlChanged: { Flick.xPosition=0; Flick.yPosition=0; zoomOut() } + scale: (width > 0) ? Flick.width/width*zoomedOut+(1-zoomedOut) : 1 + properties: Property { + name: "zoomedOut" + type: "real" + value: 1 + } + } + Rect { + id: WebViewTint + anchors.fill: WebView + color: "black" + opacity: 0 + MouseRegion { + anchors.fill: WebViewTint + onClicked: { proxy.focus=false } + } + } + } + Image { + id: Footer + width: parent.width + anchors.bottom: parent.bottom + height: 43 + source: "content/pics/footer.sci" + Rect { + y: -1 + width: parent.width + height: 1 + color: "#555555" + } + Item { + id: backbutton + anchors.right: reload.left + anchors.rightMargin: 10 + anchors.verticalCenter: parent.verticalCenter + width: back_e.width + height: back_e.height + Image { + anchors.fill: parent + id: back_e + source: "content/pics/back.png" + } + Image { + anchors.fill: parent + id: back_d + source: "content/pics/back-disabled.png" + } + states: [ + State { + name: "Enabled" + when: WebView.back.enabled==true + SetProperty { + target: back_e + property: "opacity" + value: 1 + } + SetProperty { + target: back_d + property: "opacity" + value: 0 + } + }, + State { + name: "Disabled" + when: WebView.back.enabled==false + SetProperty { + target: back_e + property: "opacity" + value: 0 + } + SetProperty { + target: back_d + property: "opacity" + value: 1 + } + } + ] + transitions: [ + Transition { + NumericAnimation { + properties: "opacity" + easing: "easeInOutQuad" + duration: 300 + } + } + ] + MouseRegion { + anchors.fill: back_e + onClicked: { if (WebView.back.enabled) WebView.back.trigger() } + } + } + Image { + id: reload + source: "content/pics/reload.png" + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter + } + MouseRegion { + anchors.fill: reload + onClicked: { WebView.reload.trigger() } + } + Item { + id: forwardbutton + anchors.left: reload.right + anchors.leftMargin: 10 + anchors.verticalCenter: parent.verticalCenter + width: forward_e.width + height: forward_e.height + Image { + anchors.fill: parent + anchors.verticalCenter: parent.verticalCenter + id: forward_e + source: "content/pics/forward.png" + } + Image { + anchors.fill: parent + id: forward_d + source: "content/pics/forward-disabled.png" + } + states: [ + State { + name: "Enabled" + when: WebView.forward.enabled==true + SetProperty { + target: forward_e + property: "opacity" + value: 1 + } + SetProperty { + target: forward_d + property: "opacity" + value: 0 + } + }, + State { + name: "Disabled" + when: WebView.forward.enabled==false + SetProperty { + target: forward_e + property: "opacity" + value: 0 + } + SetProperty { + target: forward_d + property: "opacity" + value: 1 + } + } + ] + transitions: [ + Transition { + NumericAnimation { + properties: "opacity" + easing: "easeInOutQuad" + duration: 320 + } + } + ] + MouseRegion { + anchors.fill: parent + onClicked: { if (WebView.forward.enabled) WebView.forward.trigger() } + } + } + } + } + states: [ + State { + name: "Normal" + SetProperty { + target: WebView + property: "zoomedOut" + value: 0 + } + SetProperty { + target: Flick + property: "xPosition" + value: Math.min(WebView.width-Flick.width,Math.max(0,Flick.centerX-Flick.width/2)) + } + SetProperty { + target: Flick + property: "yPosition" + value: Math.min(WebView.height-Flick.height,Math.max(0,Flick.centerY-Flick.height/2)) + } + }, + State { + name: "ZoomedOut" + SetProperty { + target: WebView + property: "zoomedOut" + value: 1 + } + } + ] + transitions: [ + Transition { + SequentialAnimation { + SetPropertyAction { + target: WebView + property: "smooth" + value: false + } + ParallelAnimation { + NumericAnimation { + target: WebView + properties: "zoomedOut" + easing: "easeInOutQuad" + duration: 200 + } + NumericAnimation { + target: Flick + properties: "xPosition,yPosition" + easing: "easeInOutQuad" + duration: 200 + } + } + SetPropertyAction { + target: WebView + property: "smooth" + value: true + } + } + } + ] +} diff --git a/examples/declarative/contacts/dummydata/contactModel.qml b/examples/declarative/contacts/dummydata/contactModel.qml index 341b7a6..48b2fd9 100644 --- a/examples/declarative/contacts/dummydata/contactModel.qml +++ b/examples/declarative/contacts/dummydata/contactModel.qml @@ -1,103 +1,103 @@ - - - Aaron - Kennedy - contact.png - - - - - - - Contact - 1 - contact.png - - - Contact - 2 - contact.png - - - Contact - 3 - contact.png - - - Contact - 4 - contact.png - - - Contact - 5 - contact.png - - - Contact - 6 - contact.png - - - Contact - 7 - contact.png - - - Contact - 8 - contact.png - - - Contact - 9 - contact.png - - - Alan - Alpert - contact.png - - - Betty - Boo - contact.png - - - Foo - Bar - contact.png - - - Marius - Bugge Monsen - contact.png - - - Martin - Jones - contact.png - - - - - - - Michael - Brasser - contact.png - - - - - - Yann - Bodson - contact.png - - - Yogi - Bear - contact.png - - +ListModel2 { + ListElement { + firstName: "Aaron" + lastName: "Kennedy" + portrait: "contact.png" + emails: [ + ListElement { address: "akennedy@trolltech.com" }, + ListElement { address: "aaron.kennedy@trolltech.com" } + ] + } + ListElement { + firstName: "ListElement" + lastName: 1 + portrait: "contact.png" + } + ListElement { + firstName: "ListElement" + lastName: 2 + portrait: "contact.png" + } + ListElement { + firstName: "ListElement" + lastName: 3 + portrait: "contact.png" + } + ListElement { + firstName: "ListElement" + lastName: 4 + portrait: "contact.png" + } + ListElement { + firstName: "ListElement" + lastName: 5 + portrait: "contact.png" + } + ListElement { + firstName: "ListElement" + lastName: 6 + portrait: "contact.png" + } + ListElement { + firstName: "ListElement" + lastName: 7 + portrait: "contact.png" + } + ListElement { + firstName: "ListElement" + lastName: 8 + portrait: "contact.png" + } + ListElement { + firstName: "ListElement" + lastName: 9 + portrait: "contact.png" + } + ListElement { + firstName: "Alan" + lastName: "Alpert" + portrait: "contact.png" + } + ListElement { + firstName: "Betty" + lastName: "Boo" + portrait: "contact.png" + } + ListElement { + firstName: "Foo" + lastName: "Bar" + portrait: "contact.png" + } + ListElement { + firstName: "Marius" + lastName: "Bugge Monsen" + portrait: "contact.png" + } + ListElement { + firstName: "Martin" + lastName: "Jones" + portrait: "contact.png" + emails: [ + ListElement { address: "mjones@trolltech.com" }, + ListElement { address: "martin.jones@trolltech.com" } + ] + } + ListElement { + firstName: "Michael" + lastName: "Brasser" + portrait: "contact.png" + emails: ListElement { + address: "mbrasser@trolltech.com" + } + } + ListElement { + firstName: "Yann" + lastName: "Bodson" + portrait: "contact.png" + } + ListElement { + firstName: "Yogi" + lastName: "Bear" + portrait: "contact.png" + } +} diff --git a/examples/declarative/easing/easing.qml b/examples/declarative/easing/easing.qml index f95d8c6..32c1b9b 100644 --- a/examples/declarative/easing/easing.qml +++ b/examples/declarative/easing/easing.qml @@ -1,67 +1,92 @@ - +Rect { + id: Window + width: 640 + height: Layout.height + color: "white" - - - easeLinear - easeInQuad - easeOutQuad - easeInOutQuad - easeOutInQuad - easeInCubic - easeOutCubic - easeInOutCubic - easeOutInCubic - easeInQuart - easeOutQuart - easeInOutQuart - easeOutInQuart - easeInQuint - easeOutQuint - easeInOutQuint - easeOutInQuint - easeInSine - easeOutSine - easeInOutSine - easeOutInSine - easeInExpo - easeOutExpo - easeInOutExpo - easeOutInExpo - easeInCirc - easeOutCirc - easeInOutCirc - easeOutInCirc - easeInElastic - easeOutElastic - easeInOutElastic - easeOutInElastic - easeInBack - easeOutBack - easeInOutBack - easeOutInBack - easeOutBounce - easeInBounce - easeInOutBounce - easeOutInBounce - - - - - - - - - - - - - - - - - - - - - - + ListModel2 { + id: EasingTypes + ListElement { type: "easeLinear" } + ListElement { type: "easeInQuad" } + ListElement { type: "easeOutQuad" } + ListElement { type: "easeInOutQuad" } + ListElement { type: "easeOutInQuad" } + ListElement { type: "easeInCubic" } + ListElement { type: "easeOutCubic" } + ListElement { type: "easeInOutCubic" } + ListElement { type: "easeOutInCubic" } + ListElement { type: "easeInQuart" } + ListElement { type: "easeOutQuart" } + ListElement { type: "easeInOutQuart" } + ListElement { type: "easeOutInQuart" } + ListElement { type: "easeInQuint" } + ListElement { type: "easeOutQuint" } + ListElement { type: "easeInOutQuint" } + ListElement { type: "easeOutInQuint" } + ListElement { type: "easeInSine" } + ListElement { type: "easeOutSine" } + ListElement { type: "easeInOutSine" } + ListElement { type: "easeOutInSine" } + ListElement { type: "easeInExpo" } + ListElement { type: "easeOutExpo" } + ListElement { type: "easeInOutExpo" } + ListElement { type: "easeOutInExpo" } + ListElement { type: "easeInCirc" } + ListElement { type: "easeOutCirc" } + ListElement { type: "easeInOutCirc" } + ListElement { type: "easeOutInCirc" } + ListElement { type: "easeInElastic" } + ListElement { type: "easeOutElastic" } + ListElement { type: "easeInOutElastic" } + ListElement { type: "easeOutInElastic" } + ListElement { type: "easeInBack" } + ListElement { type: "easeOutBack" } + ListElement { type: "easeInOutBack" } + ListElement { type: "easeOutInBack" } + ListElement { type: "easeOutBounce" } + ListElement { type: "easeInBounce" } + ListElement { type: "easeInOutBounce" } + ListElement { type: "easeOutInBounce" } + } + + VerticalLayout { + id: Layout + anchors.left: Window.left + anchors.right: Window.right + Repeater { + dataSource: EasingTypes + Component { + Text { + id: Text + text: type + height: 18 + font.italic: true + x: SequentialAnimation { + id: Anim + NumericAnimation { + from: 0 + to: Window.width / 2 + easing: type + duration: 1000 + } + PauseAnimation { + duration: 300 + } + NumericAnimation { + to: 0 + from: Window.width / 2 + easing: type + duration: 1000 + } + } + children: [ + MouseRegion { + onClicked: { Anim.running=true } + anchors.fill: parent + } + ] + } + } + } + } +} diff --git a/examples/declarative/follow/pong.qml b/examples/declarative/follow/pong.qml index 4fbf323..ed4a652 100644 --- a/examples/declarative/follow/pong.qml +++ b/examples/declarative/follow/pong.qml @@ -1,55 +1,120 @@ - - - - - - - - - - - - - - - - - - - - - - - - if (y <= 0) +Rect { + id: Page + width: 640 + height: 480 + color: "#000000" + // Make a ball to bounce + Rect { + id: Ball + x: 20 + width: 20 + height: 20 + color: "#00ee00" + z: 1 + // Add a property for the target y coordinate + properties: Property { + name: "targetY" + value: Page.height-10 + } + properties: Property { + name: "direction" + value: "right" + } + // Move the ball to the right and back to the left repeatedly + x: SequentialAnimation { + running: true + repeat: true + NumericAnimation { + to: Page.width-40 + duration: 2000 + } + SetPropertyAction { + target: Ball + property: "direction" + value: "left" + } + NumericAnimation { + to: 20 + duration: 2000 + } + SetPropertyAction { + target: Ball + property: "direction" + value: "right" + } + } + // Make y follow the target y coordinate, with a velocity of 200 + y: Follow { + source: Ball.targetY + velocity: 200 + } + // Detect the ball hitting the top or bottom of the view and bounce it + onTopChanged: { if (y <= 0) targetY = Page.height-20; - else if (y >= Page.height-20) - targetY = 0; - - - - - - - - - - - - - - - - - - - - - - - + else if (y >= Page.height-20) + targetY = 0; } + } + // Place bats to the left and right of the view, following the y + // coordinates of the ball. + Rect { + id: LeftBat + color: "#00ee00" + x: 2 + width: 20 + height: 90 + y: Follow { + source: Ball.y-45 + velocity: 300 + enabled: Ball.direction == 'left' + } + } + Rect { + id: RightBat + x: Page.width-22 + color: "#00ee00" + width: 20 + height: 90 + y: Follow { + source: Ball.y-45 + velocity: 300 + enabled: Ball.direction == 'right' + } + } + // The rest, to make it look realistic, if neither ever scores... + Rect { + color: "#00ee00" + width: 40 + height: 60 + x: 320-80 + } + Rect { + color: "#000000" + width: 20 + height: 40 + x: 320-70 + y: 10 + } + Rect { + color: "#00ee00" + width: 40 + height: 60 + x: 320+40 + } + Rect { + color: "#000000" + width: 20 + height: 40 + x: 320+50 + y: 10 + } + Repeater { + dataSource: 24 + Rect { + color: "#00ee00" + width: 10 + height: 10 + x: 320-5 + y: index*20 + } + } +} diff --git a/examples/declarative/listview/dummydata/MyPetsModel.qml b/examples/declarative/listview/dummydata/MyPetsModel.qml index 5af7fbf..def8cf3 100644 --- a/examples/declarative/listview/dummydata/MyPetsModel.qml +++ b/examples/declarative/listview/dummydata/MyPetsModel.qml @@ -1,51 +1,50 @@ - - - - Rover - Dog - 5 - - - Whiskers - Cat - 2 - - - Warren - Rabbit - 2 - - - Polly - Parrot - 12 - - - Spot - Dog - 9 - - - Tiny - Elephant - 15 - - - Penny - Turtle - 4 - - - Joey - Kangaroo - 1 - - - Kimba - Bunny - 65 - - +// ListModel allows free form list models to be defined and populated. +// Be sure to name the file the same as the id. +ListModel2 { + id: MyPetsModel + ListElement { + name: "Rover" + type: "Dog" + age: 5 + } + ListElement { + name: "Whiskers" + type: "Cat" + age: 2 + } + ListElement { + name: "Warren" + type: "Rabbit" + age: 2 + } + ListElement { + name: "Polly" + type: "Parrot" + age: 12 + } + ListElement { + name: "Spot" + type: "Dog" + age: 9 + } + ListElement { + name: "Tiny" + type: "Elephant" + age: 15 + } + ListElement { + name: "Penny" + type: "Turtle" + age: 4 + } + ListElement { + name: "Joey" + type: "Kangaroo" + age: 1 + } + ListElement { + name: "Kimba" + type: "Bunny" + age: 65 + } +} diff --git a/examples/declarative/listview/dummydata/Recipies.qml b/examples/declarative/listview/dummydata/Recipies.qml index 49bc610..6b20409 100644 --- a/examples/declarative/listview/dummydata/Recipies.qml +++ b/examples/declarative/listview/dummydata/Recipies.qml @@ -1,112 +1,87 @@ - - - - -
    -
  • 1 cup (150g) self-raising flour -
  • 1 tbs caster sugar -
  • 3/4 cup (185ml) milk -
  • 1 egg -
- - ]]> -
- - -
    -
  1. Sift flour and sugar together into a bowl. Add a pinch of salt. -
  2. Beat milk and egg together, then add to dry ingredients. Beat until smooth. -
  3. Pour mixture into a pan on medium heat and cook until bubbles appear on the surface. -
  4. Turn over and cook other side until golden. -
- ]]> -
-
- - - * Seasonal Fruit - - - * Chop fruit and place in a bowl. - - - - - -
    -
  • 1 onion -
  • 1 turnip -
  • 1 potato -
  • 1 carrot -
  • 1 head of celery -
  • 1 1/2 litres of water -
- - ]]> -
- - -
    -
  1. Chop vegetables. -
  2. Boil in water until vegetables soften. -
  3. Season with salt and pepper to taste. -
- - ]]> -
-
- - - -
    -
  • 500g minced beef -
  • Seasoning -
  • lettuce, tomato, onion, cheese -
  • 1 hamburger bun for each burger -
- - ]]> -
- - -
    -
  1. Mix the beef, together with seasoning, in a food processor. -
  2. Shape the beef into burgers. -
  3. Grill the burgers for about 5 mins on each side (until cooked through) -
  4. Serve each burger on a bun with ketchup, cheese, lettuce, tomato and onion. -
- - ]]> -
-
- - - -
    -
  • 1 cup Lemon Juice -
  • 1 cup Sugar -
  • 6 Cups of Water (2 cups warm water, 4 cups cold water) -
- - ]]> -
- - -
    -
  1. Pour 2 cups of warm water into a pitcher and stir in sugar until it dissolves. -
  2. Pour in lemon juice, stir again, and add 4 cups of cold water. -
  3. Chill or serve over ice cubes. -
- - ]]> -
-
-
+ListModel2 { + id: Recipies + ListElement { + title: "Pancakes" + picture: "content/pics/pancakes.jpg" + ingredients: " \ +
    \ +
  • 1 cup (150g) self-raising flour \ +
  • 1 tbs caster sugar \ +
  • 3/4 cup (185ml) milk \ +
  • 1 egg \ +
\ + " + method: " \ +
    \ +
  1. Sift flour and sugar together into a bowl. Add a pinch of salt. \ +
  2. Beat milk and egg together, then add to dry ingredients. Beat until smooth. \ +
  3. Pour mixture into a pan on medium heat and cook until bubbles appear on the surface. \ +
  4. Turn over and cook other side until golden. \ +
" + } + ListElement { + title: "Fruit Salad" + picture: "content/pics/fruit-salad.jpg" + ingredients: "* Seasonal Fruit" + method: "* Chop fruit and place in a bowl." + } + ListElement { + title: "Vegetable Soup" + picture: "content/pics/vegetable-soup.jpg" + ingredients: " \ +
    \ +
  • 1 onion \ +
  • 1 turnip \ +
  • 1 potato \ +
  • 1 carrot \ +
  • 1 head of celery \ +
  • 1 1/2 litres of water \ +
\ + " + method: " \ +
    \ +
  1. Chop vegetables. \ +
  2. Boil in water until vegetables soften. \ +
  3. Season with salt and pepper to taste. \ +
\ + " + } + ListElement { + title: "Hamburger" + picture: "content/pics/hamburger.jpg" + ingredients: " \ +
    \ +
  • 500g minced beef \ +
  • Seasoning \ +
  • lettuce, tomato, onion, cheese \ +
  • 1 hamburger bun for each burger \ +
\ + " + method: " \ +
    \ +
  1. Mix the beef, together with seasoning, in a food processor. \ +
  2. Shape the beef into burgers. \ +
  3. Grill the burgers for about 5 mins on each side (until cooked through) \ +
  4. Serve each burger on a bun with ketchup, cheese, lettuce, tomato and onion. \ +
\ + " + } + ListElement { + title: "Lemonade" + picture: "content/pics/lemonade.jpg" + ingredients: " \ +
    \ +
  • 1 cup Lemon Juice \ +
  • 1 cup Sugar \ +
  • 6 Cups of Water (2 cups warm water, 4 cups cold water) \ +
\ + " + method: " \ +
    \ +
  1. Pour 2 cups of warm water into a pitcher and stir in sugar until it dissolves. \ +
  2. Pour in lemon juice, stir again, and add 4 cups of cold water. \ +
  3. Chill or serve over ice cubes. \ +
\ + " + } +} diff --git a/examples/declarative/minehunt/minehunt.qml b/examples/declarative/minehunt/minehunt.qml index fb65fa3..cde2612 100644 --- a/examples/declarative/minehunt/minehunt.qml +++ b/examples/declarative/minehunt/minehunt.qml @@ -1,73 +1,166 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - In play: - - - - - - - - - - +Item { + id: field + width: 370 + height: 480 + properties: Property { + name: "clickx" + type: "Int" + value: 0 + } + properties: Property { + name: "clicky" + type: "Int" + value: 0 + } + resources: [ + Component { + id: tile + Flipable { + id: flipable + width: 40 + height: 40 + axis: Axis { + startX: 20 + startY: 20 + endX: 20 + endY: 0 + } + front: Image { + source: "pics/front.png" + width: 40 + height: 40 + Image { + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter + source: "pics/flag.png" + opacity: modelData.hasFlag + opacity: Behaviour { + NumericAnimation { + property: "opacity" + duration: 250 + } + } + } + } + back: Image { + source: "pics/back.png" + width: 40 + height: 40 + Text { + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter + text: modelData.hint + color: "white" + font.bold: true + opacity: modelData.hasMine == false && modelData.hint > 0 + } + Image { + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter + source: "pics/bomb.png" + opacity: modelData.hasMine + } + Explosion { + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter + explode: modelData.hasMine==true && modelData.flipped==true + } + } + states: [ + State { + name: "back" + when: modelData.flipped == true + SetProperty { + target: flipable + property: "rotation" + value: 180 + } + } + ] + transitions: [ + Transition { + SequentialAnimation { + PauseAnimation { + duration: {var ret = Math.abs(flipable.parent.x-field.clickx) + Math.abs(flipable.parent.y-field.clicky); if (ret > 0) {if(modelData.hasMine==true && modelData.flipped==true){ret*3;}else{ret;}} else {0}} + } + NumericAnimation { + easing: "easeInOutQuad" + properties: "rotation" + } + } + } + ] + MouseRegion { + anchors.fill: parent + onClicked: { field.clickx = flipable.parent.x; field.clicky = flipable.parent.y; row = Math.floor(index/9); col = index - (Math.floor(index/9) * 9); if(mouse.button==undefined || mouse.button==Qt.RightButton){flag(row,col);}else{flip(row,col);} } + } + } + } + ] + Image { + source: "pics/No-Ones-Laughing-3.jpg" + tile: true + } + Description { + text: "Use the 'minehunt' executable to run this demo!" + width: 300 + opacity: tiles?0:1 + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter + } + Repeater { + dataSource: tiles + x: 1 + y: 1 + Component { + ComponentInstance { + component: tile + x: (index - (Math.floor(index/9) * 9)) * 41 + y: Math.floor(index/9) * 41 + } + } + } + Item { + id: gamedata + width: 370 + height: 100 + y: 380 + Text { + color: "white" + font.size: 18 + x: 20 + y: 20 + } + Image { + x: 100 + y: 20 + source: "pics/bomb-color.png" + } + Text { + x: 100 + y: 60 + color: "white" + text: numMines + } + Image { + x: 140 + y: 20 + source: "pics/flag-color.png" + } + Text { + x: 140 + y: 60 + color: "white" + text: numFlags + } + Image { + x: 240 + y: 0 + source: if(isPlaying==true){'pics/smile.png'}else{if(hasWon==true){'pics/glee.png'}else{'pics/frown.png'}} + MouseRegion { + anchors.fill: parent + onClicked: { reset() } + } + } + } +} diff --git a/examples/declarative/mouseregion/mouse.qml b/examples/declarative/mouseregion/mouse.qml index 7aaf51a..6d10425 100644 --- a/examples/declarative/mouseregion/mouse.qml +++ b/examples/declarative/mouseregion/mouse.qml @@ -1,24 +1,48 @@ - - - - - - - - - - +Rect { + color: "white" + width: 200 + height: 200 + Rect { + width: 50 + height: 50 + color: "red" + Text { + text: "Click" + anchors.centeredIn: parent + } + MouseRegion { + onPressed: { print('press (x: ' + mouse.x + ' y: ' + mouse.y + ' button: ' + (mouse.button == Qt.RightButton ? 'right' : 'left') + ' Shift: ' + (mouse.modifiers & Qt.ShiftModifier ? 'true' : 'false') + ')') } + onReleased: { print('release (x: ' + mouse.x + ' y: ' + mouse.y + ' isClick: ' + mouse.isClick + ' wasHeld: ' + mouse.wasHeld + ')') } + onClicked: { print('click (x: ' + mouse.x + ' y: ' + mouse.y + ' wasHeld: ' + mouse.wasHeld + ')') } + onDoubleClicked: { print('double click (x: ' + mouse.x + ' y: ' + mouse.y + ')') } + onPressAndHold: { print('press and hold') } + onExitedWhilePressed: { print('exiting while pressed') } + onReenteredWhilePressed: { print('reentering while pressed') } + anchors.fill: parent + } + } + Rect { + y: 100 + width: 50 + height: 50 + color: "blue" + Text { + text: "Drag" + anchors.centeredIn: parent + } + MouseRegion { + drag.target: parent + drag.axis: "x" + drag.xmin: 0 + drag.xmax: 150 + onPressed: { print('press') } + onReleased: { print('release (isClick: ' + mouse.isClick + ') (wasHeld: ' + mouse.wasHeld + ')') } + onClicked: { print('click' + '(wasHeld: ' + mouse.wasHeld + ')') } + onDoubleClicked: { print('double click') } + onPressAndHold: { print('press and hold') } + onExitedWhilePressed: { print('exiting while pressed') } + onReenteredWhilePressed: { print('reentering while pressed') } + anchors.fill: parent + } + } +} diff --git a/examples/declarative/velocity/Day.qml b/examples/declarative/velocity/Day.qml index b65f2bc..7d26e88 100644 --- a/examples/declarative/velocity/Day.qml +++ b/examples/declarative/velocity/Day.qml @@ -1,41 +1,115 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Rect { + width: 400 + height: 500 + radius: 7 + pen.color: "black" + id: Page + properties: Property { + name: "day" + type: "string" + } + properties: Property { + name: "stickies" + } + Image { + x: 10 + y: 10 + source: "cork.jpg" + opaque: true + } + Text { + x: 20 + y: 20 + height: 40 + font.size: 14 + font.bold: true + width: 370 + text: day + style: Outline + styleColor: "#dedede" + } + Repeater { + dataSource: Page.stickies + Item { + x: Math.random() * 200 + 100 + y: Math.random() * 300 + 50 + id: StickyPage + rotation: Follow { + source: -Flick.xVelocity / 100 + spring: 2.0 + damping: 0.1 + } + Item { + id: Sticky + scale: 0.5 + Image { + id: StickyImage + source: "sticky.png" + smooth: true + y: -20 + x: 8 + -width * 0.6 / 2 + scale: 0.6 + } + TextEdit { + id: MyText + smooth: true + font.size: 28 + readOnly: false + x: -104 + y: 36 + wrap: true + rotation: -8 + text: noteText + width: 195 + height: 172 + } + Item { + y: -20 + x: StickyImage.x + width: StickyImage.width * StickyImage.scale + height: StickyImage.height * StickyImage.scale + MouseRegion { + id: Mouse + onClicked: { MyText.focus = true } + anchors.fill: parent + drag.target: StickyPage + drag.axis: "xy" + drag.ymin: 0 + drag.ymax: 500 + drag.xmin: 0 + drag.xmax: 400 + } + } + } + Image { + source: "tack.png" + x: -width / 2 + y: -height * 0.7 / 2 + scale: 0.7 + } + states: [ + State { + name: "pressed" + when: Mouse.pressed + SetProperties { + target: Sticky + rotation: 8 + scale: 1 + } + SetProperties { + target: Page + z: 8 + } + } + ] + transitions: [ + Transition { + NumericAnimation { + properties: "rotation,scale" + duration: 200 + } + } + ] + } + } +} diff --git a/examples/declarative/velocity/velocity.qml b/examples/declarative/velocity/velocity.qml index 0215d37..ff95527 100644 --- a/examples/declarative/velocity/velocity.qml +++ b/examples/declarative/velocity/velocity.qml @@ -1,81 +1,113 @@ - - - - Sunday - #808080 - - - - - - - Monday - blue - - - - - - - - Tuesday - yellow - - - - - - - Wednesday - purple - - - - - - - Thursday - blue - - - - - - - Friday - green - - - - - - - Saturday - orange - - - - - - - - - - - - - - - - - - - +Rect { + color: "lightSteelBlue" + width: 800 + height: 600 + ListModel2 { + id: List + ListElement { + name: "Sunday" + dayColor: "#808080" + notes: [ + ListElement { + noteText: "Lunch" + }, + ListElement { + noteText: "Party" + } + ] + } + ListElement { + name: "Monday" + dayColor: "blue" + notes: [ + ListElement { + noteText: "Pickup kids" + }, + ListElement { + noteText: "Checkout kinetic" + }, + ListElement { + noteText: "Read email" + } + ] + } + ListElement { + name: "Tuesday" + dayColor: "yellow" + notes: [ + ListElement { + noteText: "Walk dog" + }, + ListElement { + noteText: "Buy newspaper" + } + ] + } + ListElement { + name: "Wednesday" + dayColor: "purple" + notes: [ + ListElement { + noteText: "Cook dinner" + }, + ListElement { + noteText: "Eat dinner" + } + ] + } + ListElement { + name: "Thursday" + dayColor: "blue" + notes: [ + ListElement { + noteText: "5:30pm Meeting" + }, + ListElement { + noteText: "Weed garden" + } + ] + } + ListElement { + name: "Friday" + dayColor: "green" + notes: [ + ListElement { + noteText: "Still work" + }, + ListElement { + noteText: "Drink" + } + ] + } + ListElement { + name: "Saturday" + dayColor: "orange" + notes: [ + ListElement { + noteText: "Drink" + }, + ListElement { + noteText: "Drink" + } + ] + } + } + Flickable { + id: Flick + anchors.fill: parent + viewportWidth: Lay.width + HorizontalLayout { + id: Lay + Repeater { + dataSource: List + Component { + Day { + day: name + color: dayColor + stickies: notes + } + } + } + } + } +} diff --git a/examples/declarative/xmldata/daringfireball.qml b/examples/declarative/xmldata/daringfireball.qml index 5e98d1b..3877adf 100644 --- a/examples/declarative/xmldata/daringfireball.qml +++ b/examples/declarative/xmldata/daringfireball.qml @@ -1,25 +1,59 @@ - - - - - declare default element namespace 'http://www.w3.org/2005/Atom'; - - - - - - - - - - - print('link clicked: ' + link) - - - - - - - +Rect { + color: "white" + width: 600 + height: 600 + resources: [ + XmlListModel { + id: feedModel + source: "http://daringfireball.net/index.xml" + query: "doc($src)/feed/entry" + namespaceDeclarations: "declare default element namespace 'http://www.w3.org/2005/Atom';" + Role { + name: "title" + query: "title/string()" + } + Role { + name: "tagline" + query: "author/name/string()" + } + Role { + name: "content" + query: "content/string()" + isCData: true + } + }, + Component { + id: feedDelegate + Item { + height: contents.height + 20 + Text { + x: 10 + id: TitleText + text: title + font.bold: true + } + Text { + text: 'by ' + tagline + anchors.left: TitleText.right + anchors.leftMargin: 10 + font.italic: true + } + Text { + x: 10 + text: content + anchors.top: TitleText.bottom + width: 580 + wrap: true + onLinkActivated: { print('link clicked: ' + link) } + } + } + } + ] + ListView { + id: list + anchors.fill: parent + clip: true + model: feedModel + delegate: feedDelegate + } +} diff --git a/examples/declarative/xmldata/yahoonews.qml b/examples/declarative/xmldata/yahoonews.qml index 32a706e..a465cdd 100644 --- a/examples/declarative/xmldata/yahoonews.qml +++ b/examples/declarative/xmldata/yahoonews.qml @@ -1,38 +1,111 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Rect { + color: "black" + gradientColor: "#AAAAAA" + width: 600 + height: 600 + resources: [ + XmlListModel { + id: feedModel + source: "http://rss.news.yahoo.com/rss/oceania" + query: "doc($src)/rss/channel/item" + Role { + name: "title" + query: "title/string()" + } + Role { + name: "link" + query: "link/string()" + } + Role { + name: "description" + query: "description/string()" + isCData: true + } + }, + Component { + id: feedDelegate + Item { + id: Delegate + height: Wrapper.height + 10 + MouseRegion { + anchors.fill: Wrapper + onPressed: { Delegate.ListView.list.currentIndex = index; } + onClicked: { if (Wrapper.state == 'Details') { Wrapper.state = '';} else {Wrapper.state = 'Details';} } + } + Rect { + id: Wrapper + y: 5 + height: TitleText.height + 10 + width: 580 + color: "#F0F0F0" + radius: 5 + Text { + x: 10 + y: 5 + id: TitleText + text: '' + title + '' + font.bold: true + font.family: "Helvetica" + font.size: 14 + onLinkActivated: { print('link clicked: ' + link) } + } + Text { + x: 10 + id: Description + text: description + width: 560 + wrap: true + font.family: "Helvetica" + anchors.top: TitleText.bottom + anchors.topMargin: 5 + opacity: 0 + } + states: [ + State { + name: "Details" + SetProperty { + target: Wrapper + property: "height" + binding: "contents.height + 10" + } + SetProperty { + target: Description + property: "opacity" + value: 1 + } + } + ] + transitions: [ + Transition { + fromState: "*" + toState: "Details" + reversible: true + SequentialAnimation { + NumericAnimation { + duration: 200 + properties: "height" + easing: "easeOutQuad" + } + NumericAnimation { + duration: 200 + properties: "opacity" + } + } + } + ] + } + } + } + ] + ListView { + id: list + x: 10 + y: 10 + width: parent.width - 20 + height: parent.height - 20 + clip: true + model: feedModel + delegate: feedDelegate + currentItemPositioning: "Snap" + } +} diff --git a/src/declarative/fx/qfxkeyactions.cpp b/src/declarative/fx/qfxkeyactions.cpp index 69d4679..d2739ea 100644 --- a/src/declarative/fx/qfxkeyactions.cpp +++ b/src/declarative/fx/qfxkeyactions.cpp @@ -736,7 +736,7 @@ void QFxKeyActions::setKey_Space(const QString &s) /*! \qmlproperty string KeyActions::escape - \qmlproperty string KeyActions::return + \qmlproperty string KeyActions::keyReturn \qmlproperty string KeyActions::enter \qmlproperty string KeyActions::delete \qmlproperty string KeyActions::space diff --git a/src/declarative/fx/qfxkeyactions.h b/src/declarative/fx/qfxkeyactions.h index 7ad323a..b0d002d 100644 --- a/src/declarative/fx/qfxkeyactions.h +++ b/src/declarative/fx/qfxkeyactions.h @@ -101,7 +101,7 @@ class Q_DECLARATIVE_EXPORT QFxKeyActions : public QFxItem Q_PROPERTY(QString digit9 READ key_9 WRITE setKey_9) Q_PROPERTY(QString asterisk READ key_Asterisk WRITE setKey_Asterisk) Q_PROPERTY(QString escape READ key_Escape WRITE setKey_Escape) - Q_PROPERTY(QString return READ key_Return WRITE setKey_Return) + Q_PROPERTY(QString keyReturn READ key_Return WRITE setKey_Return) Q_PROPERTY(QString enter READ key_Enter WRITE setKey_Enter) Q_PROPERTY(QString delete READ key_Delete WRITE setKey_Delete) Q_PROPERTY(QString space READ key_Space WRITE setKey_Space) -- cgit v0.12 From 72afedd7fad133b390cc63fd04e3cf0cee757e2e Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Thu, 30 Apr 2009 14:58:56 +1000 Subject: Rename duiviewer to qmlviewer. --- doc/src/declarative/examples.qdoc | 9 +- doc/src/declarative/focus.qdoc | 2 +- doc/src/declarative/tutorial1.qdoc | 4 +- doc/src/duiviewer.qdoc | 80 -------- doc/src/qmlviewer.qdoc | 79 ++++++++ doc/src/tutorials/declarative.qdoc | 2 +- tools/duiviewer/duiviewer.pro | 12 -- tools/duiviewer/main.cpp | 135 -------------- tools/duiviewer/qfxviewer.cpp | 367 ------------------------------------- tools/duiviewer/qfxviewer.h | 72 -------- tools/qmlviewer/main.cpp | 135 ++++++++++++++ tools/qmlviewer/qmlviewer.cpp | 366 ++++++++++++++++++++++++++++++++++++ tools/qmlviewer/qmlviewer.h | 72 ++++++++ tools/qmlviewer/qmlviewer.pro | 12 ++ tools/tools.pro | 2 +- 15 files changed, 673 insertions(+), 676 deletions(-) delete mode 100644 doc/src/duiviewer.qdoc create mode 100644 doc/src/qmlviewer.qdoc delete mode 100644 tools/duiviewer/duiviewer.pro delete mode 100644 tools/duiviewer/main.cpp delete mode 100644 tools/duiviewer/qfxviewer.cpp delete mode 100644 tools/duiviewer/qfxviewer.h create mode 100644 tools/qmlviewer/main.cpp create mode 100644 tools/qmlviewer/qmlviewer.cpp create mode 100644 tools/qmlviewer/qmlviewer.h create mode 100644 tools/qmlviewer/qmlviewer.pro diff --git a/doc/src/declarative/examples.qdoc b/doc/src/declarative/examples.qdoc index e65808f..fa9f05b 100644 --- a/doc/src/declarative/examples.qdoc +++ b/doc/src/declarative/examples.qdoc @@ -3,18 +3,18 @@ \target qmlexamples \title QML Examples -A viewer application is included that allows you to quickly explore many of the +A \l {qmlviewer}{viewer} application is included that allows you to quickly explore many of the examples. It has some useful options, revealed by: \code - bin/duiviewer -help + bin/qmlviewer -help \endcode -There are several illustrative XML examples available. From your build +There are several illustrative QML examples available. From your build directory, \code - bin/duiviewer $QT_SOURCE_DIR/examples/declarative/mediabrowser/mediabrowser.qml + bin/qmlviewer $QT_SOURCE_DIR/demos/declarative/phonebrowser/phonebrowser.qml \endcode Many other simple examples can be found under the \c examples/declarative sub @@ -32,5 +32,4 @@ own QML-based applications. software rasterizer, a simple canvas backend is used by default. To use Graphics View instead, set \c QML_USE_GRAPHICSVIEW=1. - */ diff --git a/doc/src/declarative/focus.qdoc b/doc/src/declarative/focus.qdoc index e0d4ca3..fc747a9 100644 --- a/doc/src/declarative/focus.qdoc +++ b/doc/src/declarative/focus.qdoc @@ -48,7 +48,7 @@ element whose text is determined by whether or not it has \e {active focus}. An \l Item requests focus by setting the \c {Item::focus} property to true. For very simple cases simply setting the \c {Item::focus} property is sometimes -sufficient. If we run the following example in the \c duiviewer, we see that +sufficient. If we run the following example in the \c qmlviewer, we see that the \c {} element has \e {active focus} and pressing the \e A, \e B, or \e C keys modifies the text appropriately. diff --git a/doc/src/declarative/tutorial1.qdoc b/doc/src/declarative/tutorial1.qdoc index caadbf5..aa94c06 100644 --- a/doc/src/declarative/tutorial1.qdoc +++ b/doc/src/declarative/tutorial1.qdoc @@ -43,10 +43,10 @@ The \c anchors.horizontalCenter property refers to the horizontal center of an e \section2 Viewing the example -To view what you have created, run the duiviewer (located in the \c bin directory) with your filename as the first argument. For example, to run the provided completed Tutorial 1 example from the install location, you would type: +To view what you have created, run the qmlviewer (located in the \c bin directory) with your filename as the first argument. For example, to run the provided completed Tutorial 1 example from the install location, you would type: \code -bin/duiviewer examples/tutorials/t1/tutorial1.qml +bin/qmlviewer examples/tutorials/t1/tutorial1.qml \endcode [\l tutorial] [Next: \l tutorial2] diff --git a/doc/src/duiviewer.qdoc b/doc/src/duiviewer.qdoc deleted file mode 100644 index f967f87..0000000 --- a/doc/src/duiviewer.qdoc +++ /dev/null @@ -1,80 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/*! - \page duiviewer.html - \title Declarative UI Viewer (duiviewer) - \ingroup qttools - \keyword duiviewer - - This page documents the \e{Declarative UI Viewer} for the Qt GUI - toolkit. The \c duiviewer reads an XML format declarative user interface definition - (\c .qml) file - and displays the user interface it describes. - - \section1 Options - - When run with the \c -help option, duiviewer shows available options. - - \section1 Dummy Data - - One use of duiviewer is to allow QML files to be viewed stand-alone, - rather than being loaded from within a Qt program. Qt applications will - usually bind objects and properties into the execution context before - running the QML. To stand-in for such bindings, you can provide dummy - data: create a directory called "dummydata" in the same directory as - the target QML file and create files there with the "qml" extension. - All such files will be loaded as QML objects and bound to the root - context as a property with the name of the file (without ".qml"). - - For example, if the Qt application has a "clock.time" property - that is a qreal from 0 to 86400 representing the number of seconds since - midnight, dummy data for this could be provided by \c dummydata/clock.qml: - \code - - - - - - \endcode - Any QML can be used in the dummy data files. You could even animate the - fictional data! -*/ diff --git a/doc/src/qmlviewer.qdoc b/doc/src/qmlviewer.qdoc new file mode 100644 index 0000000..e8fdec4 --- /dev/null +++ b/doc/src/qmlviewer.qdoc @@ -0,0 +1,79 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \page qmlviewer.html + \title Qt Declarative UI Viewer (qmlviewer) + \ingroup qttools + \keyword qmlviewer + + This page documents the \e{Declarative UI Viewer} for the Qt GUI + toolkit. The \c qmlviewer reads a declarative user interface definition + (\c .qml) file and displays the user interface it describes. + + \section1 Options + + When run with the \c -help option, qmlviewer shows available options. + + \section1 Dummy Data + + One use of qmlviewer is to allow QML files to be viewed stand-alone, + rather than being loaded from within a Qt program. Qt applications will + usually bind objects and properties into the execution context before + running the QML. To stand-in for such bindings, you can provide dummy + data: create a directory called "dummydata" in the same directory as + the target QML file and create files there with the "qml" extension. + All such files will be loaded as QML objects and bound to the root + context as a property with the name of the file (without ".qml"). + + For example, if the Qt application has a "clock.time" property + that is a qreal from 0 to 86400 representing the number of seconds since + midnight, dummy data for this could be provided by \c dummydata/clock.qml: + \code + + + + + + \endcode + Any QML can be used in the dummy data files. You could even animate the + fictional data! +*/ diff --git a/doc/src/tutorials/declarative.qdoc b/doc/src/tutorials/declarative.qdoc index 3724b10..16dad6e 100644 --- a/doc/src/tutorials/declarative.qdoc +++ b/doc/src/tutorials/declarative.qdoc @@ -77,7 +77,7 @@ sub directory the files are numbered in an order of increasing features. The code in this example is not compiled, but interpreted at run time. - This means you should use the duiviewer application provided with + This means you should use the qmlviewer application provided with Qt to run the examples. \list diff --git a/tools/duiviewer/duiviewer.pro b/tools/duiviewer/duiviewer.pro deleted file mode 100644 index eae313e..0000000 --- a/tools/duiviewer/duiviewer.pro +++ /dev/null @@ -1,12 +0,0 @@ -DESTDIR = ../../bin -QT += declarative script network sql -# Input -HEADERS += qfxviewer.h -SOURCES += main.cpp qfxviewer.cpp - -include($$QT_SOURCE_TREE/tools/shared/deviceskin/deviceskin.pri) - -target.path=$$[QT_INSTALL_BINS] -INSTALLS += target - -CONFIG += console diff --git a/tools/duiviewer/main.cpp b/tools/duiviewer/main.cpp deleted file mode 100644 index cb4ba05..0000000 --- a/tools/duiviewer/main.cpp +++ /dev/null @@ -1,135 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 1992-$THISYEAR$ $TROLLTECH$. All rights reserved. -** -** This file is part of the $MODULE$ of the Qt Toolkit. -** -** $TROLLTECH_DUAL_LICENSE$ -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -****************************************************************************/ - -#include "qml.h" -#include "qfxviewer.h" -#include -#include -#include "qfxtestengine.h" -#include - - -void usage() -{ - qWarning("Usage: duiviewer [options] "); - qWarning(" "); - qWarning(" options:"); - qWarning(" -v, -version ............................. display version"); - qWarning(" -frameless ............................... run with no window frame"); - qWarning(" -skin ...................... run with a skin window frame"); - qWarning(" -recorddither ordered|threshold|floyd .... set dither mode used for recording"); - qWarning(" -recordperiod ............. set time between recording frames"); - qWarning(" -autorecord [from-] ...... set recording to start and stop automatically"); - qWarning(" -devicekeys .............................. use numeric keys (see F1)"); - qWarning(" -cache ................................... enable a disk cache of remote content"); - qWarning(" -recordtest .................. record an autotest"); - qWarning(" -runtest ..................... run a previously recorded test"); - qWarning(" "); - qWarning(" Press F1 for interactive help"); - exit(1); -} - -int main(int argc, char ** argv) -{ - //### default to using raster graphics backend for now - int newargc = argc + 2; - char **newargv; - newargv = new char * [newargc]; - for (int i = 0; i < argc; ++i) { - newargv[i] = argv[i]; - if (!qstrcmp(argv[i], "-graphicssystem")) { - newargc -= 2; - break; - } - } - char system[] = "-graphicssystem"; - newargv[argc] = system; - char raster[] = "raster"; - newargv[argc+1] = raster; - - - QApplication app(newargc, newargv); - app.setApplicationName("viewer"); - - bool frameless = false; - QString fileName; - int period = 0; - int autorecord_from = 0; - int autorecord_to = 0; - QString dither = "threshold"; - QString skin; - bool devkeys = false; - bool cache = false; - QFxTestEngine::TestMode testMode = QFxTestEngine::NoTest; - QString testDir; - - for (int i = 1; i < newargc; ++i) { - QString arg = newargv[i]; - if (arg == "-frameless") { - frameless = true; - } else if (arg == "-skin") { - skin = QString(argv[++i]); - } else if (arg == "-cache") { - cache = true; - } else if (arg == "-recordperiod") { - period = QString(argv[++i]).toInt(); - } else if (arg == "-autorecord") { - QString range = QString(argv[++i]); - int dash = range.indexOf('-'); - if (dash > 0) - autorecord_from = range.left(dash).toInt(); - autorecord_to = range.mid(dash+1).toInt(); - } else if (arg == "-devicekeys") { - devkeys = true; - } else if (arg == "-recordtest") { - testMode = QFxTestEngine::RecordTest; - if(i + 1 >= newargc) - usage(); - testDir = newargv[i + 1]; - ++i; - } else if (arg == "-runtest") { - testMode = QFxTestEngine::PlaybackTest; - if(i + 1 >= newargc) - usage(); - testDir = newargv[i + 1]; - ++i; - } else if (arg == QLatin1String("-v") || arg == QLatin1String("-version")) { - fprintf(stderr, "Qt Declarative UI Viewer version %s\n", QT_VERSION_STR); - return 0; - } else if (arg[0] != '-') { - fileName = arg; - } else if (1 || arg == "-help") { - usage(); - } - } - - if (fileName.isEmpty()) - usage(); - - QFxViewer viewer(testMode, testDir, 0, frameless ? Qt::FramelessWindowHint : Qt::Widget); - viewer.setCacheEnabled(cache); - viewer.openXml(fileName); - if (period>0) - viewer.setRecordPeriod(period); - if (autorecord_to) - viewer.setAutoRecord(autorecord_from,autorecord_to); - if (QDir(skin).exists()) - viewer.setSkin(skin); - if (devkeys) - viewer.setDeviceKeys(true); - viewer.setRecordDither(dither); - viewer.show(); - - return app.exec(); -} - diff --git a/tools/duiviewer/qfxviewer.cpp b/tools/duiviewer/qfxviewer.cpp deleted file mode 100644 index b15a8bf..0000000 --- a/tools/duiviewer/qfxviewer.cpp +++ /dev/null @@ -1,367 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 1992-$THISYEAR$ $TROLLTECH$. All rights reserved. -** -** This file is part of the $MODULE$ of the Qt Toolkit. -** -** $TROLLTECH_DUAL_LICENSE$ -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -****************************************************************************/ - -#include - -#include "qmlbindablevalue.h" -#include "qfxviewer.h" -#include -#include -#include "qml.h" -#include "qperformancelog.h" -#include "qfxtestengine.h" -#include "deviceskin.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -QFxViewer::QFxViewer(QFxTestEngine::TestMode testMode, const QString &testDir, QWidget *parent, Qt::WindowFlags flags) - : QWidget(parent, flags) -{ - testEngine = 0; - devicemode = false; - skin = 0; - canvas = 0; - record_autotime = 0; - record_period = 20; - - int width=240; - int height=320; - setAttribute(Qt::WA_OpaquePaintEvent); - setAttribute(Qt::WA_NoSystemBackground); - - canvas = new QFxView(this); - if(testMode != QFxTestEngine::NoTest) - testEngine = new QFxTestEngine(testMode, testDir, canvas, this); - - QObject::connect(canvas, SIGNAL(sceneResized(QSize)), this, SLOT(sceneResized(QSize))); - canvas->setFixedSize(width, height); - resize(width, height); -} - -void QFxViewer::reload() -{ - openXml(currentFileName); -} - -void QFxViewer::openXml(const QString& fileName) -{ - setWindowTitle(tr("%1 - Qt Declarative UI Viewer").arg(fileName)); - - canvas->reset(); - - currentFileName = fileName; - QUrl url(fileName); - QFileInfo fi(fileName); - if (fi.exists()) { - url = QUrl::fromLocalFile(fi.absoluteFilePath()); - QmlContext *ctxt = canvas->rootContext(); - QDir dir(fi.path()+"/dummydata", "*.qml"); - QStringList list = dir.entryList(); - for (int i = 0; i < list.size(); ++i) { - QString qml = list.at(i); - QFile f(dir.filePath(qml)); - f.open(QIODevice::ReadOnly); - QByteArray data = f.readAll(); - QmlComponent comp(canvas->engine()); - comp.setData(data, QUrl()); - QObject *dummyData = comp.create(); - if (dummyData) { - qWarning() << "Loaded dummy data:" << dir.filePath(qml); - qml.truncate(qml.length()-4); - ctxt->setContextProperty(qml, dummyData); - dummyData->setParent(this); - } - } - } - - canvas->setUrl(url); - - QTime t; - t.start(); - canvas->execute(); - qWarning() << "Wall startup time:" << t.elapsed(); -#ifdef QTOPIA - show(); -#endif -} - -class PreviewDeviceSkin : public DeviceSkin -{ - Q_OBJECT -public: - explicit PreviewDeviceSkin(const DeviceSkinParameters ¶meters, QWidget *parent); - - void setPreview(QWidget *formWidget); - void setScreenSize(const QSize& size) - { - QMatrix fit; - fit = fit.scale(qreal(size.width())/m_screenSize.width(), - qreal(size.height())/m_screenSize.height()); - setTransform(fit); - } - -private slots: - void slotSkinKeyPressEvent(int code, const QString& text, bool autorep); - void slotSkinKeyReleaseEvent(int code, const QString& text, bool autorep); - void slotPopupMenu(); - -private: - void populateContextMenu(QMenu *menu); - const QSize m_screenSize; -}; - - -PreviewDeviceSkin::PreviewDeviceSkin(const DeviceSkinParameters ¶meters, QWidget *parent) : - DeviceSkin(parameters, parent), - m_screenSize(parameters.screenSize()) -{ - connect(this, SIGNAL(skinKeyPressEvent(int,QString,bool)), - this, SLOT(slotSkinKeyPressEvent(int,QString,bool))); - connect(this, SIGNAL(skinKeyReleaseEvent(int,QString,bool)), - this, SLOT(slotSkinKeyReleaseEvent(int,QString,bool))); - connect(this, SIGNAL(popupMenu()), this, SLOT(slotPopupMenu())); -} - -void PreviewDeviceSkin::setPreview(QWidget *formWidget) -{ - formWidget->setFixedSize(m_screenSize); - formWidget->setParent(this, Qt::SubWindow); - formWidget->setAutoFillBackground(true); - setView(formWidget); -} - -void PreviewDeviceSkin::slotSkinKeyPressEvent(int code, const QString& text, bool autorep) -{ - if (QWidget *focusWidget = QApplication::focusWidget()) { - QKeyEvent e(QEvent::KeyPress,code,0,text,autorep); - QApplication::sendEvent(focusWidget, &e); - } - -} - -void PreviewDeviceSkin::slotSkinKeyReleaseEvent(int code, const QString& text, bool autorep) -{ - if (QWidget *focusWidget = QApplication::focusWidget()) { - QKeyEvent e(QEvent::KeyRelease,code,0,text,autorep); - QApplication::sendEvent(focusWidget, &e); - } -} - -void PreviewDeviceSkin::slotPopupMenu() -{ - QMenu menu(this); - populateContextMenu(&menu); - menu.exec(QCursor::pos()); -} - -void PreviewDeviceSkin::populateContextMenu(QMenu *menu) -{ - connect(menu->addAction(tr("&Close")), SIGNAL(triggered()), parentWidget(), SLOT(close())); -} - - -void QFxViewer::setSkin(const QString& skinDirectory) -{ - DeviceSkinParameters parameters; - QString err; - if (parameters.read(skinDirectory,DeviceSkinParameters::ReadAll,&err)) { - delete skin; - if (!err.isEmpty()) - qWarning() << err; - skin = new PreviewDeviceSkin(parameters,this); - skin->setScreenSize(canvas->size()); - canvas->setParent(skin, Qt::SubWindow); - canvas->setAutoFillBackground(true); - skin->setView(canvas); - delete layout(); - - canvas->show(); - } -} - -void QFxViewer::setAutoRecord(int from, int to) -{ - record_autotime = to-from; - if (from) { - autoStartTimer.start(from,this); - } else { - autoTimer.start(); - setRecording(true); - } -} - -void QFxViewer::setRecordPeriod(int ms) -{ - record_period = ms; -} - -void QFxViewer::sceneResized(QSize size) -{ - if (size.width() > 0 && size.height() > 0) { - canvas->setFixedSize(size.width(), size.height()); - if (skin) - skin->setScreenSize(size); - else - resize(size); - } -} - -void QFxViewer::resizeEvent(QResizeEvent *) -{ - if (!skin) - canvas->setFixedSize(width(),height()); -} - -void QFxViewer::keyPressEvent(QKeyEvent *event) -{ - if (event->key() == Qt::Key_0 && devicemode) - exit(0); - else if (event->key() == Qt::Key_F1 || (event->key() == Qt::Key_1 && devicemode)) { - qDebug() << "F1 - help\n" - << "F2 - toggle GIF recording\n" - << "F3 - take PNG snapshot\n" - << "F4 - show items and state\n" - << "F5 - reload XML\n" - << "F6 - show object tree\n" - << "F7 - show timing\n" - << "F8 - show performance (if available)\n" - << "device keys: 0=quit, 1..8=F1..F8" - ; - } else if (event->key() == Qt::Key_F2 || (event->key() == Qt::Key_2 && devicemode)) { - setRecording(!recordTimer.isActive()); - } else if (event->key() == Qt::Key_F3 || (event->key() == Qt::Key_3 && devicemode)) { - setRecording(!recordTimer.isActive()); - canvas->asImage().save("snapshot.png"); - qDebug() << "Wrote snapshot.png"; - } else if (event->key() == Qt::Key_F4 || (event->key() == Qt::Key_4 && devicemode)) { - canvas->dumpItems(); - canvas->checkState(); - } else if (event->key() == Qt::Key_F5 || (event->key() == Qt::Key_5 && devicemode)) { - reload(); - } else if (event->key() == Qt::Key_F6 || (event->key() == Qt::Key_6 && devicemode)) { - canvas->dumpRoot(); - } else if (event->key() == Qt::Key_F7 || (event->key() == Qt::Key_7 && devicemode)) { - canvas->dumpTiming(); - } else if (event->key() == Qt::Key_F8 || (event->key() == Qt::Key_8 && devicemode)) { - QPerformanceLog::displayData(); - QPerformanceLog::clear(); - } else if (event->key() == Qt::Key_F9) { - if(testEngine) testEngine->save(); - } else if (event->key() == Qt::Key_F10) { - if(testEngine) testEngine->captureFullFrame(); - } - - QWidget::keyPressEvent(event); -} - -void QFxViewer::setRecording(bool on) -{ - if (on == recordTimer.isActive()) - return; - - if (on) { - recordTimer.start(record_period,this); - } else { - recordTimer.stop(); - int frame=0; - QStringList inputs; - qDebug() << "Saving frames..."; - - foreach (QImage* img, frames) { - QString name; - name.sprintf("tmp-frame%04d.png",frame++); - if (record_dither=="ordered") - img->convertToFormat(QImage::Format_Indexed8,Qt::PreferDither|Qt::OrderedDither).save(name); - else if (record_dither=="threshold") - img->convertToFormat(QImage::Format_Indexed8,Qt::PreferDither|Qt::ThresholdDither).save(name); - else if (record_dither=="floyd") - img->convertToFormat(QImage::Format_Indexed8,Qt::PreferDither).save(name); - else - img->convertToFormat(QImage::Format_Indexed8).save(name); - inputs << name; - delete img; - } - QString output="animation.gif"; - - QStringList args; - - args << "-delay" << QString::number(record_period/10); - args << inputs; - args << output; - qDebug() << "Converting..." << output; - if (0!=QProcess::execute("convert", args)) { - qWarning() << "Cannot run ImageMagick 'convert' - not converted to gif"; - inputs.clear(); // don't remove them - qDebug() << "Wrote frames tmp-frame*.png"; - } else { - qDebug() << "Compressing..." << output; - if (0!=QProcess::execute("gifsicle", QStringList() << "-O2" << "-o" << output << output)) - qWarning() << "Cannot run 'gifsicle' - not compressed"; - qDebug() << "Wrote" << output; - } - - foreach (QString name, inputs) - QFile::remove(name); - - frames.clear(); - } - qDebug() << "Recording: " << (recordTimer.isActive()?"ON":"OFF"); -} - -void QFxViewer::timerEvent(QTimerEvent *event) -{ - if (event->timerId() == recordTimer.timerId()) { - frames.append(new QImage(canvas->asImage())); - if (record_autotime && autoTimer.elapsed() >= record_autotime) - setRecording(false); - } else if (event->timerId() == autoStartTimer.timerId()) { - autoTimer.start(); - autoStartTimer.stop(); - setRecording(true); - } else { - QWidget::timerEvent(event); - } -} - -void QFxViewer::setDeviceKeys(bool on) -{ - devicemode = on; -} - -void QFxViewer::setCacheEnabled(bool on) -{ - QNetworkAccessManager * nam = canvas->engine()->networkAccessManager(); - if (on == !!nam->cache()) - return; - if (on) { - // Setup a caching network manager - QNetworkDiskCache *cache = new QNetworkDiskCache; - cache->setCacheDirectory(QDir::tempPath()+QLatin1String("/qml-duiviewer-network-cache")); - cache->setMaximumCacheSize(8000000); - nam->setCache(cache); - } else { - nam->setCache(0); - } -} - -#include "qfxviewer.moc" diff --git a/tools/duiviewer/qfxviewer.h b/tools/duiviewer/qfxviewer.h deleted file mode 100644 index 7a190c5..0000000 --- a/tools/duiviewer/qfxviewer.h +++ /dev/null @@ -1,72 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 1992-$THISYEAR$ $TROLLTECH$. All rights reserved. -** -** This file is part of the $MODULE$ of the Qt Toolkit. -** -** $TROLLTECH_DUAL_LICENSE$ -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -****************************************************************************/ - -#ifndef QFXVIEWER_H -#define QFXVIEWER_H - -#include -#include -#include -#include -#include - - -class QFxView; -class PreviewDeviceSkin; -class QFxTestEngine; - -class QFxViewer : public QWidget -{ -Q_OBJECT -public: - QFxViewer(QFxTestEngine::TestMode = QFxTestEngine::NoTest, const QString &testDir = QString(), QWidget *parent=0, Qt::WindowFlags flags=0); - - void setRecordDither(const QString& s) { record_dither = s; } - void setRecordPeriod(int ms); - int recordPeriod() const { return record_period; } - void setRecording(bool on); - bool isRecording() const { return recordTimer.isActive(); } - void setAutoRecord(int from, int to); - void setSkin(const QString& skinDirectory); - void setDeviceKeys(bool); - void setCacheEnabled(bool); - -public slots: - void sceneResized(QSize size); - void openXml(const QString& fileName); - void reload(); - -protected: - virtual void keyPressEvent(QKeyEvent *); - virtual void timerEvent(QTimerEvent *); - virtual void resizeEvent(QResizeEvent *); - -private: - QString currentFileName; - PreviewDeviceSkin *skin; - QSize skinscreensize; - QFxView *canvas; - void init(QFxTestEngine::TestMode, const QString &, const QString& fileName); - QBasicTimer recordTimer; - QList frames; - QBasicTimer autoStartTimer; - QTime autoTimer; - QString record_dither; - int record_period; - int record_autotime; - bool devicemode; - - QFxTestEngine *testEngine; -}; - -#endif diff --git a/tools/qmlviewer/main.cpp b/tools/qmlviewer/main.cpp new file mode 100644 index 0000000..c5676ab --- /dev/null +++ b/tools/qmlviewer/main.cpp @@ -0,0 +1,135 @@ +/**************************************************************************** +** +** Copyright (C) 1992-$THISYEAR$ $TROLLTECH$. All rights reserved. +** +** This file is part of the $MODULE$ of the Qt Toolkit. +** +** $TROLLTECH_DUAL_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + +#include "qml.h" +#include "qmlviewer.h" +#include +#include +#include "qfxtestengine.h" +#include + + +void usage() +{ + qWarning("Usage: qmlviewer [options] "); + qWarning(" "); + qWarning(" options:"); + qWarning(" -v, -version ............................. display version"); + qWarning(" -frameless ............................... run with no window frame"); + qWarning(" -skin ...................... run with a skin window frame"); + qWarning(" -recorddither ordered|threshold|floyd .... set dither mode used for recording"); + qWarning(" -recordperiod ............. set time between recording frames"); + qWarning(" -autorecord [from-] ...... set recording to start and stop automatically"); + qWarning(" -devicekeys .............................. use numeric keys (see F1)"); + qWarning(" -cache ................................... enable a disk cache of remote content"); + qWarning(" -recordtest .................. record an autotest"); + qWarning(" -runtest ..................... run a previously recorded test"); + qWarning(" "); + qWarning(" Press F1 for interactive help"); + exit(1); +} + +int main(int argc, char ** argv) +{ + //### default to using raster graphics backend for now + int newargc = argc + 2; + char **newargv; + newargv = new char * [newargc]; + for (int i = 0; i < argc; ++i) { + newargv[i] = argv[i]; + if (!qstrcmp(argv[i], "-graphicssystem")) { + newargc -= 2; + break; + } + } + char system[] = "-graphicssystem"; + newargv[argc] = system; + char raster[] = "raster"; + newargv[argc+1] = raster; + + + QApplication app(newargc, newargv); + app.setApplicationName("viewer"); + + bool frameless = false; + QString fileName; + int period = 0; + int autorecord_from = 0; + int autorecord_to = 0; + QString dither = "threshold"; + QString skin; + bool devkeys = false; + bool cache = false; + QFxTestEngine::TestMode testMode = QFxTestEngine::NoTest; + QString testDir; + + for (int i = 1; i < newargc; ++i) { + QString arg = newargv[i]; + if (arg == "-frameless") { + frameless = true; + } else if (arg == "-skin") { + skin = QString(argv[++i]); + } else if (arg == "-cache") { + cache = true; + } else if (arg == "-recordperiod") { + period = QString(argv[++i]).toInt(); + } else if (arg == "-autorecord") { + QString range = QString(argv[++i]); + int dash = range.indexOf('-'); + if (dash > 0) + autorecord_from = range.left(dash).toInt(); + autorecord_to = range.mid(dash+1).toInt(); + } else if (arg == "-devicekeys") { + devkeys = true; + } else if (arg == "-recordtest") { + testMode = QFxTestEngine::RecordTest; + if(i + 1 >= newargc) + usage(); + testDir = newargv[i + 1]; + ++i; + } else if (arg == "-runtest") { + testMode = QFxTestEngine::PlaybackTest; + if(i + 1 >= newargc) + usage(); + testDir = newargv[i + 1]; + ++i; + } else if (arg == QLatin1String("-v") || arg == QLatin1String("-version")) { + fprintf(stderr, "Qt Declarative UI Viewer version %s\n", QT_VERSION_STR); + return 0; + } else if (arg[0] != '-') { + fileName = arg; + } else if (1 || arg == "-help") { + usage(); + } + } + + if (fileName.isEmpty()) + usage(); + + QmlViewer viewer(testMode, testDir, 0, frameless ? Qt::FramelessWindowHint : Qt::Widget); + viewer.setCacheEnabled(cache); + viewer.openQml(fileName); + if (period>0) + viewer.setRecordPeriod(period); + if (autorecord_to) + viewer.setAutoRecord(autorecord_from,autorecord_to); + if (QDir(skin).exists()) + viewer.setSkin(skin); + if (devkeys) + viewer.setDeviceKeys(true); + viewer.setRecordDither(dither); + viewer.show(); + + return app.exec(); +} + diff --git a/tools/qmlviewer/qmlviewer.cpp b/tools/qmlviewer/qmlviewer.cpp new file mode 100644 index 0000000..87bebfa --- /dev/null +++ b/tools/qmlviewer/qmlviewer.cpp @@ -0,0 +1,366 @@ +/**************************************************************************** +** +** Copyright (C) 1992-$THISYEAR$ $TROLLTECH$. All rights reserved. +** +** This file is part of the $MODULE$ of the Qt Toolkit. +** +** $TROLLTECH_DUAL_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + +#include + +#include "qmlbindablevalue.h" +#include "qmlviewer.h" +#include +#include +#include "qml.h" +#include "qperformancelog.h" +#include "qfxtestengine.h" +#include "deviceskin.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +QmlViewer::QmlViewer(QFxTestEngine::TestMode testMode, const QString &testDir, QWidget *parent, Qt::WindowFlags flags) + : QWidget(parent, flags) +{ + testEngine = 0; + devicemode = false; + skin = 0; + canvas = 0; + record_autotime = 0; + record_period = 20; + + int width=240; + int height=320; + setAttribute(Qt::WA_OpaquePaintEvent); + setAttribute(Qt::WA_NoSystemBackground); + + canvas = new QFxView(this); + if(testMode != QFxTestEngine::NoTest) + testEngine = new QFxTestEngine(testMode, testDir, canvas, this); + + QObject::connect(canvas, SIGNAL(sceneResized(QSize)), this, SLOT(sceneResized(QSize))); + canvas->setFixedSize(width, height); + resize(width, height); +} + +void QmlViewer::reload() +{ + openQml(currentFileName); +} + +void QmlViewer::openQml(const QString& fileName) +{ + setWindowTitle(tr("%1 - Qt Declarative UI Viewer").arg(fileName)); + + canvas->reset(); + + currentFileName = fileName; + QUrl url(fileName); + QFileInfo fi(fileName); + if (fi.exists()) { + url = QUrl::fromLocalFile(fi.absoluteFilePath()); + QmlContext *ctxt = canvas->rootContext(); + QDir dir(fi.path()+"/dummydata", "*.qml"); + QStringList list = dir.entryList(); + for (int i = 0; i < list.size(); ++i) { + QString qml = list.at(i); + QFile f(dir.filePath(qml)); + f.open(QIODevice::ReadOnly); + QByteArray data = f.readAll(); + QmlComponent comp(canvas->engine()); + comp.setData(data, QUrl()); + QObject *dummyData = comp.create(); + if (dummyData) { + qWarning() << "Loaded dummy data:" << dir.filePath(qml); + qml.truncate(qml.length()-4); + ctxt->setContextProperty(qml, dummyData); + dummyData->setParent(this); + } + } + } + + canvas->setUrl(url); + + QTime t; + t.start(); + canvas->execute(); + qWarning() << "Wall startup time:" << t.elapsed(); +#ifdef QTOPIA + show(); +#endif +} + +class PreviewDeviceSkin : public DeviceSkin +{ + Q_OBJECT +public: + explicit PreviewDeviceSkin(const DeviceSkinParameters ¶meters, QWidget *parent); + + void setPreview(QWidget *formWidget); + void setScreenSize(const QSize& size) + { + QMatrix fit; + fit = fit.scale(qreal(size.width())/m_screenSize.width(), + qreal(size.height())/m_screenSize.height()); + setTransform(fit); + } + +private slots: + void slotSkinKeyPressEvent(int code, const QString& text, bool autorep); + void slotSkinKeyReleaseEvent(int code, const QString& text, bool autorep); + void slotPopupMenu(); + +private: + void populateContextMenu(QMenu *menu); + const QSize m_screenSize; +}; + + +PreviewDeviceSkin::PreviewDeviceSkin(const DeviceSkinParameters ¶meters, QWidget *parent) : + DeviceSkin(parameters, parent), + m_screenSize(parameters.screenSize()) +{ + connect(this, SIGNAL(skinKeyPressEvent(int,QString,bool)), + this, SLOT(slotSkinKeyPressEvent(int,QString,bool))); + connect(this, SIGNAL(skinKeyReleaseEvent(int,QString,bool)), + this, SLOT(slotSkinKeyReleaseEvent(int,QString,bool))); + connect(this, SIGNAL(popupMenu()), this, SLOT(slotPopupMenu())); +} + +void PreviewDeviceSkin::setPreview(QWidget *formWidget) +{ + formWidget->setFixedSize(m_screenSize); + formWidget->setParent(this, Qt::SubWindow); + formWidget->setAutoFillBackground(true); + setView(formWidget); +} + +void PreviewDeviceSkin::slotSkinKeyPressEvent(int code, const QString& text, bool autorep) +{ + if (QWidget *focusWidget = QApplication::focusWidget()) { + QKeyEvent e(QEvent::KeyPress,code,0,text,autorep); + QApplication::sendEvent(focusWidget, &e); + } + +} + +void PreviewDeviceSkin::slotSkinKeyReleaseEvent(int code, const QString& text, bool autorep) +{ + if (QWidget *focusWidget = QApplication::focusWidget()) { + QKeyEvent e(QEvent::KeyRelease,code,0,text,autorep); + QApplication::sendEvent(focusWidget, &e); + } +} + +void PreviewDeviceSkin::slotPopupMenu() +{ + QMenu menu(this); + populateContextMenu(&menu); + menu.exec(QCursor::pos()); +} + +void PreviewDeviceSkin::populateContextMenu(QMenu *menu) +{ + connect(menu->addAction(tr("&Close")), SIGNAL(triggered()), parentWidget(), SLOT(close())); +} + + +void QmlViewer::setSkin(const QString& skinDirectory) +{ + DeviceSkinParameters parameters; + QString err; + if (parameters.read(skinDirectory,DeviceSkinParameters::ReadAll,&err)) { + delete skin; + if (!err.isEmpty()) + qWarning() << err; + skin = new PreviewDeviceSkin(parameters,this); + skin->setScreenSize(canvas->size()); + canvas->setParent(skin, Qt::SubWindow); + canvas->setAutoFillBackground(true); + skin->setView(canvas); + delete layout(); + + canvas->show(); + } +} + +void QmlViewer::setAutoRecord(int from, int to) +{ + record_autotime = to-from; + if (from) { + autoStartTimer.start(from,this); + } else { + autoTimer.start(); + setRecording(true); + } +} + +void QmlViewer::setRecordPeriod(int ms) +{ + record_period = ms; +} + +void QmlViewer::sceneResized(QSize size) +{ + if (size.width() > 0 && size.height() > 0) { + canvas->setFixedSize(size.width(), size.height()); + if (skin) + skin->setScreenSize(size); + else + resize(size); + } +} + +void QmlViewer::resizeEvent(QResizeEvent *) +{ + if (!skin) + canvas->setFixedSize(width(),height()); +} + +void QmlViewer::keyPressEvent(QKeyEvent *event) +{ + if (event->key() == Qt::Key_0 && devicemode) + exit(0); + else if (event->key() == Qt::Key_F1 || (event->key() == Qt::Key_1 && devicemode)) { + qDebug() << "F1 - help\n" + << "F2 - toggle GIF recording\n" + << "F3 - take PNG snapshot\n" + << "F4 - show items and state\n" + << "F5 - reload XML\n" + << "F6 - show object tree\n" + << "F7 - show timing\n" + << "F8 - show performance (if available)\n" + << "device keys: 0=quit, 1..8=F1..F8" + ; + } else if (event->key() == Qt::Key_F2 || (event->key() == Qt::Key_2 && devicemode)) { + setRecording(!recordTimer.isActive()); + } else if (event->key() == Qt::Key_F3 || (event->key() == Qt::Key_3 && devicemode)) { + canvas->asImage().save("snapshot.png"); + qDebug() << "Wrote snapshot.png"; + } else if (event->key() == Qt::Key_F4 || (event->key() == Qt::Key_4 && devicemode)) { + canvas->dumpItems(); + canvas->checkState(); + } else if (event->key() == Qt::Key_F5 || (event->key() == Qt::Key_5 && devicemode)) { + reload(); + } else if (event->key() == Qt::Key_F6 || (event->key() == Qt::Key_6 && devicemode)) { + canvas->dumpRoot(); + } else if (event->key() == Qt::Key_F7 || (event->key() == Qt::Key_7 && devicemode)) { + canvas->dumpTiming(); + } else if (event->key() == Qt::Key_F8 || (event->key() == Qt::Key_8 && devicemode)) { + QPerformanceLog::displayData(); + QPerformanceLog::clear(); + } else if (event->key() == Qt::Key_F9) { + if(testEngine) testEngine->save(); + } else if (event->key() == Qt::Key_F10) { + if(testEngine) testEngine->captureFullFrame(); + } + + QWidget::keyPressEvent(event); +} + +void QmlViewer::setRecording(bool on) +{ + if (on == recordTimer.isActive()) + return; + + if (on) { + recordTimer.start(record_period,this); + } else { + recordTimer.stop(); + int frame=0; + QStringList inputs; + qDebug() << "Saving frames..."; + + foreach (QImage* img, frames) { + QString name; + name.sprintf("tmp-frame%04d.png",frame++); + if (record_dither=="ordered") + img->convertToFormat(QImage::Format_Indexed8,Qt::PreferDither|Qt::OrderedDither).save(name); + else if (record_dither=="threshold") + img->convertToFormat(QImage::Format_Indexed8,Qt::PreferDither|Qt::ThresholdDither).save(name); + else if (record_dither=="floyd") + img->convertToFormat(QImage::Format_Indexed8,Qt::PreferDither).save(name); + else + img->convertToFormat(QImage::Format_Indexed8).save(name); + inputs << name; + delete img; + } + QString output="animation.gif"; + + QStringList args; + + args << "-delay" << QString::number(record_period/10); + args << inputs; + args << output; + qDebug() << "Converting..." << output; + if (0!=QProcess::execute("convert", args)) { + qWarning() << "Cannot run ImageMagick 'convert' - not converted to gif"; + inputs.clear(); // don't remove them + qDebug() << "Wrote frames tmp-frame*.png"; + } else { + qDebug() << "Compressing..." << output; + if (0!=QProcess::execute("gifsicle", QStringList() << "-O2" << "-o" << output << output)) + qWarning() << "Cannot run 'gifsicle' - not compressed"; + qDebug() << "Wrote" << output; + } + + foreach (QString name, inputs) + QFile::remove(name); + + frames.clear(); + } + qDebug() << "Recording: " << (recordTimer.isActive()?"ON":"OFF"); +} + +void QmlViewer::timerEvent(QTimerEvent *event) +{ + if (event->timerId() == recordTimer.timerId()) { + frames.append(new QImage(canvas->asImage())); + if (record_autotime && autoTimer.elapsed() >= record_autotime) + setRecording(false); + } else if (event->timerId() == autoStartTimer.timerId()) { + autoTimer.start(); + autoStartTimer.stop(); + setRecording(true); + } else { + QWidget::timerEvent(event); + } +} + +void QmlViewer::setDeviceKeys(bool on) +{ + devicemode = on; +} + +void QmlViewer::setCacheEnabled(bool on) +{ + QNetworkAccessManager * nam = canvas->engine()->networkAccessManager(); + if (on == !!nam->cache()) + return; + if (on) { + // Setup a caching network manager + QNetworkDiskCache *cache = new QNetworkDiskCache; + cache->setCacheDirectory(QDir::tempPath()+QLatin1String("/qml-duiviewer-network-cache")); + cache->setMaximumCacheSize(8000000); + nam->setCache(cache); + } else { + nam->setCache(0); + } +} + +#include "qmlviewer.moc" diff --git a/tools/qmlviewer/qmlviewer.h b/tools/qmlviewer/qmlviewer.h new file mode 100644 index 0000000..0fa879d --- /dev/null +++ b/tools/qmlviewer/qmlviewer.h @@ -0,0 +1,72 @@ +/**************************************************************************** +** +** Copyright (C) 1992-$THISYEAR$ $TROLLTECH$. All rights reserved. +** +** This file is part of the $MODULE$ of the Qt Toolkit. +** +** $TROLLTECH_DUAL_LICENSE$ +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + +#ifndef QMLVIEWER_H +#define QMLVIEWER_H + +#include +#include +#include +#include +#include + + +class QFxView; +class PreviewDeviceSkin; +class QFxTestEngine; + +class QmlViewer : public QWidget +{ +Q_OBJECT +public: + QmlViewer(QFxTestEngine::TestMode = QFxTestEngine::NoTest, const QString &testDir = QString(), QWidget *parent=0, Qt::WindowFlags flags=0); + + void setRecordDither(const QString& s) { record_dither = s; } + void setRecordPeriod(int ms); + int recordPeriod() const { return record_period; } + void setRecording(bool on); + bool isRecording() const { return recordTimer.isActive(); } + void setAutoRecord(int from, int to); + void setSkin(const QString& skinDirectory); + void setDeviceKeys(bool); + void setCacheEnabled(bool); + +public slots: + void sceneResized(QSize size); + void openQml(const QString& fileName); + void reload(); + +protected: + virtual void keyPressEvent(QKeyEvent *); + virtual void timerEvent(QTimerEvent *); + virtual void resizeEvent(QResizeEvent *); + +private: + QString currentFileName; + PreviewDeviceSkin *skin; + QSize skinscreensize; + QFxView *canvas; + void init(QFxTestEngine::TestMode, const QString &, const QString& fileName); + QBasicTimer recordTimer; + QList frames; + QBasicTimer autoStartTimer; + QTime autoTimer; + QString record_dither; + int record_period; + int record_autotime; + bool devicemode; + + QFxTestEngine *testEngine; +}; + +#endif diff --git a/tools/qmlviewer/qmlviewer.pro b/tools/qmlviewer/qmlviewer.pro new file mode 100644 index 0000000..08d2d2b --- /dev/null +++ b/tools/qmlviewer/qmlviewer.pro @@ -0,0 +1,12 @@ +DESTDIR = ../../bin +QT += declarative script network sql +# Input +HEADERS += qmlviewer.h +SOURCES += main.cpp qmlviewer.cpp + +include($$QT_SOURCE_TREE/tools/shared/deviceskin/deviceskin.pri) + +target.path=$$[QT_INSTALL_BINS] +INSTALLS += target + +CONFIG += console diff --git a/tools/tools.pro b/tools/tools.pro index 12da18c..2c83580 100644 --- a/tools/tools.pro +++ b/tools/tools.pro @@ -24,7 +24,7 @@ mac { SUBDIRS += kmap2qmap -contains(QT_CONFIG, declarative):SUBDIRS += duiviewer qmlconv +contains(QT_CONFIG, declarative):SUBDIRS += qmlviewer qmlconv contains(QT_CONFIG, dbus):SUBDIRS += qdbus !wince*:contains(QT_CONFIG, xmlpatterns): SUBDIRS += xmlpatterns embedded: SUBDIRS += makeqpf -- cgit v0.12 From 500474fcd985893da0b675e24298ac98c29f8a76 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Thu, 30 Apr 2009 15:22:33 +1000 Subject: Fix crash in QmlDomDocument::load() --- src/declarative/qml/qmlcompositetypemanager_p.h | 2 ++ src/declarative/qml/qmldom.cpp | 20 +++++++++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/declarative/qml/qmlcompositetypemanager_p.h b/src/declarative/qml/qmlcompositetypemanager_p.h index ffa4fda..bc86fcf 100644 --- a/src/declarative/qml/qmlcompositetypemanager_p.h +++ b/src/declarative/qml/qmlcompositetypemanager_p.h @@ -52,6 +52,7 @@ class QmlEngine; class QmlCompiledComponent; class QmlComponentPrivate; class QmlComponent; +class QmlDomDocument; struct QmlCompositeTypeData : public QmlRefCount { QmlCompositeTypeData(); @@ -98,6 +99,7 @@ struct QmlCompositeTypeData : public QmlRefCount private: friend class QmlCompositeTypeManager; friend class QmlCompiler; + friend class QmlDomDocument; QmlScriptParser data; QList waiters; diff --git a/src/declarative/qml/qmldom.cpp b/src/declarative/qml/qmldom.cpp index 72c1c76..4e8e1f7 100644 --- a/src/declarative/qml/qmldom.cpp +++ b/src/declarative/qml/qmldom.cpp @@ -42,6 +42,7 @@ #include "qmldom.h" #include "qmldom_p.h" #include "private/qmlcompiler_p.h" +#include "private/qmlengine_p.h" #include "qmlcompiledcomponent_p.h" #include #include @@ -159,15 +160,28 @@ bool QmlDomDocument::load(QmlEngine *engine, const QByteArray &data) QmlCompiledComponent component; QmlCompiler compiler; - // ### -// compiler.compile(engine, parser, &component); + + QmlCompositeTypeData *td = ((QmlEnginePrivate *)QmlEnginePrivate::get(engine))->typeManager.getImmediate(data, QUrl());; + + if(td->status == QmlCompositeTypeData::Error) { + d->error = td->errorDescription; + td->release(); + return false; + } else if(td->status == QmlCompositeTypeData::Waiting) { + d->error = QLatin1String("QmlDomDocument supports local types only"); + td->release(); + return false; + } + + compiler.compile(engine, td, &component); if (compiler.isError()) { d->error = compiler.errorDescription(); + td->release(); return false; } - if (parser.tree()) { + if (td->data.tree()) { component.dump(0, parser.tree()); d->root = parser.tree(); d->root->addref(); -- cgit v0.12 From 6409c4256c8f63a981c5448ded84246134ac2a40 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Thu, 30 Apr 2009 16:18:20 +1000 Subject: whitespace --- demos/declarative/webbrowser/webbrowser.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/demos/declarative/webbrowser/webbrowser.qml b/demos/declarative/webbrowser/webbrowser.qml index 79fd1cd..709d649 100644 --- a/demos/declarative/webbrowser/webbrowser.qml +++ b/demos/declarative/webbrowser/webbrowser.qml @@ -1,4 +1,5 @@ import "content" + Item { id: WebBrowser -- cgit v0.12 From a26c1cbe326f59162cd6549b8da479c4a7f198da Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Thu, 30 Apr 2009 16:18:50 +1000 Subject: Documentation work. --- doc/src/declarative/basictypes.qdoc | 210 +++++++-------------------------- doc/src/declarative/elements.qdoc | 4 +- doc/src/declarative/index.qdoc | 2 +- doc/src/declarative/qtprogrammers.qdoc | 2 +- doc/src/declarative/tutorial3.qdoc | 2 +- src/declarative/fx/qfxgridview.cpp | 6 +- src/declarative/fx/qfximage.cpp | 2 +- src/declarative/fx/qfxitem.cpp | 2 +- src/declarative/fx/qfxlistview.cpp | 8 +- src/declarative/fx/qfxpathview.cpp | 4 +- src/declarative/fx/qfxtext.cpp | 50 ++++---- tools/qdoc3/test/classic.css | 49 ++++---- tools/qmlviewer/qmlviewer.cpp | 2 +- 13 files changed, 111 insertions(+), 232 deletions(-) diff --git a/doc/src/declarative/basictypes.qdoc b/doc/src/declarative/basictypes.qdoc index a6b9177..0000c37 100644 --- a/doc/src/declarative/basictypes.qdoc +++ b/doc/src/declarative/basictypes.qdoc @@ -1,20 +1,16 @@ /*! - \page basicxmltypes.html + \page basicqmltypes.html \title Common QML Types QML uses a range of property types, which you will see referenced throughout the element documentation. Almost all of them are exactly what you would expect. - \target basicxmlint + \target basicqmlint \raw HTML -
-
- - +
int
+
int
-
-
\endraw ints are whole numbers - things like 0, 10 and -20. The possible int @@ -30,25 +26,16 @@ \endcode - \raw HTML -
-
- \endraw - - \target basicxmlbool + \target basicqmlbool \raw HTML
-
-
- - +
bool
+
bool
-
-
\endraw bools are a binary true/false value, represented by the strings - "true" and "false" in XML. + "true" and "false" in QML. Setting bools looks like this: \code @@ -58,21 +45,12 @@ \note Technically bool treats an empty string, "false" and "0" as false and everything else as true. Seriously, though, use "true" and "false". - \raw HTML -
-
- \endraw - - \target basicxmlreal + \target basicqmlreal \raw HTML
-
-
- - +
real
+
real
-
-
\endraw reals are numbers - either whole numbers like ints, or fractional numbers @@ -85,21 +63,12 @@ \note In QML all reals are stored in single precision, \l {http://en.wikipedia.org/wiki/IEEE_754}{IEEE floating point} format. - \raw HTML -
-
- \endraw - - \target basicxmlstring + \target basicqmlstring \raw HTML
-
-
- - +
string
+
string
-
-
\endraw strings are free form text, like "hello world", "QML is cool" and @@ -111,20 +80,14 @@ \endcode \raw HTML -
-
\endraw - \target basicxmlcolor + \target basicqmlcolor \raw HTML
-
-
- - +
color
+
color
-
-
\endraw Colors are most commonly specified as an \l {http://www.w3.org/TR/SVG/types.html#ColorKeywords}{SVG color name}. These names include colors like @@ -143,21 +106,12 @@ \endcode - \raw HTML -
-
- \endraw - - \target basicxmlpoint + \target basicqmlpoint \raw HTML
-
-
- - +
point
+
point
-
-
\endraw Points are specified in \c "x,y" format. @@ -167,21 +121,12 @@ \endcode - \raw HTML -
-
- \endraw - - \target basicxmlsize + \target basicqmlsize \raw HTML
-
-
- - +
size
+
size
-
-
\endraw Sizes are specified in \c "widthxheight" format. @@ -191,21 +136,12 @@ \endcode - \raw HTML -
-
- \endraw - - \target basicxmlrectangle + \target basicqmlrectangle \raw HTML
-
-
- - +
rectangle
+
rectangle
-
-
\endraw Rectangles are specified in \c "x,y,widthxheight" format. @@ -215,21 +151,12 @@ \endcode - \raw HTML -
-
- \endraw - - \target basicxmldate + \target basicqmldate \raw HTML
-
-
- - +
date
+
date
-
-
\endraw Dates are specified in \c "YYYY-MM-DD" format. @@ -239,21 +166,12 @@ \endcode - \raw HTML -
-
- \endraw - - \target basicxmltime + \target basicqmltime \raw HTML
-
-
- - +
time
+
time
-
-
\endraw Times are specified in \c "hh:mm:ss" format. @@ -263,21 +181,12 @@ \endcode - \raw HTML -
-
- \endraw - - \target basicxmlfont + \target basicqmlfont \raw HTML
-
-
- - +
font
+
font
-
-
\endraw The font type has components: @@ -293,21 +202,12 @@ \endcode - \raw HTML -
-
- \endraw - - \target basicxmlaction + \target basicqmlaction \raw HTML
-
-
- - +
action
+
action
-
-
\endraw The action type has all the properties of QAction, in particular: @@ -325,42 +225,24 @@ \endcode - \raw HTML -
-
- \endraw - - \target basicxmlany + \target basicqmlany \raw HTML
-
-
- - +
any
+
any
-
-
\endraw The any type can accept any basic type, object or list. Generally this is only used in very special cases. The documentation for elements that use the any type will explain the constraints in that particular case. - \raw HTML -
-
- \endraw - - \target basicxmllist + \target basicqmllist \raw HTML
-
-
- - +
Lists
+
Lists
-
-
\endraw While not technically a basic type, QML also supports lists of object @@ -380,8 +262,4 @@ \endcode \c child1, \c child2 and \c child3 will all be added to the children list in the order in which they appear. - \raw HTML -
-
- \endraw */ diff --git a/doc/src/declarative/elements.qdoc b/doc/src/declarative/elements.qdoc index 8955587..3e88e5a 100644 --- a/doc/src/declarative/elements.qdoc +++ b/doc/src/declarative/elements.qdoc @@ -7,7 +7,7 @@ The following table lists the Qml elements provided by the Qt Declarative module \bold {Standard Qt Declarative Elements} -\table +\table 100% \header \o \bold {States} \o \bold {Animation and Transitions} @@ -51,7 +51,7 @@ The following table lists the Qml elements provided by the Qt Declarative module \bold {Fluid UI Primitives} -\table +\table 100% \header \o \bold {Basic Items} \o \bold {Utility} diff --git a/doc/src/declarative/index.qdoc b/doc/src/declarative/index.qdoc index 22195ba..b5e9001 100644 --- a/doc/src/declarative/index.qdoc +++ b/doc/src/declarative/index.qdoc @@ -13,7 +13,7 @@ user-interfaces. Building fluid applications is done declaratively, rather than procedurally. That is, you specify \e what the UI should look like and how it should behave -in an XML-based format called QML instead of specifying step-by-step \e how to +in an declarative format called QML instead of specifying step-by-step \e how to build it in a language like C++ or JavaScript. Specifying a UI declaratively does not just include the layout of the interface items, but also the way each individual item looks and behaves and the overall flow of the application. diff --git a/doc/src/declarative/qtprogrammers.qdoc b/doc/src/declarative/qtprogrammers.qdoc index 92caa3f..b63ebbb 100644 --- a/doc/src/declarative/qtprogrammers.qdoc +++ b/doc/src/declarative/qtprogrammers.qdoc @@ -14,7 +14,7 @@ an application with a UI defined in QML also uses Qt for all the non-UI logic. QML provides direct access to the following concepts from Qt: \list - \o QAction - the \l {basicxmlaction}{action} type + \o QAction - the \l {basicqmlaction}{action} type \o QObject signals and slots - available as functions to call in JavaScript \o QObject properties - available as variables in JavaScript \o QWidget - QFxView is a QML-displaying widget diff --git a/doc/src/declarative/tutorial3.qdoc b/doc/src/declarative/tutorial3.qdoc index 91ab9f0..533e179 100644 --- a/doc/src/declarative/tutorial3.qdoc +++ b/doc/src/declarative/tutorial3.qdoc @@ -52,7 +52,7 @@ Here is the QML code: \endcode -First, we create a new state \e down for our text element. This state will be activated when \l {xmlMouseRegion}{MouseRegion} is pressed, and deactivated when it is released. +First, we create a new state \e down for our text element. This state will be activated when MouseRegion is pressed, and deactivated when it is released. The \e down state includes a set of property changes from our implicit \e {default state} (the items as they were initially defined in the QML). Specifically, we set the \c y property of the text to 160 and the \c color to red. diff --git a/src/declarative/fx/qfxgridview.cpp b/src/declarative/fx/qfxgridview.cpp index c8b8d27..b8acea2 100644 --- a/src/declarative/fx/qfxgridview.cpp +++ b/src/declarative/fx/qfxgridview.cpp @@ -650,12 +650,12 @@ void QFxGridViewPrivate::updateCurrent(int modelIndex) \brief The GridView element provides a grid view of items provided by a model. The model is typically provided by a QAbstractListModel "C++ model object", - but can also be created directly in XML. + but can also be created directly in QML. The items are laid out top to bottom (vertically) or left to right (horizontally) and may be flicked to scroll. - The below example creates a very simple grid, using an XML model. + The below example creates a very simple grid, using a QML model. \code @@ -706,7 +706,7 @@ QFxGridView::~QFxGridView() The C++ model object must be a \l QListModelInterface subclass, a \l VisualModel, or a simple list. - Models can also be created directly in XML, using the \l ListModel element. For example: + Models can also be created directly in QML, using the \l ListModel element. For example: \code diff --git a/src/declarative/fx/qfximage.cpp b/src/declarative/fx/qfximage.cpp index a34cd12..74ba8b8 100644 --- a/src/declarative/fx/qfximage.cpp +++ b/src/declarative/fx/qfximage.cpp @@ -135,7 +135,7 @@ QFxImage::~QFxImage() This property contains the image currently being displayed by this item, which may be an empty pixmap if nothing is currently displayed. If this property is set, the src property will be unset. This property is intended - to be used only in C++, not in XML. + to be used only in C++, not in QML. */ QPixmap QFxImage::pixmap() const { diff --git a/src/declarative/fx/qfxitem.cpp b/src/declarative/fx/qfxitem.cpp index 11b7dd3..38b5713 100644 --- a/src/declarative/fx/qfxitem.cpp +++ b/src/declarative/fx/qfxitem.cpp @@ -1676,7 +1676,7 @@ QmlList* QFxItem::transitions() the item, or giving it a \l Reflection. Some filters may not be available on all canvases; if a filter is not available on a certain canvas, it will simply not be applied for - that canvas (but the XML will still be considered valid). + that canvas (but the QML will still be considered valid). \qml diff --git a/src/declarative/fx/qfxlistview.cpp b/src/declarative/fx/qfxlistview.cpp index 13e5b21..6d11764 100644 --- a/src/declarative/fx/qfxlistview.cpp +++ b/src/declarative/fx/qfxlistview.cpp @@ -797,10 +797,10 @@ void QFxListViewPrivate::fixupX() \inherits Flickable \brief The ListView element provides a list view of items provided by a model. - The model is typically provided by a QAbstractListModel "C++ model object", but can also be created directly in XML. + The model is typically provided by a QAbstractListModel "C++ model object", but can also be created directly in QML. The items are laid out vertically or horizontally and may be flicked to scroll. - The below example creates a very simple vertical list, using an XML model. + The below example creates a very simple vertical list, using a QML model. \image trivialListView.png The user interface defines a delegate to display an item, a highlight, @@ -808,7 +808,7 @@ void QFxListViewPrivate::fixupX() \snippet doc/src/snippets/declarative/listview/listview.qml 3 - The model is defined as a ListModel using XML: + The model is defined as a ListModel using QML: \quotefromfile doc/src/snippets/declarative/listview/dummydata/ContactModel.qml \skipto diff --git a/src/declarative/fx/qfxtext.cpp b/src/declarative/fx/qfxtext.cpp index 5cb31e1..f1aefb9 100644 --- a/src/declarative/fx/qfxtext.cpp +++ b/src/declarative/fx/qfxtext.cpp @@ -67,16 +67,12 @@ QML_DEFINE_TYPE(QFxText,Text); It can display both plain and rich text. For example: \code - - - Hello World!]]]]> - + Text { text: "Hello World!"; font.family: "Helvetica"; font.size: 24; color: "red" } + Text { text: "Hello World!" } \endcode \image declarative-text.png - Additional examples can be found in examples/poc/text.xml - If height and width are not explicitly set, Text will attempt to determine how much room is needed and set it accordingly. Unless \c wrap is set, it will always prefer width to height (all text will be placed on a single line). @@ -99,26 +95,19 @@ QML_DEFINE_TYPE(QFxText,Text); It can display both plain and rich text. For example: \code - - - Hello World!]]> - + Text { text: "Hello World!"; font.family: "Helvetica"; font.size: 24; color: "red" } + Text { text: "Hello World!" } \endcode \image text.png - Note that the 'styling' properties such as color and outline are ignored for rich text, styling - of rich text should be done within the text itself. - - Additional examples can be found in examples/poc/text.xml - If height and width are not explicitly set, Text will attempt to determine how much room is needed and set it accordingly. Unless \c wrap is set, it will always prefer width to height (all text will be placed on a single line). The \c elideMode can alternatively be used to fit a line of plain text to a set width. - A QFxText object can be instantiated in Qml using the tag \c <Text>. + A QFxText object can be instantiated in Qml using the tag \c Text. */ QFxText::QFxText(QFxItem *parent) : QFxItem(*(new QFxTextPrivate), parent) @@ -143,9 +132,14 @@ QFxText::~QFxText() } /*! - \qmlproperty font Text::font + \qmlproperty string Text::font.family + \qmlproperty bool Text::font.bold + \qmlproperty bool Text::font.italic + \qmlproperty real Text::font.size - Set the Text's font attributes. \c font.size sets the font's point size. + Set the Text's font attributes. + + \note \c font.size sets the font's point size (not pixel size). */ /*! @@ -219,11 +213,11 @@ void QFxText::setColor(const QColor &color) The text color. \code - - + //green text using hexadecimal notation + Text { color: "#00FF00"; ... } - - + //steelblue text using SVG color name + Text { color: "steelblue"; ... } \endcode */ @@ -241,12 +235,12 @@ QColor QFxText::color() const Supported text styles are \c Normal, \c Outline, \c Raised and \c Sunken. \code - - - - - - + HorizontalLayout { + Text { font.size: 24; text: "Normal" } + Text { font.size: 24; text: "Raised"; style: "Raised"; styleColor: "#AAAAAA" } + Text { font.size: 24; text: "Outline"; style: "Outline"; styleColor: "red" } + Text { font.size: 24; text: "Sunken"; style: "Sunken"; styleColor: "#AAAAAA" } + } \endcode \image declarative-textstyle.png diff --git a/tools/qdoc3/test/classic.css b/tools/qdoc3/test/classic.css index 92a90d4..757d64e 100644 --- a/tools/qdoc3/test/classic.css +++ b/tools/qdoc3/test/classic.css @@ -139,43 +139,50 @@ span.string,span.char } .qmlitem { - padding: 0; + padding: 0; } .qmlname { - white-space: nowrap; - font-weight: bold; + white-space: nowrap; + font-weight: bold; + font-size: 125%; +} + +.qmltype { + font-weight: bold; + font-size: 125%; } .qmlproto, .qmldoc { - border: 1px solid #84b0c7; + // border-top: 1px solid #84b0c7; } .qmlproto { - padding: 0; - background-color: #d5e1e8; - font-weight: bold; - -webkit-border-top-left-radius: 8px; - -webkit-border-top-right-radius: 8px; - -moz-border-radius-topleft: 8px; - -moz-border-radius-topright: 8px; + padding: 0; + //background-color: #e4e4e4;//#d5e1e8; + //font-weight: bold; + //-webkit-border-top-left-radius: 8px; + //-webkit-border-top-right-radius: 8px; + //-moz-border-radius-topleft: 8px; + //-moz-border-radius-topright: 8px; } .qmldoc { - padding: 2px 5px; - background-color: #eef3f5; - border-top-width: 0; - -webkit-border-bottom-left-radius: 8px; - -webkit-border-bottom-right-radius: 8px; - -moz-border-radius-bottomleft: 8px; - -moz-border-radius-bottomright: 8px; + border-top: 1px solid #e4e4e4; + //padding: 2px 5px; + //background-color: #eef3f5; + //border-top-width: 0; + //-webkit-border-bottom-left-radius: 8px; + //-webkit-border-bottom-right-radius: 8px; + //-moz-border-radius-bottomleft: 8px; + //-moz-border-radius-bottomright: 8px; } .qmldoc p, .qmldoc dl, .qmldoc ul { - margin: 6px 0; + //margin: 6px 0; } *.qmlitem p { - margin-top: 0px; - margin-bottom: 0px; + //margin-top: 0px; + //margin-bottom: 0px; } diff --git a/tools/qmlviewer/qmlviewer.cpp b/tools/qmlviewer/qmlviewer.cpp index 87bebfa..3c52cfe 100644 --- a/tools/qmlviewer/qmlviewer.cpp +++ b/tools/qmlviewer/qmlviewer.cpp @@ -241,7 +241,7 @@ void QmlViewer::keyPressEvent(QKeyEvent *event) << "F2 - toggle GIF recording\n" << "F3 - take PNG snapshot\n" << "F4 - show items and state\n" - << "F5 - reload XML\n" + << "F5 - reload QML\n" << "F6 - show object tree\n" << "F7 - show timing\n" << "F8 - show performance (if available)\n" -- cgit v0.12 From 8cd3c8f83b72a988a2d6a99924dda97504c9c24e Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Thu, 30 Apr 2009 16:23:46 +1000 Subject: port syntax --- .../declarative/listview/content/MediaButton.qml | 61 ++++++++++++++-------- 1 file changed, 40 insertions(+), 21 deletions(-) diff --git a/examples/declarative/listview/content/MediaButton.qml b/examples/declarative/listview/content/MediaButton.qml index 6c672ea..bb2510a 100644 --- a/examples/declarative/listview/content/MediaButton.qml +++ b/examples/declarative/listview/content/MediaButton.qml @@ -1,21 +1,40 @@ - - - - - - - - - - - - - - {Image.width} - - - - - - - +Item { + id: Container + signals: Signal { + name: "clicked" + } + properties: Property { + name: "text" + } + Image { + id: Image + source: "pics/button.png" + } + Image { + id: Pressed + source: "pics/button-pressed.png" + opacity: 0 + } + MouseRegion { + id: MouseRegion + anchors.fill: Image + onClicked: { Container.clicked.emit(); } + } + Text { + font.bold: true + color: "white" + anchors.centeredIn: Image + text: Container.text + } + width: Image.width + states: [ + State { + name: "Pressed" + when: MouseRegion.pressed == true + SetProperties { + target: Pressed + opacity: 1 + } + } + ] +} -- cgit v0.12 From cc4c8562890784e1b4ca55612f8963e59f2e6bce Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Thu, 30 Apr 2009 16:42:11 +1000 Subject: doc --- src/declarative/fx/qfxwebview.cpp | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/src/declarative/fx/qfxwebview.cpp b/src/declarative/fx/qfxwebview.cpp index 05730f9..fe694ea 100644 --- a/src/declarative/fx/qfxwebview.cpp +++ b/src/declarative/fx/qfxwebview.cpp @@ -221,7 +221,13 @@ public: if the idealHeight is changed after the content is loaded. \code - + WebView { + url: "http://www.nokia.com" + width: 490 + height: 400 + scale: 0.5 + smooth: true + } \endcode \image webview.png @@ -998,23 +1004,12 @@ QString QFxWebView::html() const \qmlproperty string WebView::html This property holds HTML text set directly - The html property can be set as a string (using CDATA for large blocks), - or as xhtml inline using the XML namespace http://www.w3.org/1999/xhtml: + The html property can be set as a string. \code - - -

This is valid xHTML.

- -
- \endcode - - \code - - <CDATA[ -

This is just HTML. - ]]>html> - + WebView { + html: "

This is HTML." + } \endcode */ void QFxWebView::setHtml(const QString &html, const QUrl &baseUrl) -- cgit v0.12 From 0e664dabc5b7325634e54d120eb374940497ca0f Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Thu, 30 Apr 2009 16:42:28 +1000 Subject: Support stdin --- tools/qmlconv/qmlconv.cpp | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/tools/qmlconv/qmlconv.cpp b/tools/qmlconv/qmlconv.cpp index 3ba40a4..3457a4f 100644 --- a/tools/qmlconv/qmlconv.cpp +++ b/tools/qmlconv/qmlconv.cpp @@ -442,24 +442,26 @@ int main(int argc, char *argv[]) QStringList args = a.arguments(); args.removeFirst(); -again: - if (args.isEmpty()) { - qWarning() << "Usage: qmlconf [-i] filename"; - exit(1); - } - - if (args.first() == QLatin1String("-i")) { + if (!args.isEmpty() && args.first() == QLatin1String("-i")) { optionInPlace = true; args.removeFirst(); - goto again; } - const QString fileName = args.first(); + if (args.isEmpty() && optionInPlace) { + qWarning() << "Usage: qmlconf [ [-i] filename ]"; + exit(1); + } + + const QString fileName = args.isEmpty() ? QString("-") : args.first(); QFile file(fileName); - if (! file.open(QIODevice::ReadOnly)) { - qWarning() << "qmlconv: no input file"; - exit(1); + if (fileName == "-") { + file.open(0,QIODevice::ReadOnly); + } else { + if (! file.open(QIODevice::ReadOnly)) { + qWarning() << "qmlconv: no input file"; + exit(1); + } } Reader r(&file); -- cgit v0.12 From 0b5f394208d5aaf803e2100f2ffe12bdef44a7e8 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Thu, 30 Apr 2009 17:06:10 +1000 Subject: Item insertion and removal for PathView. Not animated at the moment. --- src/declarative/fx/qfxpathview.cpp | 166 ++++++++++++++++++++++--------------- src/declarative/fx/qfxpathview.h | 2 + 2 files changed, 103 insertions(+), 65 deletions(-) diff --git a/src/declarative/fx/qfxpathview.cpp b/src/declarative/fx/qfxpathview.cpp index c0d3ab2..5c24d86 100644 --- a/src/declarative/fx/qfxpathview.cpp +++ b/src/declarative/fx/qfxpathview.cpp @@ -140,28 +140,6 @@ QFxPathView::~QFxPathView() The model provides a set of data that is used to create the items for the view. For large or dynamic datasets the model is usually provided by a C++ model object. - However, models can also be created directly in XML, for example: - \code - - - - pics/john.png - John - Smith - - - pics/bill.png - Bill - Jones - - - pics/jane.png - Jane - Doe - - - - \endcode */ /*! @@ -180,6 +158,10 @@ QVariant QFxPathView::model() const void QFxPathView::setModel(const QVariant &model) { Q_D(QFxPathView); + if (d->model) { + disconnect(d->model, SIGNAL(itemsInserted(int,int)), this, SLOT(itemsInserted(int,int))); + disconnect(d->model, SIGNAL(itemsRemoved(int,int)), this, SLOT(itemsRemoved(int,int))); + } if (QFxVisualItemModel *m = qvariant_cast(model)) { if (d->ownModel) { delete d->model; @@ -193,6 +175,12 @@ void QFxPathView::setModel(const QVariant &model) } d->model->setModel(model); } + if (d->model) { + connect(d->model, SIGNAL(itemsInserted(int,int)), this, SLOT(itemsInserted(int,int))); + connect(d->model, SIGNAL(itemsRemoved(int,int)), this, SLOT(itemsRemoved(int,int))); + } + d->firstIndex = 0; + d->pathOffset = 0; d->regenerate(); d->fixOffset(); } @@ -425,6 +413,8 @@ QPointF QFxPathViewPrivate::pointNear(const QPointF &point, qreal *nearPercent) void QFxPathView::mousePressEvent(QGraphicsSceneMouseEvent *event) { Q_D(QFxPathView); + if (!d->items.count()) + return; QPointF scenePoint = mapToScene(event->pos()); int idx = 0; for (; idx < d->items.count(); ++idx) { @@ -576,9 +566,6 @@ bool QFxPathView::mouseFilter(QGraphicsSceneMouseEvent *e) void QFxPathViewPrivate::regenerate() { Q_Q(QFxPathView); - if (!model || model->count() <= 0 || !model->delegate() || !path) - return; - for (int i=0; iattachedProperties.remove(p); @@ -586,29 +573,23 @@ void QFxPathViewPrivate::regenerate() } items.clear(); - firstIndex = 0; - pathOffset = 0; + if (!model || model->count() <= 0 || !model->delegate() || !path) + return; - int numItems = (pathItems>=0 ? pathItems : model->count()); - qreal minDiff = 1e9; - int minI = -1; - for (int i=0; iitem(i); + if (firstIndex >= model->count()) + firstIndex = model->count()-1; + if (pathOffset >= model->count()) + pathOffset = model->count()-1; + + int numItems = pathItems >= 0 ? pathItems : model->count(); + for (int i=0; i < numItems && i < model->count(); ++i){ + QFxItem *item = model->item((i + firstIndex) % model->count()); if (!item) return; items.append(item); item->setZ(i); item->setParent(q); - qreal percent = i * (100.0 / (numItems)); - percent /= 100.0; - updateItem(items.last(), percent); - qreal diff = qAbs(percent - snapPos); - if (diff < minDiff){ - minDiff = diff; - minI = i; - } } - q->setCurrentIndex(minI); q->refill(); } @@ -639,10 +620,9 @@ void QFxPathView::refill() positions << qAbs(percent/100.0); } - if (d->pathItems==-1){ - for (int i=0; ipathItems==-1) { + for (int i=0; iupdateItem(d->items.at(i), positions[i]); - } return; } @@ -650,54 +630,110 @@ void QFxPathView::refill() for (int i=0; iitems.count(); i++) rotatedPositions << positions[(i + d->pathOffset + d->items.count()) % d->items.count()]; - int firstFind = -1; - int i; - for (i=0; iitems.count()-1; i++) - { + int wrapIndex= -1; + for (int i=0; iitems.count()-1; i++) { if (rotatedPositions[i] > rotatedPositions[i+1]){ - firstFind = i; + wrapIndex = i; break; } } - if (firstFind!=-1 ){ + if (wrapIndex != -1 ){ //A wraparound has occured - if (firstFind<(d->items.count()/2)){ - while(firstFind-- >= 0){ + if (wrapIndex < d->items.count()/2){ + while(wrapIndex-- >= 0){ QFxItem* p = d->items.takeFirst(); attachedProperties.remove(p); d->model->release(p); d->firstIndex++; - d->firstIndex%=d->model->count(); + d->firstIndex %= d->model->count(); int index = (d->firstIndex + d->items.count())%d->model->count(); d->items << d->model->item(index); - d->items.last()->setZ(i); + d->items.last()->setZ(wrapIndex); d->items.last()->setParent(this); d->pathOffset++; d->pathOffset=d->pathOffset % d->items.count(); } - }else{ - while(firstFind++ < (d->items.count()-1)){ + } else { + while(wrapIndex++ < d->items.count()-1){ QFxItem* p = d->items.takeLast(); attachedProperties.remove(p); d->model->release(p); d->firstIndex--; - if (d->firstIndex<0) + if (d->firstIndex < 0) d->firstIndex = d->model->count() - 1; d->items.prepend(d->model->item(d->firstIndex)); d->items.first()->setZ(d->firstIndex); d->items.first()->setParent(this); d->pathOffset--; - if (d->pathOffset<0) + if (d->pathOffset < 0) d->pathOffset = d->items.count() - 1; } } for (int i=0; iitems.count(); i++) rotatedPositions[i] = positions[(i + d->pathOffset + d->items.count()) - % d->items.count()]; + % d->items.count()]; } - for (int i=0; iitems.count(); i++){ + for (int i=0; iitems.count(); i++) d->updateItem(d->items.at(i), rotatedPositions[i]); +} + +void QFxPathView::itemsInserted(int modelIndex, int count) +{ + //XXX support animated insertion + Q_D(QFxPathView); + if (d->pathItems == -1 || d->items.count() < d->pathItems) { + for (int i = 0; i < count; ++i) { + QFxItem *item = d->model->item(modelIndex + i); + item->setZ(modelIndex + i); + item->setParent(this); + d->items.insert(modelIndex + i, item); + } + refill(); + } else { + //XXX This is pretty heavy handed until we reference count items. + d->regenerate(); } + + // make sure the current item is still at the snap position + int itemIndex = (d->currentIndex - d->firstIndex + d->model->count())%d->model->count(); + itemIndex += d->pathOffset; + itemIndex %= d->items.count(); + qreal targetOffset = fmod(100 + (d->snapPos*100) - 100.0 * itemIndex / d->items.count(), 100); + + if (targetOffset < 0) + targetOffset = 100.0 + targetOffset; + if (targetOffset != d->_offset) + d->moveOffset.setValue(targetOffset); +} + +void QFxPathView::itemsRemoved(int modelIndex, int count) +{ + //XXX support animated removal + Q_D(QFxPathView); + if (d->pathItems == -1) { + for (int i = 0; i < count; ++i) { + QFxItem* p = d->items.takeAt(modelIndex); + attachedProperties.remove(p); + d->model->release(p); + } + d->snapToCurrent(); + refill(); + } else { + d->regenerate(); + } + + // make sure the current item is still at the snap position + if (d->currentIndex >= d->model->count()) + d->currentIndex = d->model->count() - 1; + int itemIndex = (d->currentIndex - d->firstIndex + d->model->count())%d->model->count(); + itemIndex += d->pathOffset; + itemIndex %= d->items.count(); + qreal targetOffset = fmod(100 + (d->snapPos*100) - 100.0 * itemIndex / d->items.count(), 100); + + if (targetOffset < 0) + targetOffset = 100.0 + targetOffset; + if (targetOffset != d->_offset) + d->moveOffset.setValue(targetOffset); } void QFxPathView::ticked() @@ -715,7 +751,7 @@ int QFxPathViewPrivate::calcCurrentIndex() if (_offset < 0) _offset += 100.0; - if (pathItems == -1){ + if (pathItems == -1) { qreal delta = fmod(_offset - snapPos, 100.0); if (delta < 0) delta = 100.0 + delta; @@ -723,7 +759,7 @@ int QFxPathViewPrivate::calcCurrentIndex() if (ii < 0) ii = 0; current = ii; - }else{ + } else { qreal bestDiff=1e9; int bestI=-1; for (int i=0; icount() <= 0) return; - int itemIndex = (currentIndex - firstIndex + model->count())%model->count(); + int itemIndex = (currentIndex - firstIndex + model->count()) % model->count(); //Rounds is the number of times round to make the current item visible int rounds = itemIndex / items.count(); - int otherWayRounds = (model->count() - (itemIndex))/items.count() + 1; + int otherWayRounds = (model->count() - (itemIndex)) / items.count() + 1; if (otherWayRounds < rounds) rounds = -otherWayRounds; @@ -792,7 +828,7 @@ void QFxPathViewPrivate::snapToCurrent() if (targetOffset < 0) targetOffset = 100.0 + targetOffset; - if (targetOffset == _offset && rounds==0) + if (targetOffset == _offset && rounds == 0) return; moveReason = Other; diff --git a/src/declarative/fx/qfxpathview.h b/src/declarative/fx/qfxpathview.h index 2cc0769..23f2f07 100644 --- a/src/declarative/fx/qfxpathview.h +++ b/src/declarative/fx/qfxpathview.h @@ -113,6 +113,8 @@ protected: private Q_SLOTS: void refill(); void ticked(); + void itemsInserted(int index, int count); + void itemsRemoved(int index, int count); protected: QFxPathView(QFxPathViewPrivate &dd, QFxItem *parent); -- cgit v0.12 From c50f26a26f1e7ac22bd3ff08fe24a927c57e127b Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Thu, 30 Apr 2009 17:07:55 +1000 Subject: Doc. --- src/declarative/fx/qfxlistview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/declarative/fx/qfxlistview.cpp b/src/declarative/fx/qfxlistview.cpp index 13e5b21..4a626f5 100644 --- a/src/declarative/fx/qfxlistview.cpp +++ b/src/declarative/fx/qfxlistview.cpp @@ -837,7 +837,7 @@ QFxListView::~QFxListView() The model provides a set of data that is used to create the items for the view. For large or dynamic datasets the model is usually provided by a C++ model object. - The C++ model object must be a \l QListModelInterface subclass, a \l VisualModel, + The C++ model object must be a \l QAbstractItemModel subclass, a \l VisualModel, or a simple list. Models can also be created directly in XML, using the \l ListModel element. -- cgit v0.12 From 6d217e8b3ba881eb02d09e225305ccd0329598e9 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Thu, 30 Apr 2009 17:19:23 +1000 Subject: Join some lines in example code. --- examples/declarative/follow/follow.qml | 66 ++++++--------------- examples/declarative/follow/pong.qml | 102 ++++++--------------------------- 2 files changed, 36 insertions(+), 132 deletions(-) diff --git a/examples/declarative/follow/follow.qml b/examples/declarative/follow/follow.qml index 598d953..5368e75 100644 --- a/examples/declarative/follow/follow.qml +++ b/examples/declarative/follow/follow.qml @@ -1,78 +1,46 @@ Rect { - width: 320 - height: 240 color: "#ffffff" + width: 320; height: 240 Rect { id: Rect - y: 200 color: "#00ff00" - width: 60 - height: 20 + y: 200; width: 60; height: 20 y: SequentialAnimation { - running: true - repeat: true + running: true; repeat: true NumericAnimation { - to: 200 + to: 200; duration: 2000 easing: "easeOutBounce(amplitude:180)" - duration: 2000 - } - PauseAnimation { - duration: 1000 } + PauseAnimation { duration: 1000 } } } + // Velocity Rect { - x: Rect.width color: "#ff0000" - width: Rect.width - height: 20 - y: Follow { - source: Rect.y - velocity: 200 - } - } - Text { - x: Rect.width - y: 220 - text: "Velocity" + x: Rect.width; width: Rect.width; height: 20 + y: Follow { source: Rect.y; velocity: 200 } } + Text { x: Rect.width; y: 220; text: "Velocity" } + // Spring Rect { - x: Rect.width * 2 color: "#ff0000" - width: Rect.width - height: 20 - y: Follow { - source: Rect.y - spring: 1.2 - damping: 0.1 - } - } - Text { - x: Rect.width * 2 - y: 220 - text: "Spring" + x: Rect.width * 2; width: Rect.width; height: 20 + y: Follow { source: Rect.y; spring: 1.2; damping: 0.1 } } + Text { x: Rect.width * 2; y: 220; text: "Spring" } + // Follow mouse MouseRegion { id: Mouse anchors.fill: parent Rect { - width: 20 - height: 20 + width: 20; height: 20 radius: 10 color: "#0000ff" - x: Follow { - source: Mouse.mouseX-10 - spring: 1.0 - damping: 0.05 - } - y: Follow { - source: Mouse.mouseY-10 - spring: 1.0 - damping: 0.05 - } + x: Follow { source: Mouse.mouseX-10; spring: 1.0; damping: 0.05 } + y: Follow { source: Mouse.mouseY-10; spring: 1.0; damping: 0.05 } } } } diff --git a/examples/declarative/follow/pong.qml b/examples/declarative/follow/pong.qml index b6695bd..32ee049 100644 --- a/examples/declarative/follow/pong.qml +++ b/examples/declarative/follow/pong.qml @@ -1,57 +1,29 @@ Rect { id: Page - width: 640 - height: 480 + width: 640; height: 480 color: "#000000" // Make a ball to bounce Rect { id: Ball - x: 20 - width: 20 - height: 20 color: "#00ee00" - z: 1 + x: 20; width: 20; height: 20; z: 1 // Add a property for the target y coordinate - properties: Property { - name: "targetY" - value: Page.height-10 - } - properties: Property { - name: "direction" - value: "right" - } + properties: Property { name: "targetY"; value: Page.height-10 } + properties: Property { name: "direction"; value: "right" } // Move the ball to the right and back to the left repeatedly x: SequentialAnimation { - running: true - repeat: true - NumericAnimation { - to: Page.width-40 - duration: 2000 - } - SetPropertyAction { - target: Ball - property: "direction" - value: "left" - } - NumericAnimation { - to: 20 - duration: 2000 - } - SetPropertyAction { - target: Ball - property: "direction" - value: "right" - } + running: true; repeat: true + NumericAnimation { to: Page.width-40; duration: 2000 } + SetPropertyAction { target: Ball; property: "direction"; value: "left" } + NumericAnimation { to: 20; duration: 2000 } + SetPropertyAction { target: Ball; property: "direction"; value: "right" } } // Make y follow the target y coordinate, with a velocity of 200 - y: Follow { - source: Ball.targetY - velocity: 200 - } + y: Follow { source: Ball.targetY; velocity: 200 } // Detect the ball hitting the top or bottom of the view and bounce it onTopChanged: { @@ -67,65 +39,29 @@ Rect { Rect { id: LeftBat color: "#00ee00" - x: 2 - width: 20 - height: 90 + x: 2; width: 20; height: 90 y: Follow { - source: Ball.y-45 - velocity: 300 + source: Ball.y-45; velocity: 300 enabled: Ball.direction == 'left' } } Rect { id: RightBat - x: Page.width-22 color: "#00ee00" - width: 20 - height: 90 + x: Page.width-22; width: 20; height: 90 y: Follow { - source: Ball.y-45 - velocity: 300 + source: Ball.y-45; velocity: 300 enabled: Ball.direction == 'right' } } // The rest, to make it look realistic, if neither ever scores... - Rect { - color: "#00ee00" - x: 320-80 - y: 0 - width: 40 - height: 60 - } - Rect { - color: "#000000" - x: 320-70 - y: 10 - width: 20 - height: 40 - } - Rect { - color: "#00ee00" - x: 320+40 - y: 0 - width: 40 - height: 60 - } - Rect { - color: "#000000" - x: 320+50 - y: 10 - width: 20 - height: 40 - } + Rect { color: "#00ee00"; x: 320-80; y: 0; width: 40; height: 60 } + Rect { color: "#000000"; x: 320-70; y: 10; width: 20; height: 40 } + Rect { color: "#00ee00"; x: 320+40; y: 0; width: 40; height: 60 } + Rect { color: "#000000"; x: 320+50; y: 10; width: 20; height: 40 } Repeater { dataSource: 24 - Rect { - color: "#00ee00" - x: 320-5 - y: index*20 - width: 10 - height: 10 - } + Rect { color: "#00ee00"; x: 320-5; y: index*20; width: 10; height: 10 } } } -- cgit v0.12 From 0ce47e44c2c2259ebe2c8167766d91de082a3531 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Thu, 30 Apr 2009 18:33:31 +1000 Subject: Accept "return" and reserved words as property names --- src/declarative/fx/qfxkeyactions.h | 2 +- src/declarative/qml/parser/javascript.g | 14 + src/declarative/qml/parser/javascriptgrammar.cpp | 1181 +++++++++++----------- src/declarative/qml/parser/javascriptgrammar_p.h | 64 +- src/declarative/qml/parser/javascriptparser.cpp | 365 +++---- src/declarative/qml/parser/javascriptparser_p.h | 4 +- 6 files changed, 880 insertions(+), 750 deletions(-) diff --git a/src/declarative/fx/qfxkeyactions.h b/src/declarative/fx/qfxkeyactions.h index b0d002d..7ad323a 100644 --- a/src/declarative/fx/qfxkeyactions.h +++ b/src/declarative/fx/qfxkeyactions.h @@ -101,7 +101,7 @@ class Q_DECLARATIVE_EXPORT QFxKeyActions : public QFxItem Q_PROPERTY(QString digit9 READ key_9 WRITE setKey_9) Q_PROPERTY(QString asterisk READ key_Asterisk WRITE setKey_Asterisk) Q_PROPERTY(QString escape READ key_Escape WRITE setKey_Escape) - Q_PROPERTY(QString keyReturn READ key_Return WRITE setKey_Return) + Q_PROPERTY(QString return READ key_Return WRITE setKey_Return) Q_PROPERTY(QString enter READ key_Enter WRITE setKey_Enter) Q_PROPERTY(QString delete READ key_Delete WRITE setKey_Delete) Q_PROPERTY(QString space READ key_Space WRITE setKey_Space) diff --git a/src/declarative/qml/parser/javascript.g b/src/declarative/qml/parser/javascript.g index f9a2165..cc72737 100644 --- a/src/declarative/qml/parser/javascript.g +++ b/src/declarative/qml/parser/javascript.g @@ -687,6 +687,20 @@ case $rule_number: { } break; ./ +UiQualifiedId: T_RESERVED_WORD ; +/. +case $rule_number: +./ +UiQualifiedId: T_RETURN ; +/. +case $rule_number: +{ + AST::UiQualifiedId *node = makeAstNode (driver->nodePool(), driver->intern(lexer->characterBuffer(), lexer->characterCount())); + node->identifierToken = loc(1); + sym(1).Node = node; +} break; +./ + UiQualifiedId: T_IDENTIFIER ; /. case $rule_number: { diff --git a/src/declarative/qml/parser/javascriptgrammar.cpp b/src/declarative/qml/parser/javascriptgrammar.cpp index 13c3fad..0d2a215 100644 --- a/src/declarative/qml/parser/javascriptgrammar.cpp +++ b/src/declarative/qml/parser/javascriptgrammar.cpp @@ -1,4 +1,45 @@ // This file was generated by qlalr - DO NOT EDIT! +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include "javascriptgrammar_p.h" const char *const JavaScriptGrammar::spell [] = { @@ -16,509 +57,552 @@ const int JavaScriptGrammar::lhs [] = { 88, 89, 89, 92, 92, 93, 93, 91, 90, 90, 95, 95, 97, 97, 96, 94, 96, 94, 96, 94, 96, 94, 94, 94, 94, 94, 94, 94, 98, 98, - 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, - 103, 103, 103, 103, 103, 105, 105, 109, 109, 104, - 104, 107, 107, 110, 110, 110, 110, 111, 111, 111, + 98, 98, 103, 103, 103, 103, 103, 103, 103, 103, + 103, 103, 103, 103, 103, 103, 103, 105, 105, 109, + 109, 104, 104, 107, 107, 110, 110, 110, 110, 111, + 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, - 111, 111, 111, 111, 111, 111, 111, 111, 112, 112, - 113, 113, 113, 113, 113, 116, 116, 117, 117, 117, - 117, 115, 115, 118, 118, 119, 119, 120, 120, 120, - 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, - 122, 122, 122, 122, 123, 123, 123, 124, 124, 124, - 124, 125, 125, 125, 125, 125, 125, 125, 126, 126, - 126, 126, 126, 126, 127, 127, 127, 127, 127, 128, - 128, 128, 128, 128, 129, 129, 130, 130, 131, 131, - 132, 132, 133, 133, 134, 134, 135, 135, 136, 136, - 137, 137, 138, 138, 139, 139, 140, 140, 108, 108, - 141, 141, 142, 142, 142, 142, 142, 142, 142, 142, - 142, 142, 142, 142, 100, 100, 143, 143, 144, 144, - 145, 145, 99, 99, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 146, 161, 161, - 160, 160, 102, 102, 162, 162, 163, 163, 165, 165, - 164, 166, 169, 167, 167, 170, 168, 168, 147, 148, - 148, 149, 149, 150, 150, 150, 150, 150, 150, 150, - 151, 151, 151, 151, 152, 152, 152, 152, 153, 153, - 154, 156, 171, 171, 174, 174, 172, 172, 175, 173, - 155, 157, 157, 158, 158, 158, 176, 177, 159, 159, - 101, 114, 181, 181, 178, 178, 179, 179, 182, 183, - 183, 184, 184, 180, 180, 106, 106, 185}; + 112, 112, 113, 113, 113, 113, 113, 116, 116, 117, + 117, 117, 117, 115, 115, 118, 118, 119, 119, 120, + 120, 120, 121, 121, 121, 121, 121, 121, 121, 121, + 121, 121, 122, 122, 122, 122, 123, 123, 123, 124, + 124, 124, 124, 125, 125, 125, 125, 125, 125, 125, + 126, 126, 126, 126, 126, 126, 127, 127, 127, 127, + 127, 128, 128, 128, 128, 128, 129, 129, 130, 130, + 131, 131, 132, 132, 133, 133, 134, 134, 135, 135, + 136, 136, 137, 137, 138, 138, 139, 139, 140, 140, + 108, 108, 141, 141, 142, 142, 142, 142, 142, 142, + 142, 142, 142, 142, 142, 142, 100, 100, 143, 143, + 144, 144, 145, 145, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 146, + 161, 161, 160, 160, 102, 102, 162, 162, 163, 163, + 165, 165, 164, 166, 169, 167, 167, 170, 168, 168, + 147, 148, 148, 149, 149, 150, 150, 150, 150, 150, + 150, 150, 151, 151, 151, 151, 152, 152, 152, 152, + 153, 153, 154, 156, 171, 171, 174, 174, 172, 172, + 175, 173, 155, 157, 157, 158, 158, 158, 176, 177, + 159, 159, 101, 114, 181, 181, 178, 178, 179, 179, + 182, 183, 183, 184, 184, 180, 180, 106, 106, 185}; const int JavaScriptGrammar:: rhs[] = { 2, 1, 1, 1, 2, 3, 3, 0, 1, 2, 1, 3, 2, 3, 4, 4, 2, 2, 5, 5, - 3, 3, 3, 4, 5, 6, 1, 1, 1, 3, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, - 3, 5, 3, 4, 3, 2, 4, 1, 2, 0, - 1, 3, 5, 1, 1, 1, 1, 1, 1, 1, + 3, 3, 3, 4, 5, 6, 1, 1, 1, 1, + 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 3, 3, 5, 3, 4, 3, 2, 4, 1, + 2, 0, 1, 3, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 4, 3, 5, 1, 2, 4, 4, 4, - 3, 0, 1, 1, 3, 1, 1, 1, 2, 2, - 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 1, 3, 3, 3, 1, 3, 3, 1, 3, 3, - 3, 1, 3, 3, 3, 3, 3, 3, 1, 3, - 3, 3, 3, 3, 1, 3, 3, 3, 3, 1, - 3, 3, 3, 3, 1, 3, 1, 3, 1, 3, + 1, 1, 1, 1, 4, 3, 5, 1, 2, 4, + 4, 4, 3, 0, 1, 1, 3, 1, 1, 1, + 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 1, 3, 3, 3, 1, 3, 3, 1, + 3, 3, 3, 1, 3, 3, 3, 3, 3, 3, + 1, 3, 3, 3, 3, 3, 1, 3, 3, 3, + 3, 1, 3, 3, 3, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, - 1, 3, 1, 3, 1, 5, 1, 5, 1, 3, - 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 3, 0, 1, 1, 3, - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 3, 1, 2, - 0, 1, 3, 3, 1, 1, 1, 3, 1, 3, - 2, 2, 2, 0, 1, 2, 0, 1, 1, 2, - 2, 7, 5, 7, 7, 5, 9, 10, 7, 8, - 2, 2, 3, 3, 2, 2, 3, 3, 3, 3, - 5, 5, 3, 5, 1, 2, 0, 1, 4, 3, - 3, 3, 3, 3, 3, 4, 5, 2, 2, 2, - 8, 8, 1, 3, 0, 1, 0, 1, 1, 1, - 2, 1, 1, 0, 1, 0, 1, 2}; + 1, 3, 1, 3, 1, 3, 1, 5, 1, 5, + 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 3, 0, 1, + 1, 3, 0, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, + 1, 2, 0, 1, 3, 3, 1, 1, 1, 3, + 1, 3, 2, 2, 2, 0, 1, 2, 0, 1, + 1, 2, 2, 7, 5, 7, 7, 5, 9, 10, + 7, 8, 2, 2, 3, 3, 2, 2, 3, 3, + 3, 3, 5, 5, 3, 5, 1, 2, 0, 1, + 4, 3, 3, 3, 3, 3, 3, 4, 5, 2, + 2, 2, 8, 8, 1, 3, 0, 1, 0, 1, + 1, 1, 2, 1, 1, 0, 1, 0, 1, 2}; const int JavaScriptGrammar::action_default [] = { 8, 2, 0, 4, 3, 0, 0, 0, 6, 7, - 5, 27, 225, 0, 29, 0, 226, 9, 1, 0, - 0, 28, 0, 285, 286, 0, 283, 0, 284, 0, - 287, 128, 195, 159, 167, 163, 203, 210, 107, 179, - 209, 217, 205, 155, 0, 206, 288, 0, 293, 92, - 207, 208, 213, 108, 171, 175, 96, 125, 106, 111, - 91, 145, 211, 132, 290, 289, 292, 214, 0, 0, - 0, 0, 38, 39, 0, 35, 0, 294, 32, 0, - 296, 50, 0, 0, 0, 0, 0, 33, 36, 0, - 0, 197, 239, 37, 0, 31, 0, 0, 34, 0, - 0, 0, 0, 0, 215, 216, 121, 204, 212, 0, - 0, 108, 127, 294, 32, 296, 110, 109, 0, 0, - 0, 123, 124, 122, 0, 295, 285, 0, 0, 287, - 0, 282, 0, 297, 0, 57, 58, 59, 60, 85, - 61, 86, 62, 63, 64, 65, 66, 67, 68, 69, - 54, 70, 71, 72, 73, 74, 56, 87, 75, 55, - 76, 77, 78, 79, 80, 81, 82, 83, 84, 88, - 0, 52, 0, 0, 44, 0, 53, 43, 126, 0, - 156, 0, 0, 0, 0, 146, 0, 0, 0, 0, - 0, 0, 136, 0, 0, 0, 130, 131, 129, 134, - 138, 137, 135, 133, 148, 147, 149, 0, 164, 0, - 160, 0, 0, 102, 101, 90, 89, 0, 0, 100, - 196, 103, 0, 104, 0, 105, 99, 240, 241, 281, - 0, 192, 185, 183, 190, 191, 189, 188, 194, 187, - 186, 184, 193, 180, 0, 168, 0, 0, 172, 0, - 0, 176, 0, 0, 102, 94, 0, 93, 0, 98, - 291, 255, 0, 256, 257, 258, 251, 0, 252, 253, - 254, 279, 280, 112, 0, 0, 0, 0, 0, 244, - 245, 201, 199, 161, 169, 165, 181, 157, 202, 0, - 108, 173, 177, 150, 139, 0, 0, 158, 0, 0, - 0, 0, 151, 0, 0, 0, 0, 0, 143, 141, - 144, 142, 140, 153, 152, 154, 0, 166, 0, 162, - 0, 200, 108, 0, 182, 197, 198, 0, 197, 0, - 0, 247, 0, 0, 0, 249, 0, 170, 0, 0, - 174, 0, 0, 178, 237, 0, 229, 238, 232, 0, - 236, 0, 197, 230, 0, 197, 0, 0, 248, 0, - 0, 0, 250, 295, 0, 271, 0, 0, 0, 243, - 0, 242, 219, 222, 0, 58, 85, 61, 86, 63, - 64, 35, 68, 69, 32, 70, 73, 33, 36, 197, - 37, 76, 31, 78, 34, 80, 81, 82, 83, 84, - 88, 220, 218, 96, 97, 102, 0, 95, 0, 259, - 260, 0, 0, 0, 262, 267, 265, 268, 0, 0, - 266, 267, 0, 263, 0, 264, 221, 270, 0, 221, - 269, 0, 272, 273, 0, 221, 274, 275, 0, 0, - 276, 0, 0, 0, 277, 278, 114, 113, 0, 0, - 0, 246, 0, 0, 0, 261, 0, 51, 0, 48, - 50, 41, 0, 47, 42, 49, 46, 40, 0, 45, - 118, 116, 120, 117, 115, 119, 0, 18, 13, 0, - 14, 10, 0, 0, 0, 24, 0, 26, 23, 0, - 25, 0, 0, 22, 32, 50, 16, 29, 0, 11, - 0, 17, 0, 20, 12, 0, 21, 32, 50, 15, - 0, 19, 30, 234, 227, 0, 235, 231, 0, 233, - 223, 0, 224, 228, 298}; + 5, 27, 227, 0, 31, 0, 29, 30, 228, 9, + 1, 0, 0, 28, 0, 287, 288, 0, 285, 0, + 286, 0, 289, 130, 197, 161, 169, 165, 205, 212, + 109, 181, 211, 219, 207, 157, 0, 208, 290, 0, + 295, 94, 209, 210, 215, 110, 173, 177, 98, 127, + 108, 113, 93, 147, 213, 134, 292, 291, 294, 216, + 0, 0, 0, 0, 40, 41, 0, 37, 0, 296, + 34, 0, 298, 52, 0, 0, 0, 0, 0, 35, + 38, 0, 0, 199, 241, 39, 0, 33, 0, 0, + 36, 0, 0, 0, 0, 0, 217, 218, 123, 206, + 214, 0, 0, 110, 129, 296, 34, 298, 112, 111, + 0, 0, 0, 125, 126, 124, 0, 297, 287, 0, + 0, 289, 0, 284, 0, 299, 0, 59, 60, 61, + 62, 87, 63, 88, 64, 65, 66, 67, 68, 69, + 70, 71, 56, 72, 73, 74, 75, 76, 58, 89, + 77, 57, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 90, 0, 54, 0, 0, 46, 0, 55, 45, + 128, 0, 158, 0, 0, 0, 0, 148, 0, 0, + 0, 0, 0, 0, 138, 0, 0, 0, 132, 133, + 131, 136, 140, 139, 137, 135, 150, 149, 151, 0, + 166, 0, 162, 0, 0, 104, 103, 92, 91, 0, + 0, 102, 198, 105, 0, 106, 0, 107, 101, 242, + 243, 283, 0, 194, 187, 185, 192, 193, 191, 190, + 196, 189, 188, 186, 195, 182, 0, 170, 0, 0, + 174, 0, 0, 178, 0, 0, 104, 96, 0, 95, + 0, 100, 293, 257, 0, 258, 259, 260, 253, 0, + 254, 255, 256, 281, 282, 114, 0, 0, 0, 0, + 0, 246, 247, 203, 201, 163, 171, 167, 183, 159, + 204, 0, 110, 175, 179, 152, 141, 0, 0, 160, + 0, 0, 0, 0, 153, 0, 0, 0, 0, 0, + 145, 143, 146, 144, 142, 155, 154, 156, 0, 168, + 0, 164, 0, 202, 110, 0, 184, 199, 200, 0, + 199, 0, 0, 249, 0, 0, 0, 251, 0, 172, + 0, 0, 176, 0, 0, 180, 239, 0, 231, 240, + 234, 0, 238, 0, 199, 232, 0, 199, 0, 0, + 250, 0, 0, 0, 252, 297, 0, 273, 0, 0, + 0, 245, 0, 244, 221, 224, 0, 60, 87, 63, + 88, 65, 66, 37, 70, 71, 34, 72, 75, 35, + 38, 199, 39, 78, 33, 80, 36, 82, 83, 84, + 85, 86, 90, 222, 220, 98, 99, 104, 0, 97, + 0, 261, 262, 0, 0, 0, 264, 269, 267, 270, + 0, 0, 268, 269, 0, 265, 0, 266, 223, 272, + 0, 223, 271, 0, 274, 275, 0, 223, 276, 277, + 0, 0, 278, 0, 0, 0, 279, 280, 116, 115, + 0, 0, 0, 248, 0, 0, 0, 263, 0, 53, + 0, 50, 52, 43, 0, 49, 44, 51, 48, 42, + 0, 47, 120, 118, 122, 119, 117, 121, 0, 18, + 13, 0, 14, 10, 0, 0, 0, 24, 0, 26, + 23, 0, 25, 0, 0, 22, 34, 52, 16, 31, + 0, 11, 0, 17, 0, 20, 12, 0, 21, 34, + 52, 15, 0, 19, 32, 236, 229, 0, 237, 233, + 0, 235, 225, 0, 226, 230, 300}; const int JavaScriptGrammar::goto_default [] = { - 6, 5, 18, 1, 4, 3, 17, 498, 499, 477, - 19, 372, 44, 11, 107, 60, 458, 456, 134, 133, - 32, 457, 132, 135, 214, 56, 49, 222, 58, 38, - 221, 53, 59, 106, 57, 31, 63, 61, 293, 43, - 287, 33, 283, 35, 285, 34, 284, 54, 291, 55, - 292, 39, 286, 282, 323, 408, 288, 289, 36, 42, - 45, 50, 51, 40, 37, 62, 108, 52, 67, 104, - 105, 41, 374, 373, 20, 515, 514, 345, 346, 517, - 348, 516, 347, 414, 418, 421, 417, 416, 436, 437, - 25, 47, 124, 24, 46, 65, 64, 0}; + 6, 5, 20, 1, 4, 3, 19, 500, 501, 479, + 21, 374, 46, 11, 109, 62, 460, 458, 136, 135, + 34, 459, 134, 137, 216, 58, 51, 224, 60, 40, + 223, 55, 61, 108, 59, 33, 65, 63, 295, 45, + 289, 35, 285, 37, 287, 36, 286, 56, 293, 57, + 294, 41, 288, 284, 325, 410, 290, 291, 38, 44, + 47, 52, 53, 42, 39, 64, 110, 54, 69, 106, + 107, 43, 376, 375, 22, 517, 516, 347, 348, 519, + 350, 518, 349, 416, 420, 423, 419, 418, 438, 439, + 27, 49, 126, 26, 48, 67, 66, 0}; const int JavaScriptGrammar::action_index [] = { - -18, -88, 35, -88, 13, 262, 83, 118, -88, -88, - -88, -88, -88, 76, 71, 162, -88, -88, 249, 125, - 46, -88, 42, 41, 58, 17, -88, 52, -88, 54, - 1419, 126, -88, 156, 31, 10, -88, -88, 228, -88, - -88, -88, -88, 201, 199, -88, -88, 55, -88, -88, - -88, -88, -88, 408, 72, 79, 203, 188, -88, -88, - -88, 365, -88, 300, -88, 1419, -88, -88, 197, 204, - 80, 603, -88, -88, 1335, -88, 48, 33, 61, 37, - 1587, 64, 603, 603, 603, 441, 603, -88, -88, 603, - 603, 603, -88, -88, 44, -88, 603, 603, -88, 36, - 603, 603, 73, 59, -88, -88, -88, -88, -88, 603, - 603, 78, 185, 62, -88, 1083, -88, -88, 603, 603, - 603, -88, -88, -88, 65, -88, 74, 32, 60, 1419, - 57, -88, 81, 77, 75, -88, -88, -88, -88, -88, + 20, -88, 13, -88, -14, 289, 57, 97, -88, -88, + -88, -88, -88, 64, 70, 118, -88, -88, -88, -88, + 247, 160, 11, -88, 7, 24, 37, -9, -88, 0, + -88, -10, 1383, 126, -88, 86, -16, -39, -88, -88, + 214, -88, -88, -88, -88, 235, 161, -88, -88, 15, + -88, -88, -88, -88, -88, 574, 77, 62, 215, 195, + -88, -88, -88, 312, -88, 274, -88, 1383, -88, -88, + 150, 141, 79, 651, -88, -88, 1299, -88, -21, -8, + -4, -36, 1635, 78, 651, 651, 651, 418, 651, -88, + -88, 651, 651, 651, -88, -88, 65, -88, 651, 651, + -88, 29, 651, 651, 47, 33, -88, -88, -88, -88, + -88, 651, 651, 109, 181, 21, -88, 1131, -88, -88, + 651, 651, 651, -88, -88, -88, -28, -88, 24, -27, + -6, 1383, -17, -88, 3, 5, 35, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, - 603, -88, 1167, 56, -88, 603, -88, -88, 166, 603, - 235, 603, 603, 603, 603, 365, 603, 603, 603, 603, - 603, 603, 163, 603, 603, 603, 94, 96, 84, 300, - 300, 300, 300, 190, 365, 365, 365, 603, 10, 603, - 156, 999, 603, 603, -88, -88, -88, 131, 603, -88, - -88, 68, 30, -88, 603, -88, -88, -88, -88, -88, - 603, -88, -88, -88, -88, -88, -88, -88, -88, -88, - -88, -88, -88, -88, 603, 34, 603, 603, 63, 82, - 603, -88, 999, 603, 603, -88, 148, -88, 67, -88, - -88, -88, 124, -88, -88, -88, -88, 120, -88, -88, - -88, -88, -88, -88, 70, 66, 603, 111, 122, -88, - -88, 757, -88, 21, -24, -53, -88, 222, 5, -51, - 526, 69, 108, 266, 300, -17, 603, 251, 603, 603, - 603, 603, 250, 603, 603, 603, 603, 603, 211, 168, - 187, 167, 171, 276, 291, 270, 603, -76, 603, 1, - 603, -88, 352, 603, -88, 603, -1, -8, 603, 4, - 1335, -88, 603, 114, 1335, -88, 603, -20, 603, 603, - 69, 24, 603, -88, 18, 89, 9, -88, -88, 603, - -88, 15, 603, -88, -19, 603, -21, 1335, -88, 603, - 86, 1335, -88, 2, 1335, -88, 603, 88, 1335, 27, - 1335, -88, -88, 1335, -22, 173, 3, 170, 92, 603, - 1335, 49, 19, 85, 53, 25, 441, 47, 38, 915, - 39, 11, 43, 603, 45, -6, 603, 0, 603, -32, - -27, -88, -88, 174, -88, 603, -43, -88, 90, -88, - -88, 603, 100, -25, -88, 6, -88, 20, 106, 603, - -88, 14, 7, -88, -39, -88, 1335, -88, 99, 1335, - -88, 160, -88, -88, 93, 1335, -2, -88, -15, -13, - -88, -23, -57, -28, -88, -88, -88, -88, 603, 110, - 1335, -88, 603, 109, 1335, -88, 103, 50, 834, -88, - 40, -88, 680, -88, -88, -88, -88, -88, 107, -88, - -88, -88, -88, -88, -88, -88, 287, -88, -88, 295, - -88, -88, 12, 8, -3, 23, 603, 26, 29, 603, - 51, 1503, 28, -88, 130, 147, -88, 16, 117, -88, - 237, -88, 22, -88, -88, 1251, -88, 116, 135, -88, - 157, -88, -88, -16, -88, 195, -88, -88, 603, -88, - -88, -14, -88, -88, -88, + -88, -88, 651, -88, 1215, 10, -88, 651, -88, -88, + 176, 651, 244, 651, 651, 651, 651, 404, 651, 651, + 651, 651, 651, 651, 157, 651, 651, 651, 104, 103, + 106, 189, 190, 172, 193, 274, 292, 322, 302, 651, + 4, 651, 81, 1047, 651, 651, -88, -88, -88, 142, + 651, -88, -88, 48, -5, -88, 651, -88, -88, -88, + -88, -88, 651, -88, -88, -88, -88, -88, -88, -88, + -88, -88, -88, -88, -88, -88, 651, 59, 651, 651, + 98, 89, 651, -88, 1047, 651, 651, -88, 145, -88, + 38, -88, -88, -88, 72, -88, -88, -88, -88, 74, + -88, -88, -88, -88, -88, -88, -65, -22, 651, 121, + 87, -88, -88, 805, -88, 19, -20, -57, -88, 242, + -3, -59, 526, 50, 73, 339, 274, -25, 651, 246, + 651, 651, 651, 651, 339, 651, 651, 651, 651, 651, + 274, 274, 274, 167, 162, 339, 339, 270, 651, -46, + 651, 23, 651, -88, 489, 651, -88, 651, 27, -19, + 651, -29, 1299, -88, 651, 116, 1299, -88, 651, -12, + 651, 651, 50, 18, 651, -88, 22, 102, 16, -88, + -88, 651, -88, 25, 651, -88, -15, 651, -11, 1299, + -88, 651, 211, 1299, -88, -24, 1299, -88, 651, 111, + 1299, 28, 1299, -88, -88, 1299, 39, 205, 63, 184, + 69, 651, 1299, 88, 49, 84, 99, 66, 444, 90, + 92, 963, 51, 32, 53, 651, 131, 31, 651, 30, + 651, 36, 40, -88, -88, 206, -88, 651, 17, -88, + 56, -88, -88, 651, 100, 42, -88, 61, -88, 68, + 154, 651, -88, 60, 67, -88, 12, -88, 1299, -88, + 107, 1299, -88, 175, -88, -88, 105, 1299, -2, -88, + -35, -26, -88, -23, -34, 8, -88, -88, -88, -88, + 651, 113, 1299, -88, 651, 101, 1299, -88, 148, 14, + 728, -88, 26, -88, 882, -88, -88, -88, -88, -88, + 114, -88, -88, -88, -88, -88, -88, -88, 329, -88, + -88, 361, -88, -88, -13, -18, 34, 41, 651, 83, + 82, 651, 80, 1467, 55, -88, 119, 239, -88, 71, + 124, -88, 130, -88, 149, -88, -88, 1551, -88, 132, + 227, -88, 134, -88, -88, 44, -88, 164, -88, -88, + 651, -88, -88, 52, -88, -88, -88, - -98, -98, -98, -98, 2, -10, -98, -98, -98, -98, - -98, -98, -98, -98, -98, -98, -98, -98, 50, -98, + -98, -98, -98, -98, -2, -7, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, - 57, -98, -98, -98, -98, -98, -98, -98, -98, -98, + 184, -98, -98, -98, -98, -98, -98, -98, -98, -98, + -98, -98, 164, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, - -98, -98, -98, -36, -98, -98, -98, -98, -98, -98, - -98, -98, -98, -98, -98, 191, -98, -98, -98, -98, - -98, 68, -98, -98, 67, -98, -98, -98, -98, -98, - -98, -98, 41, 114, 150, 232, 153, -98, -98, 146, - 149, 47, -98, -98, -98, -98, 25, 89, -98, -29, - 85, 80, -98, -98, -98, -98, -98, -98, -98, 103, - 108, -98, -98, -98, -98, -98, -98, -98, 105, 100, - 96, -98, -98, -98, -98, -98, -68, -98, -98, 176, + -98, -98, -98, -98, -98, -32, -98, -98, -98, -98, + -98, -98, -98, -98, -98, -98, -98, 181, -98, -98, + -98, -98, -98, 105, -98, -98, -5, -98, -98, -98, + -98, -98, -98, -98, 51, 79, 84, 44, 91, -98, + -98, 42, 55, 52, -98, -98, -98, -98, 45, 110, + -98, -12, 125, 128, -98, -98, -98, -98, -98, -98, + -98, 131, 132, -98, -98, -98, -98, -98, -98, -98, + 111, 120, 116, -98, -98, -98, -98, -98, -63, -98, + -98, 182, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, + -98, -98, 35, -98, 25, -98, -98, 39, -98, -98, + -98, 56, -98, 59, 61, 62, 60, -98, 46, 43, + 47, 49, 53, 95, -98, 97, 83, 72, -98, -98, + -98, -98, -98, -98, -98, -98, -98, -98, -98, 70, + -98, 80, -98, 17, 33, 15, -98, -98, -98, -98, + 10, -98, -98, -98, -98, -98, 30, -98, -98, -98, + -98, -98, 34, -98, -98, -98, -98, -98, -98, -98, + -98, -98, -98, -98, -98, -98, 63, -98, 88, 36, + -98, -98, 38, -98, 82, 37, 89, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, - -12, -98, -13, -98, -98, 7, -98, -98, -98, 118, - -98, 117, 119, 141, 121, -98, 128, 130, 124, 140, - 83, 51, -98, 48, 62, 55, -98, -98, -98, -98, - -98, -98, -98, -98, -98, -98, -98, 60, -98, 54, - -98, 31, 37, 43, -98, -98, -98, -98, 22, -98, - -98, -98, -98, -98, 42, -98, -98, -98, -98, -98, - 45, -98, -98, -98, -98, -98, -98, -98, -98, -98, - -98, -98, -98, -98, 61, -98, 58, -20, -98, -98, - -7, -98, 52, 4, 53, -98, -98, -98, -98, -98, - -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, - -98, -98, -98, -98, -98, -98, 9, -98, -98, -98, - -98, 138, -98, -98, -98, -98, -98, -98, -98, -98, - -98, -98, -98, -98, -98, -98, 194, -98, 167, 170, - 180, 186, -98, 73, 76, 90, 92, 99, -98, -98, - -98, -98, -98, -98, -98, -98, 196, -98, 184, -98, - 161, -98, -98, 160, -98, 112, -98, -98, 120, -98, - 6, -98, 12, -98, 17, -98, 163, -98, 164, 157, - -98, -98, 154, -98, -98, -98, -98, -98, -98, 192, - -98, -28, 113, -98, -98, 86, -98, 49, -98, 20, - -98, 28, -98, -98, 35, -98, 36, -98, 24, -98, - 30, -98, -98, 29, -98, -98, -98, -98, -98, 77, - 67, -98, -98, -98, -98, -98, 115, -98, -98, 19, - -98, -98, -98, 26, -98, -24, 84, -98, 69, -98, - -98, -98, -98, -98, -98, 126, -98, -98, -98, -98, - -98, 39, -98, -98, -98, -98, -98, -42, -98, 18, - -98, -82, -98, -98, -98, -98, -67, -98, -98, -71, - -98, -98, -98, -98, -98, -98, -86, -98, -98, -35, - -98, -98, -98, -33, -98, -98, -98, -98, 14, -98, - 8, -98, -2, -98, 1, -98, -98, -98, -9, -98, - -1, -98, -6, -98, -98, -98, -98, -98, -98, -98, - -98, -98, -98, -98, -98, -98, 82, -98, -98, 159, - -98, -98, -98, -98, -98, -98, 40, -98, -98, 46, - -98, 44, -98, -98, 38, 23, -98, 27, -98, -98, - -98, -98, 64, -98, -98, 33, -98, 34, 59, -98, - -98, -98, -98, -98, -98, -98, -98, -98, -14, -98, - -98, -56, -98, -98, -98}; + -98, -98, -98, -98, -98, -98, -98, -98, 32, -98, + -98, -98, -98, 94, -98, -98, -98, -98, -98, -98, + -98, -98, -98, -98, -98, -98, -98, -98, 179, -98, + 189, 176, 251, 175, -98, 133, 143, 149, 137, 109, + -98, -98, -98, -98, -98, -98, -98, -98, 165, -98, + 166, -98, 186, -98, -98, 193, -98, 121, -98, -98, + 136, -98, 31, -98, 19, -98, 21, -98, 195, -98, + 187, 185, -98, -98, 152, -98, -98, -98, -98, -98, + -98, 151, -98, -54, 134, -98, -98, 117, -98, 22, + -98, 24, -98, 28, -98, -98, 27, -98, 29, -98, + 26, -98, 23, -98, -98, 14, -98, -98, -98, -98, + -98, 106, 50, -98, -98, -98, -98, -98, 129, -98, + -98, 40, -98, -98, -98, 41, -98, 13, 119, -98, + 69, -98, -98, -98, -98, -98, -98, 107, -98, -98, + -98, -98, -98, 48, -98, -98, -98, -98, -98, -44, + -98, -10, -98, -79, -98, -98, -98, -98, -72, -98, + -98, -68, -98, -98, -98, -98, -98, -98, -71, -98, + -98, -41, -98, -98, -98, -37, -98, -98, -98, -98, + 92, -98, -1, -98, 2, -98, 4, -98, -98, -98, + 8, -98, -3, -98, 9, -98, -98, -98, -98, -98, + -98, -98, -98, -98, -98, -98, -98, -98, 153, -98, + -98, 172, -98, -98, -98, -98, -98, -98, -4, -98, + -98, 7, -98, 5, -98, -98, 3, 1, -98, 0, + -98, -98, -98, -98, 57, -98, -98, 12, -98, 11, + 113, -98, -98, -98, -98, -98, -98, -98, -98, -98, + 6, -98, -98, -75, -98, -98, -98}; const int JavaScriptGrammar::action_info [] = { - 318, 518, 296, 443, 448, 435, 442, 218, 415, 452, - 325, 419, 344, 320, 426, 513, 425, 407, 439, 419, - 435, 441, 296, 318, 316, 419, 485, 435, 316, -226, - 486, 342, -225, 402, 218, 349, 489, 488, 23, 357, - 359, 484, 355, 370, 344, -56, -55, 411, 459, 476, - -77, 497, -79, 328, -74, 281, -66, 512, 465, 218, - -54, 366, 363, 175, 330, 244, 27, 2, 364, 435, - 26, 336, 459, 366, 244, 513, 224, 29, 23, 207, - 411, 28, 207, 524, 281, 172, 209, 30, 170, 250, - 226, 125, 128, 129, 218, 452, 218, 351, 2, 438, - 7, 126, 276, 26, 476, 22, 429, 218, 218, 448, - 229, 460, 131, 439, 125, 218, 422, 218, 218, 218, - 116, -294, 218, 364, 109, 502, 0, 259, 0, 246, - 177, 117, 491, 247, 109, 110, 109, 364, 0, 218, - 492, 272, 271, 459, 275, 110, 361, 110, 368, 476, - 352, 410, 409, 272, 271, 459, 218, 179, 338, 461, - 413, 423, 339, 476, 497, 502, 109, 469, 218, 454, - 450, 278, 482, 503, 334, 0, 497, 110, 118, 9, - 8, 270, 269, 280, 279, 265, 264, 219, 193, 252, - 194, 483, 193, 193, 194, 194, 193, 118, 194, 267, - 118, 195, 262, 521, 257, 195, 195, 218, 253, 195, - 405, 0, 193, 511, 194, 193, 0, 194, 252, 181, - 182, 433, 432, 119, 0, 195, 262, 0, 195, 120, - 0, 268, 266, 267, 263, 261, 193, 253, 194, 254, - 298, 299, 119, 211, 505, 119, 183, 184, 120, 195, - 0, 120, 492, 181, 182, 0, 522, 520, 263, 261, - 228, 227, 212, 0, 213, 268, 266, 300, 301, 298, - 299, 13, 0, 303, 304, 0, 0, 0, 14, 0, - 183, 184, 305, 0, 13, 306, 0, 307, 0, 303, - 304, 14, 0, 303, 304, 0, 300, 301, 305, 303, - 304, 306, 305, 307, 0, 306, 0, 307, 305, 13, - 0, 306, 0, 307, 303, 304, 14, 13, 0, 0, - 0, 16, 0, 305, 14, 193, 306, 194, 307, 0, - 12, 0, 0, 15, 16, 0, 0, 0, 195, 0, - 0, 0, 478, 12, 0, 0, 15, 0, 0, 0, - 480, 0, 0, 0, 0, 231, 0, 0, 0, 16, - 0, 0, 0, 0, 0, 232, 0, 16, 12, 233, - 0, 15, 0, 0, 0, 0, 12, 0, 234, 15, - 235, 0, 0, 0, 0, 0, 0, 0, 186, 187, - 0, 236, 0, 237, 116, 0, 188, 189, 0, 0, - 190, 238, 191, 0, 239, 117, 0, 0, 0, 0, - 240, 231, 0, 0, 0, 0, 241, 0, 0, 0, - 0, 232, 0, 0, 0, 233, 0, 0, 0, 242, - 0, 0, 0, 0, 234, 0, 235, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 236, 0, 237, - 116, 0, 0, 72, 73, 0, 0, 238, 0, 0, - 239, 117, 0, 113, 0, 0, 240, 0, 0, 0, - 114, 0, 241, 0, 115, 81, 0, 82, 0, 0, - 0, 0, 0, 0, 85, 242, 0, 0, 88, 0, + 368, 443, 327, 366, 346, 322, 444, 437, 128, 277, + 172, 490, 25, 174, 278, 283, 486, 177, 441, 320, + 298, 365, 467, 32, 298, 344, 445, 131, 318, 30, + 320, 332, 209, 130, 461, 220, 318, 211, 133, 351, + 515, 437, 330, 25, 372, 29, 357, 361, 488, 359, + 127, 31, 338, 28, 346, 228, 226, 526, -57, -228, + -79, 520, 437, 487, 437, 421, 421, 427, 413, 454, + 231, 2, 450, 421, 428, 417, 454, 409, 7, 246, + 211, 515, 181, 450, 514, 283, 461, 181, 220, 491, + 179, 220, -227, 24, 404, -68, 252, -76, 261, -58, + 246, 413, 368, 478, 478, 2, -56, 209, 220, 220, + 353, 440, 248, 127, 431, 220, 249, 412, 411, 220, + -296, 220, 220, 340, 220, 441, 366, 341, 484, 220, + 274, 273, 504, 267, 266, 272, 271, 507, -81, 366, + 274, 273, 504, 111, 111, 494, 111, 485, 282, 281, + 220, 118, 478, 220, 112, 112, 462, 112, 9, 8, + 415, 456, 119, 354, 424, 478, 111, 493, 0, 220, + 269, 370, 523, 452, 471, 494, 336, 112, 499, 264, + 505, 280, 195, 220, 196, 0, 0, 195, 120, 196, + 513, 0, 195, 120, 196, 197, 0, 195, 221, 196, + 197, 259, 270, 268, 463, 197, 0, 120, 17, 425, + 197, 265, 263, 269, 195, 195, 196, 196, 195, 220, + 196, 254, 230, 229, 0, 524, 522, 197, 197, 213, + 254, 197, 16, 121, 264, 461, 435, 434, 121, 122, + 255, 0, 407, 0, 122, 270, 268, 461, 214, 255, + 215, 256, 121, 183, 184, 0, 499, 0, 122, 0, + 300, 301, 183, 184, 300, 301, 265, 263, 499, 13, + 0, 363, 0, 0, 0, 0, 14, 0, 0, 0, + 185, 186, 0, 0, 0, 0, 17, 302, 303, 185, + 186, 302, 303, 305, 306, 0, 0, 0, 17, 195, + 0, 196, 307, 0, 0, 308, 17, 309, 0, 0, + 16, 13, 197, 0, 0, 188, 189, 0, 14, 18, + 0, 0, 16, 190, 191, 188, 189, 192, 12, 193, + 16, 15, 0, 190, 191, 188, 189, 192, 0, 193, + 0, 0, 0, 190, 191, 188, 189, 192, 17, 193, + 0, 13, 0, 190, 191, 0, 0, 192, 14, 193, + 0, 18, 305, 306, 0, 0, 0, 0, 0, 0, + 12, 307, 16, 15, 308, 0, 309, 0, 0, 0, + 0, 0, 0, 13, 480, 0, 0, 0, 17, 0, + 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, + 12, 0, 16, 15, 0, 0, 482, 0, 0, 0, + 17, 0, 0, 0, 0, 0, 0, 188, 189, 0, + 74, 75, 0, 18, 0, 190, 191, 0, 0, 192, + 115, 193, 12, 0, 16, 15, 0, 116, 0, 0, + 0, 117, 83, 0, 84, 0, 74, 75, 0, 0, + 0, 87, 0, 0, 0, 90, 115, 0, 0, 0, + 0, 0, 0, 116, 0, 0, 0, 117, 83, 0, + 84, 0, 0, 95, 0, 97, 0, 87, 0, 0, + 0, 90, 233, 0, 0, 0, 89, 100, 77, 0, + 0, 0, 234, 0, 0, 0, 235, 0, 0, 95, + 0, 97, 0, 0, 0, 236, 0, 237, 0, 0, + 0, 0, 89, 100, 77, 0, 0, 0, 238, 233, + 239, 118, 0, 0, 0, 0, 0, 0, 240, 234, + 0, 241, 119, 235, 0, 0, 0, 242, 0, 0, + 0, 0, 236, 243, 237, 0, 0, 334, 0, 0, + 0, 0, 0, 0, 0, 238, 244, 239, 118, 0, + 0, 0, 0, 0, 0, 240, 0, 233, 241, 119, + 0, 0, 0, 0, 242, 0, 0, 234, 0, 0, + 243, 235, 0, 0, 0, 0, 0, 0, 0, 0, + 236, 0, 237, 244, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 238, 0, 239, 118, 0, 0, 0, + 0, 0, 0, 240, 0, 0, 241, 119, 0, 0, + 0, 0, 242, 0, 0, 0, 0, 0, 243, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 244, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 73, 74, 75, 0, 0, 0, 0, 0, + 0, 0, 0, 115, 0, 0, 0, 0, 0, 0, + 116, 0, 0, 0, 117, 83, 0, 84, 0, 0, + 0, 85, 0, 86, 87, 88, 0, 0, 90, 0, + 0, 0, 91, 0, 92, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 95, 0, 97, 0, + 99, 0, 102, 0, 103, 0, 0, 0, 0, 89, + 100, 77, 0, 0, 0, 0, 0, 0, 0, 73, + 74, 75, 0, 0, 0, 0, 0, 0, 0, 0, + 115, 0, 0, 0, 0, 0, 0, 116, 0, 0, + 0, 117, 83, 0, 84, 0, 0, 0, 85, 0, + 86, 87, 88, 0, 0, 90, 0, 0, 0, 91, + 0, 92, 0, 0, 469, 0, 0, 0, 0, 0, + 0, 0, 0, 95, 0, 97, 0, 99, 0, 102, + 0, 103, 0, 0, 0, 0, 89, 100, 77, 0, + 0, 0, 0, 0, 0, 0, 73, 74, 75, 0, + 0, 0, 0, 0, 0, 0, 0, 115, 0, 0, + 0, 0, 0, 0, 116, 0, 0, 0, 117, 83, + 0, 84, 0, 0, 0, 85, 0, 86, 87, 88, + 0, 0, 90, 0, 0, 0, 91, 0, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 93, 0, 95, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, - 98, 75, 0, 0, 0, 0, 0, 0, 0, 231, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, - 0, 0, 0, 233, 0, 0, 0, 0, 0, 0, - 0, 0, 234, 0, 235, 0, 0, 332, 0, 0, - 0, 0, 0, 0, 0, 236, 0, 237, 116, 0, - 0, 0, 0, 0, 0, 238, 0, 0, 239, 117, - 0, 0, 0, 0, 240, 0, 0, 0, 0, 0, - 241, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 242, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 71, 72, 73, 0, 0, 0, - 0, 0, 0, 0, 0, 113, 0, 0, 0, 0, - 0, 0, 114, 0, 0, 0, 115, 81, 0, 82, - 0, 0, 0, 83, 0, 84, 85, 86, 0, 0, - 88, 0, 0, 0, 89, 0, 90, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 93, 0, - 95, 0, 97, 0, 100, 0, 101, 0, 0, 0, - 0, 87, 98, 75, 0, 0, 0, 0, 0, 0, - 0, 71, 72, 73, 0, 0, 0, 0, 0, 0, - 0, 0, 113, 0, 0, 0, 0, 0, 0, 114, - 0, 0, 0, 115, 81, 0, 82, 0, 0, 0, - 83, 0, 84, 85, 86, 0, 0, 88, 0, 0, - 0, 89, 0, 90, 0, 0, 464, 0, 0, 0, - 0, 0, 0, 0, 0, 93, 0, 95, 0, 97, - 0, 100, 0, 101, 0, 0, 0, 0, 87, 98, - 75, 0, 0, 0, 0, 0, 0, 0, 71, 72, - 73, 0, 0, 0, 0, 0, 0, 0, 0, 113, - 0, 0, 0, 0, 0, 0, 114, 0, 0, 0, - 115, 81, 0, 82, 0, 0, 0, 83, 0, 84, - 85, 86, 0, 0, 88, 0, 0, 0, 89, 0, - 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 93, 0, 95, 0, 97, 0, 100, 295, - 101, 0, 0, 0, 0, 87, 98, 75, 0, 0, - 0, 0, 0, 0, 0, 71, 72, 73, 0, 0, - 0, 0, 0, 0, 0, 0, 113, 0, 0, 0, - 0, 0, 0, 114, 0, 0, 0, 115, 81, 0, - 82, 0, 0, 0, 83, 0, 84, 85, 86, 0, - 0, 88, 0, 0, 0, 89, 0, 90, 0, 0, - 467, 0, 0, 0, 0, 0, 0, 0, 0, 93, - 0, 95, 0, 97, 0, 100, 0, 101, 0, 0, - 0, 0, 87, 98, 75, 0, 0, 0, 0, 0, - 0, 0, -75, 0, 0, 0, 71, 72, 73, 0, - 0, 0, 0, 0, 0, 0, 0, 113, 0, 0, - 0, 0, 0, 0, 114, 0, 0, 0, 115, 81, - 0, 82, 0, 0, 0, 83, 0, 84, 85, 86, - 0, 0, 88, 0, 0, 0, 89, 0, 90, 0, + 95, 0, 97, 0, 99, 0, 102, 297, 103, 0, + 0, 0, 0, 89, 100, 77, 0, 0, 0, 0, + 0, 0, 0, 73, 74, 75, 0, 0, 0, 0, + 0, 0, 0, 0, 115, 0, 0, 0, 0, 0, + 0, 116, 0, 0, 0, 117, 83, 0, 84, 0, + 0, 0, 85, 0, 86, 87, 88, 0, 0, 90, + 0, 0, 0, 91, 0, 92, 0, 0, 466, 0, + 0, 0, 0, 0, 0, 0, 0, 95, 0, 97, + 0, 99, 0, 102, 0, 103, 0, 0, 0, 0, + 89, 100, 77, 0, 0, 0, 0, 0, 0, 0, + -77, 0, 0, 0, 73, 74, 75, 0, 0, 0, + 0, 0, 0, 0, 0, 115, 0, 0, 0, 0, + 0, 0, 116, 0, 0, 0, 117, 83, 0, 84, + 0, 0, 0, 85, 0, 86, 87, 88, 0, 0, + 90, 0, 0, 0, 91, 0, 92, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 95, 0, + 97, 0, 99, 0, 102, 0, 103, 0, 0, 0, + 0, 89, 100, 77, 0, 0, 0, 0, 0, 0, + 0, 138, 139, 140, 0, 0, 142, 144, 145, 0, + 0, 146, 0, 147, 0, 0, 0, 149, 150, 151, + 0, 0, 0, 0, 0, 0, 218, 153, 154, 155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 93, 0, 95, 0, 97, 0, 100, 0, 101, 0, - 0, 0, 0, 87, 98, 75, 0, 0, 0, 0, - 0, 0, 0, 136, 137, 138, 0, 0, 140, 142, - 143, 0, 0, 144, 0, 145, 0, 0, 0, 147, - 148, 149, 0, 0, 0, 0, 0, 0, 216, 151, - 152, 153, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 154, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 158, 0, - 0, 0, 0, 0, 0, 160, 161, 162, 0, 164, - 165, 166, 167, 168, 169, 0, 0, 155, 163, 146, - 139, 141, 157, 0, 0, 0, 0, 136, 137, 138, - 0, 0, 140, 142, 143, 0, 0, 144, 0, 145, - 0, 0, 0, 147, 148, 149, 0, 0, 0, 0, - 0, 0, 150, 151, 152, 153, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 154, 0, 0, 0, 156, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 158, 0, 0, 0, 0, 0, 159, 160, - 161, 162, 0, 164, 165, 166, 167, 168, 169, 0, - 0, 155, 163, 146, 139, 141, 157, 0, 0, 0, - 0, 136, 137, 138, 0, 0, 140, 142, 143, 0, - 0, 144, 0, 145, 0, 0, 0, 147, 148, 149, - 0, 0, 0, 0, 0, 0, 150, 151, 152, 153, + 0, 0, 0, 0, 0, 0, 160, 0, 0, 0, + 0, 0, 0, 162, 163, 164, 0, 166, 167, 168, + 169, 170, 171, 0, 0, 157, 165, 148, 141, 143, + 159, 0, 0, 0, 0, 138, 139, 140, 0, 0, + 142, 144, 145, 0, 0, 146, 0, 147, 0, 0, + 0, 149, 150, 151, 0, 0, 0, 0, 0, 0, + 152, 153, 154, 155, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 156, 0, 0, 0, 158, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 154, 0, 0, 0, 156, 0, 0, 0, 0, 0, - 0, 0, 174, 0, 0, 0, 158, 0, 0, 0, - 0, 0, 159, 160, 161, 162, 0, 164, 165, 166, - 167, 168, 169, 0, 0, 155, 163, 146, 139, 141, - 157, 0, 0, 0, 0, 68, 0, 0, 0, 0, - 69, 0, 71, 72, 73, 74, 0, 0, 0, 0, - 0, 0, 76, 113, 0, 0, 0, 0, 0, 0, - 507, 79, 0, 0, 80, 508, 0, 82, 0, 0, - 0, 83, 0, 84, 85, 86, 0, 0, 88, 0, - 0, 0, 89, 0, 90, 0, 0, 0, 0, 0, - 91, 0, 92, 0, 0, 0, 93, 94, 95, 96, - 97, 99, 100, 16, 101, 102, 103, 0, 0, 87, - 98, 75, 12, 70, 0, 0, 0, 0, 0, 68, - 0, 0, 0, 0, 69, 0, 71, 72, 73, 74, - 0, 0, 0, 0, 0, 0, 76, 113, 0, 0, - 0, 0, 0, 0, 78, 79, 0, 0, 80, 81, - 0, 82, 0, 0, 0, 83, 0, 84, 85, 86, - 0, 0, 88, 0, 0, 0, 89, 0, 90, 0, - 0, 0, 0, 0, 91, 0, 92, 0, 0, 0, - 93, 94, 95, 96, 97, 99, 100, 16, 101, 102, - 103, 0, 0, 87, 98, 75, 12, 70, 0, 0, - 0, 0, 0, 68, 0, 0, 0, 0, 69, 0, - 71, 72, 73, 74, 0, 0, 0, 0, 0, 0, - 76, 77, 0, 0, 0, 0, 0, 0, 78, 79, - 0, 0, 80, 81, 0, 82, 0, 0, 0, 83, - 0, 84, 85, 86, 0, 0, 88, 0, 0, 0, - 89, 0, 90, 0, 0, 0, 0, 0, 91, 0, - 92, 0, 0, 0, 93, 94, 95, 96, 97, 99, - 100, 16, 101, 102, 103, 0, 0, 87, 98, 75, - 12, 70, 0, 0, 0, 0, 0, 68, 0, 0, - 0, 0, 69, 0, 71, 72, 73, 74, 0, 0, - 0, 0, 0, 0, 76, 113, 0, 0, 0, 0, - 0, 0, 494, 79, 0, 0, 80, 495, 0, 82, - 0, 0, 0, 83, 0, 84, 85, 86, 0, 0, - 88, 0, 0, 0, 89, 0, 90, 0, 0, 0, - 0, 0, 91, 0, 92, 0, 0, 0, 93, 94, - 95, 96, 97, 99, 100, 16, 101, 102, 103, 0, - 0, 87, 98, 75, 12, 70, 0, 0, 0, 0, - 0, 375, 137, 138, 0, 0, 377, 142, 379, 72, - 73, 380, 0, 145, 0, 0, 0, 147, 382, 383, - 0, 0, 0, 0, 0, 0, 384, 385, 152, 153, - 80, 81, 0, 82, 0, 0, 0, 83, 0, 84, - 386, 86, 0, 0, 388, 0, 0, 0, 89, 0, - 90, 0, -221, 0, 0, 0, 389, 0, 92, 0, - 0, 0, 390, 391, 392, 393, 97, 395, 396, 397, - 398, 399, 400, 0, 0, 387, 394, 381, 376, 378, - 157, 0, 0, 0, 0, + 160, 0, 0, 0, 0, 0, 161, 162, 163, 164, + 0, 166, 167, 168, 169, 170, 171, 0, 0, 157, + 165, 148, 141, 143, 159, 0, 0, 0, 0, 138, + 139, 140, 0, 0, 142, 144, 145, 0, 0, 146, + 0, 147, 0, 0, 0, 149, 150, 151, 0, 0, + 0, 0, 0, 0, 152, 153, 154, 155, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 156, 0, + 0, 0, 158, 0, 0, 0, 0, 0, 0, 0, + 176, 0, 0, 0, 160, 0, 0, 0, 0, 0, + 161, 162, 163, 164, 0, 166, 167, 168, 169, 170, + 171, 0, 0, 157, 165, 148, 141, 143, 159, 0, + 0, 0, 0, 70, 0, 0, 0, 0, 71, 0, + 73, 74, 75, 76, 0, 0, 0, 0, 0, 0, + 78, 115, 0, 0, 0, 0, 0, 0, 80, 81, + 0, 0, 82, 83, 0, 84, 0, 0, 0, 85, + 0, 86, 87, 88, 0, 0, 90, 0, 0, 0, + 91, 0, 92, 0, 0, 0, 0, 0, 93, 0, + 94, 0, 0, 0, 95, 96, 97, 98, 99, 101, + 102, 18, 103, 104, 105, 0, 0, 89, 100, 77, + 12, 72, 0, 0, 0, 0, 0, 70, 0, 0, + 0, 0, 71, 0, 73, 74, 75, 76, 0, 0, + 0, 0, 0, 0, 78, 79, 0, 0, 0, 0, + 0, 0, 80, 81, 0, 0, 82, 83, 0, 84, + 0, 0, 0, 85, 0, 86, 87, 88, 0, 0, + 90, 0, 0, 0, 91, 0, 92, 0, 0, 0, + 0, 0, 93, 0, 94, 0, 0, 0, 95, 96, + 97, 98, 99, 101, 102, 18, 103, 104, 105, 0, + 0, 89, 100, 77, 12, 72, 0, 0, 0, 0, + 0, 70, 0, 0, 0, 0, 71, 0, 73, 74, + 75, 76, 0, 0, 0, 0, 0, 0, 78, 115, + 0, 0, 0, 0, 0, 0, 496, 81, 0, 0, + 82, 497, 0, 84, 0, 0, 0, 85, 0, 86, + 87, 88, 0, 0, 90, 0, 0, 0, 91, 0, + 92, 0, 0, 0, 0, 0, 93, 0, 94, 0, + 0, 0, 95, 96, 97, 98, 99, 101, 102, 18, + 103, 104, 105, 0, 0, 89, 100, 77, 12, 72, + 0, 0, 0, 0, 0, 70, 0, 0, 0, 0, + 71, 0, 73, 74, 75, 76, 0, 0, 0, 0, + 0, 0, 78, 115, 0, 0, 0, 0, 0, 0, + 509, 81, 0, 0, 82, 510, 0, 84, 0, 0, + 0, 85, 0, 86, 87, 88, 0, 0, 90, 0, + 0, 0, 91, 0, 92, 0, 0, 0, 0, 0, + 93, 0, 94, 0, 0, 0, 95, 96, 97, 98, + 99, 101, 102, 18, 103, 104, 105, 0, 0, 89, + 100, 77, 12, 72, 0, 0, 0, 0, 0, 377, + 139, 140, 0, 0, 379, 144, 381, 74, 75, 382, + 0, 147, 0, 0, 0, 149, 384, 385, 0, 0, + 0, 0, 0, 0, 386, 387, 154, 155, 82, 83, + 0, 84, 0, 0, 0, 85, 0, 86, 388, 88, + 0, 0, 390, 0, 0, 0, 91, 0, 92, 0, + -223, 0, 0, 0, 391, 0, 94, 0, 0, 0, + 392, 393, 394, 395, 99, 397, 398, 399, 400, 401, + 402, 0, 0, 389, 396, 383, 378, 380, 159, 0, + 0, 0, 0, - 249, 430, 424, 440, 21, 427, 519, 10, 171, 173, - 453, 466, 455, 251, 463, 462, 256, 331, 230, 451, - 523, 277, 127, 445, 333, 444, 449, 176, 335, 434, - 428, 326, 360, 500, 434, 369, 501, 431, 431, 362, - 401, 371, 220, 509, 506, 420, 365, 496, 367, 217, - 353, 412, 487, 468, 215, 493, 481, 0, 490, 326, - 358, 0, 225, 223, 21, 243, 510, 0, 66, 500, - 48, 0, 504, 223, 500, 215, 255, 0, 274, 111, - 258, 0, 111, 196, 479, 111, 111, 203, 0, 111, - 198, 111, 111, 111, 0, 210, 21, 197, 326, 111, - 111, 273, 447, 208, 111, 248, 245, 111, 111, 308, - 273, 111, 309, 447, 111, 111, 111, 446, 446, 202, - 111, 111, 475, 111, 326, 326, 310, 111, 311, 123, - 111, 111, 326, 122, 111, 312, 111, 112, 121, 111, - 403, 356, 178, 404, 0, 111, 223, 470, 111, 111, - 111, 0, 111, 406, 185, 111, 204, 180, 206, 111, - 200, 111, 0, 0, 192, 481, 199, 327, 354, 290, - 0, 111, 111, 21, 294, 329, 201, 111, 205, 473, - 111, 111, 474, 471, 111, 322, 472, 66, 322, 48, - 294, 322, 322, 294, 111, 111, 294, 294, 111, 294, - 294, 111, 66, 294, 48, 302, 294, 343, 313, 337, - 341, 111, 340, 324, 321, 111, 294, 111, 314, 0, - 294, 0, 294, 322, 315, 111, 319, 111, 294, 0, - 294, 0, 294, 0, 297, 0, 0, 0, 0, 0, - 317, 0, 0, 0, 0, 350, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 403, 0, 0, - 404, 0, 0, 0, 0, 0, 0, 130, 0, 0, + 429, 525, 430, 10, 432, 426, 276, 23, 489, 503, + 453, 502, 498, 464, 455, 457, 495, 447, 442, 492, + 511, 446, 232, 508, 355, 403, 521, 129, 468, 465, + 222, 335, 337, 360, 373, 225, 362, 371, 367, 364, + 217, 369, 333, 422, 279, 219, 436, 175, 0, 258, + 227, 0, 328, 433, 245, 173, 251, 433, 253, 178, + 414, 276, 0, 470, 328, 506, 0, 502, 0, 405, + 0, 436, 406, 113, 113, 475, 0, 113, 113, 201, + 113, 0, 194, 202, 113, 203, 113, 113, 476, 204, + 113, 113, 113, 113, 113, 182, 187, 208, 206, 207, + 113, 113, 449, 113, 451, 217, 257, 200, 247, 225, + 113, 113, 472, 210, 113, 113, 260, 473, 199, 113, + 512, 212, 113, 502, 474, 292, 113, 225, 113, 328, + 296, 205, 198, 328, 408, 250, 113, 113, 275, 275, + 113, 113, 113, 477, 123, 314, 328, 113, 328, 125, + 113, 113, 448, 124, 405, 481, 113, 406, 448, 113, + 0, 449, 113, 113, 113, 114, 180, 23, 113, 310, + 0, 0, 358, 313, 113, 68, 329, 50, 483, 311, + 113, 0, 324, 324, 0, 312, 23, 296, 296, 356, + 483, 331, 68, 68, 50, 50, 113, 113, 23, 0, + 0, 296, 296, 0, 352, 345, 113, 113, 321, 319, + 113, 296, 296, 317, 315, 296, 324, 324, 113, 299, + 113, 296, 296, 296, 324, 296, 113, 304, 0, 296, + 0, 296, 0, 0, 0, 342, 0, 0, 343, 323, + 0, 339, 0, 0, 0, 0, 326, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 260, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 132, 0, 0, 0, 262, 0, 0, + 0, 0, 113, 0, 0, 0, 0, 296, 0, 316, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0}; const int JavaScriptGrammar::action_check [] = { - 76, 17, 1, 60, 36, 33, 29, 8, 33, 36, - 61, 5, 29, 8, 7, 29, 55, 60, 20, 5, - 33, 36, 1, 76, 48, 5, 29, 33, 48, 29, - 7, 7, 29, 55, 8, 17, 7, 29, 36, 60, - 31, 29, 61, 16, 29, 7, 7, 36, 8, 33, - 7, 29, 7, 61, 7, 36, 7, 29, 8, 8, - 7, 36, 29, 7, 60, 2, 8, 85, 7, 33, - 29, 2, 8, 36, 2, 29, 8, 60, 36, 48, - 36, 29, 48, 0, 36, 8, 76, 33, 7, 7, - 60, 29, 60, 33, 8, 36, 8, 8, 85, 6, - 65, 36, 36, 29, 33, 29, 7, 8, 8, 36, - 55, 8, 55, 20, 29, 8, 10, 8, 8, 8, - 42, 36, 8, 7, 40, 8, -1, 60, -1, 50, - 55, 53, 7, 54, 40, 51, 40, 7, -1, 8, - 15, 61, 62, 8, 74, 51, 60, 51, 60, 33, - 61, 61, 62, 61, 62, 8, 8, 1, 50, 56, - 60, 55, 54, 33, 29, 8, 40, 60, 8, 60, - 60, 60, 10, 56, 60, -1, 29, 51, 12, 61, - 62, 61, 62, 61, 62, 61, 62, 56, 25, 15, - 27, 29, 25, 25, 27, 27, 25, 12, 27, 29, - 12, 38, 29, 8, 56, 38, 38, 8, 34, 38, - 36, -1, 25, 56, 27, 25, -1, 27, 15, 18, - 19, 61, 62, 57, -1, 38, 29, -1, 38, 63, - -1, 61, 62, 29, 61, 62, 25, 34, 27, 36, - 18, 19, 57, 15, 7, 57, 45, 46, 63, 38, - -1, 63, 15, 18, 19, -1, 61, 62, 61, 62, - 61, 62, 34, -1, 36, 61, 62, 45, 46, 18, - 19, 22, -1, 23, 24, -1, -1, -1, 29, -1, - 45, 46, 32, -1, 22, 35, -1, 37, -1, 23, - 24, 29, -1, 23, 24, -1, 45, 46, 32, 23, - 24, 35, 32, 37, -1, 35, -1, 37, 32, 22, - -1, 35, -1, 37, 23, 24, 29, 22, -1, -1, - -1, 72, -1, 32, 29, 25, 35, 27, 37, -1, - 81, -1, -1, 84, 72, -1, -1, -1, 38, -1, - -1, -1, 55, 81, -1, -1, 84, -1, -1, -1, - 55, -1, -1, -1, -1, 3, -1, -1, -1, 72, - -1, -1, -1, -1, -1, 13, -1, 72, 81, 17, - -1, 84, -1, -1, -1, -1, 81, -1, 26, 84, - 28, -1, -1, -1, -1, -1, -1, -1, 23, 24, - -1, 39, -1, 41, 42, -1, 31, 32, -1, -1, - 35, 49, 37, -1, 52, 53, -1, -1, -1, -1, - 58, 3, -1, -1, -1, -1, 64, -1, -1, -1, - -1, 13, -1, -1, -1, 17, -1, -1, -1, 77, - -1, -1, -1, -1, 26, -1, 28, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 39, -1, 41, - 42, -1, -1, 12, 13, -1, -1, 49, -1, -1, - 52, 53, -1, 22, -1, -1, 58, -1, -1, -1, - 29, -1, 64, -1, 33, 34, -1, 36, -1, -1, - -1, -1, -1, -1, 43, 77, -1, -1, 47, -1, + 36, 36, 61, 7, 29, 8, 29, 33, 36, 74, + 7, 29, 36, 8, 36, 36, 29, 7, 20, 76, + 1, 29, 8, 33, 1, 7, 60, 33, 48, 29, + 76, 60, 48, 60, 8, 8, 48, 76, 55, 17, + 29, 33, 61, 36, 16, 8, 61, 31, 7, 60, + 29, 60, 2, 29, 29, 60, 8, 0, 7, 29, + 7, 17, 33, 29, 33, 5, 5, 55, 36, 36, + 55, 85, 36, 5, 7, 33, 36, 60, 65, 2, + 76, 29, 1, 36, 29, 36, 8, 1, 8, 7, + 55, 8, 29, 29, 55, 7, 7, 7, 60, 7, + 2, 36, 36, 33, 33, 85, 7, 48, 8, 8, + 8, 6, 50, 29, 7, 8, 54, 61, 62, 8, + 36, 8, 8, 50, 8, 20, 7, 54, 10, 8, + 61, 62, 8, 61, 62, 61, 62, 7, 7, 7, + 61, 62, 8, 40, 40, 15, 40, 29, 61, 62, + 8, 42, 33, 8, 51, 51, 8, 51, 61, 62, + 60, 60, 53, 61, 10, 33, 40, 7, -1, 8, + 29, 60, 8, 60, 60, 15, 60, 51, 29, 29, + 56, 60, 25, 8, 27, -1, -1, 25, 12, 27, + 56, -1, 25, 12, 27, 38, -1, 25, 56, 27, + 38, 56, 61, 62, 56, 38, -1, 12, 59, 55, + 38, 61, 62, 29, 25, 25, 27, 27, 25, 8, + 27, 15, 61, 62, -1, 61, 62, 38, 38, 15, + 15, 38, 83, 57, 29, 8, 61, 62, 57, 63, + 34, -1, 36, -1, 63, 61, 62, 8, 34, 34, + 36, 36, 57, 18, 19, -1, 29, -1, 63, -1, + 18, 19, 18, 19, 18, 19, 61, 62, 29, 22, + -1, 60, -1, -1, -1, -1, 29, -1, -1, -1, + 45, 46, -1, -1, -1, -1, 59, 45, 46, 45, + 46, 45, 46, 23, 24, -1, -1, -1, 59, 25, + -1, 27, 32, -1, -1, 35, 59, 37, -1, -1, + 83, 22, 38, -1, -1, 23, 24, -1, 29, 72, + -1, -1, 83, 31, 32, 23, 24, 35, 81, 37, + 83, 84, -1, 31, 32, 23, 24, 35, -1, 37, + -1, -1, -1, 31, 32, 23, 24, 35, 59, 37, + -1, 22, -1, 31, 32, -1, -1, 35, 29, 37, + -1, 72, 23, 24, -1, -1, -1, -1, -1, -1, + 81, 32, 83, 84, 35, -1, 37, -1, -1, -1, + -1, -1, -1, 22, 55, -1, -1, -1, 59, -1, + 29, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 72, -1, -1, -1, -1, -1, -1, -1, -1, + 81, -1, 83, 84, -1, -1, 55, -1, -1, -1, + 59, -1, -1, -1, -1, -1, -1, 23, 24, -1, + 12, 13, -1, 72, -1, 31, 32, -1, -1, 35, + 22, 37, 81, -1, 83, 84, -1, 29, -1, -1, + -1, 33, 34, -1, 36, -1, 12, 13, -1, -1, + -1, 43, -1, -1, -1, 47, 22, -1, -1, -1, + -1, -1, -1, 29, -1, -1, -1, 33, 34, -1, + 36, -1, -1, 65, -1, 67, -1, 43, -1, -1, + -1, 47, 3, -1, -1, -1, 78, 79, 80, -1, + -1, -1, 13, -1, -1, -1, 17, -1, -1, 65, + -1, 67, -1, -1, -1, 26, -1, 28, -1, -1, + -1, -1, 78, 79, 80, -1, -1, -1, 39, 3, + 41, 42, -1, -1, -1, -1, -1, -1, 49, 13, + -1, 52, 53, 17, -1, -1, -1, 58, -1, -1, + -1, -1, 26, 64, 28, -1, -1, 31, -1, -1, + -1, -1, -1, -1, -1, 39, 77, 41, 42, -1, + -1, -1, -1, -1, -1, 49, -1, 3, 52, 53, + -1, -1, -1, -1, 58, -1, -1, 13, -1, -1, + 64, 17, -1, -1, -1, -1, -1, -1, -1, -1, + 26, -1, 28, 77, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 39, -1, 41, 42, -1, -1, -1, + -1, -1, -1, 49, -1, -1, 52, 53, -1, -1, + -1, -1, 58, -1, -1, -1, -1, -1, 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 77, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 11, 12, 13, -1, -1, -1, -1, -1, + -1, -1, -1, 22, -1, -1, -1, -1, -1, -1, + 29, -1, -1, -1, 33, 34, -1, 36, -1, -1, + -1, 40, -1, 42, 43, 44, -1, -1, 47, -1, + -1, -1, 51, -1, 53, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 65, -1, 67, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 78, - 79, 80, -1, -1, -1, -1, -1, -1, -1, 3, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 13, - -1, -1, -1, 17, -1, -1, -1, -1, -1, -1, - -1, -1, 26, -1, 28, -1, -1, 31, -1, -1, - -1, -1, -1, -1, -1, 39, -1, 41, 42, -1, - -1, -1, -1, -1, -1, 49, -1, -1, 52, 53, - -1, -1, -1, -1, 58, -1, -1, -1, -1, -1, - 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 77, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 11, 12, 13, -1, -1, -1, + 69, -1, 71, -1, 73, -1, -1, -1, -1, 78, + 79, 80, -1, -1, -1, -1, -1, -1, -1, 11, + 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, + 22, -1, -1, -1, -1, -1, -1, 29, -1, -1, + -1, 33, 34, -1, 36, -1, -1, -1, 40, -1, + 42, 43, 44, -1, -1, 47, -1, -1, -1, 51, + -1, 53, -1, -1, 56, -1, -1, -1, -1, -1, + -1, -1, -1, 65, -1, 67, -1, 69, -1, 71, + -1, 73, -1, -1, -1, -1, 78, 79, 80, -1, + -1, -1, -1, -1, -1, -1, 11, 12, 13, -1, + -1, -1, -1, -1, -1, -1, -1, 22, -1, -1, + -1, -1, -1, -1, 29, -1, -1, -1, 33, 34, + -1, 36, -1, -1, -1, 40, -1, 42, 43, 44, + -1, -1, 47, -1, -1, -1, 51, -1, 53, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 65, -1, 67, -1, 69, -1, 71, 72, 73, -1, + -1, -1, -1, 78, 79, 80, -1, -1, -1, -1, + -1, -1, -1, 11, 12, 13, -1, -1, -1, -1, + -1, -1, -1, -1, 22, -1, -1, -1, -1, -1, + -1, 29, -1, -1, -1, 33, 34, -1, 36, -1, + -1, -1, 40, -1, 42, 43, 44, -1, -1, 47, + -1, -1, -1, 51, -1, 53, -1, -1, 56, -1, + -1, -1, -1, -1, -1, -1, -1, 65, -1, 67, + -1, 69, -1, 71, -1, 73, -1, -1, -1, -1, + 78, 79, 80, -1, -1, -1, -1, -1, -1, -1, + 7, -1, -1, -1, 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, 22, -1, -1, -1, -1, -1, -1, 29, -1, -1, -1, 33, 34, -1, 36, -1, -1, -1, 40, -1, 42, 43, 44, -1, -1, @@ -526,79 +610,31 @@ const int JavaScriptGrammar::action_check [] = { -1, -1, -1, -1, -1, -1, -1, -1, 65, -1, 67, -1, 69, -1, 71, -1, 73, -1, -1, -1, -1, 78, 79, 80, -1, -1, -1, -1, -1, -1, - -1, 11, 12, 13, -1, -1, -1, -1, -1, -1, - -1, -1, 22, -1, -1, -1, -1, -1, -1, 29, - -1, -1, -1, 33, 34, -1, 36, -1, -1, -1, - 40, -1, 42, 43, 44, -1, -1, 47, -1, -1, - -1, 51, -1, 53, -1, -1, 56, -1, -1, -1, - -1, -1, -1, -1, -1, 65, -1, 67, -1, 69, - -1, 71, -1, 73, -1, -1, -1, -1, 78, 79, - 80, -1, -1, -1, -1, -1, -1, -1, 11, 12, - 13, -1, -1, -1, -1, -1, -1, -1, -1, 22, - -1, -1, -1, -1, -1, -1, 29, -1, -1, -1, - 33, 34, -1, 36, -1, -1, -1, 40, -1, 42, - 43, 44, -1, -1, 47, -1, -1, -1, 51, -1, - 53, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 65, -1, 67, -1, 69, -1, 71, 72, - 73, -1, -1, -1, -1, 78, 79, 80, -1, -1, - -1, -1, -1, -1, -1, 11, 12, 13, -1, -1, - -1, -1, -1, -1, -1, -1, 22, -1, -1, -1, - -1, -1, -1, 29, -1, -1, -1, 33, 34, -1, - 36, -1, -1, -1, 40, -1, 42, 43, 44, -1, - -1, 47, -1, -1, -1, 51, -1, 53, -1, -1, - 56, -1, -1, -1, -1, -1, -1, -1, -1, 65, - -1, 67, -1, 69, -1, 71, -1, 73, -1, -1, - -1, -1, 78, 79, 80, -1, -1, -1, -1, -1, - -1, -1, 7, -1, -1, -1, 11, 12, 13, -1, - -1, -1, -1, -1, -1, -1, -1, 22, -1, -1, - -1, -1, -1, -1, 29, -1, -1, -1, 33, 34, - -1, 36, -1, -1, -1, 40, -1, 42, 43, 44, - -1, -1, 47, -1, -1, -1, 51, -1, 53, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 65, -1, 67, -1, 69, -1, 71, -1, 73, -1, - -1, -1, -1, 78, 79, 80, -1, -1, -1, -1, - -1, -1, -1, 4, 5, 6, -1, -1, 9, 10, - 11, -1, -1, 14, -1, 16, -1, -1, -1, 20, - 21, 22, -1, -1, -1, -1, -1, -1, 29, 30, - 31, 32, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 43, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 59, -1, - -1, -1, -1, -1, -1, 66, 67, 68, -1, 70, - 71, 72, 73, 74, 75, -1, -1, 78, 79, 80, - 81, 82, 83, -1, -1, -1, -1, 4, 5, 6, - -1, -1, 9, 10, 11, -1, -1, 14, -1, 16, - -1, -1, -1, 20, 21, 22, -1, -1, -1, -1, - -1, -1, 29, 30, 31, 32, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 43, -1, -1, -1, - 47, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 59, -1, -1, -1, -1, -1, 65, 66, - 67, 68, -1, 70, 71, 72, 73, 74, 75, -1, - -1, 78, 79, 80, 81, 82, 83, -1, -1, -1, -1, 4, 5, 6, -1, -1, 9, 10, 11, -1, -1, 14, -1, 16, -1, -1, -1, 20, 21, 22, -1, -1, -1, -1, -1, -1, 29, 30, 31, 32, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 43, -1, -1, -1, 47, -1, -1, -1, -1, -1, - -1, -1, 55, -1, -1, -1, 59, -1, -1, -1, - -1, -1, 65, 66, 67, 68, -1, 70, 71, 72, + 43, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 59, -1, -1, -1, + -1, -1, -1, 66, 67, 68, -1, 70, 71, 72, 73, 74, 75, -1, -1, 78, 79, 80, 81, 82, - 83, -1, -1, -1, -1, 4, -1, -1, -1, -1, - 9, -1, 11, 12, 13, 14, -1, -1, -1, -1, - -1, -1, 21, 22, -1, -1, -1, -1, -1, -1, - 29, 30, -1, -1, 33, 34, -1, 36, -1, -1, - -1, 40, -1, 42, 43, 44, -1, -1, 47, -1, - -1, -1, 51, -1, 53, -1, -1, -1, -1, -1, - 59, -1, 61, -1, -1, -1, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, -1, -1, 78, - 79, 80, 81, 82, -1, -1, -1, -1, -1, 4, - -1, -1, -1, -1, 9, -1, 11, 12, 13, 14, - -1, -1, -1, -1, -1, -1, 21, 22, -1, -1, - -1, -1, -1, -1, 29, 30, -1, -1, 33, 34, - -1, 36, -1, -1, -1, 40, -1, 42, 43, 44, - -1, -1, 47, -1, -1, -1, 51, -1, 53, -1, - -1, -1, -1, -1, 59, -1, 61, -1, -1, -1, - 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 75, -1, -1, 78, 79, 80, 81, 82, -1, -1, + 83, -1, -1, -1, -1, 4, 5, 6, -1, -1, + 9, 10, 11, -1, -1, 14, -1, 16, -1, -1, + -1, 20, 21, 22, -1, -1, -1, -1, -1, -1, + 29, 30, 31, 32, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 43, -1, -1, -1, 47, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 59, -1, -1, -1, -1, -1, 65, 66, 67, 68, + -1, 70, 71, 72, 73, 74, 75, -1, -1, 78, + 79, 80, 81, 82, 83, -1, -1, -1, -1, 4, + 5, 6, -1, -1, 9, 10, 11, -1, -1, 14, + -1, 16, -1, -1, -1, 20, 21, 22, -1, -1, + -1, -1, -1, -1, 29, 30, 31, 32, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 43, -1, + -1, -1, 47, -1, -1, -1, -1, -1, -1, -1, + 55, -1, -1, -1, 59, -1, -1, -1, -1, -1, + 65, 66, 67, 68, -1, 70, 71, 72, 73, 74, + 75, -1, -1, 78, 79, 80, 81, 82, 83, -1, -1, -1, -1, 4, -1, -1, -1, -1, 9, -1, 11, 12, 13, 14, -1, -1, -1, -1, -1, -1, 21, 22, -1, -1, -1, -1, -1, -1, 29, 30, @@ -616,47 +652,66 @@ const int JavaScriptGrammar::action_check [] = { -1, -1, 59, -1, 61, -1, -1, -1, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, -1, -1, 78, 79, 80, 81, 82, -1, -1, -1, -1, - -1, 4, 5, 6, -1, -1, 9, 10, 11, 12, - 13, 14, -1, 16, -1, -1, -1, 20, 21, 22, - -1, -1, -1, -1, -1, -1, 29, 30, 31, 32, + -1, 4, -1, -1, -1, -1, 9, -1, 11, 12, + 13, 14, -1, -1, -1, -1, -1, -1, 21, 22, + -1, -1, -1, -1, -1, -1, 29, 30, -1, -1, 33, 34, -1, 36, -1, -1, -1, 40, -1, 42, 43, 44, -1, -1, 47, -1, -1, -1, 51, -1, - 53, -1, 55, -1, -1, -1, 59, -1, 61, -1, + 53, -1, -1, -1, -1, -1, 59, -1, 61, -1, -1, -1, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, -1, -1, 78, 79, 80, 81, 82, - 83, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 4, -1, -1, -1, -1, + 9, -1, 11, 12, 13, 14, -1, -1, -1, -1, + -1, -1, 21, 22, -1, -1, -1, -1, -1, -1, + 29, 30, -1, -1, 33, 34, -1, 36, -1, -1, + -1, 40, -1, 42, 43, 44, -1, -1, 47, -1, + -1, -1, 51, -1, 53, -1, -1, -1, -1, -1, + 59, -1, 61, -1, -1, -1, 65, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, -1, -1, 78, + 79, 80, 81, 82, -1, -1, -1, -1, -1, 4, + 5, 6, -1, -1, 9, 10, 11, 12, 13, 14, + -1, 16, -1, -1, -1, 20, 21, 22, -1, -1, + -1, -1, -1, -1, 29, 30, 31, 32, 33, 34, + -1, 36, -1, -1, -1, 40, -1, 42, 43, 44, + -1, -1, 47, -1, -1, -1, 51, -1, 53, -1, + 55, -1, -1, -1, 59, -1, 61, -1, -1, -1, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, -1, -1, 78, 79, 80, 81, 82, 83, -1, + -1, -1, -1, - 20, 72, 84, 89, 14, 72, 20, 5, 20, 22, - 12, 20, 11, 20, 20, 16, 12, 11, 54, 11, - 76, 12, 90, 58, 12, 58, 12, 20, 11, 58, - 12, 12, 12, 10, 58, 11, 9, 12, 12, 11, - 11, 11, 20, 9, 11, 87, 11, 9, 12, 12, - 78, 12, 12, 12, 23, 11, 6, -1, 12, 12, - 11, -1, 20, 20, 14, 20, 7, -1, 11, 10, - 13, -1, 8, 20, 10, 23, 24, -1, 11, 31, - 27, -1, 31, 35, 2, 31, 31, 36, -1, 31, - 35, 31, 31, 31, -1, 41, 14, 35, 12, 31, - 31, 33, 33, 43, 31, 47, 45, 31, 31, 36, - 33, 31, 36, 33, 31, 31, 31, 33, 33, 36, - 31, 31, 33, 31, 12, 12, 36, 31, 36, 33, - 31, 31, 12, 33, 31, 36, 31, 34, 33, 31, - 25, 55, 34, 28, -1, 31, 20, 33, 31, 31, - 31, -1, 31, 27, 37, 31, 37, 39, 37, 31, - 36, 31, -1, -1, 36, 6, 36, 55, 55, 31, - -1, 31, 31, 14, 36, 55, 36, 31, 37, 33, - 31, 31, 33, 33, 31, 31, 33, 11, 31, 13, - 36, 31, 31, 36, 31, 31, 36, 36, 31, 36, - 36, 31, 11, 36, 13, 38, 36, 53, 38, 46, - 53, 31, 48, 53, 53, 31, 36, 31, 38, -1, - 36, -1, 36, 31, 38, 31, 42, 31, 36, -1, - 36, -1, 36, -1, 40, -1, -1, -1, -1, -1, - 44, -1, -1, -1, -1, 53, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 25, -1, -1, - 28, -1, -1, -1, -1, -1, -1, 91, -1, -1, + 72, 76, 12, 5, 72, 84, 11, 14, 12, 9, + 11, 10, 9, 16, 12, 11, 11, 58, 89, 12, + 9, 58, 54, 11, 78, 11, 20, 90, 20, 20, + 20, 12, 11, 11, 11, 20, 12, 11, 11, 11, + 23, 12, 11, 87, 12, 12, 58, 22, -1, 12, + 20, -1, 12, 12, 20, 20, 20, 12, 20, 20, + 12, 11, -1, 12, 12, 8, -1, 10, -1, 25, + -1, 58, 28, 31, 31, 33, -1, 31, 31, 36, + 31, -1, 36, 36, 31, 36, 31, 31, 33, 36, + 31, 31, 31, 31, 31, 39, 37, 37, 37, 37, + 31, 31, 33, 31, 12, 23, 24, 35, 45, 20, + 31, 31, 33, 43, 31, 31, 27, 33, 35, 31, + 7, 41, 31, 10, 33, 31, 31, 20, 31, 12, + 36, 36, 35, 12, 27, 47, 31, 31, 33, 33, + 31, 31, 31, 33, 33, 36, 12, 31, 12, 33, + 31, 31, 33, 33, 25, 2, 31, 28, 33, 31, + -1, 33, 31, 31, 31, 34, 34, 14, 31, 36, + -1, -1, 55, 36, 31, 11, 55, 13, 6, 36, + 31, -1, 31, 31, -1, 36, 14, 36, 36, 55, + 6, 55, 11, 11, 13, 13, 31, 31, 14, -1, + -1, 36, 36, -1, 53, 53, 31, 31, 42, 44, + 31, 36, 36, 38, 38, 36, 31, 31, 31, 40, + 31, 36, 36, 36, 31, 36, 31, 38, -1, 36, + -1, 36, -1, -1, -1, 48, -1, -1, 53, 53, + -1, 46, -1, -1, -1, -1, 53, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 91, -1, -1, -1, 96, -1, -1, + -1, -1, 31, -1, -1, -1, -1, 36, -1, 38, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 96, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}; + -1, -1, -1, -1, -1, -1, -1, -1, -1}; diff --git a/src/declarative/qml/parser/javascriptgrammar_p.h b/src/declarative/qml/parser/javascriptgrammar_p.h index b6ffbc6..3412844 100644 --- a/src/declarative/qml/parser/javascriptgrammar_p.h +++ b/src/declarative/qml/parser/javascriptgrammar_p.h @@ -1,4 +1,56 @@ // This file was generated by qlalr - DO NOT EDIT! +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists for the convenience +// of other Qt classes. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + #ifndef JAVASCRIPTGRAMMAR_P_H #define JAVASCRIPTGRAMMAR_P_H @@ -95,15 +147,15 @@ public: T_XOR = 76, T_XOR_EQ = 77, - ACCEPT_STATE = 524, - RULE_COUNT = 298, - STATE_COUNT = 525, + ACCEPT_STATE = 526, + RULE_COUNT = 300, + STATE_COUNT = 527, TERMINAL_COUNT = 88, NON_TERMINAL_COUNT = 98, - GOTO_INDEX_OFFSET = 525, - GOTO_INFO_OFFSET = 1675, - GOTO_CHECK_OFFSET = 1675 + GOTO_INDEX_OFFSET = 527, + GOTO_INFO_OFFSET = 1723, + GOTO_CHECK_OFFSET = 1723 }; static const char *const spell []; diff --git a/src/declarative/qml/parser/javascriptparser.cpp b/src/declarative/qml/parser/javascriptparser.cpp index f868216..137e2b0 100644 --- a/src/declarative/qml/parser/javascriptparser.cpp +++ b/src/declarative/qml/parser/javascriptparser.cpp @@ -305,61 +305,70 @@ case 27: { sym(1).Node = makeAstNode(driver->nodePool(), sym(1).Node); } break; -case 28: { +case 28: + +case 29: +{ + AST::UiQualifiedId *node = makeAstNode (driver->nodePool(), driver->intern(lexer->characterBuffer(), lexer->characterCount())); + node->identifierToken = loc(1); + sym(1).Node = node; +} break; + +case 30: { AST::UiQualifiedId *node = makeAstNode (driver->nodePool(), sym(1).sval); node->identifierToken = loc(1); sym(1).Node = node; } break; -case 29: { +case 31: { AST::UiQualifiedId *node = makeAstNode (driver->nodePool(), sym(1).UiQualifiedId, sym(3).sval); node->identifierToken = loc(3); sym(1).Node = node; } break; -case 30: { +case 32: { AST::ThisExpression *node = makeAstNode (driver->nodePool()); node->thisToken = loc(1); sym(1).Node = node; } break; -case 31: { +case 33: { AST::IdentifierExpression *node = makeAstNode (driver->nodePool(), sym(1).sval); node->identifierToken = loc(1); sym(1).Node = node; } break; -case 32: { +case 34: { AST::NullExpression *node = makeAstNode (driver->nodePool()); node->nullToken = loc(1); sym(1).Node = node; } break; -case 33: { +case 35: { AST::TrueLiteral *node = makeAstNode (driver->nodePool()); node->trueToken = loc(1); sym(1).Node = node; } break; -case 34: { +case 36: { AST::FalseLiteral *node = makeAstNode (driver->nodePool()); node->falseToken = loc(1); sym(1).Node = node; } break; -case 35: { +case 37: { AST::NumericLiteral *node = makeAstNode (driver->nodePool(), sym(1).dval); node->literalToken = loc(1); sym(1).Node = node; } break; -case 36: { +case 38: { AST::StringLiteral *node = makeAstNode (driver->nodePool(), sym(1).sval); node->literalToken = loc(1); sym(1).Node = node; } break; -case 37: { +case 39: { bool rx = lexer->scanRegExp(Lexer::NoPrefix); if (!rx) { diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, lexer->startLineNo(), @@ -371,7 +380,7 @@ case 37: { sym(1).Node = node; } break; -case 38: { +case 40: { bool rx = lexer->scanRegExp(Lexer::EqualPrefix); if (!rx) { diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, lexer->startLineNo(), @@ -383,21 +392,21 @@ case 38: { sym(1).Node = node; } break; -case 39: { +case 41: { AST::ArrayLiteral *node = makeAstNode (driver->nodePool(), sym(2).Elision); node->lbracketToken = loc(1); node->rbracketToken = loc(3); sym(1).Node = node; } break; -case 40: { +case 42: { AST::ArrayLiteral *node = makeAstNode (driver->nodePool(), sym(2).ElementList->finish ()); node->lbracketToken = loc(1); node->rbracketToken = loc(3); sym(1).Node = node; } break; -case 41: { +case 43: { AST::ArrayLiteral *node = makeAstNode (driver->nodePool(), sym(2).ElementList->finish (), sym(4).Elision); node->lbracketToken = loc(1); node->commaToken = loc(3); @@ -405,7 +414,7 @@ case 41: { sym(1).Node = node; } break; -case 42: { +case 44: { AST::ObjectLiteral *node = 0; if (sym(2).Node) node = makeAstNode (driver->nodePool(), @@ -417,7 +426,7 @@ case 42: { sym(1).Node = node; } break; -case 43: { +case 45: { AST::ObjectLiteral *node = makeAstNode (driver->nodePool(), sym(2).PropertyNameAndValueList->finish ()); node->lbraceToken = loc(1); @@ -425,51 +434,51 @@ case 43: { sym(1).Node = node; } break; -case 44: { +case 46: { AST::NestedExpression *node = makeAstNode(driver->nodePool(), sym(2).Expression); node->lparenToken = loc(1); node->rparenToken = loc(3); sym(1).Node = node; } break; -case 45: { +case 47: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).Elision, sym(2).Expression); } break; -case 46: { +case 48: { AST::ElementList *node = makeAstNode (driver->nodePool(), sym(1).ElementList, sym(3).Elision, sym(4).Expression); node->commaToken = loc(2); sym(1).Node = node; } break; -case 47: { +case 49: { AST::Elision *node = makeAstNode (driver->nodePool()); node->commaToken = loc(1); sym(1).Node = node; } break; -case 48: { +case 50: { AST::Elision *node = makeAstNode (driver->nodePool(), sym(1).Elision); node->commaToken = loc(2); sym(1).Node = node; } break; -case 49: { +case 51: { sym(1).Node = 0; } break; -case 50: { +case 52: { sym(1).Elision = sym(1).Elision->finish (); } break; -case 51: { +case 53: { AST::PropertyNameAndValueList *node = makeAstNode (driver->nodePool(), sym(1).PropertyName, sym(3).Expression); node->colonToken = loc(2); sym(1).Node = node; } break; -case 52: { +case 54: { AST::PropertyNameAndValueList *node = makeAstNode (driver->nodePool(), sym(1).PropertyNameAndValueList, sym(3).PropertyName, sym(5).Expression); node->commaToken = loc(2); @@ -477,34 +486,30 @@ case 52: { sym(1).Node = node; } break; -case 53: { +case 55: { AST::IdentifierPropertyName *node = makeAstNode (driver->nodePool(), sym(1).sval); node->propertyNameToken = loc(1); sym(1).Node = node; } break; -case 54: { +case 56: { AST::StringLiteralPropertyName *node = makeAstNode (driver->nodePool(), sym(1).sval); node->propertyNameToken = loc(1); sym(1).Node = node; } break; -case 55: { +case 57: { AST::NumericLiteralPropertyName *node = makeAstNode (driver->nodePool(), sym(1).dval); node->propertyNameToken = loc(1); sym(1).Node = node; } break; -case 56: { +case 58: { AST::IdentifierPropertyName *node = makeAstNode (driver->nodePool(), sym(1).sval); node->propertyNameToken = loc(1); sym(1).Node = node; } break; -case 57: - -case 58: - case 59: case 60: @@ -562,25 +567,29 @@ case 85: case 86: case 87: + +case 88: + +case 89: { sym(1).sval = driver->intern(lexer->characterBuffer(), lexer->characterCount()); } break; -case 92: { +case 94: { AST::ArrayMemberExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).Expression); node->lbracketToken = loc(2); node->rbracketToken = loc(4); sym(1).Node = node; } break; -case 93: { +case 95: { AST::FieldMemberExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).sval); node->dotToken = loc(2); node->identifierToken = loc(3); sym(1).Node = node; } break; -case 94: { +case 96: { AST::NewMemberExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression, sym(4).ArgumentList); node->newToken = loc(1); node->lparenToken = loc(3); @@ -588,316 +597,309 @@ case 94: { sym(1).Node = node; } break; -case 96: { +case 98: { AST::NewExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->newToken = loc(1); sym(1).Node = node; } break; -case 97: { +case 99: { AST::CallExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).ArgumentList); node->lparenToken = loc(2); node->rparenToken = loc(4); sym(1).Node = node; } break; -case 98: { +case 100: { AST::CallExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).ArgumentList); node->lparenToken = loc(2); node->rparenToken = loc(4); sym(1).Node = node; } break; -case 99: { +case 101: { AST::ArrayMemberExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).Expression); node->lbracketToken = loc(2); node->rbracketToken = loc(4); sym(1).Node = node; } break; -case 100: { +case 102: { AST::FieldMemberExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).sval); node->dotToken = loc(2); node->identifierToken = loc(3); sym(1).Node = node; } break; -case 101: { +case 103: { sym(1).Node = 0; } break; -case 102: { +case 104: { sym(1).Node = sym(1).ArgumentList->finish(); } break; -case 103: { +case 105: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).Expression); } break; -case 104: { +case 106: { AST::ArgumentList *node = makeAstNode (driver->nodePool(), sym(1).ArgumentList, sym(3).Expression); node->commaToken = loc(2); sym(1).Node = node; } break; -case 108: { +case 110: { AST::PostIncrementExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression); node->incrementToken = loc(2); sym(1).Node = node; } break; -case 109: { +case 111: { AST::PostDecrementExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression); node->decrementToken = loc(2); sym(1).Node = node; } break; -case 111: { +case 113: { AST::DeleteExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->deleteToken = loc(1); sym(1).Node = node; } break; -case 112: { +case 114: { AST::VoidExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->voidToken = loc(1); sym(1).Node = node; } break; -case 113: { +case 115: { AST::TypeOfExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->typeofToken = loc(1); sym(1).Node = node; } break; -case 114: { +case 116: { AST::PreIncrementExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->incrementToken = loc(1); sym(1).Node = node; } break; -case 115: { +case 117: { AST::PreDecrementExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->decrementToken = loc(1); sym(1).Node = node; } break; -case 116: { +case 118: { AST::UnaryPlusExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->plusToken = loc(1); sym(1).Node = node; } break; -case 117: { +case 119: { AST::UnaryMinusExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->minusToken = loc(1); sym(1).Node = node; } break; -case 118: { +case 120: { AST::TildeExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->tildeToken = loc(1); sym(1).Node = node; } break; -case 119: { +case 121: { AST::NotExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->notToken = loc(1); sym(1).Node = node; } break; -case 121: { +case 123: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Mul, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 122: { +case 124: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Div, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 123: { +case 125: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Mod, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 125: { +case 127: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Add, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 126: { +case 128: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Sub, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 128: { +case 130: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::LShift, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 129: { +case 131: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::RShift, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 130: { +case 132: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::URShift, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 132: { +case 134: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Lt, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 133: { +case 135: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Gt, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 134: { +case 136: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Le, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 135: { +case 137: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Ge, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 136: { +case 138: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::InstanceOf, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 137: { +case 139: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::In, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 139: { +case 141: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Lt, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 140: { +case 142: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Gt, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 141: { +case 143: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Le, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 142: { +case 144: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Ge, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 143: { +case 145: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::InstanceOf, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 145: { +case 147: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Equal, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 146: { +case 148: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::NotEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 147: { +case 149: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::StrictEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 148: { +case 150: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::StrictNotEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 150: { +case 152: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Equal, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 151: { +case 153: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::NotEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 152: { +case 154: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::StrictEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 153: { - AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, - QSOperator::StrictNotEqual, sym(3).Expression); - node->operatorToken = loc(2); - sym(1).Node = node; -} break; - case 155: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, - QSOperator::BitAnd, sym(3).Expression); + QSOperator::StrictNotEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; @@ -911,7 +913,7 @@ case 157: { case 159: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, - QSOperator::BitXor, sym(3).Expression); + QSOperator::BitAnd, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; @@ -925,7 +927,7 @@ case 161: { case 163: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, - QSOperator::BitOr, sym(3).Expression); + QSOperator::BitXor, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; @@ -939,7 +941,7 @@ case 165: { case 167: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, - QSOperator::And, sym(3).Expression); + QSOperator::BitOr, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; @@ -953,7 +955,7 @@ case 169: { case 171: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, - QSOperator::Or, sym(3).Expression); + QSOperator::And, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; @@ -966,6 +968,13 @@ case 173: { } break; case 175: { + AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, + QSOperator::Or, sym(3).Expression); + node->operatorToken = loc(2); + sym(1).Node = node; +} break; + +case 177: { AST::ConditionalExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).Expression, sym(5).Expression); node->questionToken = loc(2); @@ -973,7 +982,7 @@ case 175: { sym(1).Node = node; } break; -case 177: { +case 179: { AST::ConditionalExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).Expression, sym(5).Expression); node->questionToken = loc(2); @@ -981,112 +990,112 @@ case 177: { sym(1).Node = node; } break; -case 179: { +case 181: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(2).ival, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 181: { +case 183: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(2).ival, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 182: { +case 184: { sym(1).ival = QSOperator::Assign; } break; -case 183: { +case 185: { sym(1).ival = QSOperator::InplaceMul; } break; -case 184: { +case 186: { sym(1).ival = QSOperator::InplaceDiv; } break; -case 185: { +case 187: { sym(1).ival = QSOperator::InplaceMod; } break; -case 186: { +case 188: { sym(1).ival = QSOperator::InplaceAdd; } break; -case 187: { +case 189: { sym(1).ival = QSOperator::InplaceSub; } break; -case 188: { +case 190: { sym(1).ival = QSOperator::InplaceLeftShift; } break; -case 189: { +case 191: { sym(1).ival = QSOperator::InplaceRightShift; } break; -case 190: { +case 192: { sym(1).ival = QSOperator::InplaceURightShift; } break; -case 191: { +case 193: { sym(1).ival = QSOperator::InplaceAnd; } break; -case 192: { +case 194: { sym(1).ival = QSOperator::InplaceXor; } break; -case 193: { +case 195: { sym(1).ival = QSOperator::InplaceOr; } break; -case 195: { +case 197: { AST::Expression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).Expression); node->commaToken = loc(2); sym(1).Node = node; } break; -case 196: { +case 198: { sym(1).Node = 0; } break; -case 199: { +case 201: { AST::Expression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).Expression); node->commaToken = loc(2); sym(1).Node = node; } break; -case 200: { +case 202: { sym(1).Node = 0; } break; -case 217: { +case 219: { AST::Block *node = makeAstNode (driver->nodePool(), sym(2).StatementList); node->lbraceToken = loc(1); node->rbraceToken = loc(3); sym(1).Node = node; } break; -case 218: { +case 220: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).Statement); } break; -case 219: { +case 221: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).StatementList, sym(2).Statement); } break; -case 220: { +case 222: { sym(1).Node = 0; } break; -case 221: { +case 223: { sym(1).Node = sym(1).StatementList->finish (); } break; -case 223: { +case 225: { AST::VariableStatement *node = makeAstNode (driver->nodePool(), sym(2).VariableDeclarationList->finish (/*readOnly=*/sym(1).ival == T_CONST)); node->declarationKindToken = loc(1); @@ -1094,76 +1103,76 @@ case 223: { sym(1).Node = node; } break; -case 224: { +case 226: { sym(1).ival = T_CONST; } break; -case 225: { +case 227: { sym(1).ival = T_VAR; } break; -case 226: { +case 228: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).VariableDeclaration); } break; -case 227: { +case 229: { AST::VariableDeclarationList *node = makeAstNode (driver->nodePool(), sym(1).VariableDeclarationList, sym(3).VariableDeclaration); node->commaToken = loc(2); sym(1).Node = node; } break; -case 228: { +case 230: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).VariableDeclaration); } break; -case 229: { +case 231: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).VariableDeclarationList, sym(3).VariableDeclaration); } break; -case 230: { +case 232: { AST::VariableDeclaration *node = makeAstNode (driver->nodePool(), sym(1).sval, sym(2).Expression); node->identifierToken = loc(1); sym(1).Node = node; } break; -case 231: { +case 233: { AST::VariableDeclaration *node = makeAstNode (driver->nodePool(), sym(1).sval, sym(2).Expression); node->identifierToken = loc(1); sym(1).Node = node; } break; -case 232: { +case 234: { // ### TODO: AST for initializer sym(1) = sym(2); } break; -case 233: { +case 235: { sym(1).Node = 0; } break; -case 235: { +case 237: { // ### TODO: AST for initializer sym(1) = sym(2); } break; -case 236: { +case 238: { sym(1).Node = 0; } break; -case 238: { +case 240: { AST::EmptyStatement *node = makeAstNode (driver->nodePool()); node->semicolonToken = loc(1); sym(1).Node = node; } break; -case 240: { +case 242: { AST::ExpressionStatement *node = makeAstNode (driver->nodePool(), sym(1).Expression); node->semicolonToken = loc(2); sym(1).Node = node; } break; -case 241: { +case 243: { AST::IfStatement *node = makeAstNode (driver->nodePool(), sym(3).Expression, sym(5).Statement, sym(7).Statement); node->ifToken = loc(1); node->lparenToken = loc(2); @@ -1172,7 +1181,7 @@ case 241: { sym(1).Node = node; } break; -case 242: { +case 244: { AST::IfStatement *node = makeAstNode (driver->nodePool(), sym(3).Expression, sym(5).Statement); node->ifToken = loc(1); node->lparenToken = loc(2); @@ -1180,7 +1189,7 @@ case 242: { sym(1).Node = node; } break; -case 244: { +case 246: { AST::DoWhileStatement *node = makeAstNode (driver->nodePool(), sym(2).Statement, sym(5).Expression); node->doToken = loc(1); node->whileToken = loc(3); @@ -1190,7 +1199,7 @@ case 244: { sym(1).Node = node; } break; -case 245: { +case 247: { AST::WhileStatement *node = makeAstNode (driver->nodePool(), sym(3).Expression, sym(5).Statement); node->whileToken = loc(1); node->lparenToken = loc(2); @@ -1198,7 +1207,7 @@ case 245: { sym(1).Node = node; } break; -case 246: { +case 248: { AST::ForStatement *node = makeAstNode (driver->nodePool(), sym(3).Expression, sym(5).Expression, sym(7).Expression, sym(9).Statement); node->forToken = loc(1); @@ -1209,7 +1218,7 @@ case 246: { sym(1).Node = node; } break; -case 247: { +case 249: { AST::LocalForStatement *node = makeAstNode (driver->nodePool(), sym(4).VariableDeclarationList->finish (/*readOnly=*/false), sym(6).Expression, sym(8).Expression, sym(10).Statement); @@ -1222,7 +1231,7 @@ case 247: { sym(1).Node = node; } break; -case 248: { +case 250: { AST:: ForEachStatement *node = makeAstNode (driver->nodePool(), sym(3).Expression, sym(5).Expression, sym(7).Statement); node->forToken = loc(1); @@ -1232,7 +1241,7 @@ case 248: { sym(1).Node = node; } break; -case 249: { +case 251: { AST::LocalForEachStatement *node = makeAstNode (driver->nodePool(), sym(4).VariableDeclaration, sym(6).Expression, sym(8).Statement); node->forToken = loc(1); @@ -1243,14 +1252,14 @@ case 249: { sym(1).Node = node; } break; -case 251: { +case 253: { AST::ContinueStatement *node = makeAstNode (driver->nodePool()); node->continueToken = loc(1); node->semicolonToken = loc(2); sym(1).Node = node; } break; -case 253: { +case 255: { AST::ContinueStatement *node = makeAstNode (driver->nodePool(), sym(2).sval); node->continueToken = loc(1); node->identifierToken = loc(2); @@ -1258,14 +1267,14 @@ case 253: { sym(1).Node = node; } break; -case 255: { +case 257: { AST::BreakStatement *node = makeAstNode (driver->nodePool()); node->breakToken = loc(1); node->semicolonToken = loc(2); sym(1).Node = node; } break; -case 257: { +case 259: { AST::BreakStatement *node = makeAstNode (driver->nodePool(), sym(2).sval); node->breakToken = loc(1); node->identifierToken = loc(2); @@ -1273,14 +1282,14 @@ case 257: { sym(1).Node = node; } break; -case 259: { +case 261: { AST::ReturnStatement *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->returnToken = loc(1); node->semicolonToken = loc(3); sym(1).Node = node; } break; -case 260: { +case 262: { AST::WithStatement *node = makeAstNode (driver->nodePool(), sym(3).Expression, sym(5).Statement); node->withToken = loc(1); node->lparenToken = loc(2); @@ -1288,7 +1297,7 @@ case 260: { sym(1).Node = node; } break; -case 261: { +case 263: { AST::SwitchStatement *node = makeAstNode (driver->nodePool(), sym(3).Expression, sym(5).CaseBlock); node->switchToken = loc(1); node->lparenToken = loc(2); @@ -1296,83 +1305,83 @@ case 261: { sym(1).Node = node; } break; -case 262: { +case 264: { AST::CaseBlock *node = makeAstNode (driver->nodePool(), sym(2).CaseClauses); node->lbraceToken = loc(1); node->rbraceToken = loc(3); sym(1).Node = node; } break; -case 263: { +case 265: { AST::CaseBlock *node = makeAstNode (driver->nodePool(), sym(2).CaseClauses, sym(3).DefaultClause, sym(4).CaseClauses); node->lbraceToken = loc(1); node->rbraceToken = loc(5); sym(1).Node = node; } break; -case 264: { +case 266: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).CaseClause); } break; -case 265: { +case 267: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).CaseClauses, sym(2).CaseClause); } break; -case 266: { +case 268: { sym(1).Node = 0; } break; -case 267: { +case 269: { sym(1).Node = sym(1).CaseClauses->finish (); } break; -case 268: { +case 270: { AST::CaseClause *node = makeAstNode (driver->nodePool(), sym(2).Expression, sym(4).StatementList); node->caseToken = loc(1); node->colonToken = loc(3); sym(1).Node = node; } break; -case 269: { +case 271: { AST::DefaultClause *node = makeAstNode (driver->nodePool(), sym(3).StatementList); node->defaultToken = loc(1); node->colonToken = loc(2); sym(1).Node = node; } break; -case 270: { +case 272: { AST::LabelledStatement *node = makeAstNode (driver->nodePool(), sym(1).sval, sym(3).Statement); node->identifierToken = loc(1); node->colonToken = loc(2); sym(1).Node = node; } break; -case 272: { +case 274: { AST::ThrowStatement *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->throwToken = loc(1); node->semicolonToken = loc(3); sym(1).Node = node; } break; -case 273: { +case 275: { AST::TryStatement *node = makeAstNode (driver->nodePool(), sym(2).Statement, sym(3).Catch); node->tryToken = loc(1); sym(1).Node = node; } break; -case 274: { +case 276: { AST::TryStatement *node = makeAstNode (driver->nodePool(), sym(2).Statement, sym(3).Finally); node->tryToken = loc(1); sym(1).Node = node; } break; -case 275: { +case 277: { AST::TryStatement *node = makeAstNode (driver->nodePool(), sym(2).Statement, sym(3).Catch, sym(4).Finally); node->tryToken = loc(1); sym(1).Node = node; } break; -case 276: { +case 278: { AST::Catch *node = makeAstNode (driver->nodePool(), sym(3).sval, sym(5).Block); node->catchToken = loc(1); node->lparenToken = loc(2); @@ -1381,20 +1390,20 @@ case 276: { sym(1).Node = node; } break; -case 277: { +case 279: { AST::Finally *node = makeAstNode (driver->nodePool(), sym(2).Block); node->finallyToken = loc(1); sym(1).Node = node; } break; -case 279: { +case 281: { AST::DebuggerStatement *node = makeAstNode (driver->nodePool()); node->debuggerToken = loc(1); node->semicolonToken = loc(2); sym(1).Node = node; } break; -case 280: { +case 282: { AST::FunctionDeclaration *node = makeAstNode (driver->nodePool(), sym(2).sval, sym(4).FormalParameterList, sym(7).FunctionBody); node->functionToken = loc(1); node->identifierToken = loc(2); @@ -1405,7 +1414,7 @@ case 280: { sym(1).Node = node; } break; -case 281: { +case 283: { AST::FunctionExpression *node = makeAstNode (driver->nodePool(), sym(2).sval, sym(4).FormalParameterList, sym(7).FunctionBody); node->functionToken = loc(1); if (sym(2).sval) @@ -1417,56 +1426,56 @@ case 281: { sym(1).Node = node; } break; -case 282: { +case 284: { AST::FormalParameterList *node = makeAstNode (driver->nodePool(), sym(1).sval); node->identifierToken = loc(1); sym(1).Node = node; } break; -case 283: { +case 285: { AST::FormalParameterList *node = makeAstNode (driver->nodePool(), sym(1).FormalParameterList, sym(3).sval); node->commaToken = loc(2); node->identifierToken = loc(3); sym(1).Node = node; } break; -case 284: { +case 286: { sym(1).Node = 0; } break; -case 285: { +case 287: { sym(1).Node = sym(1).FormalParameterList->finish (); } break; -case 286: { +case 288: { sym(1).Node = 0; } break; -case 288: { +case 290: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).SourceElements->finish ()); } break; -case 289: { +case 291: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).SourceElement); } break; -case 290: { +case 292: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).SourceElements, sym(2).SourceElement); } break; -case 291: { +case 293: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).Statement); } break; -case 292: { +case 294: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).FunctionDeclaration); } break; -case 293: { +case 295: { sym(1).sval = 0; } break; -case 295: { +case 297: { sym(1).Node = 0; } break; diff --git a/src/declarative/qml/parser/javascriptparser_p.h b/src/declarative/qml/parser/javascriptparser_p.h index 34edaf7..e91286d 100644 --- a/src/declarative/qml/parser/javascriptparser_p.h +++ b/src/declarative/qml/parser/javascriptparser_p.h @@ -206,9 +206,9 @@ protected: }; -#define J_SCRIPT_REGEXPLITERAL_RULE1 37 +#define J_SCRIPT_REGEXPLITERAL_RULE1 39 -#define J_SCRIPT_REGEXPLITERAL_RULE2 38 +#define J_SCRIPT_REGEXPLITERAL_RULE2 40 QT_END_NAMESPACE -- cgit v0.12 From 2e71dc6b97dfa0f8193162019da326aa32291d5e Mon Sep 17 00:00:00 2001 From: Leonardo Sobral Cunha Date: Wed, 29 Apr 2009 14:58:38 +0200 Subject: Using qvariant color interpolator for QmlColorAnimation --- src/declarative/util/qmlanimation.cpp | 27 +++++++++------------------ src/declarative/util/qmlanimation_p.h | 8 +++++++- 2 files changed, 16 insertions(+), 19 deletions(-) diff --git a/src/declarative/util/qmlanimation.cpp b/src/declarative/util/qmlanimation.cpp index c09b378..a099e54 100644 --- a/src/declarative/util/qmlanimation.cpp +++ b/src/declarative/util/qmlanimation.cpp @@ -811,9 +811,9 @@ void QmlColorAnimation::transition(QmlStateActions &actions, struct NTransitionData : public QmlTimeLineValue { QmlStateActions actions; - void write(QmlMetaProperty &property, const QColor &color) + void write(QmlMetaProperty &property, const QVariant &color) { - if (property.propertyType() == qMetaTypeId()) { + if (property.propertyType() == QVariant::Color) { property.write(color); } } @@ -837,13 +837,8 @@ void QmlColorAnimation::transition(QmlStateActions &actions, QColor from(action.fromValue.value()); - //XXX consolidate somewhere - uint red = uint(qreal(from.red()) + v * (qreal(to.red()) - qreal(from.red()))); - uint green = uint(qreal(from.green()) + v * (qreal(to.green()) - qreal(from.green()))); - uint blue = uint(qreal(from.blue()) + v * (qreal(to.blue()) - qreal(from.blue()))); - uint alpha = uint(qreal(from.alpha()) + v * (qreal(to.alpha()) - qreal(from.alpha()))); - - write(action.property, QColor(red, green, blue, alpha)); + QVariant newColor = QmlColorAnimationPrivate::colorInterpolator(&from, &to, v); + write(action.property, newColor); } } } @@ -902,24 +897,20 @@ void QmlColorAnimation::transition(QmlStateActions &actions, delete data; } +QVariantAnimation::Interpolator QmlColorAnimationPrivate::colorInterpolator = 0; void QmlColorAnimationPrivate::valueChanged(qreal v) { if (!fromSourced) { if (!fromValue.isValid()) { - fromValue = QColor(qvariant_cast(property.read())); + fromValue = qvariant_cast(property.read()); } fromSourced = true; } - //XXX consolidate somewhere - uint red = uint(qreal(fromValue.red()) + v * (qreal(toValue.red()) - qreal(fromValue.red()))); - uint green = uint(qreal(fromValue.green()) + v * (qreal(toValue.green()) - qreal(fromValue.green()))); - uint blue = uint(qreal(fromValue.blue()) + v * (qreal(toValue.blue()) - qreal(fromValue.blue()))); - uint alpha = uint(qreal(fromValue.alpha()) + v * (qreal(toValue.alpha()) - qreal(fromValue.alpha()))); - - if (property.propertyType() == qMetaTypeId()) { - property.write(QColor(red, green, blue, alpha)); + if (property.propertyType() == QVariant::Color) { + QVariant newColor = colorInterpolator(&fromValue, &toValue, v); + property.write(newColor); } } QML_DEFINE_TYPE(QmlColorAnimation,ColorAnimation); diff --git a/src/declarative/util/qmlanimation_p.h b/src/declarative/util/qmlanimation_p.h index 728584c..0ef89f4 100644 --- a/src/declarative/util/qmlanimation_p.h +++ b/src/declarative/util/qmlanimation_p.h @@ -203,7 +203,11 @@ class QmlColorAnimationPrivate : public QmlAbstractAnimationPrivate Q_DECLARE_PUBLIC(QmlColorAnimation); public: QmlColorAnimationPrivate() - : QmlAbstractAnimationPrivate(), fromSourced(false), ca(0), value(this, &QmlColorAnimationPrivate::valueChanged) {} + : QmlAbstractAnimationPrivate(), fromSourced(false), ca(0), value(this, &QmlColorAnimationPrivate::valueChanged) + { + if (!colorInterpolator) + colorInterpolator = QVariantAnimationPrivate::getInterpolator(QVariant::Color); + } void init(); @@ -218,6 +222,8 @@ public: virtual void valueChanged(qreal); QmlTimeLineValueProxy value; + + static QVariantAnimation::Interpolator colorInterpolator; }; class QmlRunScriptActionPrivate : public QmlAbstractAnimationPrivate -- cgit v0.12 From 5b15e629641281dd87197b22bd4d0dc5dc7c89e1 Mon Sep 17 00:00:00 2001 From: Leonardo Sobral Cunha Date: Wed, 29 Apr 2009 16:57:46 +0200 Subject: Using QVariant for 'to' and 'from' values in QmlVariantAnimationPrivate The 'to' and 'from' attiributes in QmlVariantAnimationPrivate were QmlNullableValue before, but we can query QVariant::isValid for the same purpose. --- src/declarative/util/qmlanimation.cpp | 32 +++++++++++++++----------------- src/declarative/util/qmlanimation_p.h | 6 +++--- 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/src/declarative/util/qmlanimation.cpp b/src/declarative/util/qmlanimation.cpp index a099e54..7861e55 100644 --- a/src/declarative/util/qmlanimation.cpp +++ b/src/declarative/util/qmlanimation.cpp @@ -1997,7 +1997,7 @@ QVariant QmlVariantAnimation::from() const void QmlVariantAnimation::setFrom(const QVariant &f) { Q_D(QmlVariantAnimation); - if (!d->from.isNull && f == d->from) + if (d->from.isValid() && f == d->from) return; d->from = f; emit fromChanged(f); @@ -2021,7 +2021,7 @@ QVariant QmlVariantAnimation::to() const void QmlVariantAnimation::setTo(const QVariant &t) { Q_D(QmlVariantAnimation); - if (!d->to.isNull && t == d->to) + if (d->to.isValid() && t == d->to) return; d->to = t; emit toChanged(t); @@ -2113,18 +2113,16 @@ QList *QmlVariantAnimation::exclude() void QmlVariantAnimationPrivate::valueChanged(qreal r) { if (!fromSourced) { - if (from.isNull) { - fromValue = property.read(); - } else { - fromValue = from; + if (!from.isValid()) { + from = property.read(); } fromSourced = true; } if (r == 1.) { - property.write(to.value); + property.write(to); } else { - QVariant val = interpolateVariant(fromValue, to.value, r); + QVariant val = interpolateVariant(from, to, r); property.write(val); } } @@ -2143,9 +2141,9 @@ void QmlVariantAnimation::prepare(QmlMetaProperty &p) else d->property = d->userProperty; - d->convertVariant(d->to.value, (QVariant::Type)d->property.propertyType()); - if (!d->from.isNull) - d->convertVariant(d->from.value, (QVariant::Type)d->property.propertyType()); + d->convertVariant(d->to, (QVariant::Type)d->property.propertyType()); + if (d->from.isValid()) + d->convertVariant(d->from, (QVariant::Type)d->property.propertyType()); d->fromSourced = false; d->value.QmlTimeLineValue::setValue(0.); @@ -2205,12 +2203,12 @@ void QmlVariantAnimation::transition(QmlStateActions &actions, Action myAction = action; if (d->from.isValid()) { - myAction.fromValue = QVariant(d->from); + myAction.fromValue = d->from; } else { myAction.fromValue = QVariant(); } if (d->to.isValid()) - myAction.toValue = QVariant(d->to); + myAction.toValue = d->to; d->convertVariant(myAction.fromValue, (QVariant::Type)myAction.property.propertyType()); d->convertVariant(myAction.toValue, (QVariant::Type)myAction.property.propertyType()); @@ -2229,12 +2227,12 @@ void QmlVariantAnimation::transition(QmlStateActions &actions, myAction.property = QmlMetaProperty(obj, props.at(jj)); if (d->from.isValid()) { - d->convertVariant(d->from.value, (QVariant::Type)myAction.property.propertyType()); - myAction.fromValue = QVariant(d->from); + d->convertVariant(d->from, (QVariant::Type)myAction.property.propertyType()); + myAction.fromValue = d->from; } - d->convertVariant(d->to.value, (QVariant::Type)myAction.property.propertyType()); - myAction.toValue = QVariant(d->to); + d->convertVariant(d->to, (QVariant::Type)myAction.property.propertyType()); + myAction.toValue = d->to; myAction.bv = 0; myAction.event = 0; data->actions << myAction; diff --git a/src/declarative/util/qmlanimation_p.h b/src/declarative/util/qmlanimation_p.h index 0ef89f4..4fcaa47 100644 --- a/src/declarative/util/qmlanimation_p.h +++ b/src/declarative/util/qmlanimation_p.h @@ -354,8 +354,8 @@ public: void init(); - QmlNullableValue from; - QmlNullableValue to; + QVariant from; + QVariant to; QString easing; @@ -364,7 +364,7 @@ public: QList exclude; bool fromSourced; - QVariant fromValue; + QmlTimeLineValueAnimator *va; virtual void valueChanged(qreal); -- cgit v0.12 From e2f9eb037dfd26e02cad8a31a499a9c92a315d8b Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Thu, 30 Apr 2009 13:33:23 +0200 Subject: qdoc: Corrected some qdoc warnings. --- doc/src/animation.qdoc | 2 +- src/corelib/tools/qeasingcurve.cpp | 2 +- src/declarative/fx/qfximage.cpp | 2 +- src/declarative/fx/qfxtextedit.cpp | 5 +-- src/declarative/timeline/qmltimeline.cpp | 2 +- src/declarative/util/qfxview.cpp | 64 +++++++++++++++++++++++++++++--- src/declarative/util/qmlscript.cpp | 2 +- src/gui/painting/qpainterpath.cpp | 2 +- tools/qdoc3/test/qt-cpp-ignore.qdocconf | 3 +- 9 files changed, 69 insertions(+), 15 deletions(-) diff --git a/doc/src/animation.qdoc b/doc/src/animation.qdoc index 081660c..f8b6d4c 100644 --- a/doc/src/animation.qdoc +++ b/doc/src/animation.qdoc @@ -43,7 +43,7 @@ \page animation.html \title The Animation Framework \ingroup architecture - \ingroup animation + \ingroup group_animation \brief An overview of the Animation Framework \keyword Animation diff --git a/src/corelib/tools/qeasingcurve.cpp b/src/corelib/tools/qeasingcurve.cpp index a1a0d1f..da86442 100644 --- a/src/corelib/tools/qeasingcurve.cpp +++ b/src/corelib/tools/qeasingcurve.cpp @@ -53,7 +53,7 @@ /*! \class QEasingCurve - \ingroup animation + \ingroup group_animation \brief The QEasingCurve class provides easing curves for controlling animation. Easing curves describe a function that controls how the speed of the interpolation diff --git a/src/declarative/fx/qfximage.cpp b/src/declarative/fx/qfximage.cpp index a34cd12..9eb8277 100644 --- a/src/declarative/fx/qfximage.cpp +++ b/src/declarative/fx/qfximage.cpp @@ -812,7 +812,7 @@ QFxImage::Status QFxImage::status() const */ /*! - \property QFxImage::src + \property QFxImage::source \brief the url of the image to be displayed in this item. The content specified can be of any image type loadable by QImage. Alternatively, diff --git a/src/declarative/fx/qfxtextedit.cpp b/src/declarative/fx/qfxtextedit.cpp index 68aea01..807fcbf 100644 --- a/src/declarative/fx/qfxtextedit.cpp +++ b/src/declarative/fx/qfxtextedit.cpp @@ -63,16 +63,15 @@ QML_DEFINE_TYPE(QFxTextEdit, TextEdit); /*! \qmlclass TextEdit \brief The TextEdit element allows you to add editable formatted text to a scene. - \inherits ImageItem It can display both plain and rich text. For example: - \code + \qml Hello World!]]/> - \endcode + \endqml \image declarative-textedit.gif diff --git a/src/declarative/timeline/qmltimeline.cpp b/src/declarative/timeline/qmltimeline.cpp index b9f79ac..3fa0161 100644 --- a/src/declarative/timeline/qmltimeline.cpp +++ b/src/declarative/timeline/qmltimeline.cpp @@ -561,7 +561,7 @@ void QmlTimeLine::sync(QmlTimeLineValue &timeLineValue) } } -/*! +/* Synchronize all currently and future scheduled values in this timeline to the longest action currently scheduled. diff --git a/src/declarative/util/qfxview.cpp b/src/declarative/util/qfxview.cpp index 5611bca..aefe3e4 100644 --- a/src/declarative/util/qfxview.cpp +++ b/src/declarative/util/qfxview.cpp @@ -145,7 +145,7 @@ QFxView::QFxView(QWidget *parent) /*! \fn QFxView::QFxView(QSimpleCanvas::CanvasMode mode, QWidget *parent) - + \internal Constructs a QFxView with the given \a parent. The canvas \a mode can be QSimpleCanvas::GraphicsView or QSimpleCanvas::SimpleCanvas. @@ -173,8 +173,8 @@ void QFxViewPrivate::init() } /*! - The destructor clears the instance and deletes the internal - representation. + The destructor clears the view's \l {QFxItem} {items} and + deletes the internal representation. \sa clearItems() */ @@ -213,18 +213,29 @@ QString QFxView::xml() const } /*! - Returns a pointer to the QmlEngine. + Returns a pointer to the QmlEngine used for instantiating + QML Components. */ QmlEngine* QFxView::engine() { return &d->engine; } +/*! + This function returns the root of the context hierarchy. Each QML + component is instantiated in a QmlContext. QmlContext's are + essential for passing data to QML components. In QML, contexts are + arranged hierarchically and this hierarchy is managed by the + QmlEngine. + */ QmlContext* QFxView::rootContext() { return d->engine.rootContext(); } +/*! + Displays the Qt Declarative user interface. +*/ void QFxView::execute() { rootContext()->activate(); @@ -242,6 +253,9 @@ void QFxView::execute() } } +/*! + \internal + */ void QFxView::continueExecute() { disconnect(d->component, SIGNAL(statusChanged(QmlComponent::Status)), this, SLOT(continueExecute())); @@ -283,12 +297,23 @@ void QFxView::continueExecute() } } +/*! \fn void QFxView::sceneResized(QSize size) + This signal is emitted when the view is resized. + */ + +/*! + \internal + */ void QFxView::sizeChanged() { // delay, so we catch both width and height changing. d->resizetimer.start(0,this); } +/*! + If the \l {QTimerEvent} {timer event} \a e is this + view's resize timer, sceneResized() is emitted. + */ void QFxView::timerEvent(QTimerEvent* e) { if (e->timerId() == d->resizetimer.timerId()) { @@ -298,6 +323,12 @@ void QFxView::timerEvent(QTimerEvent* e) } } +/*! + Creates a \l{QmlComponent} {component} from the \a xml + string, and returns it as an \l {QFxItem} {item}. If the + \a parent item is provided, it becomes the new item's + parent. \a parent should be in this view's item hierarchy. + */ QFxItem* QFxView::addItem(const QString &xml, QFxItem* parent) { if (!d->root) @@ -316,12 +347,19 @@ QFxItem* QFxView::addItem(const QString &xml, QFxItem* parent) return 0; } +/*! + Deletes the view's \l {QFxItem} {items} and the \l {QmlEngine} + {QML engine's} Component cache. + */ void QFxView::reset() { clearItems(); d->engine.clearComponentCache(); } +/*! + Deletes the view's \l {QFxItem} {items}. + */ void QFxView::clearItems() { if (!d->root) @@ -330,11 +368,18 @@ void QFxView::clearItems() d->root = 0; } +/*! + Returns the view's root \l {QFxItem} {item}. + */ QFxItem *QFxView::root() const { return d->root; } +/*! + This function handles the \l {QResizeEvent} {resize event} + \a e. + */ void QFxView::resizeEvent(QResizeEvent *e) { if (d->root) { @@ -344,17 +389,26 @@ void QFxView::resizeEvent(QResizeEvent *e) QSimpleCanvas::resizeEvent(e); } +/*! \fn void QFxView::focusInEvent(QFocusEvent *e) + This virtual function does nothing in this class. + */ void QFxView::focusInEvent(QFocusEvent *) { // Do nothing (do not call QWidget::update()) } + +/*! \fn void QFxView::focusOutEvent(QFocusEvent *e) + This virtual function does nothing in this class. + */ void QFxView::focusOutEvent(QFocusEvent *) { // Do nothing (do not call QWidget::update()) } - +/*! + \internal + */ void QFxView::dumpRoot() { root()->dump(); diff --git a/src/declarative/util/qmlscript.cpp b/src/declarative/util/qmlscript.cpp index fbaf56e..757ae09 100644 --- a/src/declarative/util/qmlscript.cpp +++ b/src/declarative/util/qmlscript.cpp @@ -136,7 +136,7 @@ void QmlScript::setScript(const QString &script) the file specified. */ /*! - \property QmlScript::src + \property QmlScript::source \brief the path to a script file. */ QString QmlScript::source() const diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp index d471aaa..5f110e3 100644 --- a/src/gui/painting/qpainterpath.cpp +++ b/src/gui/painting/qpainterpath.cpp @@ -2049,7 +2049,7 @@ QPainterPath QPainterPath::translated(qreal dx, qreal dy) const } /*! - \fn void QPainterPath::translated(const QPointF &offset) + \fn void QPainterPath::translated(const QPointF &offset) const \overload \since 4.6 diff --git a/tools/qdoc3/test/qt-cpp-ignore.qdocconf b/tools/qdoc3/test/qt-cpp-ignore.qdocconf index 107c692..603f531 100644 --- a/tools/qdoc3/test/qt-cpp-ignore.qdocconf +++ b/tools/qdoc3/test/qt-cpp-ignore.qdocconf @@ -65,7 +65,8 @@ Cpp.ignoretokens = QAXFACTORY_EXPORT \ QT_BEGIN_INCLUDE_NAMESPACE \ QT_END_NAMESPACE \ QT_END_INCLUDE_NAMESPACE \ - PHONON_EXPORT + PHONON_EXPORT \ + Q_DECLARATIVE_EXPORT Cpp.ignoredirectives = Q_DECLARE_HANDLE \ Q_DECLARE_INTERFACE \ Q_DECLARE_METATYPE \ -- cgit v0.12 From 052e6a8e82b707749be2ecbad1af60effecefebb Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Thu, 30 Apr 2009 13:51:22 +0200 Subject: Removed a fiew compilation warnings on MSVC --- src/declarative/qml/qmlcomponent.h | 2 +- src/declarative/qml/qmldom.cpp | 2 ++ src/declarative/util/qmlanimation.cpp | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/declarative/qml/qmlcomponent.h b/src/declarative/qml/qmlcomponent.h index 83d08ea..0493c1f 100644 --- a/src/declarative/qml/qmlcomponent.h +++ b/src/declarative/qml/qmlcomponent.h @@ -98,7 +98,7 @@ private: QmlComponent(QmlEngine *, QmlCompiledComponent *, int, int, QObject *parent); friend class QmlVME; - friend class QmlCompositeTypeData; + friend struct QmlCompositeTypeData; }; QML_DECLARE_TYPE(QmlComponent); diff --git a/src/declarative/qml/qmldom.cpp b/src/declarative/qml/qmldom.cpp index 4e8e1f7..937c244 100644 --- a/src/declarative/qml/qmldom.cpp +++ b/src/declarative/qml/qmldom.cpp @@ -150,6 +150,8 @@ int QmlDomDocument::version() const */ bool QmlDomDocument::load(QmlEngine *engine, const QByteArray &data) { + Q_UNUSED(engine); + d->error = QString(); QmlScriptParser parser; diff --git a/src/declarative/util/qmlanimation.cpp b/src/declarative/util/qmlanimation.cpp index 7861e55..4bcc550 100644 --- a/src/declarative/util/qmlanimation.cpp +++ b/src/declarative/util/qmlanimation.cpp @@ -211,7 +211,7 @@ void QmlAbstractAnimationPrivate::commence() q->prepare(userProperty.value); q->qtAnimation()->start(); - if (!q->qtAnimation()->state() == QAbstractAnimation::Running) { + if (q->qtAnimation()->state() != QAbstractAnimation::Running) { running = false; emit q->completed(); } -- cgit v0.12 From 6091b55ef4da3459ca3dd9d92e41fc223cf06aaf Mon Sep 17 00:00:00 2001 From: Roberto Raggi Date: Thu, 30 Apr 2009 16:26:22 +0200 Subject: Report the syntax errors. --- src/declarative/qml/qmlscriptparser.cpp | 39 ++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/src/declarative/qml/qmlscriptparser.cpp b/src/declarative/qml/qmlscriptparser.cpp index adc30dd..61cb2ee 100644 --- a/src/declarative/qml/qmlscriptparser.cpp +++ b/src/declarative/qml/qmlscriptparser.cpp @@ -547,7 +547,9 @@ bool QmlScriptParser::parse(const QByteArray &data, const QUrl &url) } const QString fileName = url.toString(); - const QString code = QString::fromUtf8(data); // ### FIXME + + QTextStream stream(data, QIODevice::ReadOnly); + const QString code = stream.readAll(); JavaScriptParser parser; JavaScriptEnginePrivate driver; @@ -562,6 +564,41 @@ bool QmlScriptParser::parse(const QByteArray &data, const QUrl &url) if (! parser.parse(&driver)) { _error = parser.errorMessage(); _errorLine = parser.errorLineNumber(); + + const QStringList lines = code.split(QLatin1Char('\n')); + + foreach (const JavaScriptParser::DiagnosticMessage &m, parser.diagnosticMessages()) { + + if (m.isWarning()) + continue; + + qWarning().nospace() << qPrintable(fileName) << ":" + << m.line << ":" + << m.column << ": " + << "error: " + << qPrintable(m.message); + + const QString textLine = lines.at(m.line - 1); + + qWarning() << qPrintable(textLine); + + int column = qMax(0, m.column - 1); + column = qMin(column, textLine.length()); // paranoia check + + QByteArray ind; + ind.reserve(column); + + for (int i = 0; i < column; ++i) { + const QChar ch = textLine.at(i); + if (ch.isSpace()) + ind.append(ch.unicode()); + else + ind.append(' '); + } + ind.append('^'); + qWarning() << ind.constData(); + } + return false; } -- cgit v0.12 From 5b548025ca353fa2f512356d0969b096b5b705e1 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Thu, 30 Apr 2009 16:44:40 +0200 Subject: Added simple autotests for QmlDom classes --- tests/auto/declarative/qmldom/qmldom.pro | 3 + tests/auto/declarative/qmldom/tst_qmldom.cpp | 90 ++++++++++++++++++++++++++++ 2 files changed, 93 insertions(+) create mode 100644 tests/auto/declarative/qmldom/qmldom.pro create mode 100644 tests/auto/declarative/qmldom/tst_qmldom.cpp diff --git a/tests/auto/declarative/qmldom/qmldom.pro b/tests/auto/declarative/qmldom/qmldom.pro new file mode 100644 index 0000000..5294cb4 --- /dev/null +++ b/tests/auto/declarative/qmldom/qmldom.pro @@ -0,0 +1,3 @@ +load(qttest_p4) +contains(QT_CONFIG,declarative): QT += declarative +SOURCES += tst_qmldom.cpp diff --git a/tests/auto/declarative/qmldom/tst_qmldom.cpp b/tests/auto/declarative/qmldom/tst_qmldom.cpp new file mode 100644 index 0000000..7e7e067 --- /dev/null +++ b/tests/auto/declarative/qmldom/tst_qmldom.cpp @@ -0,0 +1,90 @@ +#include +#include +#include +#include + +#include + +class tst_qmldom : public QObject +{ + Q_OBJECT +public: + tst_qmldom() {} + +private slots: + void loadSimple(); + void loadProperties(); + void loadChildObject(); + +private: + QmlEngine engine; +}; + + +void tst_qmldom::loadSimple() +{ + QByteArray qml = "Item {}"; + //QByteArray qml = ""; + + QmlDomDocument document; + QVERIFY(document.load(&engine, qml)); + QVERIFY(document.loadError().isEmpty()); + + QmlDomObject rootObject = document.rootObject(); + QVERIFY(rootObject.isValid()); + QVERIFY(!rootObject.isComponent()); + QVERIFY(!rootObject.isCustomType()); + QVERIFY(rootObject.objectType() == "Item"); +} + +void tst_qmldom::loadProperties() +{ + QByteArray qml = "Item { id : item; x : 300; visible : true }"; + //QByteArray qml = ""; + + QmlDomDocument document; + QVERIFY(document.load(&engine, qml)); + + QmlDomObject rootObject = document.rootObject(); + QVERIFY(rootObject.isValid()); + QVERIFY(rootObject.objectId() == "item"); + QVERIFY(rootObject.properties().size() == 2); + + QmlDomProperty xProperty = rootObject.property("x"); + QVERIFY(xProperty.propertyName() == "x"); + QVERIFY(xProperty.value().isLiteral()); + QVERIFY(xProperty.value().toLiteral().literal() == "300"); + + QmlDomProperty visibleProperty = rootObject.property("visible"); + QVERIFY(visibleProperty.propertyName() == "visible"); + QVERIFY(visibleProperty.value().isLiteral()); + QVERIFY(visibleProperty.value().toLiteral().literal() == "true"); +} + +void tst_qmldom::loadChildObject() +{ + QByteArray qml = "Item { Item }"; + //QByteArray qml = " "; + + QmlDomDocument document; + QVERIFY(document.load(&engine, qml)); + + QmlDomObject rootItem = document.rootObject(); + QVERIFY(rootItem.isValid()); + QVERIFY(rootItem.properties().size() == 1); + + QmlDomProperty listProperty = rootItem.properties().at(0); + QVERIFY(listProperty.isDefaultProperty()); + QVERIFY(listProperty.value().isList()); + + QmlDomList list = listProperty.value().toList(); + QVERIFY(list.values().size() == 1); + + QmlDomObject childItem = list.values().first().toObject(); + QVERIFY(childItem.isValid()); + QVERIFY(childItem.objectType() == "Item"); +} + +QTEST_MAIN(tst_qmldom) + +#include "tst_qmldom.moc" -- cgit v0.12 From f57e5f12807e1860839a4b3c47af180230bdbfaa Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Fri, 1 May 2009 10:03:07 +1000 Subject: Fix typo. --- tools/qmlconv/qmlconv.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/qmlconv/qmlconv.cpp b/tools/qmlconv/qmlconv.cpp index 3457a4f..6e89530 100644 --- a/tools/qmlconv/qmlconv.cpp +++ b/tools/qmlconv/qmlconv.cpp @@ -448,7 +448,7 @@ int main(int argc, char *argv[]) } if (args.isEmpty() && optionInPlace) { - qWarning() << "Usage: qmlconf [ [-i] filename ]"; + qWarning() << "Usage: qmlconv [ [-i] filename ]"; exit(1); } -- cgit v0.12 From 3e3e22b2eb1ac2cc3fa33de3810962cd95be9988 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Fri, 1 May 2009 10:06:55 +1000 Subject: PathView format conversion. --- doc/src/images/declarative-pathattribute.png | Bin 481 -> 7207 bytes .../declarative/pathview/dummydata/MenuModel.qml | 15 ++++ .../declarative/pathview/pathattributes.qml | 34 ++++++++ doc/src/snippets/declarative/pathview/pathview.qml | 28 +++++++ .../declarative/pathview/pics/qtlogo-64.png | Bin 0 -> 2991 bytes src/declarative/fx/qfxpath.cpp | 90 +++++++++------------ src/declarative/fx/qfxpathview.cpp | 28 +------ 7 files changed, 115 insertions(+), 80 deletions(-) create mode 100644 doc/src/snippets/declarative/pathview/dummydata/MenuModel.qml create mode 100644 doc/src/snippets/declarative/pathview/pathattributes.qml create mode 100644 doc/src/snippets/declarative/pathview/pathview.qml create mode 100644 doc/src/snippets/declarative/pathview/pics/qtlogo-64.png diff --git a/doc/src/images/declarative-pathattribute.png b/doc/src/images/declarative-pathattribute.png index 04215db..57cd049 100644 Binary files a/doc/src/images/declarative-pathattribute.png and b/doc/src/images/declarative-pathattribute.png differ diff --git a/doc/src/snippets/declarative/pathview/dummydata/MenuModel.qml b/doc/src/snippets/declarative/pathview/dummydata/MenuModel.qml new file mode 100644 index 0000000..5b973d7 --- /dev/null +++ b/doc/src/snippets/declarative/pathview/dummydata/MenuModel.qml @@ -0,0 +1,15 @@ +ListModel2 { + id: MenuModel + ListElement { + name: "Bill Jones" + icon: "pics/qtlogo-64.png" + } + ListElement { + name: "Jane Doe" + icon: "pics/qtlogo-64.png" + } + ListElement { + name: "John Smith" + icon: "pics/qtlogo-64.png" + } +} diff --git a/doc/src/snippets/declarative/pathview/pathattributes.qml b/doc/src/snippets/declarative/pathview/pathattributes.qml new file mode 100644 index 0000000..44789f2 --- /dev/null +++ b/doc/src/snippets/declarative/pathview/pathattributes.qml @@ -0,0 +1,34 @@ +Rect { + width: 240; height: 200; color: 'white' +//! [0] +//! [1] + Component { + id: Delegate + Item { + id: Wrapper + width: 80; height: 80 + scale: PathView.scale + opacity: PathView.opacity + VerticalLayout { + Image { anchors.horizontalCenter: Name.horizontalCenter; width: 64; height: 64; source: icon } + Text { id: Name; text: name; font.size: 16} + } + } + } +//! [1] +//! [2] + PathView { + anchors.fill: parent; model: MenuModel; delegate: Delegate + path: Path { + startX: 120; startY: 100 + PathAttribute { name: "scale"; value: 1.0 } + PathAttribute { name: "opacity"; value: 1.0 } + PathQuad { x: 120; y: 25; controlX: 260; controlY: 75 } + PathAttribute { name: "scale"; value: 0.3 } + PathAttribute { name: "opacity"; value: 0.5 } + PathQuad { x: 120; y: 100; controlX: -20; controlY: 75 } + } + } +//! [2] +//! [0] +} diff --git a/doc/src/snippets/declarative/pathview/pathview.qml b/doc/src/snippets/declarative/pathview/pathview.qml new file mode 100644 index 0000000..11df0a2 --- /dev/null +++ b/doc/src/snippets/declarative/pathview/pathview.qml @@ -0,0 +1,28 @@ +Rect { + width: 240; height: 200; color: 'white' +//! [0] +//! [1] + Component { + id: Delegate + Item { + id: Wrapper + width: 80; height: 80 + VerticalLayout { + Image { anchors.horizontalCenter: Name.horizontalCenter; width: 64; height: 64; source: icon } + Text { id: Name; text: name; font.size: 16} + } + } + } +//! [1] +//! [2] + PathView { + anchors.fill: parent; model: MenuModel; delegate: Delegate + path: Path { + startX: 120; startY: 100 + PathQuad { x: 120; y: 25; controlX: 260; controlY: 75 } + PathQuad { x: 120; y: 100; controlX: -20; controlY: 75 } + } + } +//! [2] +//! [0] +} diff --git a/doc/src/snippets/declarative/pathview/pics/qtlogo-64.png b/doc/src/snippets/declarative/pathview/pics/qtlogo-64.png new file mode 100644 index 0000000..4f68e16 Binary files /dev/null and b/doc/src/snippets/declarative/pathview/pics/qtlogo-64.png differ diff --git a/src/declarative/fx/qfxpath.cpp b/src/declarative/fx/qfxpath.cpp index f08671d..26aa10e 100644 --- a/src/declarative/fx/qfxpath.cpp +++ b/src/declarative/fx/qfxpath.cpp @@ -164,16 +164,7 @@ void QFxPath::setStartY(qreal y) \i \l PathPercent - a way to spread out items along various segments of the path. \endlist - \code - - - - - - - - - \endcode + \snippet doc/src/snippets/declarative/pathview/pathattributes.qml 2 */ QList* QFxPath::pathElements() @@ -493,31 +484,15 @@ void QFxCurve::setY(qreal y) an attribute at any particular point is interpolated from the PathAttributes bounding the point. - The example below shows a path with the items scaled to 10% at the ends of - the path and scaled 100% along the PathLine in the middle. Note the use - of the PathView.scale attached property to set the scale of the delegate. + The example below shows a path with the items scaled to 30% with opacity 50% + at the top of the path and scaled 100% with opacity 100% at the bottom. + Note the use of the PathView.scale and PathView.opacity attached properties + to set the scale and opacity of the delegate. \table \row \o \image declarative-pathattribute.png \o - \code - - - - - - - - - - - - - - - - - \endcode + \snippet doc/src/snippets/declarative/pathview/pathattributes.qml 0 \endtable \sa Path @@ -583,9 +558,10 @@ void QFxPathAttribute::setValue(qreal value) 0,100 to 200,100: \code - - - + Path { + startX: 0; startY: 100 + PathLine { x: 200; y: 100 } + } \endcode \sa Path, PathQuad, PathCubic @@ -624,9 +600,10 @@ void QFxPathLine::addToPath(QPainterPath &path) \o \image declarative-pathquad.png \o \code - - - + Path { + startX: 0; startY: 0 + PathQuad x: 200; y: 0; controlX: 100; controlY: 150 } + } \endcode \endtable @@ -707,10 +684,13 @@ void QFxPathQuad::addToPath(QPainterPath &path) \o \image declarative-pathcubic.png \o \code - - - + Path { + startX: 20; startY: 0 + PathCubic { + x: 180; y: 0; control1X: -10; control1Y: 90 + control2X: 210; control2Y: 90 + } + } \endcode \endtable @@ -834,24 +814,26 @@ void QFxPathCubic::addToPath(QPainterPath &path) \o \image declarative-nopercent.png \o \code - - - - - + Path { + startX: 20; startY: 0 + PathQuad { x: 50; y: 80; controlX: 0; controlY: 80 } + PathLine { x: 150; y: 80 } + PathQuad { x: 180; y: 0; controlX: 200; controlY: 80 } + } \endcode \row \o \image declarative-percent.png \o \code - - - - - - - - + Path { + startX: 20; startY: 0 + PathQuad { x: 50; y: 80; controlX: 0; controlY: 80 } + PathPercent { value: 0.25 } + PathLine { x: 150; y: 80 } + PathPercent { value: 0.75 } + PathQuad { x: 180; y: 0; controlX: 200; controlY: 80 } + PathPercent { value: 1 } + } \endcode \endtable diff --git a/src/declarative/fx/qfxpathview.cpp b/src/declarative/fx/qfxpathview.cpp index a2ea8ee..4785a52 100644 --- a/src/declarative/fx/qfxpathview.cpp +++ b/src/declarative/fx/qfxpathview.cpp @@ -41,7 +41,6 @@ #include #include -#include #include #include "qmlbindablevalue.h" #include "qmlstate.h" @@ -51,7 +50,6 @@ #include "qfxpathview.h" #include "qfxpathview_p.h" #include -#include static const int FlickThreshold = 5; @@ -103,13 +101,7 @@ private: The items are laid out along a path defined by a \l Path and may be flicked to scroll. - \code - - ... - ... - ... - - \endcode + \snippet doc/src/snippets/declarative/pathview/pathview.qml 0 \image pathview.gif @@ -320,23 +312,7 @@ void QFxPathView::setDragMargin(qreal dragMargin) The delegate provides a template describing what each item in the view should look and act like. Here is an example delegate: - \code - - - - - - - - - - ... - - \endcode + \snippet doc/src/snippets/declarative/pathview/pathview.qml 1 */ /*! -- cgit v0.12 From 8650453c304a350ac3fb3e43b2f0b3aaa8ed0217 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Fri, 1 May 2009 10:13:10 +1000 Subject: Show how to achieve aspect-ratio-maintaining effects. --- examples/declarative/aspectratio/face_fit.qml | 26 +++++++++++++++++++++ examples/declarative/aspectratio/pics/face.png | Bin 0 -> 905 bytes .../declarative/aspectratio/scale_and_crop.qml | 21 +++++++++++++++++ examples/declarative/aspectratio/scale_to_fit.qml | 21 +++++++++++++++++ 4 files changed, 68 insertions(+) create mode 100644 examples/declarative/aspectratio/face_fit.qml create mode 100644 examples/declarative/aspectratio/pics/face.png create mode 100644 examples/declarative/aspectratio/scale_and_crop.qml create mode 100644 examples/declarative/aspectratio/scale_to_fit.qml diff --git a/examples/declarative/aspectratio/face_fit.qml b/examples/declarative/aspectratio/face_fit.qml new file mode 100644 index 0000000..35c63ce --- /dev/null +++ b/examples/declarative/aspectratio/face_fit.qml @@ -0,0 +1,26 @@ +// The Image primitive does not have any special handling for maintaining +// aspect ratio. This example shows that you can provide whatever specific +// behaviour you like. +// +// Here, we implement a hybrid of the "scale to fit" and "scale and crop" +// behaviours which will crop up to 25% from *one* dimension if necessary +// to fully scale the other. This is a realistic algorithm, for example +// when the edges of the image contain less vital information than the +// center - such as a face. +// +Rect { + // default size: whole image, unscaled + width: Image.width + height: Image.height + color: "gray" + clip: true + + Image { + id: Image + source: "pics/face.png" + x: (parent.width-width*scale)/2 + y: (parent.height-height*scale)/2 + scale: Math.max(Math.min(parent.width/width*1.333,parent.height/height), + Math.min(parent.width/width,parent.height/height*1.333)) + } +} diff --git a/examples/declarative/aspectratio/pics/face.png b/examples/declarative/aspectratio/pics/face.png new file mode 100644 index 0000000..9623b1a Binary files /dev/null and b/examples/declarative/aspectratio/pics/face.png differ diff --git a/examples/declarative/aspectratio/scale_and_crop.qml b/examples/declarative/aspectratio/scale_and_crop.qml new file mode 100644 index 0000000..a5409f9 --- /dev/null +++ b/examples/declarative/aspectratio/scale_and_crop.qml @@ -0,0 +1,21 @@ +// The Image primitive does not have any special handling for maintaining +// aspect ratio. This example shows that you can provide whatever specific +// behaviour you like. +// +// Here, we implement "Scale and Crop" behaviour. +// +Rect { + // default size: whole image, unscaled + width: Image.width + height: Image.height + color: "gray" + clip: true + + Image { + id: Image + source: "pics/face.png" + x: (parent.width-width*scale)/2 + y: (parent.height-height*scale)/2 + scale: Math.max(parent.width/width,parent.height/height) + } +} diff --git a/examples/declarative/aspectratio/scale_to_fit.qml b/examples/declarative/aspectratio/scale_to_fit.qml new file mode 100644 index 0000000..61a4082 --- /dev/null +++ b/examples/declarative/aspectratio/scale_to_fit.qml @@ -0,0 +1,21 @@ +// The Image primitive does not have any special handling for maintaining +// aspect ratio. This example shows that you can provide whatever specific +// behaviour you like. +// +// Here, we implement "Scale to Fit" behaviour. +// +Rect { + // default size: whole image, unscaled + width: Image.width + height: Image.height + color: "gray" + clip: true + + Image { + id: Image + source: "pics/face.png" + x: (parent.width-width*scale)/2 + y: (parent.height-height*scale)/2 + scale: Math.min(parent.width/width,parent.height/height) + } +} -- cgit v0.12 From afbf5a144f40cacce0673292d34eda3086a3745e Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Fri, 1 May 2009 10:19:49 +1000 Subject: Format conversion. --- src/declarative/fx/qfximage.cpp | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/src/declarative/fx/qfximage.cpp b/src/declarative/fx/qfximage.cpp index dded48c..1361d68 100644 --- a/src/declarative/fx/qfximage.cpp +++ b/src/declarative/fx/qfximage.cpp @@ -68,28 +68,27 @@ QML_DEFINE_TYPE(QFxImage,Image); \o \image declarative-qtlogo1.png \o Untransformed \code - + Image { source: "pics/qtlogo.png" } \endcode \row \o \image declarative-qtlogo2.png \o Stretched \code - + Image { width: 160; height: 160; source: "pics/qtlogo.png" } \endcode \row \o \image declarative-qtlogo4.png \o Grid-scaled \code - + Image { scaleGrid.left: 20; scaleGrid.right: 10 + scaleGrid.top: 14; scaleGrid.bottom: 14 + width: 160; height: 160; source: "pics/qtlogo.png" } \endcode \row \o \image declarative-qtlogo3.png \o Tiled \code - + Image { tile: true; width: 160; height: 160; source: "pics/qtlogo.png" } \endcode \endtable */ @@ -103,7 +102,7 @@ QML_DEFINE_TYPE(QFxImage,Image); Example: \code - + Image { source: "pics/star.png" } \endcode A QFxImage object can be instantiated in Qml using the tag \l Image. @@ -200,11 +199,11 @@ QFxScaleGrid *QFxImage::scaleGrid() of unscaled tiles, clipped to the size of the Image. \code - - - - - + Item { + Image { source: "tile.png" } + Image { x: 80; width: 100; height: 100; src: "tile.png" } + Image { x: 190; width: 100; height: 100; tile: true; src: "tile.png" } + } \endcode \image declarative-image_tile.png -- cgit v0.12 From dae1a84e571691e32147e7d1699e161693dbfee1 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Fri, 1 May 2009 10:40:13 +1000 Subject: Fix insertion of items when there are no existing items. --- src/declarative/fx/qfxpathview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/declarative/fx/qfxpathview.cpp b/src/declarative/fx/qfxpathview.cpp index 4785a52..810a359 100644 --- a/src/declarative/fx/qfxpathview.cpp +++ b/src/declarative/fx/qfxpathview.cpp @@ -658,7 +658,7 @@ void QFxPathView::itemsInserted(int modelIndex, int count) { //XXX support animated insertion Q_D(QFxPathView); - if (d->pathItems == -1 || d->items.count() < d->pathItems) { + if (d->pathItems == -1) { for (int i = 0; i < count; ++i) { QFxItem *item = d->model->item(modelIndex + i); item->setZ(modelIndex + i); -- cgit v0.12 From 020f86805e2f3f9fa8e069c3a0ae04ef4a6d57cd Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Fri, 1 May 2009 10:49:51 +1000 Subject: Format conversion for animation, states and transitions, and transform elements. --- doc/src/snippets/declarative/pics/qt.png | Bin 0 -> 514 bytes doc/src/snippets/declarative/rotation.qml | 27 ++++++++++ src/declarative/fx/qfxtransform.cpp | 34 +++--------- src/declarative/util/qmlanimation.cpp | 78 +++++++++++++--------------- src/declarative/util/qmlbehaviour.cpp | 20 ++++--- src/declarative/util/qmlfollow.cpp | 36 ++++++++----- src/declarative/util/qmlsetproperties.cpp | 14 ++++- src/declarative/util/qmlstateoperations.cpp | 41 +++++++++++---- src/declarative/util/qmltransition.cpp | 6 ++- 9 files changed, 152 insertions(+), 104 deletions(-) create mode 100644 doc/src/snippets/declarative/pics/qt.png create mode 100644 doc/src/snippets/declarative/rotation.qml diff --git a/doc/src/snippets/declarative/pics/qt.png b/doc/src/snippets/declarative/pics/qt.png new file mode 100644 index 0000000..cbed1a9 Binary files /dev/null and b/doc/src/snippets/declarative/pics/qt.png differ diff --git a/doc/src/snippets/declarative/rotation.qml b/doc/src/snippets/declarative/rotation.qml new file mode 100644 index 0000000..01838dd --- /dev/null +++ b/doc/src/snippets/declarative/rotation.qml @@ -0,0 +1,27 @@ +Rect { + width: 360; height: 80 + color: "white" +//! [0] + HorizontalLayout { + margin: 10 + spacing: 10 + Image { source: "pics/qt.png" } + Image { + source: "pics/qt.png" + transform: Rotation3D { axis.startX: 30; axis.endX: 30; axis.endY: 60; angle: 18 } + } + Image { + source: "pics/qt.png" + transform: Rotation3D { axis.startX: 30; axis.endX: 30; axis.endY: 60; angle: 36 } + } + Image { + source: "pics/qt.png" + transform: Rotation3D { axis.startX: 30; axis.endX: 30; axis.endY: 60; angle: 54 } + } + Image { + source: "pics/qt.png" + transform: Rotation3D { axis.startX: 30; axis.endX: 30; axis.endY: 60; angle: 72 } + } + } +//! [0] +} diff --git a/src/declarative/fx/qfxtransform.cpp b/src/declarative/fx/qfxtransform.cpp index 2bed170..8ff4c54 100644 --- a/src/declarative/fx/qfxtransform.cpp +++ b/src/declarative/fx/qfxtransform.cpp @@ -93,7 +93,7 @@ void QFxTransform::update() between the points does matter for translation along an axis. \code - + Axis { startX: 0; startY: 0; endX: 20; endY: 30 } \endcode */ @@ -182,31 +182,7 @@ void QFxAxis::setEndZ(qreal z) \brief The Rotation3D element provides a way to rotate an Item around an axis. Here is an example of various rotations applied to an \l Image. - \code - - - - - - - - - - - - - - - - - - - - - - - - \endcode + \snippet doc/src/snippets/declarative/rotation.qml 0 \image axisrotation.png */ @@ -233,6 +209,8 @@ QFxRotation3D::~QFxRotation3D() A rotation axis is specified by 2 points in 3D space: a start point and an end point. The z-position of the start point is assumed to be 0, and cannot be changed. + + \sa Axis */ QFxAxis *QFxRotation3D::axis() { @@ -374,6 +352,8 @@ QFxTranslation3D::~QFxTranslation3D() an end point. The z-position of the start point is assumed to be 0, and cannot be changed. Changing the z-position of the end point is only valid when running under OpenGL. + + \sa Axis */ QFxAxis *QFxTranslation3D::axis() { @@ -388,7 +368,7 @@ QFxAxis *QFxTranslation3D::axis() of 0.5 would translate to 50, 25. \code - + Translation3D { axis.startX: 0; axis.startY: 0; axis.endX: 100; axis.endY: 50 } \endcode */ qreal QFxTranslation3D::distance() const diff --git a/src/declarative/util/qmlanimation.cpp b/src/declarative/util/qmlanimation.cpp index 4bcc550..d5765c1 100644 --- a/src/declarative/util/qmlanimation.cpp +++ b/src/declarative/util/qmlanimation.cpp @@ -177,12 +177,14 @@ QmlAbstractAnimation::QmlAbstractAnimation(QmlAbstractAnimationPrivate &dd, QObj whenever the \l MouseRegion is pressed. \code - - - - - - + Rect { + width: 100; height: 100 + x: NumericAnimation { + running: MyMouse.pressed + from: 0; to: 100 + } + MouseRegion { id: MyMouse } + } \endcode Likewise, the \c running property can be read to determine if the animation @@ -190,8 +192,8 @@ QmlAbstractAnimation::QmlAbstractAnimation(QmlAbstractAnimationPrivate &dd, QObj or not the animation is running. \code - - + NumericAnimation { id: MyAnimation } + Text { text: MyAnimation.running ? "Animation is running" : "Animation is not running" } \endcode Animations can also be started and stopped imperatively from JavaScript @@ -304,11 +306,9 @@ void QmlAbstractAnimation::setFinishPlaying(bool f) In the following example, the rectangle will spin indefinately. \code - - - - - + Rect { + rotation: NumericAnimation { running: true; repeat: true; from: 0 to: 360 } + } \endcode */ bool QmlAbstractAnimation::repeat() const @@ -435,11 +435,9 @@ void QmlAbstractAnimation::start() Normally \c stop() stops the animation immediately, and the animation has no further influence on property values. In this example animation \code - - - - - + Rect { + x: NumericAnimation { from: 0; to: 100; duration: 500 } + } \endcode was stopped at time 250ms, the \c x property will have a value of 50. @@ -475,11 +473,9 @@ void QmlAbstractAnimation::restart() Unlike \c stop(), \c complete() immediately fast-forwards the animation to its end. In the following example, \code - - - - - + Rect { + x: NumericAnimation { from: 0; to: 100; duration: 500 } + } \endcode calling \c stop() at time 250ms will result in the \c x property having a value of 50, while calling \c complete() will set the \c x property to @@ -529,11 +525,11 @@ void QmlAbstractAnimation::timelineComplete() A 500ms animation sequence, with a 100ms pause between two animations: \code - - - - - + SequentialAnimation { + NumericAnimation { ... duration: 200 } + PauseAnimation { duration: 100 } + NumericAnimation { ... duration: 200 } + } \endcode */ /*! @@ -621,7 +617,7 @@ QAbstractAnimation *QmlPauseAnimation::qtAnimation() \brief The ColorAnimation allows you to animate color changes. \code - + ColorAnimation { from: "white" to: "#c0c0c0"; duration: 100 } \endcode The default property animated is \c color, but like other animations, @@ -1016,12 +1012,12 @@ QML_DEFINE_TYPE(QmlRunScriptAction, RunScriptAction); Explicitly set \c theimage.smooth=true during a transition: \code - + SetPropertyAction { target: theimage; property: "smooth"; value: true } \endcode Set \c thewebview.url to the value set for the destination state: \code - + SetPropertyAction { target: thewebview; property: "url" } \endcode The SetPropertyAction is immediate - @@ -1324,7 +1320,7 @@ QML_DEFINE_TYPE(QmlParentChangeAction,ParentChangeAction); Animate a set of properties over 200ms, from their values in the start state to their values in the end state of the transition: \code - + NumericAnimation { properties: "x,y,scale"; duration: 200 } \endcode */ @@ -1723,10 +1719,10 @@ QmlList *QmlAnimationGroup::animations() object will animate from its current x position to 100, and then back to 0. \code - - - - + SequentialAnimation { + NumericAnimation { target: MyItem; property: "x"; to: 100 } + NumericAnimation { target: MyItem; property: "x"; to: 0 } + } \endcode \sa ParallelAnimation @@ -1800,10 +1796,10 @@ QML_DEFINE_TYPE(QmlSequentialAnimation,SequentialAnimation); to (100,100) by animating the x and y properties in parallel. \code - - - - + ParallelAnimation { + NumericAnimation { target: MyItem; property: "x"; to: 100 } + NumericAnimation { target: MyItem; property: "y"; to: 100 } + } \endcode \sa SequentialAnimation @@ -1924,7 +1920,7 @@ void QmlVariantAnimationPrivate::convertVariant(QVariant &variant, QVariant::Typ Animate a size property over 200ms, from its current size to 20-by-20: \code - + VariantAnimation { property: "size"; to: "20x20"; duration: 200 } \endcode */ diff --git a/src/declarative/util/qmlbehaviour.cpp b/src/declarative/util/qmlbehaviour.cpp index 58e515f..354c7e3 100644 --- a/src/declarative/util/qmlbehaviour.cpp +++ b/src/declarative/util/qmlbehaviour.cpp @@ -105,15 +105,19 @@ public: \qmlclass Behaviour QmlBehaviour \brief The Behaviour element allows you to specify a default animation for a property change. - In example below, Rect1 will use a bounce easing curve over 200 millisecond for any changes to its y property: + In example below, the rect will use a bounce easing curve over 200 millisecond for any changes to its y property: \code - - - - - - - + Rect { + width: 20; height: 20 + color: "#00ff00" + y: 200 //initial value + y: Behaviour { + NumericAnimation { + easing: "easeOutBounce(amplitude:100)" + duration: 200 + } + } + } \endcode */ diff --git a/src/declarative/util/qmlfollow.cpp b/src/declarative/util/qmlfollow.cpp index 35f3c49..998166a 100644 --- a/src/declarative/util/qmlfollow.cpp +++ b/src/declarative/util/qmlfollow.cpp @@ -174,19 +174,29 @@ void QmlFollowPrivate::stop() In example below, Rect2 will follow Rect1 moving with a velocity of up to 200: \code - - - - - - - - - - - - - + Rect { + id: Rect1 + width: 20; height: 20 + color: "#00ff00" + y: 200 //initial value + y: SequentialAnimation { + running: true + repeat: true + NumericAnimation { + to: 200 + easing: "easeOutBounce(amplitude:100)" + duration: 2000 + } + PauseAnimation { duration: 1000 } + } + } + Rect { + id: Rect2 + x: Rect1.width + width: 20; height: 20 + color: "#ff0000" + y: Follow { source: Rect1.y; velocity: 200 } + } \endcode */ diff --git a/src/declarative/util/qmlsetproperties.cpp b/src/declarative/util/qmlsetproperties.cpp index 108f2b2..9b5a58e 100644 --- a/src/declarative/util/qmlsetproperties.cpp +++ b/src/declarative/util/qmlsetproperties.cpp @@ -108,7 +108,12 @@ void QmlSetPropertiesMetaObject::propertyWrite(int id) you normally would specify them for the actual item: \code - + SetProperties { + target: myRect + x: 52 + y: 300 + width: 48 + } \endcode \c target is a property of \c SetProperties, so if the property you want to change @@ -129,7 +134,12 @@ void QmlSetPropertiesMetaObject::propertyWrite(int id) you normally would specify them for the actual item: \code - + SetProperties { + target: myRect + x: 52 + y: 300 + width: 48 + } \endcode \c target is a property of \c SetProperties, so if the property you want to change diff --git a/src/declarative/util/qmlstateoperations.cpp b/src/declarative/util/qmlstateoperations.cpp index 755befe..01f9cdd 100644 --- a/src/declarative/util/qmlstateoperations.cpp +++ b/src/declarative/util/qmlstateoperations.cpp @@ -212,17 +212,36 @@ QmlRunScript::ActionList QmlRunScript::actions() the current state: \code - - - - - - - - - - - + Rect { + id: myrect + width: 50 + height: 50 + color: "red" + } + + states: [ + State { + name: "Position1" + SetProperty { + target: myrect + property: "x" + value: 150 + } + SetProperty { + target: myrect + property: "y" + value: 50 + } + }, + State { + name: "Position2" + SetProperty { + target: myrect + property: "y" + value: 200 + } + } + ] \endcode \sa SetProperties diff --git a/src/declarative/util/qmltransition.cpp b/src/declarative/util/qmltransition.cpp index a515f58..47e70ad 100644 --- a/src/declarative/util/qmltransition.cpp +++ b/src/declarative/util/qmltransition.cpp @@ -188,9 +188,11 @@ void QmlTransition::prepare(QmlStateOperation::ActionList &actions, be applied. By default fromState and toState are both "*" (any state). In the following example, the transition is applied when changing from state1 to state2. \code - + Transition { + fromState: "state1" + toState: "state2" ... - + } \endcode */ -- cgit v0.12 From 7b5da43a703ea299e9d3cff81f689159744ea12c Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Fri, 1 May 2009 10:51:50 +1000 Subject: Add epsilon to Follow can be used in more circumstances. Was biased to pixel-sized values. Scale-sized values did not work smoothly. --- src/declarative/util/qmlfollow.cpp | 29 +++++++++++++++++++++++++++-- src/declarative/util/qmlfollow.h | 3 +++ 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/src/declarative/util/qmlfollow.cpp b/src/declarative/util/qmlfollow.cpp index 35f3c49..0143678 100644 --- a/src/declarative/util/qmlfollow.cpp +++ b/src/declarative/util/qmlfollow.cpp @@ -55,7 +55,7 @@ class QmlFollowPrivate : public QObjectPrivate public: QmlFollowPrivate() : sourceValue(0), maxVelocity(0), lastTime(0) - , mass(1.0), spring(0.), damping(0.), velocity(0), enabled(true), mode(Track), clock(this) {} + , mass(1.0), spring(0.), damping(0.), velocity(0), epsilon(0.005), enabled(true), mode(Track), clock(this) {} QmlMetaProperty property; qreal currentValue; @@ -67,6 +67,7 @@ public: qreal spring; qreal damping; qreal velocity; + qreal epsilon; bool enabled; enum Mode { @@ -111,7 +112,7 @@ void QmlFollowPrivate::tick(int time) } currentValue += velocity * 10.0 / 1000.0; } - if (qAbs(velocity) < 0.5 && qAbs(sourceValue - currentValue) < 0.5) { + if (qAbs(velocity) < epsilon && qAbs(sourceValue - currentValue) < epsilon) { velocity = 0.0; currentValue = sourceValue; clock.stop(); @@ -290,6 +291,30 @@ void QmlFollow::setDamping(qreal damping) d->damping = damping; } + +/*! + \qmlproperty qreal Follow::epsilon + This property holds the spring epsilon + + The epsilon is the rate and amount of change in the value which is close enough + to 0 to be considered equal to zero. This will depend on the usage of the value. + For pixel positions, 0.25 would suffice. For scale, 0.005 will suffice. + + The default is 0.005. Small performance improvements can result in tuning this + value. +*/ +qreal QmlFollow::epsilon() const +{ + Q_D(const QmlFollow); + return d->epsilon; +} + +void QmlFollow::setEpsilon(qreal epsilon) +{ + Q_D(QmlFollow); + d->epsilon = epsilon; +} + /*! \qmlproperty qreal Follow::followValue The current value. diff --git a/src/declarative/util/qmlfollow.h b/src/declarative/util/qmlfollow.h index aac4c01..bd9363a 100644 --- a/src/declarative/util/qmlfollow.h +++ b/src/declarative/util/qmlfollow.h @@ -63,6 +63,7 @@ class Q_DECLARATIVE_EXPORT QmlFollow : public QmlPropertyValueSource, Q_PROPERTY(qreal velocity READ velocity WRITE setVelocity); Q_PROPERTY(qreal spring READ spring WRITE setSpring); Q_PROPERTY(qreal damping READ damping WRITE setDamping); + Q_PROPERTY(qreal epsilon READ epsilon WRITE setEpsilon); Q_PROPERTY(bool enabled READ enabled WRITE setEnabled); Q_PROPERTY(qreal followValue READ value NOTIFY valueChanged); @@ -80,6 +81,8 @@ public: void setSpring(qreal spring); qreal damping() const; void setDamping(qreal damping); + qreal epsilon() const; + void setEpsilon(qreal epsilon); bool enabled() const; void setEnabled(bool enabled); -- cgit v0.12 From 788d5384e07f91b0f88efb2101b427e6edb79399 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Fri, 1 May 2009 10:55:46 +1000 Subject: More examples. --- .../declarative/aspectratio/face_fit_animated.qml | 28 ++++++++++++++++++++++ .../declarative/aspectratio/scale_and_sidecrop.qml | 22 +++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 examples/declarative/aspectratio/face_fit_animated.qml create mode 100644 examples/declarative/aspectratio/scale_and_sidecrop.qml diff --git a/examples/declarative/aspectratio/face_fit_animated.qml b/examples/declarative/aspectratio/face_fit_animated.qml new file mode 100644 index 0000000..366d27b --- /dev/null +++ b/examples/declarative/aspectratio/face_fit_animated.qml @@ -0,0 +1,28 @@ +// The Image primitive does not have any special handling for maintaining +// aspect ratio. This example shows that you can provide whatever specific +// behaviour you like. +// +// Here, we extend the "face_fit" example with animation to show how truly +// diverse and usage-specific behaviours are made possible by NOT putting a +// hard-coded aspect ratio feature into the Image primitive. +// +Rect { + // default size: whole image, unscaled + width: Image.width + height: Image.height + color: "gray" + clip: true + + Image { + id: Image + source: "pics/face.png" + x: (parent.width-width*scale)/2 + y: (parent.height-height*scale)/2 + scale: Follow { + source: Math.max(Math.min(Image.parent.width/Image.width*1.333,Image.parent.height/Image.height), + Math.min(Image.parent.width/Image.width,Image.parent.height/Image.height*1.333)) + spring: 1 + damping: 0.05 + } + } +} diff --git a/examples/declarative/aspectratio/scale_and_sidecrop.qml b/examples/declarative/aspectratio/scale_and_sidecrop.qml new file mode 100644 index 0000000..e076735 --- /dev/null +++ b/examples/declarative/aspectratio/scale_and_sidecrop.qml @@ -0,0 +1,22 @@ +// The Image primitive does not have any special handling for maintaining +// aspect ratio. This example shows that you can provide whatever specific +// behaviour you like. +// +// Here, we implement a variant of "Scale and Crop" behaviour, where we +// crop the sides if necessary to fully fit vertically, but not the reverse. +// +Rect { + // default size: whole image, unscaled + width: Image.width + height: Image.height + color: "gray" + clip: true + + Image { + id: Image + source: "pics/face.png" + x: (parent.width-width*scale)/2 + y: (parent.height-height*scale)/2 + scale: parent.height/height + } +} -- cgit v0.12 From 7ea7efcd67a739a58b1fcd5fe9cf07765ec92860 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Fri, 1 May 2009 10:56:54 +1000 Subject: Support multiline string literals when assigned directly to a QML property For example, this is now allowed: Text { text: "Hello World" } but this isn't as bindings are "real" javascript: Text { text: "Big " + "Hello World" } --- src/declarative/qml/parser/javascript.g | 22 + src/declarative/qml/parser/javascriptgrammar.cpp | 1179 +++++++++++----------- src/declarative/qml/parser/javascriptgrammar_p.h | 25 +- src/declarative/qml/parser/javascriptlexer.cpp | 7 +- src/declarative/qml/parser/javascriptparser.cpp | 396 ++++---- src/declarative/qml/parser/javascriptparser_p.h | 4 +- 6 files changed, 845 insertions(+), 788 deletions(-) diff --git a/src/declarative/qml/parser/javascript.g b/src/declarative/qml/parser/javascript.g index cc72737..59ab529 100644 --- a/src/declarative/qml/parser/javascript.g +++ b/src/declarative/qml/parser/javascript.g @@ -78,6 +78,7 @@ %token T_CONST "const" %token T_DEBUGGER "debugger" %token T_RESERVED_WORD "reserved word" +%token T_MULTILINE_STRING_LITERAL "multiline string literal" --- context keywords. %token T_PUBLIC "public" @@ -611,6 +612,27 @@ case $rule_number: { } break; ./ +UiMultilineStringLiteral: T_MULTILINE_STRING_LITERAL ; +/. +case $rule_number: { + AST::StringLiteral *node = makeAstNode (driver->nodePool(), sym(1).sval); + node->literalToken = loc(1); + sym(1).Node = node; +} break; +./ + +UiMultilineStringStatement: UiMultilineStringLiteral T_AUTOMATIC_SEMICOLON ; -- automatic semicolon +UiMultilineStringStatement: UiMultilineStringLiteral T_SEMICOLON ; +/. +case $rule_number: { + AST::ExpressionStatement *node = makeAstNode (driver->nodePool(), sym(1).Expression); + node->semicolonToken = loc(2); + sym(1).Node = node; +} break; +./ + +UiObjectMember: UiQualifiedId T_COLON UiMultilineStringStatement ; +/. case $rule_number: ./ UiArrayObjectMember: UiQualifiedId T_COLON Statement ; /. case $rule_number: ./ UiObjectMember: UiQualifiedId T_COLON Statement ; diff --git a/src/declarative/qml/parser/javascriptgrammar.cpp b/src/declarative/qml/parser/javascriptgrammar.cpp index 0d2a215..9fceeb8 100644 --- a/src/declarative/qml/parser/javascriptgrammar.cpp +++ b/src/declarative/qml/parser/javascriptgrammar.cpp @@ -51,347 +51,343 @@ const char *const JavaScriptGrammar::spell [] = { "||", "+", "+=", "++", "?", "}", "]", "%", "%=", "return", ")", ";", 0, "*", "*=", "string literal", "switch", "this", "throw", "~", "try", "typeof", "var", "void", "while", "with", "^", "^=", "null", "true", - "false", "const", "debugger", "reserved word", "public", "import", 0, 0}; + "false", "const", "debugger", "reserved word", "multiline string literal", "public", "import", 0, 0}; const int JavaScriptGrammar::lhs [] = { - 88, 89, 89, 92, 92, 93, 93, 91, 90, 90, - 95, 95, 97, 97, 96, 94, 96, 94, 96, 94, - 96, 94, 94, 94, 94, 94, 94, 94, 98, 98, - 98, 98, 103, 103, 103, 103, 103, 103, 103, 103, - 103, 103, 103, 103, 103, 103, 103, 105, 105, 109, - 109, 104, 104, 107, 107, 110, 110, 110, 110, 111, - 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, - 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, - 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, - 112, 112, 113, 113, 113, 113, 113, 116, 116, 117, - 117, 117, 117, 115, 115, 118, 118, 119, 119, 120, - 120, 120, 121, 121, 121, 121, 121, 121, 121, 121, - 121, 121, 122, 122, 122, 122, 123, 123, 123, 124, - 124, 124, 124, 125, 125, 125, 125, 125, 125, 125, - 126, 126, 126, 126, 126, 126, 127, 127, 127, 127, - 127, 128, 128, 128, 128, 128, 129, 129, 130, 130, - 131, 131, 132, 132, 133, 133, 134, 134, 135, 135, - 136, 136, 137, 137, 138, 138, 139, 139, 140, 140, - 108, 108, 141, 141, 142, 142, 142, 142, 142, 142, - 142, 142, 142, 142, 142, 142, 100, 100, 143, 143, - 144, 144, 145, 145, 99, 99, 99, 99, 99, 99, - 99, 99, 99, 99, 99, 99, 99, 99, 99, 146, - 161, 161, 160, 160, 102, 102, 162, 162, 163, 163, - 165, 165, 164, 166, 169, 167, 167, 170, 168, 168, - 147, 148, 148, 149, 149, 150, 150, 150, 150, 150, - 150, 150, 151, 151, 151, 151, 152, 152, 152, 152, - 153, 153, 154, 156, 171, 171, 174, 174, 172, 172, - 175, 173, 155, 157, 157, 158, 158, 158, 176, 177, - 159, 159, 101, 114, 181, 181, 178, 178, 179, 179, - 182, 183, 183, 184, 184, 180, 180, 106, 106, 185}; + 89, 90, 90, 93, 93, 94, 94, 92, 91, 91, + 96, 96, 98, 98, 97, 95, 97, 95, 97, 95, + 100, 101, 101, 95, 97, 95, 95, 95, 95, 95, + 95, 95, 99, 99, 99, 99, 106, 106, 106, 106, + 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, + 106, 108, 108, 112, 112, 107, 107, 110, 110, 113, + 113, 113, 113, 114, 114, 114, 114, 114, 114, 114, + 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, + 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, + 114, 114, 114, 114, 115, 115, 116, 116, 116, 116, + 116, 119, 119, 120, 120, 120, 120, 118, 118, 121, + 121, 122, 122, 123, 123, 123, 124, 124, 124, 124, + 124, 124, 124, 124, 124, 124, 125, 125, 125, 125, + 126, 126, 126, 127, 127, 127, 127, 128, 128, 128, + 128, 128, 128, 128, 129, 129, 129, 129, 129, 129, + 130, 130, 130, 130, 130, 131, 131, 131, 131, 131, + 132, 132, 133, 133, 134, 134, 135, 135, 136, 136, + 137, 137, 138, 138, 139, 139, 140, 140, 141, 141, + 142, 142, 143, 143, 111, 111, 144, 144, 145, 145, + 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, + 103, 103, 146, 146, 147, 147, 148, 148, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 149, 164, 164, 163, 163, 105, 105, + 165, 165, 166, 166, 168, 168, 167, 169, 172, 170, + 170, 173, 171, 171, 150, 151, 151, 152, 152, 153, + 153, 153, 153, 153, 153, 153, 154, 154, 154, 154, + 155, 155, 155, 155, 156, 156, 157, 159, 174, 174, + 177, 177, 175, 175, 178, 176, 158, 160, 160, 161, + 161, 161, 179, 180, 162, 162, 104, 117, 184, 184, + 181, 181, 182, 182, 185, 186, 186, 187, 187, 183, + 183, 109, 109, 188}; const int JavaScriptGrammar:: rhs[] = { 2, 1, 1, 1, 2, 3, 3, 0, 1, 2, 1, 3, 2, 3, 4, 4, 2, 2, 5, 5, - 3, 3, 3, 4, 5, 6, 1, 1, 1, 1, - 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 3, 3, 5, 3, 4, 3, 2, 4, 1, - 2, 0, 1, 3, 5, 1, 1, 1, 1, 1, + 1, 2, 2, 3, 3, 3, 3, 4, 5, 6, + 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 3, 3, 5, 3, 4, + 3, 2, 4, 1, 2, 0, 1, 3, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 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, 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, 5, 1, 5, - 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 3, 0, 1, - 1, 3, 0, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, - 1, 2, 0, 1, 3, 3, 1, 1, 1, 3, - 1, 3, 2, 2, 2, 0, 1, 2, 0, 1, - 1, 2, 2, 7, 5, 7, 7, 5, 9, 10, - 7, 8, 2, 2, 3, 3, 2, 2, 3, 3, - 3, 3, 5, 5, 3, 5, 1, 2, 0, 1, - 4, 3, 3, 3, 3, 3, 3, 4, 5, 2, - 2, 2, 8, 8, 1, 3, 0, 1, 0, 1, - 1, 1, 2, 1, 1, 0, 1, 0, 1, 2}; + 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, + 1, 5, 1, 5, 1, 3, 1, 3, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 3, 0, 1, 1, 3, 0, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 3, 1, 2, 0, 1, 3, 3, + 1, 1, 1, 3, 1, 3, 2, 2, 2, 0, + 1, 2, 0, 1, 1, 2, 2, 7, 5, 7, + 7, 5, 9, 10, 7, 8, 2, 2, 3, 3, + 2, 2, 3, 3, 3, 3, 5, 5, 3, 5, + 1, 2, 0, 1, 4, 3, 3, 3, 3, 3, + 3, 4, 5, 2, 2, 2, 8, 8, 1, 3, + 0, 1, 0, 1, 1, 1, 2, 1, 1, 0, + 1, 0, 1, 2}; const int JavaScriptGrammar::action_default [] = { 8, 2, 0, 4, 3, 0, 0, 0, 6, 7, - 5, 27, 227, 0, 31, 0, 29, 30, 228, 9, - 1, 0, 0, 28, 0, 287, 288, 0, 285, 0, - 286, 0, 289, 130, 197, 161, 169, 165, 205, 212, - 109, 181, 211, 219, 207, 157, 0, 208, 290, 0, - 295, 94, 209, 210, 215, 110, 173, 177, 98, 127, - 108, 113, 93, 147, 213, 134, 292, 291, 294, 216, - 0, 0, 0, 0, 40, 41, 0, 37, 0, 296, - 34, 0, 298, 52, 0, 0, 0, 0, 0, 35, - 38, 0, 0, 199, 241, 39, 0, 33, 0, 0, - 36, 0, 0, 0, 0, 0, 217, 218, 123, 206, - 214, 0, 0, 110, 129, 296, 34, 298, 112, 111, - 0, 0, 0, 125, 126, 124, 0, 297, 287, 0, - 0, 289, 0, 284, 0, 299, 0, 59, 60, 61, - 62, 87, 63, 88, 64, 65, 66, 67, 68, 69, - 70, 71, 56, 72, 73, 74, 75, 76, 58, 89, - 77, 57, 78, 79, 80, 81, 82, 83, 84, 85, - 86, 90, 0, 54, 0, 0, 46, 0, 55, 45, - 128, 0, 158, 0, 0, 0, 0, 148, 0, 0, - 0, 0, 0, 0, 138, 0, 0, 0, 132, 133, - 131, 136, 140, 139, 137, 135, 150, 149, 151, 0, - 166, 0, 162, 0, 0, 104, 103, 92, 91, 0, - 0, 102, 198, 105, 0, 106, 0, 107, 101, 242, - 243, 283, 0, 194, 187, 185, 192, 193, 191, 190, - 196, 189, 188, 186, 195, 182, 0, 170, 0, 0, - 174, 0, 0, 178, 0, 0, 104, 96, 0, 95, - 0, 100, 293, 257, 0, 258, 259, 260, 253, 0, - 254, 255, 256, 281, 282, 114, 0, 0, 0, 0, - 0, 246, 247, 203, 201, 163, 171, 167, 183, 159, - 204, 0, 110, 175, 179, 152, 141, 0, 0, 160, - 0, 0, 0, 0, 153, 0, 0, 0, 0, 0, - 145, 143, 146, 144, 142, 155, 154, 156, 0, 168, - 0, 164, 0, 202, 110, 0, 184, 199, 200, 0, - 199, 0, 0, 249, 0, 0, 0, 251, 0, 172, - 0, 0, 176, 0, 0, 180, 239, 0, 231, 240, - 234, 0, 238, 0, 199, 232, 0, 199, 0, 0, - 250, 0, 0, 0, 252, 297, 0, 273, 0, 0, - 0, 245, 0, 244, 221, 224, 0, 60, 87, 63, - 88, 65, 66, 37, 70, 71, 34, 72, 75, 35, - 38, 199, 39, 78, 33, 80, 36, 82, 83, 84, - 85, 86, 90, 222, 220, 98, 99, 104, 0, 97, - 0, 261, 262, 0, 0, 0, 264, 269, 267, 270, - 0, 0, 268, 269, 0, 265, 0, 266, 223, 272, - 0, 223, 271, 0, 274, 275, 0, 223, 276, 277, - 0, 0, 278, 0, 0, 0, 279, 280, 116, 115, - 0, 0, 0, 248, 0, 0, 0, 263, 0, 53, - 0, 50, 52, 43, 0, 49, 44, 51, 48, 42, - 0, 47, 120, 118, 122, 119, 117, 121, 0, 18, - 13, 0, 14, 10, 0, 0, 0, 24, 0, 26, - 23, 0, 25, 0, 0, 22, 34, 52, 16, 31, - 0, 11, 0, 17, 0, 20, 12, 0, 21, 34, - 52, 15, 0, 19, 32, 236, 229, 0, 237, 233, - 0, 235, 225, 0, 226, 230, 300}; + 5, 31, 231, 0, 35, 0, 33, 34, 232, 9, + 1, 0, 0, 32, 0, 291, 292, 0, 289, 0, + 290, 0, 293, 134, 201, 165, 173, 169, 209, 216, + 113, 185, 215, 223, 211, 161, 0, 212, 294, 0, + 299, 98, 213, 214, 219, 114, 177, 181, 102, 131, + 112, 117, 97, 151, 217, 138, 296, 295, 298, 220, + 0, 0, 0, 0, 44, 45, 0, 41, 0, 300, + 38, 0, 302, 56, 0, 0, 0, 0, 0, 39, + 42, 0, 0, 203, 245, 43, 0, 37, 0, 0, + 40, 0, 0, 0, 0, 0, 221, 222, 127, 210, + 218, 0, 0, 114, 133, 300, 38, 302, 116, 115, + 0, 0, 0, 129, 130, 128, 0, 301, 291, 0, + 0, 293, 0, 288, 0, 303, 0, 63, 64, 65, + 66, 91, 67, 92, 68, 69, 70, 71, 72, 73, + 74, 75, 60, 76, 77, 78, 79, 80, 62, 93, + 81, 61, 82, 83, 84, 85, 86, 87, 88, 89, + 90, 94, 0, 58, 0, 0, 50, 0, 59, 49, + 132, 0, 162, 0, 0, 0, 0, 152, 0, 0, + 0, 0, 0, 0, 142, 0, 0, 0, 136, 137, + 135, 140, 144, 143, 141, 139, 154, 153, 155, 0, + 170, 0, 166, 0, 0, 108, 107, 96, 95, 0, + 0, 106, 202, 109, 0, 110, 0, 111, 105, 246, + 247, 287, 0, 198, 191, 189, 196, 197, 195, 194, + 200, 193, 192, 190, 199, 186, 0, 174, 0, 0, + 178, 0, 0, 182, 0, 0, 108, 100, 0, 99, + 0, 104, 297, 261, 0, 262, 263, 264, 257, 0, + 258, 259, 260, 285, 286, 118, 0, 0, 0, 0, + 0, 250, 251, 207, 205, 167, 175, 171, 187, 163, + 208, 0, 114, 179, 183, 156, 145, 0, 0, 164, + 0, 0, 0, 0, 157, 0, 0, 0, 0, 0, + 149, 147, 150, 148, 146, 159, 158, 160, 0, 172, + 0, 168, 0, 206, 114, 0, 188, 203, 204, 0, + 203, 0, 0, 253, 0, 0, 0, 255, 0, 176, + 0, 0, 180, 0, 0, 184, 243, 0, 235, 244, + 238, 0, 242, 0, 203, 236, 0, 203, 0, 0, + 254, 0, 0, 0, 256, 301, 0, 277, 0, 0, + 0, 249, 0, 248, 225, 228, 0, 64, 91, 67, + 92, 69, 70, 41, 74, 75, 38, 76, 79, 39, + 42, 203, 43, 82, 37, 84, 40, 86, 87, 88, + 89, 90, 94, 226, 224, 102, 103, 108, 0, 101, + 0, 265, 266, 0, 0, 0, 268, 273, 271, 274, + 0, 0, 272, 273, 0, 269, 0, 270, 227, 276, + 0, 227, 275, 0, 278, 279, 0, 227, 280, 281, + 0, 0, 282, 0, 0, 0, 283, 284, 120, 119, + 0, 0, 0, 252, 0, 0, 0, 267, 0, 57, + 0, 54, 56, 47, 0, 53, 48, 55, 52, 46, + 0, 51, 124, 122, 126, 123, 121, 125, 0, 18, + 13, 0, 14, 10, 0, 0, 0, 28, 0, 30, + 27, 0, 29, 0, 0, 26, 38, 56, 21, 0, + 24, 16, 35, 0, 11, 0, 17, 0, 20, 12, + 0, 25, 38, 56, 15, 0, 19, 22, 23, 36, + 240, 233, 0, 241, 237, 0, 239, 229, 0, 230, + 234, 304}; const int JavaScriptGrammar::goto_default [] = { - 6, 5, 20, 1, 4, 3, 19, 500, 501, 479, - 21, 374, 46, 11, 109, 62, 460, 458, 136, 135, - 34, 459, 134, 137, 216, 58, 51, 224, 60, 40, - 223, 55, 61, 108, 59, 33, 65, 63, 295, 45, - 289, 35, 285, 37, 287, 36, 286, 56, 293, 57, - 294, 41, 288, 284, 325, 410, 290, 291, 38, 44, - 47, 52, 53, 42, 39, 64, 110, 54, 69, 106, - 107, 43, 376, 375, 22, 517, 516, 347, 348, 519, - 350, 518, 349, 416, 420, 423, 419, 418, 438, 439, - 27, 49, 126, 26, 48, 67, 66, 0}; + 6, 5, 20, 1, 4, 3, 19, 503, 504, 479, + 21, 499, 500, 374, 46, 11, 109, 62, 460, 458, + 136, 135, 34, 459, 134, 137, 216, 58, 51, 224, + 60, 40, 223, 55, 61, 108, 59, 33, 65, 63, + 295, 45, 289, 35, 285, 37, 287, 36, 286, 56, + 293, 57, 294, 41, 288, 284, 325, 410, 290, 291, + 38, 44, 47, 52, 53, 42, 39, 64, 110, 54, + 69, 106, 107, 43, 376, 375, 22, 522, 521, 347, + 348, 524, 350, 523, 349, 416, 420, 423, 419, 418, + 438, 439, 27, 49, 126, 26, 48, 67, 66, 0}; const int JavaScriptGrammar::action_index [] = { - 20, -88, 13, -88, -14, 289, 57, 97, -88, -88, - -88, -88, -88, 64, 70, 118, -88, -88, -88, -88, - 247, 160, 11, -88, 7, 24, 37, -9, -88, 0, - -88, -10, 1383, 126, -88, 86, -16, -39, -88, -88, - 214, -88, -88, -88, -88, 235, 161, -88, -88, 15, - -88, -88, -88, -88, -88, 574, 77, 62, 215, 195, - -88, -88, -88, 312, -88, 274, -88, 1383, -88, -88, - 150, 141, 79, 651, -88, -88, 1299, -88, -21, -8, - -4, -36, 1635, 78, 651, 651, 651, 418, 651, -88, - -88, 651, 651, 651, -88, -88, 65, -88, 651, 651, - -88, 29, 651, 651, 47, 33, -88, -88, -88, -88, - -88, 651, 651, 109, 181, 21, -88, 1131, -88, -88, - 651, 651, 651, -88, -88, -88, -28, -88, 24, -27, - -6, 1383, -17, -88, 3, 5, 35, -88, -88, -88, - -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, - -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, - -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, - -88, -88, 651, -88, 1215, 10, -88, 651, -88, -88, - 176, 651, 244, 651, 651, 651, 651, 404, 651, 651, - 651, 651, 651, 651, 157, 651, 651, 651, 104, 103, - 106, 189, 190, 172, 193, 274, 292, 322, 302, 651, - 4, 651, 81, 1047, 651, 651, -88, -88, -88, 142, - 651, -88, -88, 48, -5, -88, 651, -88, -88, -88, - -88, -88, 651, -88, -88, -88, -88, -88, -88, -88, - -88, -88, -88, -88, -88, -88, 651, 59, 651, 651, - 98, 89, 651, -88, 1047, 651, 651, -88, 145, -88, - 38, -88, -88, -88, 72, -88, -88, -88, -88, 74, - -88, -88, -88, -88, -88, -88, -65, -22, 651, 121, - 87, -88, -88, 805, -88, 19, -20, -57, -88, 242, - -3, -59, 526, 50, 73, 339, 274, -25, 651, 246, - 651, 651, 651, 651, 339, 651, 651, 651, 651, 651, - 274, 274, 274, 167, 162, 339, 339, 270, 651, -46, - 651, 23, 651, -88, 489, 651, -88, 651, 27, -19, - 651, -29, 1299, -88, 651, 116, 1299, -88, 651, -12, - 651, 651, 50, 18, 651, -88, 22, 102, 16, -88, - -88, 651, -88, 25, 651, -88, -15, 651, -11, 1299, - -88, 651, 211, 1299, -88, -24, 1299, -88, 651, 111, - 1299, 28, 1299, -88, -88, 1299, 39, 205, 63, 184, - 69, 651, 1299, 88, 49, 84, 99, 66, 444, 90, - 92, 963, 51, 32, 53, 651, 131, 31, 651, 30, - 651, 36, 40, -88, -88, 206, -88, 651, 17, -88, - 56, -88, -88, 651, 100, 42, -88, 61, -88, 68, - 154, 651, -88, 60, 67, -88, 12, -88, 1299, -88, - 107, 1299, -88, 175, -88, -88, 105, 1299, -2, -88, - -35, -26, -88, -23, -34, 8, -88, -88, -88, -88, - 651, 113, 1299, -88, 651, 101, 1299, -88, 148, 14, - 728, -88, 26, -88, 882, -88, -88, -88, -88, -88, - 114, -88, -88, -88, -88, -88, -88, -88, 329, -88, - -88, 361, -88, -88, -13, -18, 34, 41, 651, 83, - 82, 651, 80, 1467, 55, -88, 119, 239, -88, 71, - 124, -88, 130, -88, 149, -88, -88, 1551, -88, 132, - 227, -88, 134, -88, -88, 44, -88, 164, -88, -88, - 651, -88, -88, 52, -88, -88, -88, + 67, -89, 30, -89, 67, 346, 173, 79, -89, -89, + -89, -89, -89, 32, 33, 90, -89, -89, -89, -89, + 336, 106, 45, -89, 55, 65, 85, 66, -89, 70, + -89, 59, 1539, 111, -89, 11, -34, -17, -89, -89, + 188, -89, -89, -89, -89, 269, 150, -89, -89, -51, + -89, -89, -89, -89, -89, 549, 41, 146, 247, 158, + -89, -89, -89, 329, -89, 311, -89, 1539, -89, -89, + 196, 191, 118, 713, -89, -89, 1454, -89, -23, 16, + 83, 61, 1709, 78, 713, 713, 713, 452, 713, -89, + -89, 713, 713, 713, -89, -89, 47, -89, 713, 713, + -89, 37, 713, 713, 73, 53, -89, -89, -89, -89, + -89, 713, 713, 76, 193, 46, -89, 1199, -89, -89, + 713, 713, 713, -89, -89, -89, -25, -89, -13, -52, + -9, 1539, 60, -89, 77, 80, 17, -89, -89, -89, + -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, + -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, + -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, + -89, -89, 713, -89, 1284, 21, -89, 713, -89, -89, + 211, 713, 267, 713, 713, 713, 713, 319, 713, 713, + 713, 713, 713, 713, 201, 713, 713, 713, 96, 91, + 110, 189, 242, 246, 238, 234, 359, 339, 349, 713, + 63, 713, 68, 1114, 713, 713, -89, -89, -89, 104, + 713, -89, -89, 69, 18, -89, 713, -89, -89, -89, + -89, -89, 713, -89, -89, -89, -89, -89, -89, -89, + -89, -89, -89, -89, -89, -89, 713, 48, 713, 713, + 74, 64, 713, -89, 1114, 713, 713, -89, 116, -89, + 2, -89, -89, -89, 87, -89, -89, -89, -89, 113, + -89, -89, -89, -89, -89, -89, 56, 62, 713, 103, + 130, -89, -89, 791, -89, 84, -38, -67, -89, 260, + 10, -41, 635, 20, 117, 302, 239, -10, 713, 271, + 713, 713, 713, 713, 272, 713, 713, 713, 713, 713, + 208, 222, 205, 213, 217, 287, 377, 377, 713, -73, + 713, 84, 713, -89, 463, 713, -89, 713, 42, -15, + 713, -16, 1454, -89, 713, 144, 1454, -89, 713, 6, + 713, 713, 54, 51, 713, -89, 38, 95, 26, -89, + -89, 713, -89, -2, 713, -89, -31, 713, -37, 1454, + -89, 713, 99, 1454, -89, 4, 1454, -89, 713, 97, + 1454, 22, 1454, -89, -89, 1454, 49, 140, 5, 147, + 82, 713, 1454, 29, 1, 81, 34, 3, 538, 28, + 25, 873, 19, -3, 24, 713, 35, 14, 713, 23, + 713, 15, 27, -89, -89, 163, -89, 713, -7, -89, + 128, -89, -89, 713, 138, -8, -89, 44, -89, 43, + 127, 713, -89, 12, -1, -89, -50, -89, 1454, -89, + 115, 1454, -89, 175, -89, -89, 108, 1454, -18, -89, + -29, -4, -89, -28, -60, -4, -89, -89, -89, -89, + 713, 124, 1454, -89, 713, 125, 1454, -89, 112, 13, + 1029, -89, 7, -89, 951, -89, -89, -89, -89, -89, + 126, -89, -89, -89, -89, -89, -89, -89, 356, -89, + -89, 375, -89, -89, 39, 31, 36, 57, 713, 71, + 75, 713, 72, 1624, 52, -89, 131, 274, -89, 133, + -89, -89, 40, 137, -89, 101, -89, 148, -89, -89, + 1369, -89, 94, 262, -89, 98, -89, -89, -89, -89, + 50, -89, 157, -89, -89, 713, -89, -89, 58, -89, + -89, -89, - -98, -98, -98, -98, -2, -7, -98, -98, -98, -98, - -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, - 184, -98, -98, -98, -98, -98, -98, -98, -98, -98, - -98, -98, 164, -98, -98, -98, -98, -98, -98, -98, - -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, - -98, -98, -98, -98, -98, -32, -98, -98, -98, -98, - -98, -98, -98, -98, -98, -98, -98, 181, -98, -98, - -98, -98, -98, 105, -98, -98, -5, -98, -98, -98, - -98, -98, -98, -98, 51, 79, 84, 44, 91, -98, - -98, 42, 55, 52, -98, -98, -98, -98, 45, 110, - -98, -12, 125, 128, -98, -98, -98, -98, -98, -98, - -98, 131, 132, -98, -98, -98, -98, -98, -98, -98, - 111, 120, 116, -98, -98, -98, -98, -98, -63, -98, - -98, 182, -98, -98, -98, -98, -98, -98, -98, -98, - -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, - -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, - -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, - -98, -98, 35, -98, 25, -98, -98, 39, -98, -98, - -98, 56, -98, 59, 61, 62, 60, -98, 46, 43, - 47, 49, 53, 95, -98, 97, 83, 72, -98, -98, - -98, -98, -98, -98, -98, -98, -98, -98, -98, 70, - -98, 80, -98, 17, 33, 15, -98, -98, -98, -98, - 10, -98, -98, -98, -98, -98, 30, -98, -98, -98, - -98, -98, 34, -98, -98, -98, -98, -98, -98, -98, - -98, -98, -98, -98, -98, -98, 63, -98, 88, 36, - -98, -98, 38, -98, 82, 37, 89, -98, -98, -98, - -98, -98, -98, -98, -98, -98, -98, -98, -98, -98, - -98, -98, -98, -98, -98, -98, -98, -98, 32, -98, - -98, -98, -98, 94, -98, -98, -98, -98, -98, -98, - -98, -98, -98, -98, -98, -98, -98, -98, 179, -98, - 189, 176, 251, 175, -98, 133, 143, 149, 137, 109, - -98, -98, -98, -98, -98, -98, -98, -98, 165, -98, - 166, -98, 186, -98, -98, 193, -98, 121, -98, -98, - 136, -98, 31, -98, 19, -98, 21, -98, 195, -98, - 187, 185, -98, -98, 152, -98, -98, -98, -98, -98, - -98, 151, -98, -54, 134, -98, -98, 117, -98, 22, - -98, 24, -98, 28, -98, -98, 27, -98, 29, -98, - 26, -98, 23, -98, -98, 14, -98, -98, -98, -98, - -98, 106, 50, -98, -98, -98, -98, -98, 129, -98, - -98, 40, -98, -98, -98, 41, -98, 13, 119, -98, - 69, -98, -98, -98, -98, -98, -98, 107, -98, -98, - -98, -98, -98, 48, -98, -98, -98, -98, -98, -44, - -98, -10, -98, -79, -98, -98, -98, -98, -72, -98, - -98, -68, -98, -98, -98, -98, -98, -98, -71, -98, - -98, -41, -98, -98, -98, -37, -98, -98, -98, -98, - 92, -98, -1, -98, 2, -98, 4, -98, -98, -98, - 8, -98, -3, -98, 9, -98, -98, -98, -98, -98, - -98, -98, -98, -98, -98, -98, -98, -98, 153, -98, - -98, 172, -98, -98, -98, -98, -98, -98, -4, -98, - -98, 7, -98, 5, -98, -98, 3, 1, -98, 0, - -98, -98, -98, -98, 57, -98, -98, 12, -98, 11, - 113, -98, -98, -98, -98, -98, -98, -98, -98, -98, - 6, -98, -98, -75, -98, -98, -98}; + -100, -100, -100, -100, 12, 4, -100, -100, -100, -100, + -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, + 59, -100, -100, -100, -100, -100, -100, -100, -100, -100, + -100, -100, 117, -100, -100, -100, -100, -100, -100, -100, + -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, + -100, -100, -100, -100, -100, -54, -100, -100, -100, -100, + -100, -100, -100, -100, -100, -100, -100, 184, -100, -100, + -100, -100, -100, 116, -100, -100, 47, -100, -100, -100, + -100, -100, -100, -100, 39, 141, 89, 65, 48, -100, + -100, 51, 52, 38, -100, -100, -100, -100, 40, 83, + -100, -16, 61, 66, -100, -100, -100, -100, -100, -100, + -100, 44, 57, -100, -100, -100, -100, -100, -100, -100, + 112, 109, 133, -100, -100, -100, -100, -100, -61, -100, + -100, 193, -100, -100, -100, -100, -100, -100, -100, -100, + -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, + -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, + -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, + -100, -100, -13, -100, -18, -100, -100, -7, -100, -100, + -100, 121, -100, 113, 104, 90, 92, -100, 123, 103, + 101, 102, 95, 137, -100, 145, 132, 126, -100, -100, + -100, -100, -100, -100, -100, -100, -100, -100, -100, 58, + -100, 84, -100, 11, 7, 3, -100, -100, -100, -100, + 6, -100, -100, -100, -100, -100, 10, -100, -100, -100, + -100, -100, 5, -100, -100, -100, -100, -100, -100, -100, + -100, -100, -100, -100, -100, -100, 41, -100, 56, -3, + -100, -100, 0, -100, 147, 64, 138, -100, -100, -100, + -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, + -100, -100, -100, -100, -100, -100, -100, -100, 2, -100, + -100, -100, -100, 115, -100, -100, -100, -100, -100, -100, + -100, -100, -100, -100, -100, -100, -100, -100, 187, -100, + 154, 195, 183, 198, -100, 33, 73, 82, 71, 75, + -100, -100, -100, -100, -100, -100, -100, -100, 165, -100, + 146, -100, 150, -100, -100, 177, -100, 50, -100, -100, + 53, -100, 22, -100, 9, -100, 45, -100, 171, -100, + 189, 169, -100, -100, 163, -100, -100, -100, -100, -100, + -100, 162, -100, -68, 136, -100, -100, 124, -100, -2, + -100, -4, -100, -5, -100, -100, 46, -100, 43, -100, + 35, -100, 34, -100, -100, 42, -100, -100, -100, -100, + -100, 122, 30, -100, -100, -100, -100, -100, 70, -100, + -100, 49, -100, -100, -100, 36, -100, -15, 86, -100, + 79, -100, -100, -100, -100, -100, -100, 142, -100, -100, + -100, -100, -100, 37, -100, -100, -100, -100, -100, -40, + -100, 32, -100, -44, -100, -100, -100, -100, -33, -100, + -100, -12, -100, -100, -100, -100, -100, -100, -35, -100, + -100, -36, -100, -100, -100, -53, -100, -100, -100, -100, + -1, -100, 1, -100, -10, -100, -8, -100, -100, -100, + -19, -100, -17, -100, -22, -100, -100, -100, -100, -100, + -100, -100, -100, -100, -100, -100, -100, -100, 175, -100, + -100, 236, -100, -100, -100, -100, -100, -100, 19, -100, + -100, 15, -100, 21, -100, -100, 28, 29, -100, -100, + -100, -100, 31, -100, -100, -100, -100, 60, -100, -100, + 25, -100, 17, 62, -100, -100, -100, -100, -100, -100, + -100, -100, -100, -100, -100, 8, -100, -100, -60, -100, + -100, -100}; const int JavaScriptGrammar::action_info [] = { - 368, 443, 327, 366, 346, 322, 444, 437, 128, 277, - 172, 490, 25, 174, 278, 283, 486, 177, 441, 320, - 298, 365, 467, 32, 298, 344, 445, 131, 318, 30, - 320, 332, 209, 130, 461, 220, 318, 211, 133, 351, - 515, 437, 330, 25, 372, 29, 357, 361, 488, 359, - 127, 31, 338, 28, 346, 228, 226, 526, -57, -228, - -79, 520, 437, 487, 437, 421, 421, 427, 413, 454, - 231, 2, 450, 421, 428, 417, 454, 409, 7, 246, - 211, 515, 181, 450, 514, 283, 461, 181, 220, 491, - 179, 220, -227, 24, 404, -68, 252, -76, 261, -58, - 246, 413, 368, 478, 478, 2, -56, 209, 220, 220, - 353, 440, 248, 127, 431, 220, 249, 412, 411, 220, - -296, 220, 220, 340, 220, 441, 366, 341, 484, 220, - 274, 273, 504, 267, 266, 272, 271, 507, -81, 366, - 274, 273, 504, 111, 111, 494, 111, 485, 282, 281, - 220, 118, 478, 220, 112, 112, 462, 112, 9, 8, - 415, 456, 119, 354, 424, 478, 111, 493, 0, 220, - 269, 370, 523, 452, 471, 494, 336, 112, 499, 264, - 505, 280, 195, 220, 196, 0, 0, 195, 120, 196, - 513, 0, 195, 120, 196, 197, 0, 195, 221, 196, - 197, 259, 270, 268, 463, 197, 0, 120, 17, 425, - 197, 265, 263, 269, 195, 195, 196, 196, 195, 220, - 196, 254, 230, 229, 0, 524, 522, 197, 197, 213, - 254, 197, 16, 121, 264, 461, 435, 434, 121, 122, - 255, 0, 407, 0, 122, 270, 268, 461, 214, 255, - 215, 256, 121, 183, 184, 0, 499, 0, 122, 0, - 300, 301, 183, 184, 300, 301, 265, 263, 499, 13, - 0, 363, 0, 0, 0, 0, 14, 0, 0, 0, - 185, 186, 0, 0, 0, 0, 17, 302, 303, 185, - 186, 302, 303, 305, 306, 0, 0, 0, 17, 195, - 0, 196, 307, 0, 0, 308, 17, 309, 0, 0, - 16, 13, 197, 0, 0, 188, 189, 0, 14, 18, - 0, 0, 16, 190, 191, 188, 189, 192, 12, 193, - 16, 15, 0, 190, 191, 188, 189, 192, 0, 193, - 0, 0, 0, 190, 191, 188, 189, 192, 17, 193, - 0, 13, 0, 190, 191, 0, 0, 192, 14, 193, - 0, 18, 305, 306, 0, 0, 0, 0, 0, 0, - 12, 307, 16, 15, 308, 0, 309, 0, 0, 0, - 0, 0, 0, 13, 480, 0, 0, 0, 17, 0, - 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, - 12, 0, 16, 15, 0, 0, 482, 0, 0, 0, - 17, 0, 0, 0, 0, 0, 0, 188, 189, 0, - 74, 75, 0, 18, 0, 190, 191, 0, 0, 192, - 115, 193, 12, 0, 16, 15, 0, 116, 0, 0, - 0, 117, 83, 0, 84, 0, 74, 75, 0, 0, - 0, 87, 0, 0, 0, 90, 115, 0, 0, 0, - 0, 0, 0, 116, 0, 0, 0, 117, 83, 0, - 84, 0, 0, 95, 0, 97, 0, 87, 0, 0, - 0, 90, 233, 0, 0, 0, 89, 100, 77, 0, - 0, 0, 234, 0, 0, 0, 235, 0, 0, 95, - 0, 97, 0, 0, 0, 236, 0, 237, 0, 0, - 0, 0, 89, 100, 77, 0, 0, 0, 238, 233, - 239, 118, 0, 0, 0, 0, 0, 0, 240, 234, - 0, 241, 119, 235, 0, 0, 0, 242, 0, 0, - 0, 0, 236, 243, 237, 0, 0, 334, 0, 0, - 0, 0, 0, 0, 0, 238, 244, 239, 118, 0, - 0, 0, 0, 0, 0, 240, 0, 233, 241, 119, - 0, 0, 0, 0, 242, 0, 0, 234, 0, 0, - 243, 235, 0, 0, 0, 0, 0, 0, 0, 0, - 236, 0, 237, 244, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 238, 0, 239, 118, 0, 0, 0, - 0, 0, 0, 240, 0, 0, 241, 119, 0, 0, - 0, 0, 242, 0, 0, 0, 0, 0, 243, 0, + 445, 444, 441, 320, 231, 427, 428, 443, 130, 320, + 318, 128, 181, 283, 209, 461, 28, 421, 322, 346, + 327, 467, 338, 359, 131, 417, -61, 346, 177, 437, + 357, -83, -62, 413, -231, -80, -72, 283, 372, 368, + 25, -60, -85, 246, 332, 365, 330, 437, 421, 421, + 220, 450, -232, 409, 318, 351, 338, 361, 344, 211, + 490, 24, 261, 454, 488, 487, 478, 525, 486, 181, + 437, 252, 179, 478, 520, 127, 246, 226, 228, 220, + 220, 519, 491, 413, 172, 298, 461, 520, 174, 454, + 366, 25, 32, 29, 28, 7, 209, 368, 278, 30, + 484, 366, 0, 353, 404, 220, 507, 220, 510, 450, + 127, 220, 220, 493, 440, 133, 494, -300, 118, 485, + 462, 494, 431, 220, 220, 0, 31, 478, 441, 119, + 277, 111, 220, 220, 220, 0, 111, 424, 366, 211, + 9, 8, 112, 274, 273, 507, 220, 112, 267, 266, + 111, 111, 220, 2, 516, 0, 354, 370, 220, 363, + 221, 112, 112, 280, 478, 528, 0, 340, 463, 264, + 120, 341, 259, 531, 272, 271, 269, 502, 254, 274, + 273, 0, 425, 220, 452, 456, 471, 0, 0, 412, + 411, 282, 281, 508, 518, 517, 248, 255, 415, 407, + 249, 265, 263, 213, 336, 120, 0, 17, 270, 268, + 0, 230, 229, 0, 195, 121, 196, 0, 529, 527, + 269, 122, 214, 120, 215, 264, 195, 197, 196, 0, + 195, 16, 196, 195, 0, 196, 435, 434, 195, 197, + 196, 0, 195, 197, 196, 0, 197, 195, 0, 196, + 121, 197, 270, 268, 0, 197, 122, 265, 263, 195, + 197, 196, 254, 195, 195, 196, 196, 195, 121, 196, + 461, 195, 197, 196, 122, 0, 197, 197, 300, 301, + 197, 255, 461, 256, 197, 183, 184, 183, 184, 300, + 301, 502, 0, 0, 0, 305, 306, 0, 0, 0, + 0, 0, 0, 502, 307, 302, 303, 308, 0, 309, + 305, 306, 185, 186, 185, 186, 302, 303, 0, 307, + 0, 17, 308, 0, 309, 305, 306, 0, 0, 0, + 0, 0, 0, 17, 307, 0, 195, 308, 196, 309, + 0, 0, 188, 189, 0, 16, 0, 0, 0, 197, + 190, 191, 188, 189, 192, 0, 193, 16, 13, 0, + 190, 191, 188, 189, 192, 14, 193, 0, 13, 0, + 190, 191, 188, 189, 192, 14, 193, 0, 13, 0, + 190, 191, 188, 189, 192, 14, 193, 0, 0, 0, + 190, 191, 0, 0, 192, 17, 193, 13, 0, 0, + 305, 306, 0, 0, 14, 17, 0, 0, 18, 307, + 0, 480, 308, 0, 309, 17, 0, 12, 18, 16, + 0, 15, 0, 0, 0, 0, 0, 12, 18, 16, + 482, 15, 0, 0, 17, 0, 0, 12, 0, 16, + 0, 15, 0, 0, 0, 0, 0, 18, 0, 0, + 0, 0, 0, 0, 0, 0, 12, 0, 16, 0, + 15, 0, 0, 0, 74, 75, 233, 0, 0, 0, + 0, 0, 0, 0, 115, 0, 234, 0, 0, 0, + 235, 116, 0, 0, 0, 117, 83, 0, 84, 236, + 0, 237, 0, 0, 0, 87, 0, 0, 0, 90, + 0, 0, 238, 0, 239, 118, 0, 0, 0, 0, + 0, 0, 240, 0, 0, 241, 119, 95, 0, 97, + 0, 242, 0, 0, 0, 0, 0, 243, 0, 0, + 89, 100, 77, 0, 0, 0, 0, 0, 0, 0, + 244, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 74, 75, 233, 0, 0, 0, 0, 0, 0, 0, + 115, 0, 234, 0, 0, 0, 235, 116, 0, 0, + 0, 117, 83, 0, 84, 236, 0, 237, 0, 0, + 0, 87, 0, 0, 0, 90, 0, 0, 238, 0, + 239, 118, 0, 0, 0, 0, 0, 0, 240, 0, + 0, 241, 119, 95, 0, 97, 0, 242, 0, 0, + 0, 0, 0, 243, 0, 0, 89, 100, 77, 0, + 0, 0, 0, 0, 0, 0, 244, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 233, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 234, 0, + 0, 0, 235, 0, 0, 0, 0, 0, 0, 0, + 0, 236, 0, 237, 0, 0, 334, 0, 0, 0, + 0, 0, 0, 0, 238, 0, 239, 118, 0, 0, + 0, 0, 0, 0, 240, 0, 0, 241, 119, 0, + 0, 0, 0, 242, 0, 0, 0, 0, 0, 243, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 244, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 244, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 73, 74, 75, 0, 0, 0, + 0, 0, 0, 0, 0, 115, 0, 0, 0, 0, + 0, 0, 116, 0, 0, 0, 117, 83, 0, 84, + 0, 0, 0, 85, 0, 86, 87, 88, 0, 0, + 90, 0, 0, 0, 91, 0, 92, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 95, 0, + 97, 0, 99, 0, 102, 0, 103, 0, 0, 0, + 0, 89, 100, 77, 0, 0, 0, 0, 0, 0, 0, 0, 73, 74, 75, 0, 0, 0, 0, 0, 0, 0, 0, 115, 0, 0, 0, 0, 0, 0, 116, 0, 0, 0, 117, 83, 0, 84, 0, 0, 0, 85, 0, 86, 87, 88, 0, 0, 90, 0, 0, 0, 91, 0, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, 0, 97, 0, - 99, 0, 102, 0, 103, 0, 0, 0, 0, 89, - 100, 77, 0, 0, 0, 0, 0, 0, 0, 73, - 74, 75, 0, 0, 0, 0, 0, 0, 0, 0, - 115, 0, 0, 0, 0, 0, 0, 116, 0, 0, - 0, 117, 83, 0, 84, 0, 0, 0, 85, 0, - 86, 87, 88, 0, 0, 90, 0, 0, 0, 91, - 0, 92, 0, 0, 469, 0, 0, 0, 0, 0, - 0, 0, 0, 95, 0, 97, 0, 99, 0, 102, - 0, 103, 0, 0, 0, 0, 89, 100, 77, 0, - 0, 0, 0, 0, 0, 0, 73, 74, 75, 0, - 0, 0, 0, 0, 0, 0, 0, 115, 0, 0, - 0, 0, 0, 0, 116, 0, 0, 0, 117, 83, - 0, 84, 0, 0, 0, 85, 0, 86, 87, 88, - 0, 0, 90, 0, 0, 0, 91, 0, 92, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 95, 0, 97, 0, 99, 0, 102, 297, 103, 0, - 0, 0, 0, 89, 100, 77, 0, 0, 0, 0, - 0, 0, 0, 73, 74, 75, 0, 0, 0, 0, - 0, 0, 0, 0, 115, 0, 0, 0, 0, 0, - 0, 116, 0, 0, 0, 117, 83, 0, 84, 0, - 0, 0, 85, 0, 86, 87, 88, 0, 0, 90, - 0, 0, 0, 91, 0, 92, 0, 0, 466, 0, - 0, 0, 0, 0, 0, 0, 0, 95, 0, 97, - 0, 99, 0, 102, 0, 103, 0, 0, 0, 0, - 89, 100, 77, 0, 0, 0, 0, 0, 0, 0, - -77, 0, 0, 0, 73, 74, 75, 0, 0, 0, + 99, 0, 102, 297, 103, 0, 0, 0, 0, 89, + 100, 77, 0, 0, 0, 0, 0, 0, 0, 0, + -81, 0, 0, 0, 73, 74, 75, 0, 0, 0, 0, 0, 0, 0, 0, 115, 0, 0, 0, 0, 0, 0, 116, 0, 0, 0, 117, 83, 0, 84, 0, 0, 0, 85, 0, 86, 87, 88, 0, 0, @@ -399,209 +395,215 @@ const int JavaScriptGrammar::action_info [] = { 0, 0, 0, 0, 0, 0, 0, 0, 95, 0, 97, 0, 99, 0, 102, 0, 103, 0, 0, 0, 0, 89, 100, 77, 0, 0, 0, 0, 0, 0, - 0, 138, 139, 140, 0, 0, 142, 144, 145, 0, - 0, 146, 0, 147, 0, 0, 0, 149, 150, 151, - 0, 0, 0, 0, 0, 0, 218, 153, 154, 155, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 156, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 160, 0, 0, 0, - 0, 0, 0, 162, 163, 164, 0, 166, 167, 168, - 169, 170, 171, 0, 0, 157, 165, 148, 141, 143, - 159, 0, 0, 0, 0, 138, 139, 140, 0, 0, - 142, 144, 145, 0, 0, 146, 0, 147, 0, 0, - 0, 149, 150, 151, 0, 0, 0, 0, 0, 0, - 152, 153, 154, 155, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 156, 0, 0, 0, 158, 0, + 0, 0, 73, 74, 75, 0, 0, 0, 0, 0, + 0, 0, 0, 115, 0, 0, 0, 0, 0, 0, + 116, 0, 0, 0, 117, 83, 0, 84, 0, 0, + 0, 85, 0, 86, 87, 88, 0, 0, 90, 0, + 0, 0, 91, 0, 92, 0, 0, 466, 0, 0, + 0, 0, 0, 0, 0, 0, 95, 0, 97, 0, + 99, 0, 102, 0, 103, 0, 0, 0, 0, 89, + 100, 77, 0, 0, 0, 0, 0, 0, 0, 0, + 73, 74, 75, 0, 0, 0, 0, 0, 0, 0, + 0, 115, 0, 0, 0, 0, 0, 0, 116, 0, + 0, 0, 117, 83, 0, 84, 0, 0, 0, 85, + 0, 86, 87, 88, 0, 0, 90, 0, 0, 0, + 91, 0, 92, 0, 0, 469, 0, 0, 0, 0, + 0, 0, 0, 0, 95, 0, 97, 0, 99, 0, + 102, 0, 103, 0, 0, 0, 0, 89, 100, 77, + 0, 0, 0, 0, 0, 0, 0, 0, 138, 139, + 140, 0, 0, 142, 144, 145, 0, 0, 146, 0, + 147, 0, 0, 0, 149, 150, 151, 0, 0, 0, + 0, 0, 0, 218, 153, 154, 155, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 156, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 160, 0, 0, 0, 0, 0, 161, 162, 163, 164, - 0, 166, 167, 168, 169, 170, 171, 0, 0, 157, - 165, 148, 141, 143, 159, 0, 0, 0, 0, 138, - 139, 140, 0, 0, 142, 144, 145, 0, 0, 146, - 0, 147, 0, 0, 0, 149, 150, 151, 0, 0, - 0, 0, 0, 0, 152, 153, 154, 155, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 156, 0, - 0, 0, 158, 0, 0, 0, 0, 0, 0, 0, - 176, 0, 0, 0, 160, 0, 0, 0, 0, 0, - 161, 162, 163, 164, 0, 166, 167, 168, 169, 170, - 171, 0, 0, 157, 165, 148, 141, 143, 159, 0, + 0, 0, 0, 160, 0, 0, 0, 0, 0, 0, + 162, 163, 164, 0, 166, 167, 168, 169, 170, 171, + 0, 0, 157, 165, 148, 141, 143, 159, 0, 0, + 0, 0, 0, 138, 139, 140, 0, 0, 142, 144, + 145, 0, 0, 146, 0, 147, 0, 0, 0, 149, + 150, 151, 0, 0, 0, 0, 0, 0, 152, 153, + 154, 155, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 156, 0, 0, 0, 158, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 160, 0, + 0, 0, 0, 0, 161, 162, 163, 164, 0, 166, + 167, 168, 169, 170, 171, 0, 0, 157, 165, 148, + 141, 143, 159, 0, 0, 0, 0, 0, 138, 139, + 140, 0, 0, 142, 144, 145, 0, 0, 146, 0, + 147, 0, 0, 0, 149, 150, 151, 0, 0, 0, + 0, 0, 0, 152, 153, 154, 155, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 156, 0, 0, + 0, 158, 0, 0, 0, 0, 0, 0, 0, 176, + 0, 0, 0, 160, 0, 0, 0, 0, 0, 161, + 162, 163, 164, 0, 166, 167, 168, 169, 170, 171, + 0, 0, 157, 165, 148, 141, 143, 159, 0, 0, + 0, 0, 0, 70, 0, 0, 0, 0, 71, 0, + 73, 74, 75, 76, 0, 0, 0, 0, 0, 0, + 78, 115, 0, 0, 0, 0, 0, 0, 512, 81, + 0, 0, 82, 513, 0, 84, 0, 0, 0, 85, + 0, 86, 87, 88, 0, 0, 90, 0, 0, 0, + 91, 0, 92, 0, 0, 0, 0, 0, 93, 0, + 94, 0, 0, 0, 95, 96, 97, 98, 99, 101, + 102, 18, 103, 104, 105, 0, 0, 89, 100, 77, + 12, 72, 0, 0, 0, 0, 0, 0, 70, 0, + 0, 0, 0, 71, 0, 73, 74, 75, 76, 0, + 0, 0, 0, 0, 0, 78, 115, 0, 0, 0, + 0, 0, 0, 80, 81, 0, 0, 82, 83, 0, + 84, 0, 0, 0, 85, 0, 86, 87, 88, 0, + 0, 90, 0, 0, 0, 91, 0, 92, 0, 0, + 0, 0, 0, 93, 0, 94, 0, 0, 0, 95, + 96, 97, 98, 99, 101, 102, 18, 103, 104, 105, + 0, 0, 89, 100, 77, 12, 72, 0, 0, 0, 0, 0, 0, 70, 0, 0, 0, 0, 71, 0, 73, 74, 75, 76, 0, 0, 0, 0, 0, 0, - 78, 115, 0, 0, 0, 0, 0, 0, 80, 81, + 78, 79, 0, 0, 0, 0, 0, 0, 80, 81, 0, 0, 82, 83, 0, 84, 0, 0, 0, 85, 0, 86, 87, 88, 0, 0, 90, 0, 0, 0, 91, 0, 92, 0, 0, 0, 0, 0, 93, 0, 94, 0, 0, 0, 95, 96, 97, 98, 99, 101, 102, 18, 103, 104, 105, 0, 0, 89, 100, 77, - 12, 72, 0, 0, 0, 0, 0, 70, 0, 0, - 0, 0, 71, 0, 73, 74, 75, 76, 0, 0, - 0, 0, 0, 0, 78, 79, 0, 0, 0, 0, - 0, 0, 80, 81, 0, 0, 82, 83, 0, 84, - 0, 0, 0, 85, 0, 86, 87, 88, 0, 0, - 90, 0, 0, 0, 91, 0, 92, 0, 0, 0, - 0, 0, 93, 0, 94, 0, 0, 0, 95, 96, - 97, 98, 99, 101, 102, 18, 103, 104, 105, 0, - 0, 89, 100, 77, 12, 72, 0, 0, 0, 0, - 0, 70, 0, 0, 0, 0, 71, 0, 73, 74, - 75, 76, 0, 0, 0, 0, 0, 0, 78, 115, - 0, 0, 0, 0, 0, 0, 496, 81, 0, 0, - 82, 497, 0, 84, 0, 0, 0, 85, 0, 86, - 87, 88, 0, 0, 90, 0, 0, 0, 91, 0, - 92, 0, 0, 0, 0, 0, 93, 0, 94, 0, - 0, 0, 95, 96, 97, 98, 99, 101, 102, 18, - 103, 104, 105, 0, 0, 89, 100, 77, 12, 72, - 0, 0, 0, 0, 0, 70, 0, 0, 0, 0, - 71, 0, 73, 74, 75, 76, 0, 0, 0, 0, - 0, 0, 78, 115, 0, 0, 0, 0, 0, 0, - 509, 81, 0, 0, 82, 510, 0, 84, 0, 0, - 0, 85, 0, 86, 87, 88, 0, 0, 90, 0, - 0, 0, 91, 0, 92, 0, 0, 0, 0, 0, - 93, 0, 94, 0, 0, 0, 95, 96, 97, 98, - 99, 101, 102, 18, 103, 104, 105, 0, 0, 89, - 100, 77, 12, 72, 0, 0, 0, 0, 0, 377, - 139, 140, 0, 0, 379, 144, 381, 74, 75, 382, - 0, 147, 0, 0, 0, 149, 384, 385, 0, 0, - 0, 0, 0, 0, 386, 387, 154, 155, 82, 83, - 0, 84, 0, 0, 0, 85, 0, 86, 388, 88, - 0, 0, 390, 0, 0, 0, 91, 0, 92, 0, - -223, 0, 0, 0, 391, 0, 94, 0, 0, 0, - 392, 393, 394, 395, 99, 397, 398, 399, 400, 401, - 402, 0, 0, 389, 396, 383, 378, 380, 159, 0, - 0, 0, 0, + 12, 72, 0, 0, 0, 0, 0, 0, 70, 0, + 0, 0, 0, 71, 0, 73, 74, 75, 76, 0, + 0, 0, 0, 0, 0, 78, 115, 0, 0, 0, + 0, 0, 0, 496, 81, 0, 0, 82, 497, 0, + 84, 0, 0, 0, 85, 0, 86, 87, 88, 0, + 0, 90, 0, 0, 0, 91, 0, 92, 0, 0, + 0, 0, 0, 93, 0, 94, 0, 0, 0, 95, + 96, 97, 98, 99, 101, 102, 18, 103, 104, 105, + 0, 0, 89, 100, 77, 12, 72, 0, 498, 0, + 0, 0, 0, 377, 139, 140, 0, 0, 379, 144, + 381, 74, 75, 382, 0, 147, 0, 0, 0, 149, + 384, 385, 0, 0, 0, 0, 0, 0, 386, 387, + 154, 155, 82, 83, 0, 84, 0, 0, 0, 85, + 0, 86, 388, 88, 0, 0, 390, 0, 0, 0, + 91, 0, 92, 0, -227, 0, 0, 0, 391, 0, + 94, 0, 0, 0, 392, 393, 394, 395, 99, 397, + 398, 399, 400, 401, 402, 0, 0, 389, 396, 383, + 378, 380, 159, 0, 0, 0, 0, 0, - 429, 525, 430, 10, 432, 426, 276, 23, 489, 503, - 453, 502, 498, 464, 455, 457, 495, 447, 442, 492, - 511, 446, 232, 508, 355, 403, 521, 129, 468, 465, - 222, 335, 337, 360, 373, 225, 362, 371, 367, 364, - 217, 369, 333, 422, 279, 219, 436, 175, 0, 258, - 227, 0, 328, 433, 245, 173, 251, 433, 253, 178, - 414, 276, 0, 470, 328, 506, 0, 502, 0, 405, - 0, 436, 406, 113, 113, 475, 0, 113, 113, 201, - 113, 0, 194, 202, 113, 203, 113, 113, 476, 204, - 113, 113, 113, 113, 113, 182, 187, 208, 206, 207, - 113, 113, 449, 113, 451, 217, 257, 200, 247, 225, - 113, 113, 472, 210, 113, 113, 260, 473, 199, 113, - 512, 212, 113, 502, 474, 292, 113, 225, 113, 328, - 296, 205, 198, 328, 408, 250, 113, 113, 275, 275, - 113, 113, 113, 477, 123, 314, 328, 113, 328, 125, - 113, 113, 448, 124, 405, 481, 113, 406, 448, 113, - 0, 449, 113, 113, 113, 114, 180, 23, 113, 310, - 0, 0, 358, 313, 113, 68, 329, 50, 483, 311, - 113, 0, 324, 324, 0, 312, 23, 296, 296, 356, - 483, 331, 68, 68, 50, 50, 113, 113, 23, 0, - 0, 296, 296, 0, 352, 345, 113, 113, 321, 319, - 113, 296, 296, 317, 315, 296, 324, 324, 113, 299, - 113, 296, 296, 296, 324, 296, 113, 304, 0, 296, - 0, 296, 0, 0, 0, 342, 0, 0, 343, 323, - 0, 339, 0, 0, 0, 0, 326, 0, 0, 0, + 465, 464, 232, 468, 455, 457, 175, 446, 364, 173, + 362, 360, 355, 451, 453, 178, 279, 10, 530, 251, + 23, 219, 253, 335, 447, 225, 514, 245, 222, 492, + 526, 129, 227, 489, 495, 333, 217, 501, 511, 505, + 506, 429, 426, 276, 436, 436, 430, 373, 371, 422, + 433, 414, 328, 470, 433, 403, 442, 369, 337, 367, + 276, 0, 432, 328, 328, 483, 113, 328, 509, 515, + 505, 310, 505, 0, 113, 23, 0, 113, 258, 0, + 114, 113, 0, 474, 113, 113, 475, 476, 247, 113, + 113, 113, 405, 180, 113, 406, 448, 405, 0, 113, + 406, 449, 0, 210, 113, 250, 113, 329, 113, 313, + 331, 311, 113, 314, 449, 113, 113, 113, 477, 113, + 312, 448, 113, 113, 473, 113, 0, 212, 113, 207, + 68, 208, 50, 204, 113, 113, 113, 113, 328, 202, + 203, 201, 113, 206, 124, 113, 113, 123, 292, 113, + 328, 275, 187, 296, 113, 113, 113, 275, 0, 113, + 225, 194, 182, 200, 225, 113, 113, 260, 125, 199, + 113, 408, 217, 257, 113, 205, 472, 481, 113, 113, + 0, 358, 198, 324, 296, 0, 0, 113, 296, 0, + 321, 23, 296, 356, 304, 324, 324, 68, 113, 50, + 296, 296, 324, 296, 113, 323, 68, 296, 50, 296, + 324, 319, 0, 0, 0, 296, 113, 352, 345, 339, + 113, 296, 113, 316, 343, 296, 0, 296, 113, 299, + 0, 113, 326, 296, 0, 315, 296, 0, 317, 342, + 0, 0, 483, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 23, 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, 132, 0, 0, 0, 262, 0, 0, - 0, 0, 113, 0, 0, 0, 0, 296, 0, 316, + 0, 0, 262, 0, 0, 0, 132, 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 [] = { - 36, 36, 61, 7, 29, 8, 29, 33, 36, 74, - 7, 29, 36, 8, 36, 36, 29, 7, 20, 76, - 1, 29, 8, 33, 1, 7, 60, 33, 48, 29, - 76, 60, 48, 60, 8, 8, 48, 76, 55, 17, - 29, 33, 61, 36, 16, 8, 61, 31, 7, 60, - 29, 60, 2, 29, 29, 60, 8, 0, 7, 29, - 7, 17, 33, 29, 33, 5, 5, 55, 36, 36, - 55, 85, 36, 5, 7, 33, 36, 60, 65, 2, - 76, 29, 1, 36, 29, 36, 8, 1, 8, 7, - 55, 8, 29, 29, 55, 7, 7, 7, 60, 7, - 2, 36, 36, 33, 33, 85, 7, 48, 8, 8, - 8, 6, 50, 29, 7, 8, 54, 61, 62, 8, - 36, 8, 8, 50, 8, 20, 7, 54, 10, 8, - 61, 62, 8, 61, 62, 61, 62, 7, 7, 7, - 61, 62, 8, 40, 40, 15, 40, 29, 61, 62, - 8, 42, 33, 8, 51, 51, 8, 51, 61, 62, - 60, 60, 53, 61, 10, 33, 40, 7, -1, 8, - 29, 60, 8, 60, 60, 15, 60, 51, 29, 29, - 56, 60, 25, 8, 27, -1, -1, 25, 12, 27, - 56, -1, 25, 12, 27, 38, -1, 25, 56, 27, - 38, 56, 61, 62, 56, 38, -1, 12, 59, 55, - 38, 61, 62, 29, 25, 25, 27, 27, 25, 8, - 27, 15, 61, 62, -1, 61, 62, 38, 38, 15, - 15, 38, 83, 57, 29, 8, 61, 62, 57, 63, - 34, -1, 36, -1, 63, 61, 62, 8, 34, 34, - 36, 36, 57, 18, 19, -1, 29, -1, 63, -1, - 18, 19, 18, 19, 18, 19, 61, 62, 29, 22, - -1, 60, -1, -1, -1, -1, 29, -1, -1, -1, - 45, 46, -1, -1, -1, -1, 59, 45, 46, 45, - 46, 45, 46, 23, 24, -1, -1, -1, 59, 25, - -1, 27, 32, -1, -1, 35, 59, 37, -1, -1, - 83, 22, 38, -1, -1, 23, 24, -1, 29, 72, - -1, -1, 83, 31, 32, 23, 24, 35, 81, 37, - 83, 84, -1, 31, 32, 23, 24, 35, -1, 37, - -1, -1, -1, 31, 32, 23, 24, 35, 59, 37, - -1, 22, -1, 31, 32, -1, -1, 35, 29, 37, - -1, 72, 23, 24, -1, -1, -1, -1, -1, -1, - 81, 32, 83, 84, 35, -1, 37, -1, -1, -1, - -1, -1, -1, 22, 55, -1, -1, -1, 59, -1, - 29, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 72, -1, -1, -1, -1, -1, -1, -1, -1, - 81, -1, 83, 84, -1, -1, 55, -1, -1, -1, - 59, -1, -1, -1, -1, -1, -1, 23, 24, -1, - 12, 13, -1, 72, -1, 31, 32, -1, -1, 35, - 22, 37, 81, -1, 83, 84, -1, 29, -1, -1, - -1, 33, 34, -1, 36, -1, 12, 13, -1, -1, - -1, 43, -1, -1, -1, 47, 22, -1, -1, -1, - -1, -1, -1, 29, -1, -1, -1, 33, 34, -1, - 36, -1, -1, 65, -1, 67, -1, 43, -1, -1, - -1, 47, 3, -1, -1, -1, 78, 79, 80, -1, - -1, -1, 13, -1, -1, -1, 17, -1, -1, 65, - -1, 67, -1, -1, -1, 26, -1, 28, -1, -1, - -1, -1, 78, 79, 80, -1, -1, -1, 39, 3, - 41, 42, -1, -1, -1, -1, -1, -1, 49, 13, - -1, 52, 53, 17, -1, -1, -1, 58, -1, -1, - -1, -1, 26, 64, 28, -1, -1, 31, -1, -1, - -1, -1, -1, -1, -1, 39, 77, 41, 42, -1, - -1, -1, -1, -1, -1, 49, -1, 3, 52, 53, - -1, -1, -1, -1, 58, -1, -1, 13, -1, -1, - 64, 17, -1, -1, -1, -1, -1, -1, -1, -1, - 26, -1, 28, 77, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 39, -1, 41, 42, -1, -1, -1, - -1, -1, -1, 49, -1, -1, 52, 53, -1, -1, - -1, -1, 58, -1, -1, -1, -1, -1, 64, -1, + 60, 29, 20, 76, 55, 55, 7, 36, 60, 76, + 48, 36, 1, 36, 48, 8, 29, 5, 8, 29, + 61, 8, 2, 60, 33, 33, 7, 29, 7, 33, + 61, 7, 7, 36, 29, 7, 7, 36, 16, 36, + 36, 7, 7, 2, 60, 29, 61, 33, 5, 5, + 8, 36, 29, 60, 48, 17, 2, 31, 7, 76, + 29, 29, 60, 36, 7, 29, 33, 17, 29, 1, + 33, 7, 55, 33, 29, 29, 2, 8, 60, 8, + 8, 29, 7, 36, 7, 1, 8, 29, 8, 36, + 7, 36, 33, 8, 29, 65, 48, 36, 36, 29, + 10, 7, -1, 8, 55, 8, 8, 8, 7, 36, + 29, 8, 8, 7, 6, 55, 15, 36, 42, 29, + 8, 15, 7, 8, 8, -1, 60, 33, 20, 53, + 74, 40, 8, 8, 8, -1, 40, 10, 7, 76, + 61, 62, 51, 61, 62, 8, 8, 51, 61, 62, + 40, 40, 8, 86, 56, -1, 61, 60, 8, 60, + 56, 51, 51, 60, 33, 8, -1, 50, 56, 29, + 12, 54, 56, 0, 61, 62, 29, 29, 15, 61, + 62, -1, 55, 8, 60, 60, 60, -1, -1, 61, + 62, 61, 62, 56, 61, 62, 50, 34, 60, 36, + 54, 61, 62, 15, 60, 12, -1, 59, 61, 62, + -1, 61, 62, -1, 25, 57, 27, -1, 61, 62, + 29, 63, 34, 12, 36, 29, 25, 38, 27, -1, + 25, 83, 27, 25, -1, 27, 61, 62, 25, 38, + 27, -1, 25, 38, 27, -1, 38, 25, -1, 27, + 57, 38, 61, 62, -1, 38, 63, 61, 62, 25, + 38, 27, 15, 25, 25, 27, 27, 25, 57, 27, + 8, 25, 38, 27, 63, -1, 38, 38, 18, 19, + 38, 34, 8, 36, 38, 18, 19, 18, 19, 18, + 19, 29, -1, -1, -1, 23, 24, -1, -1, -1, + -1, -1, -1, 29, 32, 45, 46, 35, -1, 37, + 23, 24, 45, 46, 45, 46, 45, 46, -1, 32, + -1, 59, 35, -1, 37, 23, 24, -1, -1, -1, + -1, -1, -1, 59, 32, -1, 25, 35, 27, 37, + -1, -1, 23, 24, -1, 83, -1, -1, -1, 38, + 31, 32, 23, 24, 35, -1, 37, 83, 22, -1, + 31, 32, 23, 24, 35, 29, 37, -1, 22, -1, + 31, 32, 23, 24, 35, 29, 37, -1, 22, -1, + 31, 32, 23, 24, 35, 29, 37, -1, -1, -1, + 31, 32, -1, -1, 35, 59, 37, 22, -1, -1, + 23, 24, -1, -1, 29, 59, -1, -1, 72, 32, + -1, 55, 35, -1, 37, 59, -1, 81, 72, 83, + -1, 85, -1, -1, -1, -1, -1, 81, 72, 83, + 55, 85, -1, -1, 59, -1, -1, 81, -1, 83, + -1, 85, -1, -1, -1, -1, -1, 72, -1, -1, + -1, -1, -1, -1, -1, -1, 81, -1, 83, -1, + 85, -1, -1, -1, 12, 13, 3, -1, -1, -1, + -1, -1, -1, -1, 22, -1, 13, -1, -1, -1, + 17, 29, -1, -1, -1, 33, 34, -1, 36, 26, + -1, 28, -1, -1, -1, 43, -1, -1, -1, 47, + -1, -1, 39, -1, 41, 42, -1, -1, -1, -1, + -1, -1, 49, -1, -1, 52, 53, 65, -1, 67, + -1, 58, -1, -1, -1, -1, -1, 64, -1, -1, + 78, 79, 80, -1, -1, -1, -1, -1, -1, -1, + 77, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 12, 13, 3, -1, -1, -1, -1, -1, -1, -1, + 22, -1, 13, -1, -1, -1, 17, 29, -1, -1, + -1, 33, 34, -1, 36, 26, -1, 28, -1, -1, + -1, 43, -1, -1, -1, 47, -1, -1, 39, -1, + 41, 42, -1, -1, -1, -1, -1, -1, 49, -1, + -1, 52, 53, 65, -1, 67, -1, 58, -1, -1, + -1, -1, -1, 64, -1, -1, 78, 79, 80, -1, + -1, -1, -1, -1, -1, -1, 77, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 3, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 13, -1, + -1, -1, 17, -1, -1, -1, -1, -1, -1, -1, + -1, 26, -1, 28, -1, -1, 31, -1, -1, -1, + -1, -1, -1, -1, 39, -1, 41, 42, -1, -1, + -1, -1, -1, -1, 49, -1, -1, 52, 53, -1, + -1, -1, -1, 58, -1, -1, -1, -1, -1, 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 77, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 77, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 11, 12, 13, -1, -1, -1, + -1, -1, -1, -1, -1, 22, -1, -1, -1, -1, + -1, -1, 29, -1, -1, -1, 33, 34, -1, 36, + -1, -1, -1, 40, -1, 42, 43, 44, -1, -1, + 47, -1, -1, -1, 51, -1, 53, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 65, -1, + 67, -1, 69, -1, 71, -1, 73, -1, -1, -1, + -1, 78, 79, 80, -1, -1, -1, -1, -1, -1, -1, -1, 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, 22, -1, -1, -1, -1, -1, -1, 29, -1, -1, -1, 33, 34, -1, 36, -1, -1, -1, 40, -1, 42, 43, 44, -1, -1, 47, -1, -1, -1, 51, -1, 53, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 65, -1, 67, -1, - 69, -1, 71, -1, 73, -1, -1, -1, -1, 78, - 79, 80, -1, -1, -1, -1, -1, -1, -1, 11, - 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, - 22, -1, -1, -1, -1, -1, -1, 29, -1, -1, - -1, 33, 34, -1, 36, -1, -1, -1, 40, -1, - 42, 43, 44, -1, -1, 47, -1, -1, -1, 51, - -1, 53, -1, -1, 56, -1, -1, -1, -1, -1, - -1, -1, -1, 65, -1, 67, -1, 69, -1, 71, - -1, 73, -1, -1, -1, -1, 78, 79, 80, -1, - -1, -1, -1, -1, -1, -1, 11, 12, 13, -1, - -1, -1, -1, -1, -1, -1, -1, 22, -1, -1, - -1, -1, -1, -1, 29, -1, -1, -1, 33, 34, - -1, 36, -1, -1, -1, 40, -1, 42, 43, 44, - -1, -1, 47, -1, -1, -1, 51, -1, 53, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 65, -1, 67, -1, 69, -1, 71, 72, 73, -1, - -1, -1, -1, 78, 79, 80, -1, -1, -1, -1, - -1, -1, -1, 11, 12, 13, -1, -1, -1, -1, - -1, -1, -1, -1, 22, -1, -1, -1, -1, -1, - -1, 29, -1, -1, -1, 33, 34, -1, 36, -1, - -1, -1, 40, -1, 42, 43, 44, -1, -1, 47, - -1, -1, -1, 51, -1, 53, -1, -1, 56, -1, - -1, -1, -1, -1, -1, -1, -1, 65, -1, 67, - -1, 69, -1, 71, -1, 73, -1, -1, -1, -1, - 78, 79, 80, -1, -1, -1, -1, -1, -1, -1, + 69, -1, 71, 72, 73, -1, -1, -1, -1, 78, + 79, 80, -1, -1, -1, -1, -1, -1, -1, -1, 7, -1, -1, -1, 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, 22, -1, -1, -1, -1, -1, -1, 29, -1, -1, -1, 33, 34, -1, 36, @@ -610,31 +612,47 @@ const int JavaScriptGrammar::action_check [] = { -1, -1, -1, -1, -1, -1, -1, -1, 65, -1, 67, -1, 69, -1, 71, -1, 73, -1, -1, -1, -1, 78, 79, 80, -1, -1, -1, -1, -1, -1, - -1, 4, 5, 6, -1, -1, 9, 10, 11, -1, - -1, 14, -1, 16, -1, -1, -1, 20, 21, 22, - -1, -1, -1, -1, -1, -1, 29, 30, 31, 32, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 43, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 59, -1, -1, -1, - -1, -1, -1, 66, 67, 68, -1, 70, 71, 72, - 73, 74, 75, -1, -1, 78, 79, 80, 81, 82, - 83, -1, -1, -1, -1, 4, 5, 6, -1, -1, - 9, 10, 11, -1, -1, 14, -1, 16, -1, -1, - -1, 20, 21, 22, -1, -1, -1, -1, -1, -1, - 29, 30, 31, 32, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 43, -1, -1, -1, 47, -1, + -1, -1, 11, 12, 13, -1, -1, -1, -1, -1, + -1, -1, -1, 22, -1, -1, -1, -1, -1, -1, + 29, -1, -1, -1, 33, 34, -1, 36, -1, -1, + -1, 40, -1, 42, 43, 44, -1, -1, 47, -1, + -1, -1, 51, -1, 53, -1, -1, 56, -1, -1, + -1, -1, -1, -1, -1, -1, 65, -1, 67, -1, + 69, -1, 71, -1, 73, -1, -1, -1, -1, 78, + 79, 80, -1, -1, -1, -1, -1, -1, -1, -1, + 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, + -1, 22, -1, -1, -1, -1, -1, -1, 29, -1, + -1, -1, 33, 34, -1, 36, -1, -1, -1, 40, + -1, 42, 43, 44, -1, -1, 47, -1, -1, -1, + 51, -1, 53, -1, -1, 56, -1, -1, -1, -1, + -1, -1, -1, -1, 65, -1, 67, -1, 69, -1, + 71, -1, 73, -1, -1, -1, -1, 78, 79, 80, + -1, -1, -1, -1, -1, -1, -1, -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, - 59, -1, -1, -1, -1, -1, 65, 66, 67, 68, - -1, 70, 71, 72, 73, 74, 75, -1, -1, 78, - 79, 80, 81, 82, 83, -1, -1, -1, -1, 4, - 5, 6, -1, -1, 9, 10, 11, -1, -1, 14, - -1, 16, -1, -1, -1, 20, 21, 22, -1, -1, - -1, -1, -1, -1, 29, 30, 31, 32, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 43, -1, - -1, -1, 47, -1, -1, -1, -1, -1, -1, -1, - 55, -1, -1, -1, 59, -1, -1, -1, -1, -1, - 65, 66, 67, 68, -1, 70, 71, 72, 73, 74, - 75, -1, -1, 78, 79, 80, 81, 82, 83, -1, + -1, -1, -1, 59, -1, -1, -1, -1, -1, -1, + 66, 67, 68, -1, 70, 71, 72, 73, 74, 75, + -1, -1, 78, 79, 80, 81, 82, 83, -1, -1, + -1, -1, -1, 4, 5, 6, -1, -1, 9, 10, + 11, -1, -1, 14, -1, 16, -1, -1, -1, 20, + 21, 22, -1, -1, -1, -1, -1, -1, 29, 30, + 31, 32, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 43, -1, -1, -1, 47, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 59, -1, + -1, -1, -1, -1, 65, 66, 67, 68, -1, 70, + 71, 72, 73, 74, 75, -1, -1, 78, 79, 80, + 81, 82, 83, -1, -1, -1, -1, -1, 4, 5, + 6, -1, -1, 9, 10, 11, -1, -1, 14, -1, + 16, -1, -1, -1, 20, 21, 22, -1, -1, -1, + -1, -1, -1, 29, 30, 31, 32, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 43, -1, -1, + -1, 47, -1, -1, -1, -1, -1, -1, -1, 55, + -1, -1, -1, 59, -1, -1, -1, -1, -1, 65, + 66, 67, 68, -1, 70, 71, 72, 73, 74, 75, + -1, -1, 78, 79, 80, 81, 82, 83, -1, -1, -1, -1, -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, @@ -643,75 +661,74 @@ const int JavaScriptGrammar::action_check [] = { 51, -1, 53, -1, -1, -1, -1, -1, 59, -1, 61, -1, -1, -1, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, -1, -1, 78, 79, 80, - 81, 82, -1, -1, -1, -1, -1, 4, -1, -1, - -1, -1, 9, -1, 11, 12, 13, 14, -1, -1, - -1, -1, -1, -1, 21, 22, -1, -1, -1, -1, - -1, -1, 29, 30, -1, -1, 33, 34, -1, 36, - -1, -1, -1, 40, -1, 42, 43, 44, -1, -1, - 47, -1, -1, -1, 51, -1, 53, -1, -1, -1, - -1, -1, 59, -1, 61, -1, -1, -1, 65, 66, - 67, 68, 69, 70, 71, 72, 73, 74, 75, -1, - -1, 78, 79, 80, 81, 82, -1, -1, -1, -1, - -1, 4, -1, -1, -1, -1, 9, -1, 11, 12, - 13, 14, -1, -1, -1, -1, -1, -1, 21, 22, - -1, -1, -1, -1, -1, -1, 29, 30, -1, -1, - 33, 34, -1, 36, -1, -1, -1, 40, -1, 42, - 43, 44, -1, -1, 47, -1, -1, -1, 51, -1, - 53, -1, -1, -1, -1, -1, 59, -1, 61, -1, - -1, -1, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 75, -1, -1, 78, 79, 80, 81, 82, - -1, -1, -1, -1, -1, 4, -1, -1, -1, -1, - 9, -1, 11, 12, 13, 14, -1, -1, -1, -1, - -1, -1, 21, 22, -1, -1, -1, -1, -1, -1, - 29, 30, -1, -1, 33, 34, -1, 36, -1, -1, - -1, 40, -1, 42, 43, 44, -1, -1, 47, -1, - -1, -1, 51, -1, 53, -1, -1, -1, -1, -1, - 59, -1, 61, -1, -1, -1, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, -1, -1, 78, - 79, 80, 81, 82, -1, -1, -1, -1, -1, 4, - 5, 6, -1, -1, 9, 10, 11, 12, 13, 14, - -1, 16, -1, -1, -1, 20, 21, 22, -1, -1, - -1, -1, -1, -1, 29, 30, 31, 32, 33, 34, - -1, 36, -1, -1, -1, 40, -1, 42, 43, 44, - -1, -1, 47, -1, -1, -1, 51, -1, 53, -1, - 55, -1, -1, -1, 59, -1, 61, -1, -1, -1, - 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 75, -1, -1, 78, 79, 80, 81, 82, 83, -1, - -1, -1, -1, + 81, 82, -1, -1, -1, -1, -1, -1, 4, -1, + -1, -1, -1, 9, -1, 11, 12, 13, 14, -1, + -1, -1, -1, -1, -1, 21, 22, -1, -1, -1, + -1, -1, -1, 29, 30, -1, -1, 33, 34, -1, + 36, -1, -1, -1, 40, -1, 42, 43, 44, -1, + -1, 47, -1, -1, -1, 51, -1, 53, -1, -1, + -1, -1, -1, 59, -1, 61, -1, -1, -1, 65, + 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + -1, -1, 78, 79, 80, 81, 82, -1, -1, -1, + -1, -1, -1, 4, -1, -1, -1, -1, 9, -1, + 11, 12, 13, 14, -1, -1, -1, -1, -1, -1, + 21, 22, -1, -1, -1, -1, -1, -1, 29, 30, + -1, -1, 33, 34, -1, 36, -1, -1, -1, 40, + -1, 42, 43, 44, -1, -1, 47, -1, -1, -1, + 51, -1, 53, -1, -1, -1, -1, -1, 59, -1, + 61, -1, -1, -1, 65, 66, 67, 68, 69, 70, + 71, 72, 73, 74, 75, -1, -1, 78, 79, 80, + 81, 82, -1, -1, -1, -1, -1, -1, 4, -1, + -1, -1, -1, 9, -1, 11, 12, 13, 14, -1, + -1, -1, -1, -1, -1, 21, 22, -1, -1, -1, + -1, -1, -1, 29, 30, -1, -1, 33, 34, -1, + 36, -1, -1, -1, 40, -1, 42, 43, 44, -1, + -1, 47, -1, -1, -1, 51, -1, 53, -1, -1, + -1, -1, -1, 59, -1, 61, -1, -1, -1, 65, + 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + -1, -1, 78, 79, 80, 81, 82, -1, 84, -1, + -1, -1, -1, 4, 5, 6, -1, -1, 9, 10, + 11, 12, 13, 14, -1, 16, -1, -1, -1, 20, + 21, 22, -1, -1, -1, -1, -1, -1, 29, 30, + 31, 32, 33, 34, -1, 36, -1, -1, -1, 40, + -1, 42, 43, 44, -1, -1, 47, -1, -1, -1, + 51, -1, 53, -1, 55, -1, -1, -1, 59, -1, + 61, -1, -1, -1, 65, 66, 67, 68, 69, 70, + 71, 72, 73, 74, 75, -1, -1, 78, 79, 80, + 81, 82, 83, -1, -1, -1, -1, -1, - 72, 76, 12, 5, 72, 84, 11, 14, 12, 9, - 11, 10, 9, 16, 12, 11, 11, 58, 89, 12, - 9, 58, 54, 11, 78, 11, 20, 90, 20, 20, - 20, 12, 11, 11, 11, 20, 12, 11, 11, 11, - 23, 12, 11, 87, 12, 12, 58, 22, -1, 12, - 20, -1, 12, 12, 20, 20, 20, 12, 20, 20, - 12, 11, -1, 12, 12, 8, -1, 10, -1, 25, - -1, 58, 28, 31, 31, 33, -1, 31, 31, 36, - 31, -1, 36, 36, 31, 36, 31, 31, 33, 36, - 31, 31, 31, 31, 31, 39, 37, 37, 37, 37, - 31, 31, 33, 31, 12, 23, 24, 35, 45, 20, - 31, 31, 33, 43, 31, 31, 27, 33, 35, 31, - 7, 41, 31, 10, 33, 31, 31, 20, 31, 12, - 36, 36, 35, 12, 27, 47, 31, 31, 33, 33, - 31, 31, 31, 33, 33, 36, 12, 31, 12, 33, - 31, 31, 33, 33, 25, 2, 31, 28, 33, 31, - -1, 33, 31, 31, 31, 34, 34, 14, 31, 36, - -1, -1, 55, 36, 31, 11, 55, 13, 6, 36, - 31, -1, 31, 31, -1, 36, 14, 36, 36, 55, - 6, 55, 11, 11, 13, 13, 31, 31, 14, -1, - -1, 36, 36, -1, 53, 53, 31, 31, 42, 44, - 31, 36, 36, 38, 38, 36, 31, 31, 31, 40, - 31, 36, 36, 36, 31, 36, 31, 38, -1, 36, - -1, 36, -1, -1, -1, 48, -1, -1, 53, 53, - -1, 46, -1, -1, -1, -1, 53, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 22, 18, 56, 22, 14, 13, 24, 60, 13, 22, + 14, 13, 80, 14, 13, 22, 14, 5, 78, 22, + 16, 14, 22, 14, 60, 22, 9, 22, 22, 14, + 22, 92, 22, 14, 13, 13, 25, 9, 13, 10, + 9, 74, 86, 13, 60, 60, 14, 13, 13, 89, + 14, 14, 14, 14, 14, 13, 91, 14, 13, 13, + 13, -1, 74, 14, 14, 6, 33, 14, 8, 7, + 10, 38, 10, -1, 33, 16, -1, 33, 14, -1, + 36, 33, -1, 35, 33, 33, 35, 35, 47, 33, + 33, 33, 27, 36, 33, 30, 35, 27, -1, 33, + 30, 35, -1, 45, 33, 49, 33, 57, 33, 38, + 57, 38, 33, 38, 35, 33, 33, 33, 35, 33, + 38, 35, 33, 33, 35, 33, -1, 43, 33, 39, + 13, 39, 15, 38, 33, 33, 33, 33, 14, 38, + 38, 38, 33, 39, 35, 33, 33, 35, 33, 33, + 14, 35, 39, 38, 33, 33, 33, 35, -1, 33, + 22, 38, 41, 37, 22, 33, 33, 29, 35, 37, + 33, 29, 25, 26, 33, 38, 35, 2, 33, 33, + -1, 57, 37, 33, 38, -1, -1, 33, 38, -1, + 44, 16, 38, 57, 40, 33, 33, 13, 33, 15, + 38, 38, 33, 38, 33, 55, 13, 38, 15, 38, + 33, 46, -1, -1, -1, 38, 33, 55, 55, 48, + 33, 38, 33, 40, 55, 38, -1, 38, 33, 42, + -1, 33, 55, 38, -1, 40, 38, -1, 40, 50, + -1, -1, 6, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 16, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 91, -1, -1, -1, 96, -1, -1, - -1, -1, 31, -1, -1, -1, -1, 36, -1, 38, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 98, -1, -1, -1, 93, -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 3412844..61a2eb0 100644 --- a/src/declarative/qml/parser/javascriptgrammar_p.h +++ b/src/declarative/qml/parser/javascriptgrammar_p.h @@ -59,8 +59,8 @@ class JavaScriptGrammar public: enum { EOF_SYMBOL = 0, - REDUCE_HERE = 87, - SHIFT_THERE = 86, + REDUCE_HERE = 88, + SHIFT_THERE = 87, T_AND = 1, T_AND_AND = 2, T_AND_EQ = 3, @@ -95,7 +95,7 @@ public: T_GT_GT_GT_EQ = 28, T_IDENTIFIER = 29, T_IF = 30, - T_IMPORT = 85, + T_IMPORT = 86, T_IN = 31, T_INSTANCEOF = 32, T_LBRACE = 33, @@ -108,6 +108,7 @@ public: T_MINUS = 40, T_MINUS_EQ = 41, T_MINUS_MINUS = 42, + T_MULTILINE_STRING_LITERAL = 84, T_NEW = 43, T_NOT = 44, T_NOT_EQ = 45, @@ -120,7 +121,7 @@ public: T_PLUS = 51, T_PLUS_EQ = 52, T_PLUS_PLUS = 53, - T_PUBLIC = 84, + T_PUBLIC = 85, T_QUESTION = 54, T_RBRACE = 55, T_RBRACKET = 56, @@ -147,15 +148,15 @@ public: T_XOR = 76, T_XOR_EQ = 77, - ACCEPT_STATE = 526, - RULE_COUNT = 300, - STATE_COUNT = 527, - TERMINAL_COUNT = 88, - NON_TERMINAL_COUNT = 98, + ACCEPT_STATE = 531, + RULE_COUNT = 304, + STATE_COUNT = 532, + TERMINAL_COUNT = 89, + NON_TERMINAL_COUNT = 100, - GOTO_INDEX_OFFSET = 527, - GOTO_INFO_OFFSET = 1723, - GOTO_CHECK_OFFSET = 1723 + GOTO_INDEX_OFFSET = 532, + GOTO_INFO_OFFSET = 1798, + GOTO_CHECK_OFFSET = 1798 }; static const char *const spell []; diff --git a/src/declarative/qml/parser/javascriptlexer.cpp b/src/declarative/qml/parser/javascriptlexer.cpp index 81f0983..90f8e44 100644 --- a/src/declarative/qml/parser/javascriptlexer.cpp +++ b/src/declarative/qml/parser/javascriptlexer.cpp @@ -450,6 +450,7 @@ int JavaScript::Lexer::lex() int token = 0; state = Start; ushort stringType = 0; // either single or double quotes + bool multiLineString = false; pos8 = pos16 = 0; done = false; terminator = false; @@ -499,6 +500,7 @@ int JavaScript::Lexer::lex() } else if (current == '"' || current == '\'') { recordStartPos(); state = InString; + multiLineString = false; stringType = current; } else if (isIdentLetter(current)) { recordStartPos(); @@ -540,6 +542,9 @@ int JavaScript::Lexer::lex() if (current == stringType) { shift(1); setDone(String); + } else if (isLineTerminator()) { + multiLineString = true; + record16(current); } else if (current == 0 || isLineTerminator()) { setDone(Bad); err = UnclosedStringLiteral; @@ -817,7 +822,7 @@ int JavaScript::Lexer::lex() qsyylval.ustr = driver->intern(buffer16, pos16); else qsyylval.ustr = 0; - return JavaScriptGrammar::T_STRING_LITERAL; + return multiLineString?JavaScriptGrammar::T_MULTILINE_STRING_LITERAL:JavaScriptGrammar::T_STRING_LITERAL; case Number: qsyylval.dval = dval; return JavaScriptGrammar::T_NUMERIC_LITERAL; diff --git a/src/declarative/qml/parser/javascriptparser.cpp b/src/declarative/qml/parser/javascriptparser.cpp index 137e2b0..58b7a5b 100644 --- a/src/declarative/qml/parser/javascriptparser.cpp +++ b/src/declarative/qml/parser/javascriptparser.cpp @@ -251,15 +251,27 @@ case 19: { node->rbracketToken = loc(5); sym(1).Node = node; } break; - case 20: -case 21: { + +case 20: { + AST::StringLiteral *node = makeAstNode (driver->nodePool(), sym(1).sval); + node->literalToken = loc(1); + sym(1).Node = node; +} break; + +case 22: { + AST::ExpressionStatement *node = makeAstNode (driver->nodePool(), sym(1).Expression); + node->semicolonToken = loc(2); + sym(1).Node = node; +} break; + case 23: case 24: +case 25: { AST::UiScriptBinding *node = makeAstNode (driver->nodePool(), sym(1).UiQualifiedId->finish(), sym(3).Statement); node->colonToken = loc(2); sym(1).Node = node; } break; -case 22: { +case 26: { AST::UiPublicMember *node = makeAstNode (driver->nodePool(), sym(2).sval, sym(3).sval); node->publicToken = loc(1); node->attributeTypeToken = loc(2); @@ -267,7 +279,7 @@ case 22: { sym(1).Node = node; } break; -case 23: { +case 27: { AST::UiPublicMember *node = makeAstNode (driver->nodePool(), sym(3).sval, sym(4).sval); node->isDefaultMember = true; node->publicToken = loc(1); @@ -276,7 +288,7 @@ case 23: { sym(1).Node = node; } break; -case 24: { +case 28: { AST::UiPublicMember *node = makeAstNode (driver->nodePool(), sym(2).sval, sym(3).sval, sym(5).Expression); node->publicToken = loc(1); @@ -286,7 +298,7 @@ case 24: { sym(1).Node = node; } break; -case 25: { +case 29: { AST::UiPublicMember *node = makeAstNode (driver->nodePool(), sym(3).sval, sym(4).sval, sym(6).Expression); node->isDefaultMember = true; @@ -297,78 +309,78 @@ case 25: { sym(1).Node = node; } break; -case 26: { +case 30: { sym(1).Node = makeAstNode(driver->nodePool(), sym(1).Node); } break; -case 27: { +case 31: { sym(1).Node = makeAstNode(driver->nodePool(), sym(1).Node); } break; -case 28: +case 32: -case 29: +case 33: { AST::UiQualifiedId *node = makeAstNode (driver->nodePool(), driver->intern(lexer->characterBuffer(), lexer->characterCount())); node->identifierToken = loc(1); sym(1).Node = node; } break; -case 30: { +case 34: { AST::UiQualifiedId *node = makeAstNode (driver->nodePool(), sym(1).sval); node->identifierToken = loc(1); sym(1).Node = node; } break; -case 31: { +case 35: { AST::UiQualifiedId *node = makeAstNode (driver->nodePool(), sym(1).UiQualifiedId, sym(3).sval); node->identifierToken = loc(3); sym(1).Node = node; } break; -case 32: { +case 36: { AST::ThisExpression *node = makeAstNode (driver->nodePool()); node->thisToken = loc(1); sym(1).Node = node; } break; -case 33: { +case 37: { AST::IdentifierExpression *node = makeAstNode (driver->nodePool(), sym(1).sval); node->identifierToken = loc(1); sym(1).Node = node; } break; -case 34: { +case 38: { AST::NullExpression *node = makeAstNode (driver->nodePool()); node->nullToken = loc(1); sym(1).Node = node; } break; -case 35: { +case 39: { AST::TrueLiteral *node = makeAstNode (driver->nodePool()); node->trueToken = loc(1); sym(1).Node = node; } break; -case 36: { +case 40: { AST::FalseLiteral *node = makeAstNode (driver->nodePool()); node->falseToken = loc(1); sym(1).Node = node; } break; -case 37: { +case 41: { AST::NumericLiteral *node = makeAstNode (driver->nodePool(), sym(1).dval); node->literalToken = loc(1); sym(1).Node = node; } break; -case 38: { +case 42: { AST::StringLiteral *node = makeAstNode (driver->nodePool(), sym(1).sval); node->literalToken = loc(1); sym(1).Node = node; } break; -case 39: { +case 43: { bool rx = lexer->scanRegExp(Lexer::NoPrefix); if (!rx) { diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, lexer->startLineNo(), @@ -380,7 +392,7 @@ case 39: { sym(1).Node = node; } break; -case 40: { +case 44: { bool rx = lexer->scanRegExp(Lexer::EqualPrefix); if (!rx) { diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, lexer->startLineNo(), @@ -392,21 +404,21 @@ case 40: { sym(1).Node = node; } break; -case 41: { +case 45: { AST::ArrayLiteral *node = makeAstNode (driver->nodePool(), sym(2).Elision); node->lbracketToken = loc(1); node->rbracketToken = loc(3); sym(1).Node = node; } break; -case 42: { +case 46: { AST::ArrayLiteral *node = makeAstNode (driver->nodePool(), sym(2).ElementList->finish ()); node->lbracketToken = loc(1); node->rbracketToken = loc(3); sym(1).Node = node; } break; -case 43: { +case 47: { AST::ArrayLiteral *node = makeAstNode (driver->nodePool(), sym(2).ElementList->finish (), sym(4).Elision); node->lbracketToken = loc(1); node->commaToken = loc(3); @@ -414,7 +426,7 @@ case 43: { sym(1).Node = node; } break; -case 44: { +case 48: { AST::ObjectLiteral *node = 0; if (sym(2).Node) node = makeAstNode (driver->nodePool(), @@ -426,7 +438,7 @@ case 44: { sym(1).Node = node; } break; -case 45: { +case 49: { AST::ObjectLiteral *node = makeAstNode (driver->nodePool(), sym(2).PropertyNameAndValueList->finish ()); node->lbraceToken = loc(1); @@ -434,51 +446,51 @@ case 45: { sym(1).Node = node; } break; -case 46: { +case 50: { AST::NestedExpression *node = makeAstNode(driver->nodePool(), sym(2).Expression); node->lparenToken = loc(1); node->rparenToken = loc(3); sym(1).Node = node; } break; -case 47: { +case 51: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).Elision, sym(2).Expression); } break; -case 48: { +case 52: { AST::ElementList *node = makeAstNode (driver->nodePool(), sym(1).ElementList, sym(3).Elision, sym(4).Expression); node->commaToken = loc(2); sym(1).Node = node; } break; -case 49: { +case 53: { AST::Elision *node = makeAstNode (driver->nodePool()); node->commaToken = loc(1); sym(1).Node = node; } break; -case 50: { +case 54: { AST::Elision *node = makeAstNode (driver->nodePool(), sym(1).Elision); node->commaToken = loc(2); sym(1).Node = node; } break; -case 51: { +case 55: { sym(1).Node = 0; } break; -case 52: { +case 56: { sym(1).Elision = sym(1).Elision->finish (); } break; -case 53: { +case 57: { AST::PropertyNameAndValueList *node = makeAstNode (driver->nodePool(), sym(1).PropertyName, sym(3).Expression); node->colonToken = loc(2); sym(1).Node = node; } break; -case 54: { +case 58: { AST::PropertyNameAndValueList *node = makeAstNode (driver->nodePool(), sym(1).PropertyNameAndValueList, sym(3).PropertyName, sym(5).Expression); node->commaToken = loc(2); @@ -486,38 +498,30 @@ case 54: { sym(1).Node = node; } break; -case 55: { +case 59: { AST::IdentifierPropertyName *node = makeAstNode (driver->nodePool(), sym(1).sval); node->propertyNameToken = loc(1); sym(1).Node = node; } break; -case 56: { +case 60: { AST::StringLiteralPropertyName *node = makeAstNode (driver->nodePool(), sym(1).sval); node->propertyNameToken = loc(1); sym(1).Node = node; } break; -case 57: { +case 61: { AST::NumericLiteralPropertyName *node = makeAstNode (driver->nodePool(), sym(1).dval); node->propertyNameToken = loc(1); sym(1).Node = node; } break; -case 58: { +case 62: { AST::IdentifierPropertyName *node = makeAstNode (driver->nodePool(), sym(1).sval); node->propertyNameToken = loc(1); sym(1).Node = node; } break; -case 59: - -case 60: - -case 61: - -case 62: - case 63: case 64: @@ -571,25 +575,33 @@ case 87: case 88: case 89: + +case 90: + +case 91: + +case 92: + +case 93: { sym(1).sval = driver->intern(lexer->characterBuffer(), lexer->characterCount()); } break; -case 94: { +case 98: { AST::ArrayMemberExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).Expression); node->lbracketToken = loc(2); node->rbracketToken = loc(4); sym(1).Node = node; } break; -case 95: { +case 99: { AST::FieldMemberExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).sval); node->dotToken = loc(2); node->identifierToken = loc(3); sym(1).Node = node; } break; -case 96: { +case 100: { AST::NewMemberExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression, sym(4).ArgumentList); node->newToken = loc(1); node->lparenToken = loc(3); @@ -597,384 +609,384 @@ case 96: { sym(1).Node = node; } break; -case 98: { +case 102: { AST::NewExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->newToken = loc(1); sym(1).Node = node; } break; -case 99: { +case 103: { AST::CallExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).ArgumentList); node->lparenToken = loc(2); node->rparenToken = loc(4); sym(1).Node = node; } break; -case 100: { +case 104: { AST::CallExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).ArgumentList); node->lparenToken = loc(2); node->rparenToken = loc(4); sym(1).Node = node; } break; -case 101: { +case 105: { AST::ArrayMemberExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).Expression); node->lbracketToken = loc(2); node->rbracketToken = loc(4); sym(1).Node = node; } break; -case 102: { +case 106: { AST::FieldMemberExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).sval); node->dotToken = loc(2); node->identifierToken = loc(3); sym(1).Node = node; } break; -case 103: { +case 107: { sym(1).Node = 0; } break; -case 104: { +case 108: { sym(1).Node = sym(1).ArgumentList->finish(); } break; -case 105: { +case 109: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).Expression); } break; -case 106: { +case 110: { AST::ArgumentList *node = makeAstNode (driver->nodePool(), sym(1).ArgumentList, sym(3).Expression); node->commaToken = loc(2); sym(1).Node = node; } break; -case 110: { +case 114: { AST::PostIncrementExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression); node->incrementToken = loc(2); sym(1).Node = node; } break; -case 111: { +case 115: { AST::PostDecrementExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression); node->decrementToken = loc(2); sym(1).Node = node; } break; -case 113: { +case 117: { AST::DeleteExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->deleteToken = loc(1); sym(1).Node = node; } break; -case 114: { +case 118: { AST::VoidExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->voidToken = loc(1); sym(1).Node = node; } break; -case 115: { +case 119: { AST::TypeOfExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->typeofToken = loc(1); sym(1).Node = node; } break; -case 116: { +case 120: { AST::PreIncrementExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->incrementToken = loc(1); sym(1).Node = node; } break; -case 117: { +case 121: { AST::PreDecrementExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->decrementToken = loc(1); sym(1).Node = node; } break; -case 118: { +case 122: { AST::UnaryPlusExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->plusToken = loc(1); sym(1).Node = node; } break; -case 119: { +case 123: { AST::UnaryMinusExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->minusToken = loc(1); sym(1).Node = node; } break; -case 120: { +case 124: { AST::TildeExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->tildeToken = loc(1); sym(1).Node = node; } break; -case 121: { +case 125: { AST::NotExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->notToken = loc(1); sym(1).Node = node; } break; -case 123: { +case 127: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Mul, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 124: { +case 128: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Div, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 125: { +case 129: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Mod, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 127: { +case 131: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Add, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 128: { +case 132: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Sub, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 130: { +case 134: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::LShift, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 131: { +case 135: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::RShift, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 132: { +case 136: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::URShift, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 134: { +case 138: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Lt, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 135: { +case 139: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Gt, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 136: { +case 140: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Le, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 137: { +case 141: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Ge, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 138: { +case 142: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::InstanceOf, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 139: { +case 143: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::In, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 141: { +case 145: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Lt, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 142: { +case 146: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Gt, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 143: { +case 147: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Le, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 144: { +case 148: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Ge, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 145: { +case 149: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::InstanceOf, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 147: { +case 151: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Equal, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 148: { +case 152: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::NotEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 149: { +case 153: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::StrictEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 150: { +case 154: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::StrictNotEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 152: { +case 156: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Equal, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 153: { +case 157: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::NotEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 154: { +case 158: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::StrictEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 155: { +case 159: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::StrictNotEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 157: { +case 161: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::BitAnd, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 159: { +case 163: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::BitAnd, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 161: { +case 165: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::BitXor, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 163: { +case 167: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::BitXor, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 165: { +case 169: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::BitOr, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 167: { +case 171: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::BitOr, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 169: { +case 173: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::And, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 171: { +case 175: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::And, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 173: { +case 177: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Or, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 175: { +case 179: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Or, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 177: { +case 181: { AST::ConditionalExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).Expression, sym(5).Expression); node->questionToken = loc(2); @@ -982,7 +994,7 @@ case 177: { sym(1).Node = node; } break; -case 179: { +case 183: { AST::ConditionalExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).Expression, sym(5).Expression); node->questionToken = loc(2); @@ -990,112 +1002,112 @@ case 179: { sym(1).Node = node; } break; -case 181: { +case 185: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(2).ival, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 183: { +case 187: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(2).ival, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 184: { +case 188: { sym(1).ival = QSOperator::Assign; } break; -case 185: { +case 189: { sym(1).ival = QSOperator::InplaceMul; } break; -case 186: { +case 190: { sym(1).ival = QSOperator::InplaceDiv; } break; -case 187: { +case 191: { sym(1).ival = QSOperator::InplaceMod; } break; -case 188: { +case 192: { sym(1).ival = QSOperator::InplaceAdd; } break; -case 189: { +case 193: { sym(1).ival = QSOperator::InplaceSub; } break; -case 190: { +case 194: { sym(1).ival = QSOperator::InplaceLeftShift; } break; -case 191: { +case 195: { sym(1).ival = QSOperator::InplaceRightShift; } break; -case 192: { +case 196: { sym(1).ival = QSOperator::InplaceURightShift; } break; -case 193: { +case 197: { sym(1).ival = QSOperator::InplaceAnd; } break; -case 194: { +case 198: { sym(1).ival = QSOperator::InplaceXor; } break; -case 195: { +case 199: { sym(1).ival = QSOperator::InplaceOr; } break; -case 197: { +case 201: { AST::Expression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).Expression); node->commaToken = loc(2); sym(1).Node = node; } break; -case 198: { +case 202: { sym(1).Node = 0; } break; -case 201: { +case 205: { AST::Expression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).Expression); node->commaToken = loc(2); sym(1).Node = node; } break; -case 202: { +case 206: { sym(1).Node = 0; } break; -case 219: { +case 223: { AST::Block *node = makeAstNode (driver->nodePool(), sym(2).StatementList); node->lbraceToken = loc(1); node->rbraceToken = loc(3); sym(1).Node = node; } break; -case 220: { +case 224: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).Statement); } break; -case 221: { +case 225: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).StatementList, sym(2).Statement); } break; -case 222: { +case 226: { sym(1).Node = 0; } break; -case 223: { +case 227: { sym(1).Node = sym(1).StatementList->finish (); } break; -case 225: { +case 229: { AST::VariableStatement *node = makeAstNode (driver->nodePool(), sym(2).VariableDeclarationList->finish (/*readOnly=*/sym(1).ival == T_CONST)); node->declarationKindToken = loc(1); @@ -1103,76 +1115,76 @@ case 225: { sym(1).Node = node; } break; -case 226: { +case 230: { sym(1).ival = T_CONST; } break; -case 227: { +case 231: { sym(1).ival = T_VAR; } break; -case 228: { +case 232: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).VariableDeclaration); } break; -case 229: { +case 233: { AST::VariableDeclarationList *node = makeAstNode (driver->nodePool(), sym(1).VariableDeclarationList, sym(3).VariableDeclaration); node->commaToken = loc(2); sym(1).Node = node; } break; -case 230: { +case 234: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).VariableDeclaration); } break; -case 231: { +case 235: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).VariableDeclarationList, sym(3).VariableDeclaration); } break; -case 232: { +case 236: { AST::VariableDeclaration *node = makeAstNode (driver->nodePool(), sym(1).sval, sym(2).Expression); node->identifierToken = loc(1); sym(1).Node = node; } break; -case 233: { +case 237: { AST::VariableDeclaration *node = makeAstNode (driver->nodePool(), sym(1).sval, sym(2).Expression); node->identifierToken = loc(1); sym(1).Node = node; } break; -case 234: { +case 238: { // ### TODO: AST for initializer sym(1) = sym(2); } break; -case 235: { +case 239: { sym(1).Node = 0; } break; -case 237: { +case 241: { // ### TODO: AST for initializer sym(1) = sym(2); } break; -case 238: { +case 242: { sym(1).Node = 0; } break; -case 240: { +case 244: { AST::EmptyStatement *node = makeAstNode (driver->nodePool()); node->semicolonToken = loc(1); sym(1).Node = node; } break; -case 242: { +case 246: { AST::ExpressionStatement *node = makeAstNode (driver->nodePool(), sym(1).Expression); node->semicolonToken = loc(2); sym(1).Node = node; } break; -case 243: { +case 247: { AST::IfStatement *node = makeAstNode (driver->nodePool(), sym(3).Expression, sym(5).Statement, sym(7).Statement); node->ifToken = loc(1); node->lparenToken = loc(2); @@ -1181,7 +1193,7 @@ case 243: { sym(1).Node = node; } break; -case 244: { +case 248: { AST::IfStatement *node = makeAstNode (driver->nodePool(), sym(3).Expression, sym(5).Statement); node->ifToken = loc(1); node->lparenToken = loc(2); @@ -1189,7 +1201,7 @@ case 244: { sym(1).Node = node; } break; -case 246: { +case 250: { AST::DoWhileStatement *node = makeAstNode (driver->nodePool(), sym(2).Statement, sym(5).Expression); node->doToken = loc(1); node->whileToken = loc(3); @@ -1199,7 +1211,7 @@ case 246: { sym(1).Node = node; } break; -case 247: { +case 251: { AST::WhileStatement *node = makeAstNode (driver->nodePool(), sym(3).Expression, sym(5).Statement); node->whileToken = loc(1); node->lparenToken = loc(2); @@ -1207,7 +1219,7 @@ case 247: { sym(1).Node = node; } break; -case 248: { +case 252: { AST::ForStatement *node = makeAstNode (driver->nodePool(), sym(3).Expression, sym(5).Expression, sym(7).Expression, sym(9).Statement); node->forToken = loc(1); @@ -1218,7 +1230,7 @@ case 248: { sym(1).Node = node; } break; -case 249: { +case 253: { AST::LocalForStatement *node = makeAstNode (driver->nodePool(), sym(4).VariableDeclarationList->finish (/*readOnly=*/false), sym(6).Expression, sym(8).Expression, sym(10).Statement); @@ -1231,7 +1243,7 @@ case 249: { sym(1).Node = node; } break; -case 250: { +case 254: { AST:: ForEachStatement *node = makeAstNode (driver->nodePool(), sym(3).Expression, sym(5).Expression, sym(7).Statement); node->forToken = loc(1); @@ -1241,7 +1253,7 @@ case 250: { sym(1).Node = node; } break; -case 251: { +case 255: { AST::LocalForEachStatement *node = makeAstNode (driver->nodePool(), sym(4).VariableDeclaration, sym(6).Expression, sym(8).Statement); node->forToken = loc(1); @@ -1252,14 +1264,14 @@ case 251: { sym(1).Node = node; } break; -case 253: { +case 257: { AST::ContinueStatement *node = makeAstNode (driver->nodePool()); node->continueToken = loc(1); node->semicolonToken = loc(2); sym(1).Node = node; } break; -case 255: { +case 259: { AST::ContinueStatement *node = makeAstNode (driver->nodePool(), sym(2).sval); node->continueToken = loc(1); node->identifierToken = loc(2); @@ -1267,14 +1279,14 @@ case 255: { sym(1).Node = node; } break; -case 257: { +case 261: { AST::BreakStatement *node = makeAstNode (driver->nodePool()); node->breakToken = loc(1); node->semicolonToken = loc(2); sym(1).Node = node; } break; -case 259: { +case 263: { AST::BreakStatement *node = makeAstNode (driver->nodePool(), sym(2).sval); node->breakToken = loc(1); node->identifierToken = loc(2); @@ -1282,14 +1294,14 @@ case 259: { sym(1).Node = node; } break; -case 261: { +case 265: { AST::ReturnStatement *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->returnToken = loc(1); node->semicolonToken = loc(3); sym(1).Node = node; } break; -case 262: { +case 266: { AST::WithStatement *node = makeAstNode (driver->nodePool(), sym(3).Expression, sym(5).Statement); node->withToken = loc(1); node->lparenToken = loc(2); @@ -1297,7 +1309,7 @@ case 262: { sym(1).Node = node; } break; -case 263: { +case 267: { AST::SwitchStatement *node = makeAstNode (driver->nodePool(), sym(3).Expression, sym(5).CaseBlock); node->switchToken = loc(1); node->lparenToken = loc(2); @@ -1305,83 +1317,83 @@ case 263: { sym(1).Node = node; } break; -case 264: { +case 268: { AST::CaseBlock *node = makeAstNode (driver->nodePool(), sym(2).CaseClauses); node->lbraceToken = loc(1); node->rbraceToken = loc(3); sym(1).Node = node; } break; -case 265: { +case 269: { AST::CaseBlock *node = makeAstNode (driver->nodePool(), sym(2).CaseClauses, sym(3).DefaultClause, sym(4).CaseClauses); node->lbraceToken = loc(1); node->rbraceToken = loc(5); sym(1).Node = node; } break; -case 266: { +case 270: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).CaseClause); } break; -case 267: { +case 271: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).CaseClauses, sym(2).CaseClause); } break; -case 268: { +case 272: { sym(1).Node = 0; } break; -case 269: { +case 273: { sym(1).Node = sym(1).CaseClauses->finish (); } break; -case 270: { +case 274: { AST::CaseClause *node = makeAstNode (driver->nodePool(), sym(2).Expression, sym(4).StatementList); node->caseToken = loc(1); node->colonToken = loc(3); sym(1).Node = node; } break; -case 271: { +case 275: { AST::DefaultClause *node = makeAstNode (driver->nodePool(), sym(3).StatementList); node->defaultToken = loc(1); node->colonToken = loc(2); sym(1).Node = node; } break; -case 272: { +case 276: { AST::LabelledStatement *node = makeAstNode (driver->nodePool(), sym(1).sval, sym(3).Statement); node->identifierToken = loc(1); node->colonToken = loc(2); sym(1).Node = node; } break; -case 274: { +case 278: { AST::ThrowStatement *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->throwToken = loc(1); node->semicolonToken = loc(3); sym(1).Node = node; } break; -case 275: { +case 279: { AST::TryStatement *node = makeAstNode (driver->nodePool(), sym(2).Statement, sym(3).Catch); node->tryToken = loc(1); sym(1).Node = node; } break; -case 276: { +case 280: { AST::TryStatement *node = makeAstNode (driver->nodePool(), sym(2).Statement, sym(3).Finally); node->tryToken = loc(1); sym(1).Node = node; } break; -case 277: { +case 281: { AST::TryStatement *node = makeAstNode (driver->nodePool(), sym(2).Statement, sym(3).Catch, sym(4).Finally); node->tryToken = loc(1); sym(1).Node = node; } break; -case 278: { +case 282: { AST::Catch *node = makeAstNode (driver->nodePool(), sym(3).sval, sym(5).Block); node->catchToken = loc(1); node->lparenToken = loc(2); @@ -1390,20 +1402,20 @@ case 278: { sym(1).Node = node; } break; -case 279: { +case 283: { AST::Finally *node = makeAstNode (driver->nodePool(), sym(2).Block); node->finallyToken = loc(1); sym(1).Node = node; } break; -case 281: { +case 285: { AST::DebuggerStatement *node = makeAstNode (driver->nodePool()); node->debuggerToken = loc(1); node->semicolonToken = loc(2); sym(1).Node = node; } break; -case 282: { +case 286: { AST::FunctionDeclaration *node = makeAstNode (driver->nodePool(), sym(2).sval, sym(4).FormalParameterList, sym(7).FunctionBody); node->functionToken = loc(1); node->identifierToken = loc(2); @@ -1414,7 +1426,7 @@ case 282: { sym(1).Node = node; } break; -case 283: { +case 287: { AST::FunctionExpression *node = makeAstNode (driver->nodePool(), sym(2).sval, sym(4).FormalParameterList, sym(7).FunctionBody); node->functionToken = loc(1); if (sym(2).sval) @@ -1426,56 +1438,56 @@ case 283: { sym(1).Node = node; } break; -case 284: { +case 288: { AST::FormalParameterList *node = makeAstNode (driver->nodePool(), sym(1).sval); node->identifierToken = loc(1); sym(1).Node = node; } break; -case 285: { +case 289: { AST::FormalParameterList *node = makeAstNode (driver->nodePool(), sym(1).FormalParameterList, sym(3).sval); node->commaToken = loc(2); node->identifierToken = loc(3); sym(1).Node = node; } break; -case 286: { +case 290: { sym(1).Node = 0; } break; -case 287: { +case 291: { sym(1).Node = sym(1).FormalParameterList->finish (); } break; -case 288: { +case 292: { sym(1).Node = 0; } break; -case 290: { +case 294: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).SourceElements->finish ()); } break; -case 291: { +case 295: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).SourceElement); } break; -case 292: { +case 296: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).SourceElements, sym(2).SourceElement); } break; -case 293: { +case 297: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).Statement); } break; -case 294: { +case 298: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).FunctionDeclaration); } break; -case 295: { +case 299: { sym(1).sval = 0; } break; -case 297: { +case 301: { sym(1).Node = 0; } break; diff --git a/src/declarative/qml/parser/javascriptparser_p.h b/src/declarative/qml/parser/javascriptparser_p.h index e91286d..34f41a8 100644 --- a/src/declarative/qml/parser/javascriptparser_p.h +++ b/src/declarative/qml/parser/javascriptparser_p.h @@ -206,9 +206,9 @@ protected: }; -#define J_SCRIPT_REGEXPLITERAL_RULE1 39 +#define J_SCRIPT_REGEXPLITERAL_RULE1 43 -#define J_SCRIPT_REGEXPLITERAL_RULE2 40 +#define J_SCRIPT_REGEXPLITERAL_RULE2 44 QT_END_NAMESPACE -- cgit v0.12 From 0d58554d8ff48459759875a37822ad5a3afca602 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Fri, 1 May 2009 11:04:03 +1000 Subject: Remove unnecessary escaping from data --- .../declarative/listview/dummydata/Recipies.qml | 125 +++++++++++---------- 1 file changed, 63 insertions(+), 62 deletions(-) diff --git a/examples/declarative/listview/dummydata/Recipies.qml b/examples/declarative/listview/dummydata/Recipies.qml index 6b20409..8f464da 100644 --- a/examples/declarative/listview/dummydata/Recipies.qml +++ b/examples/declarative/listview/dummydata/Recipies.qml @@ -3,21 +3,22 @@ ListModel2 { ListElement { title: "Pancakes" picture: "content/pics/pancakes.jpg" - ingredients: " \ -

    \ -
  • 1 cup (150g) self-raising flour \ -
  • 1 tbs caster sugar \ -
  • 3/4 cup (185ml) milk \ -
  • 1 egg \ -
\ - " - method: " \ -
    \ -
  1. Sift flour and sugar together into a bowl. Add a pinch of salt. \ -
  2. Beat milk and egg together, then add to dry ingredients. Beat until smooth. \ -
  3. Pour mixture into a pan on medium heat and cook until bubbles appear on the surface. \ -
  4. Turn over and cook other side until golden. \ -
" + ingredients: " +
    +
  • 1 cup (150g) self-raising flour +
  • 1 tbs caster sugar +
  • 3/4 cup (185ml) milk +
  • 1 egg +
+ " + method: " +
    +
  1. Sift flour and sugar together into a bowl. Add a pinch of salt. +
  2. Beat milk and egg together, then add to dry ingredients. Beat until smooth. +
  3. Pour mixture into a pan on medium heat and cook until bubbles appear on the surface. +
  4. Turn over and cook other side until golden. +
+ " } ListElement { title: "Fruit Salad" @@ -28,60 +29,60 @@ ListModel2 { ListElement { title: "Vegetable Soup" picture: "content/pics/vegetable-soup.jpg" - ingredients: " \ -
    \ -
  • 1 onion \ -
  • 1 turnip \ -
  • 1 potato \ -
  • 1 carrot \ -
  • 1 head of celery \ -
  • 1 1/2 litres of water \ -
\ - " - method: " \ -
    \ -
  1. Chop vegetables. \ -
  2. Boil in water until vegetables soften. \ -
  3. Season with salt and pepper to taste. \ -
\ - " + ingredients: " +
    +
  • 1 onion +
  • 1 turnip +
  • 1 potato +
  • 1 carrot +
  • 1 head of celery +
  • 1 1/2 litres of water +
+ " + method: " +
    +
  1. Chop vegetables. +
  2. Boil in water until vegetables soften. +
  3. Season with salt and pepper to taste. +
+ " } ListElement { title: "Hamburger" picture: "content/pics/hamburger.jpg" - ingredients: " \ -
    \ -
  • 500g minced beef \ -
  • Seasoning \ -
  • lettuce, tomato, onion, cheese \ -
  • 1 hamburger bun for each burger \ -
\ - " - method: " \ -
    \ -
  1. Mix the beef, together with seasoning, in a food processor. \ -
  2. Shape the beef into burgers. \ -
  3. Grill the burgers for about 5 mins on each side (until cooked through) \ -
  4. Serve each burger on a bun with ketchup, cheese, lettuce, tomato and onion. \ -
\ - " + ingredients: " +
    +
  • 500g minced beef +
  • Seasoning +
  • lettuce, tomato, onion, cheese +
  • 1 hamburger bun for each burger +
+ " + method: " +
    +
  1. Mix the beef, together with seasoning, in a food processor. +
  2. Shape the beef into burgers. +
  3. Grill the burgers for about 5 mins on each side (until cooked through) +
  4. Serve each burger on a bun with ketchup, cheese, lettuce, tomato and onion. +
+ " } ListElement { title: "Lemonade" picture: "content/pics/lemonade.jpg" - ingredients: " \ -
    \ -
  • 1 cup Lemon Juice \ -
  • 1 cup Sugar \ -
  • 6 Cups of Water (2 cups warm water, 4 cups cold water) \ -
\ - " - method: " \ -
    \ -
  1. Pour 2 cups of warm water into a pitcher and stir in sugar until it dissolves. \ -
  2. Pour in lemon juice, stir again, and add 4 cups of cold water. \ -
  3. Chill or serve over ice cubes. \ -
\ - " + ingredients: " +
    +
  • 1 cup Lemon Juice +
  • 1 cup Sugar +
  • 6 Cups of Water (2 cups warm water, 4 cups cold water) +
+ " + method: " +
    +
  1. Pour 2 cups of warm water into a pitcher and stir in sugar until it dissolves. +
  2. Pour in lemon juice, stir again, and add 4 cups of cold water. +
  3. Chill or serve over ice cubes. +
+ " } } -- cgit v0.12 From 94dff487709583068bdc002a955cf5b423cae614 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Fri, 1 May 2009 11:07:52 +1000 Subject: More format conversion. --- doc/src/declarative/pics/repeater.png | Bin 0 -> 800 bytes doc/src/snippets/declarative/repeater.qml | 12 ++++++++++++ src/declarative/fx/qfxflickable.cpp | 29 ++++++++++++++++------------ src/declarative/fx/qfxrepeater.cpp | 31 +++++++++++++++--------------- 4 files changed, 44 insertions(+), 28 deletions(-) create mode 100644 doc/src/declarative/pics/repeater.png create mode 100644 doc/src/snippets/declarative/repeater.qml diff --git a/doc/src/declarative/pics/repeater.png b/doc/src/declarative/pics/repeater.png new file mode 100644 index 0000000..973df27 Binary files /dev/null and b/doc/src/declarative/pics/repeater.png differ diff --git a/doc/src/snippets/declarative/repeater.qml b/doc/src/snippets/declarative/repeater.qml new file mode 100644 index 0000000..c8f9f18 --- /dev/null +++ b/doc/src/snippets/declarative/repeater.qml @@ -0,0 +1,12 @@ +//! [0] +Rect { width: 220; height: 20; color: "white" + Component { id: Dot + Rect { width: 20; height: 20; radius: 10; color: "green" } + } + HorizontalLayout { + Rect { width: 10; height: 20; color: "red" } + Repeater { component: Dot; dataSource: 10 } + Rect { width: 10; height: 20; color: "blue" } + } +} +//! [0] diff --git a/src/declarative/fx/qfxflickable.cpp b/src/declarative/fx/qfxflickable.cpp index 671d65d..17e44e1 100644 --- a/src/declarative/fx/qfxflickable.cpp +++ b/src/declarative/fx/qfxflickable.cpp @@ -232,9 +232,10 @@ QML_DEFINE_TYPE(QFxFlickable,Flickable); Flickable places its children on a surface that can be dragged and flicked. \code - - - + Flickable { + width: 200; height: 200; viewportWidth: image.width; viewportHeight: image.height + Image { id: image; source: "bigimage.png" } + } \endcode \image flickable.gif @@ -257,9 +258,10 @@ QML_DEFINE_TYPE(QFxFlickable,Flickable); QFxFlickable allows its children to be dragged and flicked. \code - - - +Flickable { + width: 320; height: 480; viewportWidth: image.width; viewportHeight: image.height + Image { id: image; source: "bigimage.png" } +} \endcode Note that QFxFlickable does not automatically clip its contents. If @@ -475,9 +477,11 @@ bool QFxFlickable::isAtYBeginning() const These properties are typically used to draw a scrollbar, for example: \code - + Rect { + opacity: 0.5; anchors.right: MyListView.right-2; width: 6 + y: MyListView.pageYPosition * MyListView.height + height: MyListView.pageHeight * MyListView.height + } \endcode */ qreal QFxFlickable::pageWidth() const @@ -879,9 +883,10 @@ void QFxFlickable::setOverShoot(bool o) should be set to the combined size of the items placed in the Flickable. \code - - - + Flickable { + width: 320; height: 480; viewportWidth: image.width; viewportHeight: image.height + Image { id: image; source: "bigimage.png" } + } \endcode */ diff --git a/src/declarative/fx/qfxrepeater.cpp b/src/declarative/fx/qfxrepeater.cpp index 7ee949d..f9fc878 100644 --- a/src/declarative/fx/qfxrepeater.cpp +++ b/src/declarative/fx/qfxrepeater.cpp @@ -99,14 +99,9 @@ QML_DEFINE_TYPE(QFxRepeater,Repeater); the instantiated items would visually appear stacked between the red and blue rectangles. - \code - - - - - - - \endcode + \snippet doc/src/snippets/declarative/repeater.qml 0 + + \image repeater.png The repeater instance continues to own all items it instantiates, even if they are otherwise manipulated. It is illegal to manually remove an item @@ -144,14 +139,7 @@ QML_DEFINE_TYPE(QFxRepeater,Repeater); the instantiated items would visually appear stacked between the red and blue rectangles. - \code - - - - - - - \endcode + \snippet doc/src/snippets/declarative/repeater.qml 0 The QFxRepeater instance continues to own all items it instantiates, even if they are otherwise manipulated. It is illegal to manually delete an item @@ -191,6 +179,17 @@ QFxRepeater::~QFxRepeater() \qmlproperty any Repeater::dataSource The Repeater's data source. + + The data source may be either an object list, a string list or a Qt model. + In each case, the data element and the index is exposed to each instantiated + component. The index is always exposed as an accessible \c index property. + In the case of an object or string list, the data element (of type string + or object) is available as the \c modelData property. In the case of a Qt model, + all roles are available as named properties just like in the view classes. + + As a special case the data source can also be merely a number. In this case it will + create that many instances of the component. They will also be assigned an index + based on the order they are created. */ /*! -- cgit v0.12 From 1206e9fb0c9a21e60b1e6841bb3071daa1f0da8a Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Fri, 1 May 2009 11:21:44 +1000 Subject: More format conversion. --- src/declarative/extra/qmlnumberformatter.cpp | 4 ++-- src/declarative/extra/qmlxmllistmodel.cpp | 13 ++++++++----- src/declarative/util/qbindablemap.cpp | 4 ++-- src/declarative/util/qmlbind.cpp | 4 ++-- src/declarative/util/qmldatetimeformatter.cpp | 28 +++++++++++++-------------- src/declarative/util/qmlscript.cpp | 6 +++--- 6 files changed, 31 insertions(+), 28 deletions(-) diff --git a/src/declarative/extra/qmlnumberformatter.cpp b/src/declarative/extra/qmlnumberformatter.cpp index 8772305..1549525 100644 --- a/src/declarative/extra/qmlnumberformatter.cpp +++ b/src/declarative/extra/qmlnumberformatter.cpp @@ -72,8 +72,8 @@ public: In the following example, the text element will display the text "1,234.57". \code - - + NumberFormatter { id: Formatter; number: 1234.5678; format: "##,##0.##" } + Text { text: Formatter.text } \endcode */ diff --git a/src/declarative/extra/qmlxmllistmodel.cpp b/src/declarative/extra/qmlxmllistmodel.cpp index 91c8139..6b8f285 100644 --- a/src/declarative/extra/qmlxmllistmodel.cpp +++ b/src/declarative/extra/qmlxmllistmodel.cpp @@ -74,11 +74,14 @@ QML_DEFINE_TYPE(QmlXmlListModel, XmlListModel); The following is an example of a model containing news from a Yahoo RSS feed: \qml - - - - - + XmlListModel { + id: FeedModel + source: "http://rss.news.yahoo.com/rss/oceania" + query: "doc($src)/rss/channel/item" + Role { name: "title"; query: "title/string()" } + Role { name: "link"; query: "link/string()" } + Role { name: "description"; query: "description/string()"; isCData: true } + } \endqml \note The model is currently static, so the above is really just a snapshot of an RSS feed. */ diff --git a/src/declarative/util/qbindablemap.cpp b/src/declarative/util/qbindablemap.cpp index 341dd31..c8c8ced 100644 --- a/src/declarative/util/qbindablemap.cpp +++ b/src/declarative/util/qbindablemap.cpp @@ -87,8 +87,8 @@ private: Then, in QML: \code - - + Text { text: owner.name } + Text { text: owner.phone } \endcode The binding is dynamic - whenever a key's value is updated, anything bound to that diff --git a/src/declarative/util/qmlbind.cpp b/src/declarative/util/qmlbind.cpp index 3b51c6a..59bfd75 100644 --- a/src/declarative/util/qmlbind.cpp +++ b/src/declarative/util/qmlbind.cpp @@ -77,8 +77,8 @@ QML_DEFINE_TYPE(QmlBind,Bind); property into QML. You could use Bind to update the enteredText property like this. \code - - + TextEdit { id: myTextField; text: "Please type here..." } + Bind { target: app; property: "enteredText"; value: myTextField.text /> \endcode Whenever the text in the TextEdit is updated, the C++ property will be updated also. diff --git a/src/declarative/util/qmldatetimeformatter.cpp b/src/declarative/util/qmldatetimeformatter.cpp index efddd81..94b87ee 100644 --- a/src/declarative/util/qmldatetimeformatter.cpp +++ b/src/declarative/util/qmldatetimeformatter.cpp @@ -74,8 +74,8 @@ public: \brief The DateTimeFormatter allows you to control the format of a date string. \code - - + DateTimeFormatter { id: Formatter; date: System.date } + Text { text: Formatter.dateText } \endcode By default, the text properties (dateText, timeText, and dateTimeText) will return the @@ -110,18 +110,18 @@ QmlDateTimeFormatter::~QmlDateTimeFormatter() will use the system locale's default 'short' setting. \code - - + // specify source date (assuming today is February 19, 2009) + DateTimeFormatter { id: formatter; dateTime: Today.date } - - + // display the full date and time + Text { text: formatter.dateText } \endcode Would be equivalent to the following for a US English locale: \code - - + // display the date + Text { text: "2/19/09" } \endcode */ QString QmlDateTimeFormatter::dateTimeText() const @@ -150,14 +150,14 @@ QString QmlDateTimeFormatter::timeText() const The source date and time to be used by the formatter. \code - - + // setting the date and time + DateTimeFormatter { date: System.date; time: System.time } \endcode For convienience it is possible to set the datetime property to set both the date and the time. \code - - + // setting the datetime + DateTimeFormatter { dateTime: System.dateTime } \endcode There can only be one instance of date and time per formatter; if date, time, and dateTime are all @@ -208,8 +208,8 @@ QDateTime QmlDateTimeFormatter::dateTime() const Syntax for the format is based on the QDateTime::toString() formatting options. \code - - + // rect with green border using hexidecimal notation + Rect { pen.color: "#00FF00" } - - + // rect with steelblue border using SVG color name + Rect { pen.color: "steelblue" } \endcode For the full set of ways to specify color, see Qt's QColor::setNamedColor documentation. @@ -102,7 +102,7 @@ QML_DEFINE_TYPE(QFxRect,Rect); A Rect is painted having a solid fill (color) and an optional border (pen). You can also create rounded rectangles using the radius property. \code - + Rect { width: 100; height: 100; color: "red"; pen.color: "black"; pen.width: 5; radius: 10 } \endcode \image declarative-rect.png @@ -116,7 +116,7 @@ QML_DEFINE_TYPE(QFxRect,Rect); A Rect is painted having a solid fill (color) and an optional border (pen). You can also create rounded rectangles using the radius property. \code - + Rect { width: 100; height: 100; color: "red"; pen.color: "black"; pen.width: 5; radius: 10 } \endcode \image declarative-rect.png @@ -217,11 +217,11 @@ void QFxRect::dump(int depth) This property holds the color used to fill the rect. \code - - + // green rect using hexidecimal notation + Rect { color: "#00FF00" } - - + // steelblue rect using SVG color name + Rect { color: "steelblue" } \endcode */ @@ -260,8 +260,8 @@ void QFxRect::setColor(const QColor &c) This color will be drawn over the rect's color when the rect is painted. The tint color should usually be mostly transparent, or you will not be able to see the underlying color. The below example provides a slight red tint by having the tint color be pure red which is only 1/16th opaque. \code - - + Rect { x: 0; width: 80; height: 80; color: "lightsteelblue" } + Rect { x: 100; width: 80; height: 80; color: "lightsteelblue"; tintColor: "#10FF0000" } \endcode \image declarative-rect_tint.png @@ -321,11 +321,11 @@ QColor QFxRectPrivate::getColor() This property allows for the easy construction of simple horizontal gradients. Other gradients may by formed by adding rotation to the rect. The gradient will blend linearly from the rect's main color to the color specified for gradient color. \code - - - - + Rect { y: 0; width: 80; height: 80; color: "lightsteelblue" } + Rect { y: 100; width: 80; height: 80; color: "lightsteelblue"; gradientColor="blue" } + Rect { rotation: 90; x: 80; y: 200; width: 80; height: 80; color="lightsteelblue" + gradientColor: "blue" } + // The x offset is needed because the rotation is from the top left corner \endcode \image declarative-rect_gradient.png */ -- cgit v0.12 From f5b007243af66abc320ee9022170c84e1a3f6da6 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Fri, 1 May 2009 12:47:44 +1000 Subject: More format changes. --- src/declarative/fx/qfxanimatedimageitem.cpp | 12 +++++++----- src/declarative/fx/qfxcomponentinstance.cpp | 13 +++++++------ 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/declarative/fx/qfxanimatedimageitem.cpp b/src/declarative/fx/qfxanimatedimageitem.cpp index 8f930d5..5a495e9 100644 --- a/src/declarative/fx/qfxanimatedimageitem.cpp +++ b/src/declarative/fx/qfxanimatedimageitem.cpp @@ -67,11 +67,13 @@ QT_BEGIN_NAMESPACE \o \image animatedimageitem.gif \o \code - - - - +Item { + width: anim.width; height: anim.height+8 + AnimatedImage { id: anim; source: "pics/games-anim.gif" } + Rect { color: "red"; width: 4; height: 8; y: anim.height + x: (anim.width-width)*anim.currentFrame/(anim.frameCount-1) + } +} \endcode \endtable */ diff --git a/src/declarative/fx/qfxcomponentinstance.cpp b/src/declarative/fx/qfxcomponentinstance.cpp index 5343f7d..5fb5466 100644 --- a/src/declarative/fx/qfxcomponentinstance.cpp +++ b/src/declarative/fx/qfxcomponentinstance.cpp @@ -61,13 +61,14 @@ QML_DEFINE_TYPE(QFxComponentInstance,ComponentInstance); \brief The ComponentInstance element allows you to instantiate a \l{qml-component.html} {Component}. \code - - - - + Item { + Component { + id: RedSquare + Rect { color: "red"; width: 10; height: 10 } + } - - + ComponentInstance { component: RedSquare } + } \endcode */ QFxComponentInstance::QFxComponentInstance(QFxItem *parent) -- cgit v0.12 From 1276c6ff207ee2d5228a6282f2a632ba0c206f25 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Fri, 1 May 2009 13:32:57 +1000 Subject: Support userStyleSheetUrl. --- src/declarative/fx/qfxwebview.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/declarative/fx/qfxwebview.cpp b/src/declarative/fx/qfxwebview.cpp index fe694ea..eb2f7d2 100644 --- a/src/declarative/fx/qfxwebview.cpp +++ b/src/declarative/fx/qfxwebview.cpp @@ -106,6 +106,8 @@ class QFxWebSettings : public QObject { Q_PROPERTY(bool offlineWebApplicationCacheEnabled READ offlineWebApplicationCacheEnabled WRITE setOfflineWebApplicationCacheEnabled) Q_PROPERTY(bool localStorageDatabaseEnabled READ localStorageDatabaseEnabled WRITE setLocalStorageDatabaseEnabled) + Q_PROPERTY(QString userStyleSheetUrl READ userStyleSheetUrl WRITE setUserStyleSheetUrl) + public: QFxWebSettings() {} @@ -138,6 +140,9 @@ public: bool localStorageDatabaseEnabled() const { return s->testAttribute(QWebSettings::LocalStorageDatabaseEnabled); } void setLocalStorageDatabaseEnabled(bool on) { s->setAttribute(QWebSettings::LocalStorageDatabaseEnabled, on); } + QString userStyleSheetUrl() const { return s->userStyleSheetUrl(); } + void setUserStyleSheetUrl(const QString& url) { s->setUserStyleSheetUrl(url); } + QWebSettings *s; }; @@ -951,6 +956,21 @@ QWebPage *QFxWebView::page() const } // The QObject interface to settings(). +/*! + \qmlproperty QWebSettings WebView::settings + + This property gives access to the settings controlling the web view. + + See QWebSettings for the list of sub-properties. + + \code + WebView { + settings.pluginsEnabled: true + settings.userStyleSheetUrl: "mystyle.css" + ... + } + \endcode +*/ QObject *QFxWebView::settingsObject() const { Q_D(const QFxWebView); -- cgit v0.12 From 282da61249a7b2ba47afadb94bfcd2517ea60d9a Mon Sep 17 00:00:00 2001 From: Yann Bodson Date: Fri, 1 May 2009 14:05:52 +1000 Subject: Small fix for QXmlListModel. --- src/declarative/extra/qmlxmllistmodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/declarative/extra/qmlxmllistmodel.cpp b/src/declarative/extra/qmlxmllistmodel.cpp index 6b8f285..badc6fb 100644 --- a/src/declarative/extra/qmlxmllistmodel.cpp +++ b/src/declarative/extra/qmlxmllistmodel.cpp @@ -346,7 +346,7 @@ void QmlXmlListModel::doSubquery(int index) const s.replace(QLatin1String(">"), QLatin1String(">")); s.replace(QLatin1String("&"), QLatin1String("&")); } - resultList << s; + resultList << s.trimmed(); //qDebug() << s; } b.seek(0); -- cgit v0.12 From ed07e08b5d5d3ce8a514e9a9974fe6e581f24d0d Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Fri, 1 May 2009 14:37:50 +1000 Subject: Tweak QML property syntax The syntax is now [default] property [ : ] where name is one of "int", "bool", "double", "real", "string", "color", "date", "var" or "variant" --- src/declarative/qml/parser/javascript.g | 119 +- src/declarative/qml/parser/javascriptast_p.h | 12 +- src/declarative/qml/parser/javascriptgrammar.cpp | 1301 +++++++++++----------- src/declarative/qml/parser/javascriptgrammar_p.h | 68 +- src/declarative/qml/parser/javascriptlexer.cpp | 9 + src/declarative/qml/parser/javascriptparser.cpp | 450 ++++---- src/declarative/qml/parser/javascriptparser_p.h | 4 +- src/declarative/qml/qmlscriptparser.cpp | 76 +- 8 files changed, 1099 insertions(+), 940 deletions(-) diff --git a/src/declarative/qml/parser/javascript.g b/src/declarative/qml/parser/javascript.g index 59ab529..a318ccb 100644 --- a/src/declarative/qml/parser/javascript.g +++ b/src/declarative/qml/parser/javascript.g @@ -45,7 +45,7 @@ %parser JavaScriptGrammar %decl javascriptparser_p.h %impl javascriptparser.cpp -%expect 2 +%expect 8 %expect-rr 1 %token T_AND "&" T_AND_AND "&&" T_AND_EQ "&=" @@ -70,6 +70,7 @@ %token T_REMAINDER_EQ "%=" T_RETURN "return" T_RPAREN ")" %token T_SEMICOLON ";" T_AUTOMATIC_SEMICOLON T_STAR "*" %token T_STAR_EQ "*=" T_STRING_LITERAL "string literal" +%token T_PROPERTY "property" T_SIGNAL "signal" %token T_SWITCH "switch" T_THIS "this" T_THROW "throw" %token T_TILDE "~" T_TRY "try" T_TYPEOF "typeof" %token T_VAR "var" T_VOID "void" T_WHILE "while" @@ -645,50 +646,64 @@ case $rule_number: { } break; ./ -UiObjectMember: T_PUBLIC T_IDENTIFIER T_IDENTIFIER ; +UiPropertyType: T_VAR ; +/. +case $rule_number: +./ +UiPropertyType: T_RESERVED_WORD ; +/. +case $rule_number: { + sym(1).sval = driver->intern(lexer->characterBuffer(), lexer->characterCount()); + break; +} +./ + +UiPropertyType: T_IDENTIFIER ; + +UiObjectMember: T_PROPERTY UiPropertyType T_IDENTIFIER ; /. case $rule_number: { AST::UiPublicMember *node = makeAstNode (driver->nodePool(), sym(2).sval, sym(3).sval); - node->publicToken = loc(1); - node->attributeTypeToken = loc(2); + node->propertyToken = loc(1); + node->typeToken = loc(2); node->identifierToken = loc(3); sym(1).Node = node; } break; ./ -UiObjectMember: T_PUBLIC T_DEFAULT T_IDENTIFIER T_IDENTIFIER ; +UiObjectMember: T_DEFAULT T_PROPERTY UiPropertyType T_IDENTIFIER ; /. case $rule_number: { AST::UiPublicMember *node = makeAstNode (driver->nodePool(), sym(3).sval, sym(4).sval); node->isDefaultMember = true; - node->publicToken = loc(1); - node->attributeTypeToken = loc(3); + node->propertyToken = loc(1); + node->typeToken = loc(3); node->identifierToken = loc(4); sym(1).Node = node; } break; ./ -UiObjectMember: T_PUBLIC T_IDENTIFIER T_IDENTIFIER T_COLON Expression ; +UiObjectMember: T_PROPERTY UiPropertyType T_IDENTIFIER T_COLON Expression ; /. case $rule_number: { AST::UiPublicMember *node = makeAstNode (driver->nodePool(), sym(2).sval, sym(3).sval, sym(5).Expression); - node->publicToken = loc(1); - node->attributeTypeToken = loc(2); + node->propertyToken = loc(1); + node->typeToken = loc(2); node->identifierToken = loc(3); node->colonToken = loc(4); sym(1).Node = node; } break; ./ -UiObjectMember: T_PUBLIC T_DEFAULT T_IDENTIFIER T_IDENTIFIER T_COLON Expression ; +UiObjectMember: T_DEFAULT T_PROPERTY UiPropertyType T_IDENTIFIER T_COLON Expression ; /. case $rule_number: { AST::UiPublicMember *node = makeAstNode (driver->nodePool(), sym(3).sval, sym(4).sval, sym(6).Expression); node->isDefaultMember = true; - node->publicToken = loc(1); - node->attributeTypeToken = loc(3); + node->propertyToken = loc(1); + node->typeToken = loc(3); node->identifierToken = loc(4); node->colonToken = loc(5); sym(1).Node = node; @@ -723,7 +738,20 @@ case $rule_number: } break; ./ -UiQualifiedId: T_IDENTIFIER ; +JsIdentifier: T_IDENTIFIER; +JsIdentifier: T_PROPERTY ; +/. +case $rule_number: +./ +JsIdentifier: T_SIGNAL ; +/. +case $rule_number: { + sym(1).sval = driver->intern(lexer->characterBuffer(), lexer->characterCount()); + break; +} +./ + +UiQualifiedId: JsIdentifier ; /. case $rule_number: { AST::UiQualifiedId *node = makeAstNode (driver->nodePool(), sym(1).sval); @@ -732,7 +760,7 @@ case $rule_number: { } break; ./ -UiQualifiedId: UiQualifiedId T_DOT T_IDENTIFIER ; +UiQualifiedId: UiQualifiedId T_DOT JsIdentifier ; /. case $rule_number: { AST::UiQualifiedId *node = makeAstNode (driver->nodePool(), sym(1).UiQualifiedId, sym(3).sval); @@ -745,6 +773,7 @@ case $rule_number: { -------------------------------------------------------------------------------------------------------- -- Expressions -------------------------------------------------------------------------------------------------------- + PrimaryExpression: T_THIS ; /. case $rule_number: { @@ -754,7 +783,7 @@ case $rule_number: { } break; ./ -PrimaryExpression: T_IDENTIFIER ; +PrimaryExpression: JsIdentifier ; /. case $rule_number: { AST::IdentifierExpression *node = makeAstNode (driver->nodePool(), sym(1).sval); @@ -996,6 +1025,16 @@ case $rule_number: { } break; ./ +PropertyName: T_SIGNAL ; +PropertyName: T_PROPERTY ; +/. +case $rule_number: { + AST::IdentifierPropertyName *node = makeAstNode (driver->nodePool(), driver->intern(lexer->characterBuffer(), lexer->characterCount())); + node->propertyNameToken = loc(1); + sym(1).Node = node; +} break; +./ + PropertyName: T_STRING_LITERAL ; /. case $rule_number: { @@ -1151,7 +1190,7 @@ case $rule_number: } break; ./ -PropertyIdentifier: T_IDENTIFIER ; +PropertyIdentifier: JsIdentifier ; PropertyIdentifier: ReservedIdentifier ; MemberExpression: PrimaryExpression ; @@ -2064,7 +2103,7 @@ case $rule_number: { } break; ./ -VariableDeclaration: T_IDENTIFIER InitialiserOpt ; +VariableDeclaration: JsIdentifier InitialiserOpt ; /. case $rule_number: { AST::VariableDeclaration *node = makeAstNode (driver->nodePool(), sym(1).sval, sym(2).Expression); @@ -2073,7 +2112,7 @@ case $rule_number: { } break; ./ -VariableDeclarationNotIn: T_IDENTIFIER InitialiserNotInOpt ; +VariableDeclarationNotIn: JsIdentifier InitialiserNotInOpt ; /. case $rule_number: { AST::VariableDeclaration *node = makeAstNode (driver->nodePool(), sym(1).sval, sym(2).Expression); @@ -2252,8 +2291,8 @@ case $rule_number: { } break; ./ -ContinueStatement: T_CONTINUE T_IDENTIFIER T_AUTOMATIC_SEMICOLON ; -- automatic semicolon -ContinueStatement: T_CONTINUE T_IDENTIFIER T_SEMICOLON ; +ContinueStatement: T_CONTINUE JsIdentifier T_AUTOMATIC_SEMICOLON ; -- automatic semicolon +ContinueStatement: T_CONTINUE JsIdentifier T_SEMICOLON ; /. case $rule_number: { AST::ContinueStatement *node = makeAstNode (driver->nodePool(), sym(2).sval); @@ -2275,8 +2314,8 @@ case $rule_number: { } break; ./ -BreakStatement: T_BREAK T_IDENTIFIER T_AUTOMATIC_SEMICOLON ; -- automatic semicolon -BreakStatement: T_BREAK T_IDENTIFIER T_SEMICOLON ; +BreakStatement: T_BREAK JsIdentifier T_AUTOMATIC_SEMICOLON ; -- automatic semicolon +BreakStatement: T_BREAK JsIdentifier T_SEMICOLON ; /. case $rule_number: { AST::BreakStatement *node = makeAstNode (driver->nodePool(), sym(2).sval); @@ -2388,6 +2427,17 @@ case $rule_number: { } break; ./ +LabelledStatement: T_SIGNAL T_COLON Statement ; +LabelledStatement: T_PROPERTY T_COLON Statement ; +/. +case $rule_number: { + AST::LabelledStatement *node = makeAstNode (driver->nodePool(), driver->intern(lexer->characterBuffer(), lexer->characterCount()), sym(3).Statement); + node->identifierToken = loc(1); + node->colonToken = loc(2); + sym(1).Node = node; +} break; +./ + LabelledStatement: T_IDENTIFIER T_COLON Statement ; /. case $rule_number: { @@ -2436,7 +2486,7 @@ case $rule_number: { } break; ./ -Catch: T_CATCH T_LPAREN T_IDENTIFIER T_RPAREN Block ; +Catch: T_CATCH T_LPAREN JsIdentifier T_RPAREN Block ; /. case $rule_number: { AST::Catch *node = makeAstNode (driver->nodePool(), sym(3).sval, sym(5).Block); @@ -2468,6 +2518,21 @@ case $rule_number: { } break; ./ +FunctionDeclaration: T_FUNCTION T_SIGNAL T_LPAREN FormalParameterListOpt T_RPAREN T_LBRACE FunctionBodyOpt T_RBRACE ; +FunctionDeclaration: T_FUNCTION T_PROPERTY T_LPAREN FormalParameterListOpt T_RPAREN T_LBRACE FunctionBodyOpt T_RBRACE ; +/. +case $rule_number: { + AST::FunctionDeclaration *node = makeAstNode (driver->nodePool(), driver->intern(lexer->characterBuffer(), lexer->characterCount()), sym(4).FormalParameterList, sym(7).FunctionBody); + node->functionToken = loc(1); + node->identifierToken = loc(2); + node->lparenToken = loc(3); + node->rparenToken = loc(5); + node->lbraceToken = loc(6); + node->rbraceToken = loc(8); + sym(1).Node = node; +} break; +./ + FunctionDeclaration: T_FUNCTION T_IDENTIFIER T_LPAREN FormalParameterListOpt T_RPAREN T_LBRACE FunctionBodyOpt T_RBRACE ; /. case $rule_number: { @@ -2497,7 +2562,7 @@ case $rule_number: { } break; ./ -FormalParameterList: T_IDENTIFIER ; +FormalParameterList: JsIdentifier ; /. case $rule_number: { AST::FormalParameterList *node = makeAstNode (driver->nodePool(), sym(1).sval); @@ -2506,7 +2571,7 @@ case $rule_number: { } break; ./ -FormalParameterList: FormalParameterList T_COMMA T_IDENTIFIER ; +FormalParameterList: FormalParameterList T_COMMA JsIdentifier ; /. case $rule_number: { AST::FormalParameterList *node = makeAstNode (driver->nodePool(), sym(1).FormalParameterList, sym(3).sval); @@ -2589,7 +2654,7 @@ case $rule_number: { } break; ./ -IdentifierOpt: T_IDENTIFIER ; +IdentifierOpt: JsIdentifier ; PropertyNameAndValueListOpt: ; /. diff --git a/src/declarative/qml/parser/javascriptast_p.h b/src/declarative/qml/parser/javascriptast_p.h index 4aa89c9..f32a48c 100644 --- a/src/declarative/qml/parser/javascriptast_p.h +++ b/src/declarative/qml/parser/javascriptast_p.h @@ -2336,7 +2336,7 @@ public: { kind = K; } virtual SourceLocation firstSourceLocation() const - { return publicToken; } + { return propertyToken; } virtual SourceLocation lastSourceLocation() const { @@ -2346,9 +2346,9 @@ public: return colonToken; else if (identifierToken.isValid()) return identifierToken; - else if (attributeTypeToken.isValid()) - return attributeTypeToken; - return publicToken; + else if (typeToken.isValid()) + return typeToken; + return propertyToken; } virtual void accept0(Visitor *visitor); @@ -2358,8 +2358,8 @@ public: JavaScriptNameIdImpl *name; ExpressionNode *expression; bool isDefaultMember; - SourceLocation publicToken; - SourceLocation attributeTypeToken; + SourceLocation propertyToken; + SourceLocation typeToken; SourceLocation identifierToken; SourceLocation colonToken; }; diff --git a/src/declarative/qml/parser/javascriptgrammar.cpp b/src/declarative/qml/parser/javascriptgrammar.cpp index 9fceeb8..3fac1ed 100644 --- a/src/declarative/qml/parser/javascriptgrammar.cpp +++ b/src/declarative/qml/parser/javascriptgrammar.cpp @@ -49,627 +49,645 @@ const char *const JavaScriptGrammar::spell [] = { "if", "in", "instanceof", "{", "[", "<=", "(", "<", "<<", "<<=", "-", "-=", "--", "new", "!", "!=", "!==", "numeric literal", "|", "|=", "||", "+", "+=", "++", "?", "}", "]", "%", "%=", "return", - ")", ";", 0, "*", "*=", "string literal", "switch", "this", "throw", "~", - "try", "typeof", "var", "void", "while", "with", "^", "^=", "null", "true", - "false", "const", "debugger", "reserved word", "multiline string literal", "public", "import", 0, 0}; + ")", ";", 0, "*", "*=", "string literal", "property", "signal", "switch", "this", + "throw", "~", "try", "typeof", "var", "void", "while", "with", "^", "^=", + "null", "true", "false", "const", "debugger", "reserved word", "multiline string literal", "public", "import", 0, + 0}; const int JavaScriptGrammar::lhs [] = { - 89, 90, 90, 93, 93, 94, 94, 92, 91, 91, - 96, 96, 98, 98, 97, 95, 97, 95, 97, 95, - 100, 101, 101, 95, 97, 95, 95, 95, 95, 95, - 95, 95, 99, 99, 99, 99, 106, 106, 106, 106, - 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, - 106, 108, 108, 112, 112, 107, 107, 110, 110, 113, - 113, 113, 113, 114, 114, 114, 114, 114, 114, 114, - 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, - 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, - 114, 114, 114, 114, 115, 115, 116, 116, 116, 116, - 116, 119, 119, 120, 120, 120, 120, 118, 118, 121, - 121, 122, 122, 123, 123, 123, 124, 124, 124, 124, - 124, 124, 124, 124, 124, 124, 125, 125, 125, 125, - 126, 126, 126, 127, 127, 127, 127, 128, 128, 128, - 128, 128, 128, 128, 129, 129, 129, 129, 129, 129, - 130, 130, 130, 130, 130, 131, 131, 131, 131, 131, - 132, 132, 133, 133, 134, 134, 135, 135, 136, 136, + 91, 92, 92, 95, 95, 96, 96, 94, 93, 93, + 98, 98, 100, 100, 99, 97, 99, 97, 99, 97, + 102, 103, 103, 97, 99, 97, 105, 105, 105, 97, + 97, 97, 97, 97, 97, 101, 101, 109, 109, 109, + 101, 101, 110, 110, 110, 110, 110, 110, 110, 110, + 110, 110, 110, 110, 110, 110, 110, 112, 112, 116, + 116, 111, 111, 114, 114, 117, 117, 117, 117, 117, + 117, 118, 118, 118, 118, 118, 118, 118, 118, 118, + 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, + 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, + 118, 118, 119, 119, 120, 120, 120, 120, 120, 123, + 123, 124, 124, 124, 124, 122, 122, 125, 125, 126, + 126, 127, 127, 127, 128, 128, 128, 128, 128, 128, + 128, 128, 128, 128, 129, 129, 129, 129, 130, 130, + 130, 131, 131, 131, 131, 132, 132, 132, 132, 132, + 132, 132, 133, 133, 133, 133, 133, 133, 134, 134, + 134, 134, 134, 135, 135, 135, 135, 135, 136, 136, 137, 137, 138, 138, 139, 139, 140, 140, 141, 141, - 142, 142, 143, 143, 111, 111, 144, 144, 145, 145, - 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, - 103, 103, 146, 146, 147, 147, 148, 148, 102, 102, - 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, - 102, 102, 102, 149, 164, 164, 163, 163, 105, 105, - 165, 165, 166, 166, 168, 168, 167, 169, 172, 170, - 170, 173, 171, 171, 150, 151, 151, 152, 152, 153, - 153, 153, 153, 153, 153, 153, 154, 154, 154, 154, - 155, 155, 155, 155, 156, 156, 157, 159, 174, 174, - 177, 177, 175, 175, 178, 176, 158, 160, 160, 161, - 161, 161, 179, 180, 162, 162, 104, 117, 184, 184, - 181, 181, 182, 182, 185, 186, 186, 187, 187, 183, - 183, 109, 109, 188}; + 142, 142, 143, 143, 144, 144, 145, 145, 146, 146, + 147, 147, 115, 115, 148, 148, 149, 149, 149, 149, + 149, 149, 149, 149, 149, 149, 149, 149, 106, 106, + 150, 150, 151, 151, 152, 152, 104, 104, 104, 104, + 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, + 104, 153, 168, 168, 167, 167, 108, 108, 169, 169, + 170, 170, 172, 172, 171, 173, 176, 174, 174, 177, + 175, 175, 154, 155, 155, 156, 156, 157, 157, 157, + 157, 157, 157, 157, 158, 158, 158, 158, 159, 159, + 159, 159, 160, 160, 161, 163, 178, 178, 181, 181, + 179, 179, 182, 180, 162, 162, 162, 164, 164, 165, + 165, 165, 183, 184, 166, 166, 107, 107, 107, 121, + 188, 188, 185, 185, 186, 186, 189, 190, 190, 191, + 191, 187, 187, 113, 113, 192}; const int JavaScriptGrammar:: rhs[] = { 2, 1, 1, 1, 2, 3, 3, 0, 1, 2, 1, 3, 2, 3, 4, 4, 2, 2, 5, 5, - 1, 2, 2, 3, 3, 3, 3, 4, 5, 6, - 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 3, 3, 5, 3, 4, - 3, 2, 4, 1, 2, 0, 1, 3, 5, 1, + 1, 2, 2, 3, 3, 3, 1, 1, 1, 3, + 4, 5, 6, 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, 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, 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, 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, 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, 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, 3, 1, 2, 0, 1, 3, 3, - 1, 1, 1, 3, 1, 3, 2, 2, 2, 0, - 1, 2, 0, 1, 1, 2, 2, 7, 5, 7, - 7, 5, 9, 10, 7, 8, 2, 2, 3, 3, - 2, 2, 3, 3, 3, 3, 5, 5, 3, 5, - 1, 2, 0, 1, 4, 3, 3, 3, 3, 3, - 3, 4, 5, 2, 2, 2, 8, 8, 1, 3, - 0, 1, 0, 1, 1, 1, 2, 1, 1, 0, - 1, 0, 1, 2}; + 1, 3, 1, 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, 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, 31, 231, 0, 35, 0, 33, 34, 232, 9, - 1, 0, 0, 32, 0, 291, 292, 0, 289, 0, - 290, 0, 293, 134, 201, 165, 173, 169, 209, 216, - 113, 185, 215, 223, 211, 161, 0, 212, 294, 0, - 299, 98, 213, 214, 219, 114, 177, 181, 102, 131, - 112, 117, 97, 151, 217, 138, 296, 295, 298, 220, - 0, 0, 0, 0, 44, 45, 0, 41, 0, 300, - 38, 0, 302, 56, 0, 0, 0, 0, 0, 39, - 42, 0, 0, 203, 245, 43, 0, 37, 0, 0, - 40, 0, 0, 0, 0, 0, 221, 222, 127, 210, - 218, 0, 0, 114, 133, 300, 38, 302, 116, 115, - 0, 0, 0, 129, 130, 128, 0, 301, 291, 0, - 0, 293, 0, 288, 0, 303, 0, 63, 64, 65, - 66, 91, 67, 92, 68, 69, 70, 71, 72, 73, - 74, 75, 60, 76, 77, 78, 79, 80, 62, 93, - 81, 61, 82, 83, 84, 85, 86, 87, 88, 89, - 90, 94, 0, 58, 0, 0, 50, 0, 59, 49, - 132, 0, 162, 0, 0, 0, 0, 152, 0, 0, - 0, 0, 0, 0, 142, 0, 0, 0, 136, 137, - 135, 140, 144, 143, 141, 139, 154, 153, 155, 0, - 170, 0, 166, 0, 0, 108, 107, 96, 95, 0, - 0, 106, 202, 109, 0, 110, 0, 111, 105, 246, - 247, 287, 0, 198, 191, 189, 196, 197, 195, 194, - 200, 193, 192, 190, 199, 186, 0, 174, 0, 0, - 178, 0, 0, 182, 0, 0, 108, 100, 0, 99, - 0, 104, 297, 261, 0, 262, 263, 264, 257, 0, - 258, 259, 260, 285, 286, 118, 0, 0, 0, 0, - 0, 250, 251, 207, 205, 167, 175, 171, 187, 163, - 208, 0, 114, 179, 183, 156, 145, 0, 0, 164, - 0, 0, 0, 0, 157, 0, 0, 0, 0, 0, - 149, 147, 150, 148, 146, 159, 158, 160, 0, 172, - 0, 168, 0, 206, 114, 0, 188, 203, 204, 0, - 203, 0, 0, 253, 0, 0, 0, 255, 0, 176, - 0, 0, 180, 0, 0, 184, 243, 0, 235, 244, - 238, 0, 242, 0, 203, 236, 0, 203, 0, 0, - 254, 0, 0, 0, 256, 301, 0, 277, 0, 0, - 0, 249, 0, 248, 225, 228, 0, 64, 91, 67, - 92, 69, 70, 41, 74, 75, 38, 76, 79, 39, - 42, 203, 43, 82, 37, 84, 40, 86, 87, 88, - 89, 90, 94, 226, 224, 102, 103, 108, 0, 101, - 0, 265, 266, 0, 0, 0, 268, 273, 271, 274, - 0, 0, 272, 273, 0, 269, 0, 270, 227, 276, - 0, 227, 275, 0, 278, 279, 0, 227, 280, 281, - 0, 0, 282, 0, 0, 0, 283, 284, 120, 119, - 0, 0, 0, 252, 0, 0, 0, 267, 0, 57, - 0, 54, 56, 47, 0, 53, 48, 55, 52, 46, - 0, 51, 124, 122, 126, 123, 121, 125, 0, 18, - 13, 0, 14, 10, 0, 0, 0, 28, 0, 30, - 27, 0, 29, 0, 0, 26, 38, 56, 21, 0, - 24, 16, 35, 0, 11, 0, 17, 0, 20, 12, - 0, 25, 38, 56, 15, 0, 19, 22, 23, 36, - 240, 233, 0, 241, 237, 0, 239, 229, 0, 230, - 234, 304}; + 5, 34, 41, 239, 0, 0, 38, 39, 36, 37, + 40, 240, 9, 1, 0, 0, 35, 0, 29, 28, + 27, 0, 31, 0, 142, 209, 173, 181, 177, 121, + 193, 169, 33, 106, 44, 122, 185, 189, 110, 139, + 120, 125, 105, 159, 146, 0, 50, 51, 47, 312, + 38, 314, 62, 0, 0, 0, 0, 0, 45, 48, + 0, 0, 39, 49, 43, 0, 46, 0, 0, 135, + 0, 0, 122, 141, 124, 123, 0, 0, 0, 137, + 138, 136, 140, 0, 170, 0, 0, 0, 0, 160, + 0, 0, 0, 0, 0, 0, 150, 0, 0, 0, + 144, 145, 143, 148, 152, 151, 149, 147, 162, 161, + 163, 0, 178, 0, 174, 0, 0, 116, 103, 115, + 104, 72, 73, 74, 99, 75, 100, 76, 77, 78, + 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, + 101, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 98, 102, 0, 0, 114, 210, 117, 0, 118, 0, + 119, 113, 0, 206, 199, 197, 204, 205, 203, 202, + 208, 201, 200, 198, 207, 194, 0, 182, 0, 0, + 186, 0, 0, 190, 0, 0, 116, 108, 0, 107, + 0, 112, 126, 0, 313, 303, 304, 0, 301, 0, + 302, 0, 305, 217, 224, 223, 231, 219, 0, 220, + 306, 0, 311, 221, 222, 227, 225, 308, 307, 310, + 228, 0, 0, 0, 0, 0, 312, 38, 0, 314, + 39, 211, 253, 40, 0, 0, 0, 0, 0, 229, + 230, 218, 226, 254, 255, 300, 309, 0, 269, 270, + 271, 272, 0, 265, 266, 267, 268, 295, 296, 0, + 0, 0, 0, 0, 258, 259, 215, 213, 175, 183, + 179, 195, 171, 216, 0, 122, 187, 191, 164, 153, + 0, 0, 172, 0, 0, 0, 0, 165, 0, 0, + 0, 0, 0, 157, 155, 158, 156, 154, 167, 166, + 168, 0, 180, 0, 176, 0, 214, 122, 0, 196, + 211, 212, 0, 211, 0, 0, 261, 0, 0, 0, + 263, 0, 184, 0, 0, 188, 0, 0, 192, 251, + 0, 243, 252, 246, 0, 250, 0, 211, 244, 0, + 211, 0, 0, 262, 0, 0, 0, 264, 38, 39, + 40, 303, 0, 0, 305, 0, 299, 303, 0, 0, + 305, 0, 298, 303, 0, 0, 305, 0, 297, 0, + 287, 0, 0, 0, 257, 0, 256, 0, 315, 0, + 71, 233, 236, 0, 72, 239, 75, 100, 77, 78, + 47, 82, 83, 38, 84, 87, 45, 48, 39, 211, + 40, 49, 90, 43, 92, 46, 94, 95, 240, 97, + 98, 102, 0, 64, 0, 0, 66, 70, 68, 56, + 67, 69, 0, 65, 55, 234, 232, 110, 111, 116, + 0, 109, 0, 286, 0, 273, 274, 0, 285, 0, + 0, 0, 276, 281, 279, 282, 0, 0, 280, 281, + 0, 277, 0, 278, 235, 284, 0, 235, 283, 0, + 288, 289, 0, 235, 290, 291, 0, 0, 292, 0, + 0, 0, 293, 294, 128, 127, 0, 0, 0, 260, + 0, 0, 0, 275, 0, 63, 0, 60, 62, 53, + 0, 59, 54, 61, 58, 52, 0, 57, 132, 130, + 134, 131, 129, 133, 0, 0, 0, 0, 18, 13, + 0, 14, 10, 0, 30, 0, 32, 0, 0, 26, + 38, 62, 21, 0, 24, 16, 38, 0, 11, 0, + 17, 0, 20, 12, 0, 25, 38, 62, 15, 0, + 19, 22, 23, 42, 248, 241, 0, 249, 245, 0, + 247, 237, 0, 238, 242, 316}; const int JavaScriptGrammar::goto_default [] = { - 6, 5, 20, 1, 4, 3, 19, 503, 504, 479, - 21, 499, 500, 374, 46, 11, 109, 62, 460, 458, - 136, 135, 34, 459, 134, 137, 216, 58, 51, 224, - 60, 40, 223, 55, 61, 108, 59, 33, 65, 63, - 295, 45, 289, 35, 285, 37, 287, 36, 286, 56, - 293, 57, 294, 41, 288, 284, 325, 410, 290, 291, - 38, 44, 47, 52, 53, 42, 39, 64, 110, 54, - 69, 106, 107, 43, 376, 375, 22, 522, 521, 347, - 348, 524, 350, 523, 349, 416, 420, 423, 419, 418, - 438, 439, 27, 49, 126, 26, 48, 67, 66, 0}; + 6, 5, 23, 1, 4, 3, 22, 537, 538, 518, + 24, 533, 534, 229, 523, 218, 222, 251, 44, 52, + 496, 494, 389, 388, 35, 495, 387, 390, 129, 48, + 43, 167, 50, 39, 166, 45, 51, 79, 49, 34, + 54, 53, 288, 41, 282, 36, 278, 38, 280, 37, + 279, 46, 286, 47, 287, 40, 281, 277, 318, 444, + 283, 284, 213, 217, 219, 223, 224, 215, 214, 226, + 252, 225, 230, 249, 250, 216, 393, 392, 25, 556, + 555, 340, 341, 558, 343, 557, 342, 452, 456, 459, + 455, 454, 474, 475, 207, 221, 203, 206, 220, 228, + 227, 0}; const int JavaScriptGrammar::action_index [] = { - 67, -89, 30, -89, 67, 346, 173, 79, -89, -89, - -89, -89, -89, 32, 33, 90, -89, -89, -89, -89, - 336, 106, 45, -89, 55, 65, 85, 66, -89, 70, - -89, 59, 1539, 111, -89, 11, -34, -17, -89, -89, - 188, -89, -89, -89, -89, 269, 150, -89, -89, -51, - -89, -89, -89, -89, -89, 549, 41, 146, 247, 158, - -89, -89, -89, 329, -89, 311, -89, 1539, -89, -89, - 196, 191, 118, 713, -89, -89, 1454, -89, -23, 16, - 83, 61, 1709, 78, 713, 713, 713, 452, 713, -89, - -89, 713, 713, 713, -89, -89, 47, -89, 713, 713, - -89, 37, 713, 713, 73, 53, -89, -89, -89, -89, - -89, 713, 713, 76, 193, 46, -89, 1199, -89, -89, - 713, 713, 713, -89, -89, -89, -25, -89, -13, -52, - -9, 1539, 60, -89, 77, 80, 17, -89, -89, -89, - -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, - -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, - -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, - -89, -89, 713, -89, 1284, 21, -89, 713, -89, -89, - 211, 713, 267, 713, 713, 713, 713, 319, 713, 713, - 713, 713, 713, 713, 201, 713, 713, 713, 96, 91, - 110, 189, 242, 246, 238, 234, 359, 339, 349, 713, - 63, 713, 68, 1114, 713, 713, -89, -89, -89, 104, - 713, -89, -89, 69, 18, -89, 713, -89, -89, -89, - -89, -89, 713, -89, -89, -89, -89, -89, -89, -89, - -89, -89, -89, -89, -89, -89, 713, 48, 713, 713, - 74, 64, 713, -89, 1114, 713, 713, -89, 116, -89, - 2, -89, -89, -89, 87, -89, -89, -89, -89, 113, - -89, -89, -89, -89, -89, -89, 56, 62, 713, 103, - 130, -89, -89, 791, -89, 84, -38, -67, -89, 260, - 10, -41, 635, 20, 117, 302, 239, -10, 713, 271, - 713, 713, 713, 713, 272, 713, 713, 713, 713, 713, - 208, 222, 205, 213, 217, 287, 377, 377, 713, -73, - 713, 84, 713, -89, 463, 713, -89, 713, 42, -15, - 713, -16, 1454, -89, 713, 144, 1454, -89, 713, 6, - 713, 713, 54, 51, 713, -89, 38, 95, 26, -89, - -89, 713, -89, -2, 713, -89, -31, 713, -37, 1454, - -89, 713, 99, 1454, -89, 4, 1454, -89, 713, 97, - 1454, 22, 1454, -89, -89, 1454, 49, 140, 5, 147, - 82, 713, 1454, 29, 1, 81, 34, 3, 538, 28, - 25, 873, 19, -3, 24, 713, 35, 14, 713, 23, - 713, 15, 27, -89, -89, 163, -89, 713, -7, -89, - 128, -89, -89, 713, 138, -8, -89, 44, -89, 43, - 127, 713, -89, 12, -1, -89, -50, -89, 1454, -89, - 115, 1454, -89, 175, -89, -89, 108, 1454, -18, -89, - -29, -4, -89, -28, -60, -4, -89, -89, -89, -89, - 713, 124, 1454, -89, 713, 125, 1454, -89, 112, 13, - 1029, -89, 7, -89, 951, -89, -89, -89, -89, -89, - 126, -89, -89, -89, -89, -89, -89, -89, 356, -89, - -89, 375, -89, -89, 39, 31, 36, 57, 713, 71, - 75, 713, 72, 1624, 52, -89, 131, 274, -89, 133, - -89, -89, 40, 137, -89, 101, -89, 148, -89, -89, - 1369, -89, 94, 262, -89, 98, -89, -89, -89, -89, - 50, -89, 157, -89, -89, 713, -89, -89, 58, -89, - -89, -89, + -12, -91, 60, -91, 63, 378, 95, 113, -91, -91, + -91, -91, -91, -91, 73, 162, 72, 166, -91, -91, + -91, -91, -91, 420, 131, 160, -91, 161, -91, -91, + -91, 44, 75, 700, 129, -91, 87, 52, 49, 182, + -91, 300, 71, -91, -91, 541, 76, 91, 259, 227, + -91, -91, -91, 360, 317, 700, -91, -91, -91, 170, + -91, 1198, 66, 700, 700, 700, 620, 700, -91, -91, + 700, 700, -91, -91, -91, 700, -91, 700, 700, -91, + 700, 700, 106, 175, -91, -91, 700, 700, 700, -91, + -91, -91, 210, 700, 283, 700, 700, 700, 700, 453, + 700, 700, 700, 700, 700, 700, 222, 700, 700, 700, + 96, 83, 82, 244, 317, 176, 241, 238, 453, 453, + 379, 700, 74, 700, 93, 1111, 700, 700, -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, -91, 153, 700, -91, -91, 84, 69, -91, 700, + -91, -91, 700, -91, -91, -91, -91, -91, -91, -91, + -91, -91, -91, -91, -91, -91, 700, 67, 700, 700, + 64, 65, 700, -91, 1111, 700, 700, -91, 112, -91, + 42, -91, -91, 41, -91, 167, 62, 36, -91, 265, + -91, 57, 1546, -91, -91, -91, -91, -91, 216, -91, + -91, 43, -91, -91, -91, -91, -91, -91, 1546, -91, + -91, 286, 320, 92, 1459, 48, 256, 68, 33, 1720, + 80, 700, -91, 86, 77, 700, 50, 53, 61, -91, + -91, -91, -91, -91, -91, -91, -91, 105, -91, -91, + -91, -91, 121, -91, -91, -91, -91, -91, -91, 56, + 55, 700, 165, 124, -91, -91, 780, -91, 70, 32, + 3, -91, 292, 59, 45, 521, 168, 127, 385, 317, + 191, 700, 294, 700, 700, 700, 700, 385, 700, 700, + 700, 700, 700, 223, 183, 179, 237, 245, 385, 385, + 385, 700, -47, 700, 16, 700, -91, 541, 700, -91, + 700, 11, -43, 700, -44, 1459, -91, 700, 118, 1459, + -91, 700, -35, 700, 700, 19, 15, 700, -91, 10, + 123, -1, -91, -91, 700, -91, 225, 700, -91, -46, + 700, -59, 1459, -91, 700, 171, 1459, -91, -32, -26, + -27, 260, -37, 24, 1546, 30, -91, 267, 8, 31, + 1546, 0, -91, 214, -8, 18, 1546, -18, -91, 1459, + -91, 700, 103, 1459, 22, 1459, -91, 28, 25, -23, + -91, -91, 1459, -15, 312, 47, 301, 94, 700, 1459, + 38, 5, 269, 29, 27, 620, 51, 58, 54, 944, + 46, 1, -29, 4, 700, 79, -9, 700, 21, 700, + -10, -7, 700, -91, 1285, 7, -91, -91, -91, -91, + -91, -91, 700, -91, -91, -91, -91, 177, -91, 700, + -40, -91, 1459, -91, 88, -91, -91, 1459, -91, 700, + 102, -21, -91, 20, -91, -3, 89, 700, -91, -5, + -4, -91, -50, -91, 1459, -91, 109, 1459, -91, 194, + -91, -91, 101, 1459, 40, -91, 14, 23, -91, 186, + 2, 26, -91, -91, -91, -91, 700, 100, 1459, -91, + 700, 104, 1459, -91, 116, 35, 1024, -91, 34, -91, + 860, -91, -91, -91, -91, -91, 111, -91, -91, -91, + -91, -91, -91, -91, -2, 13, 12, 443, -91, -91, + 440, -91, -91, 17, 37, 700, 39, 1633, 258, -91, + 97, 369, -91, 81, -91, -91, 6, 251, -91, 150, + -91, 291, -91, -91, 1372, -91, 107, 346, -91, 120, + -91, -91, -91, -91, -11, -91, 180, -91, -91, 700, + -91, -91, 178, -91, -91, -91, - -100, -100, -100, -100, 12, 4, -100, -100, -100, -100, - -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, - 59, -100, -100, -100, -100, -100, -100, -100, -100, -100, - -100, -100, 117, -100, -100, -100, -100, -100, -100, -100, - -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, - -100, -100, -100, -100, -100, -54, -100, -100, -100, -100, - -100, -100, -100, -100, -100, -100, -100, 184, -100, -100, - -100, -100, -100, 116, -100, -100, 47, -100, -100, -100, - -100, -100, -100, -100, 39, 141, 89, 65, 48, -100, - -100, 51, 52, 38, -100, -100, -100, -100, 40, 83, - -100, -16, 61, 66, -100, -100, -100, -100, -100, -100, - -100, 44, 57, -100, -100, -100, -100, -100, -100, -100, - 112, 109, 133, -100, -100, -100, -100, -100, -61, -100, - -100, 193, -100, -100, -100, -100, -100, -100, -100, -100, - -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, - -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, - -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, - -100, -100, -13, -100, -18, -100, -100, -7, -100, -100, - -100, 121, -100, 113, 104, 90, 92, -100, 123, 103, - 101, 102, 95, 137, -100, 145, 132, 126, -100, -100, - -100, -100, -100, -100, -100, -100, -100, -100, -100, 58, - -100, 84, -100, 11, 7, 3, -100, -100, -100, -100, - 6, -100, -100, -100, -100, -100, 10, -100, -100, -100, - -100, -100, 5, -100, -100, -100, -100, -100, -100, -100, - -100, -100, -100, -100, -100, -100, 41, -100, 56, -3, - -100, -100, 0, -100, 147, 64, 138, -100, -100, -100, - -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, - -100, -100, -100, -100, -100, -100, -100, -100, 2, -100, - -100, -100, -100, 115, -100, -100, -100, -100, -100, -100, - -100, -100, -100, -100, -100, -100, -100, -100, 187, -100, - 154, 195, 183, 198, -100, 33, 73, 82, 71, 75, - -100, -100, -100, -100, -100, -100, -100, -100, 165, -100, - 146, -100, 150, -100, -100, 177, -100, 50, -100, -100, - 53, -100, 22, -100, 9, -100, 45, -100, 171, -100, - 189, 169, -100, -100, 163, -100, -100, -100, -100, -100, - -100, 162, -100, -68, 136, -100, -100, 124, -100, -2, - -100, -4, -100, -5, -100, -100, 46, -100, 43, -100, - 35, -100, 34, -100, -100, 42, -100, -100, -100, -100, - -100, 122, 30, -100, -100, -100, -100, -100, 70, -100, - -100, 49, -100, -100, -100, 36, -100, -15, 86, -100, - 79, -100, -100, -100, -100, -100, -100, 142, -100, -100, - -100, -100, -100, 37, -100, -100, -100, -100, -100, -40, - -100, 32, -100, -44, -100, -100, -100, -100, -33, -100, - -100, -12, -100, -100, -100, -100, -100, -100, -35, -100, - -100, -36, -100, -100, -100, -53, -100, -100, -100, -100, - -1, -100, 1, -100, -10, -100, -8, -100, -100, -100, - -19, -100, -17, -100, -22, -100, -100, -100, -100, -100, - -100, -100, -100, -100, -100, -100, -100, -100, 175, -100, - -100, 236, -100, -100, -100, -100, -100, -100, 19, -100, - -100, 15, -100, 21, -100, -100, 28, 29, -100, -100, - -100, -100, 31, -100, -100, -100, -100, 60, -100, -100, - 25, -100, 17, 62, -100, -100, -100, -100, -100, -100, - -100, -100, -100, -100, -100, 8, -100, -100, -60, -100, - -100, -100}; + -102, -102, -102, -102, 93, 197, -102, -102, -102, -102, + -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, + -102, -102, -102, 340, -102, -1, -102, 0, -102, -102, + -102, -102, -102, -2, -102, -102, -102, -102, -102, -102, + -102, -102, -102, -102, -102, -40, -102, -102, -102, -102, + -102, -102, -102, -102, -102, 163, -102, -102, -102, 2, + -102, -102, -102, 15, 146, 149, 170, 155, -102, -102, + 101, 138, -102, -102, -102, 79, -102, 160, 104, -102, + 123, 131, -102, -102, -102, -102, 108, 118, 114, -102, + -102, -102, -102, 105, -102, 115, 119, 130, 129, -102, + 122, 107, 91, 83, 94, 97, -102, 82, 154, 152, + -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, + -102, 133, -102, 132, -102, 244, 44, 37, -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, 16, -102, -102, -102, -102, -102, 22, + -102, -102, 17, -102, -102, -102, -102, -102, -102, -102, + -102, -102, -102, -102, -102, -102, 73, -102, 74, 46, + -102, -102, 48, -102, 214, 49, 80, -102, -102, -102, + -102, -102, -102, -102, -102, 50, -102, -102, -102, 55, + -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, + -102, -102, -102, -102, -102, -102, -102, -102, -43, -102, + -102, 58, 21, -102, 18, -102, 56, -102, -102, 54, + -102, 63, -102, -102, -102, 51, 7, -102, -102, -102, + -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, + -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, + -102, 60, -102, -102, -102, -102, 59, -102, -102, -102, + -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, + 61, 220, -102, 185, 203, 184, 195, -102, 72, 52, + 70, 62, 66, -102, -102, -102, -102, -102, -102, -102, + -102, 217, -102, 182, -102, 196, -102, -102, 199, -102, + 69, -102, -102, 71, -102, 31, -102, 28, -102, 29, + -102, 168, -102, 169, 176, -102, -102, 166, -102, -102, + -102, -102, -102, -102, 172, -102, 77, 68, -102, -102, + 65, -102, 43, -102, 45, -102, 38, -102, -102, -102, + -102, 78, -102, -102, -48, -102, -102, 85, -102, -102, + -60, -102, -102, 102, -102, -102, -59, -102, -102, 36, + -102, 33, -102, 40, -102, 42, -102, -102, -102, -102, + -102, -102, 41, -102, 34, -102, 32, -102, 139, 20, + -102, -102, 19, -102, -102, 153, -102, -102, -102, 23, + -102, -102, -102, -102, 30, -102, -28, 160, -102, 98, + -102, -102, 53, -102, 39, -102, -102, -102, -102, -102, + -102, -102, 47, -102, -102, -102, -102, -102, -102, 57, + -102, -102, -6, -102, -102, -102, -102, -3, -102, -10, + -102, -102, -102, -102, -102, -91, -102, -4, -102, -87, + -102, -102, -102, -102, 76, -102, -102, 87, -102, -102, + -102, -102, -102, 13, -66, -102, -102, -33, -102, 14, + -102, -47, -102, -102, -102, -102, 6, -102, 11, -102, + 1, -102, 9, -102, -102, -102, -15, -102, -12, -102, + 4, -102, -102, -102, -102, -102, -102, -102, -102, -102, + -102, -102, -102, -102, -102, -102, -102, 257, -102, -102, + 340, -102, -102, -102, -102, -13, -102, 12, 5, -102, + 3, 75, -102, -102, -102, -102, 10, -102, -102, -102, + -102, 236, -102, -102, -7, -102, -5, 240, -102, -102, + -102, -102, -102, -102, -102, -102, -102, -102, -102, -21, + -102, -102, 64, -102, -102, -102}; const int JavaScriptGrammar::action_info [] = { - 445, 444, 441, 320, 231, 427, 428, 443, 130, 320, - 318, 128, 181, 283, 209, 461, 28, 421, 322, 346, - 327, 467, 338, 359, 131, 417, -61, 346, 177, 437, - 357, -83, -62, 413, -231, -80, -72, 283, 372, 368, - 25, -60, -85, 246, 332, 365, 330, 437, 421, 421, - 220, 450, -232, 409, 318, 351, 338, 361, 344, 211, - 490, 24, 261, 454, 488, 487, 478, 525, 486, 181, - 437, 252, 179, 478, 520, 127, 246, 226, 228, 220, - 220, 519, 491, 413, 172, 298, 461, 520, 174, 454, - 366, 25, 32, 29, 28, 7, 209, 368, 278, 30, - 484, 366, 0, 353, 404, 220, 507, 220, 510, 450, - 127, 220, 220, 493, 440, 133, 494, -300, 118, 485, - 462, 494, 431, 220, 220, 0, 31, 478, 441, 119, - 277, 111, 220, 220, 220, 0, 111, 424, 366, 211, - 9, 8, 112, 274, 273, 507, 220, 112, 267, 266, - 111, 111, 220, 2, 516, 0, 354, 370, 220, 363, - 221, 112, 112, 280, 478, 528, 0, 340, 463, 264, - 120, 341, 259, 531, 272, 271, 269, 502, 254, 274, - 273, 0, 425, 220, 452, 456, 471, 0, 0, 412, - 411, 282, 281, 508, 518, 517, 248, 255, 415, 407, - 249, 265, 263, 213, 336, 120, 0, 17, 270, 268, - 0, 230, 229, 0, 195, 121, 196, 0, 529, 527, - 269, 122, 214, 120, 215, 264, 195, 197, 196, 0, - 195, 16, 196, 195, 0, 196, 435, 434, 195, 197, - 196, 0, 195, 197, 196, 0, 197, 195, 0, 196, - 121, 197, 270, 268, 0, 197, 122, 265, 263, 195, - 197, 196, 254, 195, 195, 196, 196, 195, 121, 196, - 461, 195, 197, 196, 122, 0, 197, 197, 300, 301, - 197, 255, 461, 256, 197, 183, 184, 183, 184, 300, - 301, 502, 0, 0, 0, 305, 306, 0, 0, 0, - 0, 0, 0, 502, 307, 302, 303, 308, 0, 309, - 305, 306, 185, 186, 185, 186, 302, 303, 0, 307, - 0, 17, 308, 0, 309, 305, 306, 0, 0, 0, - 0, 0, 0, 17, 307, 0, 195, 308, 196, 309, - 0, 0, 188, 189, 0, 16, 0, 0, 0, 197, - 190, 191, 188, 189, 192, 0, 193, 16, 13, 0, - 190, 191, 188, 189, 192, 14, 193, 0, 13, 0, - 190, 191, 188, 189, 192, 14, 193, 0, 13, 0, - 190, 191, 188, 189, 192, 14, 193, 0, 0, 0, - 190, 191, 0, 0, 192, 17, 193, 13, 0, 0, - 305, 306, 0, 0, 14, 17, 0, 0, 18, 307, - 0, 480, 308, 0, 309, 17, 0, 12, 18, 16, - 0, 15, 0, 0, 0, 0, 0, 12, 18, 16, - 482, 15, 0, 0, 17, 0, 0, 12, 0, 16, - 0, 15, 0, 0, 0, 0, 0, 18, 0, 0, - 0, 0, 0, 0, 0, 0, 12, 0, 16, 0, - 15, 0, 0, 0, 74, 75, 233, 0, 0, 0, - 0, 0, 0, 0, 115, 0, 234, 0, 0, 0, - 235, 116, 0, 0, 0, 117, 83, 0, 84, 236, - 0, 237, 0, 0, 0, 87, 0, 0, 0, 90, - 0, 0, 238, 0, 239, 118, 0, 0, 0, 0, - 0, 0, 240, 0, 0, 241, 119, 95, 0, 97, - 0, 242, 0, 0, 0, 0, 0, 243, 0, 0, - 89, 100, 77, 0, 0, 0, 0, 0, 0, 0, - 244, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 74, 75, 233, 0, 0, 0, 0, 0, 0, 0, - 115, 0, 234, 0, 0, 0, 235, 116, 0, 0, - 0, 117, 83, 0, 84, 236, 0, 237, 0, 0, - 0, 87, 0, 0, 0, 90, 0, 0, 238, 0, - 239, 118, 0, 0, 0, 0, 0, 0, 240, 0, - 0, 241, 119, 95, 0, 97, 0, 242, 0, 0, - 0, 0, 0, 243, 0, 0, 89, 100, 77, 0, - 0, 0, 0, 0, 0, 0, 244, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 233, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 234, 0, - 0, 0, 235, 0, 0, 0, 0, 0, 0, 0, - 0, 236, 0, 237, 0, 0, 334, 0, 0, 0, - 0, 0, 0, 0, 238, 0, 239, 118, 0, 0, - 0, 0, 0, 0, 240, 0, 0, 241, 119, 0, - 0, 0, 0, 242, 0, 0, 0, 0, 0, 243, + 457, 352, 457, 464, 361, 463, 559, 449, -69, 373, + 367, -91, 453, 311, 432, 350, 325, 291, 323, 163, + 441, 331, 337, 363, 473, 457, 486, 344, -96, 490, + 354, 313, 434, 424, 361, 422, -66, 378, 385, 517, + 436, 276, 497, 503, 525, -80, 524, 163, 373, 367, + 479, 376, 375, 447, -99, 372, 473, 364, -88, 473, + 477, 442, 481, 381, 370, -70, 186, 315, 369, 381, + 209, 291, 192, 32, 497, 379, 2, 205, 186, 163, + 311, 313, 33, 473, 276, 366, -93, 442, 93, 486, + 212, 271, 169, 447, 93, 565, 211, 490, 255, 460, + 121, 0, 201, 0, 379, 517, 320, 476, 163, 0, + 163, 163, 163, 449, 379, 121, 467, 163, 0, 163, + 163, 477, 80, 80, 498, 7, 163, 123, 541, 171, + 517, 346, 270, 81, 81, 0, 80, 0, 527, 27, + 517, 188, 552, 551, 461, 189, 528, 81, 84, 446, + 445, 2, 123, 268, 267, 268, 267, 544, 0, 85, + 488, 163, 451, 383, 492, 528, 261, 260, 199, 80, + 331, 507, 499, 163, 9, 8, 550, 333, 329, 163, + 81, 334, 266, 265, 347, 275, 274, 86, 562, 60, + 28, 514, 194, 0, 0, 28, 60, 125, 0, 60, + 0, 107, 163, 108, 107, 0, 108, 60, 107, 164, + 108, 195, 0, 439, 109, 60, 126, 109, 127, 0, + 60, 109, 86, 0, 163, 273, 72, 20, 515, 516, + 0, 356, 87, 72, 20, 30, 72, 20, 88, 86, + 30, 563, 561, 60, 72, 20, 29, 107, 107, 108, + 108, 29, 72, 20, 60, 471, 470, 72, 20, 541, + 109, 109, 107, 107, 108, 108, 107, 87, 108, 107, + 107, 108, 108, 88, 194, 109, 109, 254, 253, 109, + 72, 20, 109, 109, 87, 358, 0, 60, 0, 60, + 88, 72, 20, 195, 60, 196, 60, 0, 60, 0, + 0, 95, 96, 0, 0, -312, 0, 542, 0, 0, + 293, 294, 293, 294, 0, 60, 0, 0, 95, 96, + 536, 0, 359, 360, 72, 20, 72, 20, 97, 98, + 60, 72, 20, 72, 20, 72, 20, 295, 296, 295, + 296, 60, 107, 0, 108, 97, 98, 259, 258, 60, + 19, 0, 72, 20, 497, 109, 0, 72, 20, 0, + 0, 0, 264, 263, 0, 0, 0, 72, 20, 0, + 0, 0, 0, 259, 258, 536, 18, 497, 72, 20, + 0, 264, 263, 100, 101, 0, 72, 20, 14, 0, + 0, 102, 103, 0, 0, 104, 0, 105, 536, 0, + 15, 0, 100, 101, 0, 19, 0, 16, 298, 299, + 102, 103, 72, 20, 104, 0, 105, 300, 0, 0, + 301, 0, 302, 0, 0, 0, 0, 0, 19, 0, + 14, 18, 0, 0, 0, 72, 20, 19, 0, 0, + 0, 0, 15, 0, 17, 20, 0, 0, 0, 16, + 14, 0, 21, 14, 18, 0, 0, 0, 0, 0, + 0, 13, 15, 18, 0, 15, 0, 0, 0, 16, + 0, 0, 16, 0, 0, 0, 100, 101, 0, 19, + 0, 0, 0, 0, 102, 103, 17, 20, 104, 0, + 105, 0, 0, 0, 21, 521, 0, 0, 519, 19, + 0, 0, 19, 13, 0, 18, 17, 20, 0, 17, + 20, 0, 0, 0, 21, 0, 0, 21, 0, 0, + 0, 0, 0, 13, 173, 18, 13, 0, 18, 0, + 0, 0, 0, 0, 174, 0, 0, 0, 175, 0, + 0, 0, 0, 0, 173, 0, 0, 176, 0, 177, + 0, 0, 327, 0, 174, 0, 0, 0, 175, 0, + 178, 0, 179, 84, 0, 0, 0, 176, 0, 177, + 180, 0, 0, 181, 85, 0, 0, 0, 0, 182, + 178, 0, 179, 84, 0, 183, 0, 0, 0, 0, + 180, 0, 0, 181, 85, 0, 0, 0, 0, 182, + 184, 0, 0, 0, 0, 183, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 184, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 56, 57, 0, 0, 0, 0, 0, 0, + 0, 0, 59, 0, 0, 0, 0, 0, 0, 60, + 0, 0, 0, 61, 62, 0, 63, 0, 0, 0, + 0, 0, 0, 66, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 244, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 73, 74, 75, 0, 0, 0, - 0, 0, 0, 0, 0, 115, 0, 0, 0, 0, - 0, 0, 116, 0, 0, 0, 117, 83, 0, 84, - 0, 0, 0, 85, 0, 86, 87, 88, 0, 0, - 90, 0, 0, 0, 91, 0, 92, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 95, 0, - 97, 0, 99, 0, 102, 0, 103, 0, 0, 0, - 0, 89, 100, 77, 0, 0, 0, 0, 0, 0, - 0, 0, 73, 74, 75, 0, 0, 0, 0, 0, - 0, 0, 0, 115, 0, 0, 0, 0, 0, 0, - 116, 0, 0, 0, 117, 83, 0, 84, 0, 0, - 0, 85, 0, 86, 87, 88, 0, 0, 90, 0, - 0, 0, 91, 0, 92, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 95, 0, 97, 0, - 99, 0, 102, 297, 103, 0, 0, 0, 0, 89, - 100, 77, 0, 0, 0, 0, 0, 0, 0, 0, - -81, 0, 0, 0, 73, 74, 75, 0, 0, 0, - 0, 0, 0, 0, 0, 115, 0, 0, 0, 0, - 0, 0, 116, 0, 0, 0, 117, 83, 0, 84, - 0, 0, 0, 85, 0, 86, 87, 88, 0, 0, - 90, 0, 0, 0, 91, 0, 92, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 95, 0, - 97, 0, 99, 0, 102, 0, 103, 0, 0, 0, - 0, 89, 100, 77, 0, 0, 0, 0, 0, 0, - 0, 0, 73, 74, 75, 0, 0, 0, 0, 0, - 0, 0, 0, 115, 0, 0, 0, 0, 0, 0, - 116, 0, 0, 0, 117, 83, 0, 84, 0, 0, - 0, 85, 0, 86, 87, 88, 0, 0, 90, 0, - 0, 0, 91, 0, 92, 0, 0, 466, 0, 0, - 0, 0, 0, 0, 0, 0, 95, 0, 97, 0, - 99, 0, 102, 0, 103, 0, 0, 0, 0, 89, - 100, 77, 0, 0, 0, 0, 0, 0, 0, 0, - 73, 74, 75, 0, 0, 0, 0, 0, 0, 0, - 0, 115, 0, 0, 0, 0, 0, 0, 116, 0, - 0, 0, 117, 83, 0, 84, 0, 0, 0, 85, - 0, 86, 87, 88, 0, 0, 90, 0, 0, 0, - 91, 0, 92, 0, 0, 469, 0, 0, 0, 0, - 0, 0, 0, 0, 95, 0, 97, 0, 99, 0, - 102, 0, 103, 0, 0, 0, 0, 89, 100, 77, - 0, 0, 0, 0, 0, 0, 0, 0, 138, 139, - 140, 0, 0, 142, 144, 145, 0, 0, 146, 0, - 147, 0, 0, 0, 149, 150, 151, 0, 0, 0, - 0, 0, 0, 218, 153, 154, 155, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 156, 0, 0, + 0, 0, 0, 0, 0, 73, 72, 20, 0, 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 160, 0, 0, 0, 0, 0, 0, - 162, 163, 164, 0, 166, 167, 168, 169, 170, 171, - 0, 0, 157, 165, 148, 141, 143, 159, 0, 0, - 0, 0, 0, 138, 139, 140, 0, 0, 142, 144, - 145, 0, 0, 146, 0, 147, 0, 0, 0, 149, - 150, 151, 0, 0, 0, 0, 0, 0, 152, 153, - 154, 155, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 156, 0, 0, 0, 158, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 160, 0, - 0, 0, 0, 0, 161, 162, 163, 164, 0, 166, - 167, 168, 169, 170, 171, 0, 0, 157, 165, 148, - 141, 143, 159, 0, 0, 0, 0, 0, 138, 139, - 140, 0, 0, 142, 144, 145, 0, 0, 146, 0, - 147, 0, 0, 0, 149, 150, 151, 0, 0, 0, - 0, 0, 0, 152, 153, 154, 155, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 156, 0, 0, - 0, 158, 0, 0, 0, 0, 0, 0, 0, 176, - 0, 0, 0, 160, 0, 0, 0, 0, 0, 161, - 162, 163, 164, 0, 166, 167, 168, 169, 170, 171, - 0, 0, 157, 165, 148, 141, 143, 159, 0, 0, - 0, 0, 0, 70, 0, 0, 0, 0, 71, 0, - 73, 74, 75, 76, 0, 0, 0, 0, 0, 0, - 78, 115, 0, 0, 0, 0, 0, 0, 512, 81, - 0, 0, 82, 513, 0, 84, 0, 0, 0, 85, - 0, 86, 87, 88, 0, 0, 90, 0, 0, 0, - 91, 0, 92, 0, 0, 0, 0, 0, 93, 0, - 94, 0, 0, 0, 95, 96, 97, 98, 99, 101, - 102, 18, 103, 104, 105, 0, 0, 89, 100, 77, - 12, 72, 0, 0, 0, 0, 0, 0, 70, 0, - 0, 0, 0, 71, 0, 73, 74, 75, 76, 0, - 0, 0, 0, 0, 0, 78, 115, 0, 0, 0, - 0, 0, 0, 80, 81, 0, 0, 82, 83, 0, - 84, 0, 0, 0, 85, 0, 86, 87, 88, 0, - 0, 90, 0, 0, 0, 91, 0, 92, 0, 0, - 0, 0, 0, 93, 0, 94, 0, 0, 0, 95, - 96, 97, 98, 99, 101, 102, 18, 103, 104, 105, - 0, 0, 89, 100, 77, 12, 72, 0, 0, 0, - 0, 0, 0, 70, 0, 0, 0, 0, 71, 0, - 73, 74, 75, 76, 0, 0, 0, 0, 0, 0, - 78, 79, 0, 0, 0, 0, 0, 0, 80, 81, - 0, 0, 82, 83, 0, 84, 0, 0, 0, 85, - 0, 86, 87, 88, 0, 0, 90, 0, 0, 0, - 91, 0, 92, 0, 0, 0, 0, 0, 93, 0, - 94, 0, 0, 0, 95, 96, 97, 98, 99, 101, - 102, 18, 103, 104, 105, 0, 0, 89, 100, 77, - 12, 72, 0, 0, 0, 0, 0, 0, 70, 0, - 0, 0, 0, 71, 0, 73, 74, 75, 76, 0, - 0, 0, 0, 0, 0, 78, 115, 0, 0, 0, - 0, 0, 0, 496, 81, 0, 0, 82, 497, 0, - 84, 0, 0, 0, 85, 0, 86, 87, 88, 0, - 0, 90, 0, 0, 0, 91, 0, 92, 0, 0, - 0, 0, 0, 93, 0, 94, 0, 0, 0, 95, - 96, 97, 98, 99, 101, 102, 18, 103, 104, 105, - 0, 0, 89, 100, 77, 12, 72, 0, 498, 0, - 0, 0, 0, 377, 139, 140, 0, 0, 379, 144, - 381, 74, 75, 382, 0, 147, 0, 0, 0, 149, - 384, 385, 0, 0, 0, 0, 0, 0, 386, 387, - 154, 155, 82, 83, 0, 84, 0, 0, 0, 85, - 0, 86, 388, 88, 0, 0, 390, 0, 0, 0, - 91, 0, 92, 0, -227, 0, 0, 0, 391, 0, - 94, 0, 0, 0, 392, 393, 394, 395, 99, 397, - 398, 399, 400, 401, 402, 0, 0, 389, 396, 383, - 378, 380, 159, 0, 0, 0, 0, 0, + 68, 76, 58, 0, 0, 0, 0, 0, 0, 0, + 0, 55, 56, 57, 0, 0, 0, 0, 0, 0, + 0, 0, 59, 0, 0, 0, 0, 0, 0, 60, + 0, 0, 0, 61, 62, 0, 63, 0, 0, 0, + 64, 0, 65, 66, 67, 0, 0, 69, 0, 0, + 0, 70, 0, 71, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 73, 72, 20, 0, 74, + 0, 75, 0, 77, 0, 78, 0, 0, 0, 0, + 68, 76, 58, 0, 0, 0, 0, 0, 0, 0, + 0, 55, 56, 57, 0, 0, 0, 0, 0, 0, + 0, 0, 59, 0, 0, 0, 0, 0, 0, 60, + 0, 0, 0, 61, 62, 0, 63, 0, 0, 0, + 64, 0, 65, 66, 67, 0, 0, 69, 0, 0, + 0, 70, 0, 71, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 73, 72, 20, 0, 74, + 0, 75, 0, 77, 290, 78, 0, 0, 0, 0, + 68, 76, 58, 0, 0, 0, 0, 0, 0, 0, + 0, 55, 56, 57, 0, 0, 0, 0, 0, 0, + 0, 0, 59, 0, 0, 0, 0, 0, 0, 60, + 0, 0, 0, 61, 62, 0, 63, 0, 0, 0, + 64, 0, 65, 66, 67, 0, 0, 69, 0, 0, + 0, 70, 0, 71, 0, 0, 502, 0, 0, 0, + 0, 0, 0, 0, 0, 73, 72, 20, 0, 74, + 0, 75, 0, 77, 0, 78, 0, 0, 0, 0, + 68, 76, 58, 0, 0, 0, 0, 0, 0, 0, + 0, -89, 0, 0, 0, 55, 56, 57, 0, 0, + 0, 0, 0, 0, 0, 0, 59, 0, 0, 0, + 0, 0, 0, 60, 0, 0, 0, 61, 62, 0, + 63, 0, 0, 0, 64, 0, 65, 66, 67, 0, + 0, 69, 0, 0, 0, 70, 0, 71, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 73, + 72, 20, 0, 74, 0, 75, 0, 77, 0, 78, + 0, 0, 0, 0, 68, 76, 58, 0, 0, 0, + 0, 0, 0, 0, 0, 55, 56, 57, 0, 0, + 0, 0, 0, 0, 0, 0, 59, 0, 0, 0, + 0, 0, 0, 60, 0, 0, 0, 61, 62, 0, + 63, 0, 0, 0, 64, 0, 65, 66, 67, 0, + 0, 69, 0, 0, 0, 70, 0, 71, 0, 0, + 505, 0, 0, 0, 0, 0, 0, 0, 0, 73, + 72, 20, 0, 74, 0, 75, 0, 77, 0, 78, + 0, 0, 0, 0, 68, 76, 58, 0, 0, 0, + 0, 0, 0, 0, 0, 131, 132, 133, 0, 0, + 135, 137, 138, 0, 0, 139, 0, 140, 0, 0, + 0, 142, 143, 144, 0, 0, 0, 0, 0, 0, + 60, 145, 146, 147, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 148, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 151, 0, 0, 0, 0, 0, 0, 72, 20, 152, + 153, 154, 0, 156, 157, 158, 159, 160, 161, 0, + 0, 149, 155, 141, 134, 136, 150, 0, 0, 0, + 0, 0, 131, 132, 133, 0, 0, 135, 137, 138, + 0, 0, 139, 0, 140, 0, 0, 0, 142, 143, + 144, 0, 0, 0, 0, 0, 0, 426, 145, 146, + 147, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 148, 0, 0, 0, 427, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 151, 0, 0, + 0, 0, 0, 431, 428, 430, 152, 153, 154, 0, + 156, 157, 158, 159, 160, 161, 0, 0, 149, 155, + 141, 134, 136, 150, 0, 0, 0, 0, 0, 131, + 132, 133, 0, 0, 135, 137, 138, 0, 0, 139, + 0, 140, 0, 0, 0, 142, 143, 144, 0, 0, + 0, 0, 0, 0, 426, 145, 146, 147, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 148, 0, + 0, 0, 427, 0, 0, 0, 0, 0, 0, 0, + 429, 0, 0, 0, 151, 0, 0, 0, 0, 0, + 431, 428, 430, 152, 153, 154, 0, 156, 157, 158, + 159, 160, 161, 0, 0, 149, 155, 141, 134, 136, + 150, 0, 0, 0, 0, 0, 231, 0, 0, 0, + 0, 232, 0, 55, 56, 57, 234, 0, 0, 0, + 0, 0, 0, 235, 59, 0, 0, 0, 0, 0, + 0, 546, 238, 0, 0, 239, 547, 0, 63, 0, + 0, 0, 64, 0, 65, 66, 67, 0, 0, 69, + 0, 0, 0, 70, 0, 71, 0, 0, 0, 0, + 0, 241, 0, 242, 0, 0, 0, 73, 240, 243, + 244, 74, 245, 75, 246, 77, 21, 78, 247, 248, + 0, 0, 68, 76, 58, 13, 233, 0, 0, 0, + 0, 0, 0, 231, 0, 0, 0, 0, 232, 0, + 55, 56, 57, 234, 0, 0, 0, 0, 0, 0, + 235, 59, 0, 0, 0, 0, 0, 0, 237, 238, + 0, 0, 239, 62, 0, 63, 0, 0, 0, 64, + 0, 65, 66, 67, 0, 0, 69, 0, 0, 0, + 70, 0, 71, 0, 0, 0, 0, 0, 241, 0, + 242, 0, 0, 0, 73, 240, 243, 244, 74, 245, + 75, 246, 77, 21, 78, 247, 248, 0, 0, 68, + 76, 58, 13, 233, 0, 0, 0, 0, 0, 0, + 231, 0, 0, 0, 0, 232, 0, 55, 56, 57, + 234, 0, 0, 0, 0, 0, 0, 235, 236, 0, + 0, 0, 0, 0, 0, 237, 238, 0, 0, 239, + 62, 0, 63, 0, 0, 0, 64, 0, 65, 66, + 67, 0, 0, 69, 0, 0, 0, 70, 0, 71, + 0, 0, 0, 0, 0, 241, 0, 242, 0, 0, + 0, 73, 240, 243, 244, 74, 245, 75, 246, 77, + 21, 78, 247, 248, 0, 0, 68, 76, 58, 13, + 233, 0, 0, 0, 0, 0, 0, 231, 0, 0, + 0, 0, 232, 0, 55, 56, 57, 234, 0, 0, + 0, 0, 0, 0, 235, 59, 0, 0, 0, 0, + 0, 0, 530, 238, 0, 0, 239, 531, 0, 63, + 0, 0, 0, 64, 0, 65, 66, 67, 0, 0, + 69, 0, 0, 0, 70, 0, 71, 0, 0, 0, + 0, 0, 241, 0, 242, 0, 0, 0, 73, 240, + 243, 244, 74, 245, 75, 246, 77, 21, 78, 247, + 248, 0, 0, 68, 76, 58, 13, 233, 0, 532, + 0, 0, 0, 0, 394, 132, 133, 0, 0, 396, + 137, 398, 56, 57, 399, 0, 140, 0, 0, 0, + 142, 401, 402, 0, 0, 0, 0, 0, 0, 403, + 404, 146, 147, 239, 62, 0, 63, 0, 0, 0, + 64, 0, 65, 405, 67, 0, 0, 407, 0, 0, + 0, 70, 0, 71, 0, -235, 0, 0, 0, 409, + 0, 242, 0, 0, 0, 411, 408, 410, 412, 413, + 414, 75, 416, 417, 418, 419, 420, 421, 0, 0, + 406, 415, 400, 395, 397, 150, 0, 0, 0, 0, + 0, - 465, 464, 232, 468, 455, 457, 175, 446, 364, 173, - 362, 360, 355, 451, 453, 178, 279, 10, 530, 251, - 23, 219, 253, 335, 447, 225, 514, 245, 222, 492, - 526, 129, 227, 489, 495, 333, 217, 501, 511, 505, - 506, 429, 426, 276, 436, 436, 430, 373, 371, 422, - 433, 414, 328, 470, 433, 403, 442, 369, 337, 367, - 276, 0, 432, 328, 328, 483, 113, 328, 509, 515, - 505, 310, 505, 0, 113, 23, 0, 113, 258, 0, - 114, 113, 0, 474, 113, 113, 475, 476, 247, 113, - 113, 113, 405, 180, 113, 406, 448, 405, 0, 113, - 406, 449, 0, 210, 113, 250, 113, 329, 113, 313, - 331, 311, 113, 314, 449, 113, 113, 113, 477, 113, - 312, 448, 113, 113, 473, 113, 0, 212, 113, 207, - 68, 208, 50, 204, 113, 113, 113, 113, 328, 202, - 203, 201, 113, 206, 124, 113, 113, 123, 292, 113, - 328, 275, 187, 296, 113, 113, 113, 275, 0, 113, - 225, 194, 182, 200, 225, 113, 113, 260, 125, 199, - 113, 408, 217, 257, 113, 205, 472, 481, 113, 113, - 0, 358, 198, 324, 296, 0, 0, 113, 296, 0, - 321, 23, 296, 356, 304, 324, 324, 68, 113, 50, - 296, 296, 324, 296, 113, 323, 68, 296, 50, 296, - 324, 319, 0, 0, 0, 296, 113, 352, 345, 339, - 113, 296, 113, 316, 343, 296, 0, 296, 113, 299, - 0, 113, 326, 296, 0, 315, 296, 0, 317, 342, - 0, 0, 483, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, + 458, 462, 526, 560, 548, 450, 545, 443, 500, 504, + 448, 466, 535, 42, 31, 482, 491, 554, 172, 540, + 204, 487, 493, 553, 489, 529, 391, 478, 501, 483, + 506, 269, 480, 269, 472, 371, 377, 204, 321, 262, + 165, 185, 330, 328, 326, 469, 170, 365, 382, 380, + 262, 357, 257, 384, 435, 386, 353, 256, 0, 162, + 355, 168, 0, 0, 198, 425, 469, 391, 208, 472, + 191, 433, 193, 210, 204, 272, 257, 423, 321, 339, + 321, 168, 554, 321, 321, 539, 321, 82, 440, 391, + 0, 0, 304, 12, 285, 339, 208, 82, 10, 289, + 391, 82, 306, 208, 168, 82, 307, 82, 82, 82, + 305, 200, 303, 0, 82, 0, 513, 82, 82, 0, + 208, 110, 187, 115, 351, 190, 82, 349, 322, 82, + 324, 114, 82, 82, 116, 485, 82, 117, 511, 82, + 82, 485, 82, 82, 564, 89, 0, 113, 94, 82, + 82, 91, 465, 82, 82, 90, 99, 82, 82, 348, + 118, 83, 106, 468, 82, 82, 82, 82, 82, 92, + 120, 119, 362, 82, 82, 512, 202, 124, 0, 368, + 122, 82, 437, 508, 82, 438, 509, 82, 0, 82, + 82, 112, 510, 111, 0, 82, 374, 484, 82, 437, + 202, 317, 438, 82, 82, 0, 289, 317, 289, 289, + 0, 317, 289, 11, 26, 12, 289, 82, 332, 82, + 82, 335, 289, 338, 289, 289, 309, 297, 314, 345, + 82, 317, 128, 336, 317, 289, 289, 310, 82, 289, + 0, 130, 197, 289, 543, 308, 539, 549, 0, 0, + 539, 0, 82, 316, 12, 82, 319, 289, 12, 520, + 289, 0, 128, 0, 292, 312, 0, 0, 0, 0, + 0, 130, 0, 11, 26, 12, 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, 522, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 11, 26, 12, 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, 262, 0, 0, 0, 132, 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 [] = { - 60, 29, 20, 76, 55, 55, 7, 36, 60, 76, - 48, 36, 1, 36, 48, 8, 29, 5, 8, 29, - 61, 8, 2, 60, 33, 33, 7, 29, 7, 33, - 61, 7, 7, 36, 29, 7, 7, 36, 16, 36, - 36, 7, 7, 2, 60, 29, 61, 33, 5, 5, - 8, 36, 29, 60, 48, 17, 2, 31, 7, 76, - 29, 29, 60, 36, 7, 29, 33, 17, 29, 1, - 33, 7, 55, 33, 29, 29, 2, 8, 60, 8, - 8, 29, 7, 36, 7, 1, 8, 29, 8, 36, - 7, 36, 33, 8, 29, 65, 48, 36, 36, 29, - 10, 7, -1, 8, 55, 8, 8, 8, 7, 36, - 29, 8, 8, 7, 6, 55, 15, 36, 42, 29, - 8, 15, 7, 8, 8, -1, 60, 33, 20, 53, - 74, 40, 8, 8, 8, -1, 40, 10, 7, 76, - 61, 62, 51, 61, 62, 8, 8, 51, 61, 62, - 40, 40, 8, 86, 56, -1, 61, 60, 8, 60, - 56, 51, 51, 60, 33, 8, -1, 50, 56, 29, - 12, 54, 56, 0, 61, 62, 29, 29, 15, 61, - 62, -1, 55, 8, 60, 60, 60, -1, -1, 61, - 62, 61, 62, 56, 61, 62, 50, 34, 60, 36, - 54, 61, 62, 15, 60, 12, -1, 59, 61, 62, - -1, 61, 62, -1, 25, 57, 27, -1, 61, 62, - 29, 63, 34, 12, 36, 29, 25, 38, 27, -1, - 25, 83, 27, 25, -1, 27, 61, 62, 25, 38, - 27, -1, 25, 38, 27, -1, 38, 25, -1, 27, - 57, 38, 61, 62, -1, 38, 63, 61, 62, 25, - 38, 27, 15, 25, 25, 27, 27, 25, 57, 27, - 8, 25, 38, 27, 63, -1, 38, 38, 18, 19, - 38, 34, 8, 36, 38, 18, 19, 18, 19, 18, - 19, 29, -1, -1, -1, 23, 24, -1, -1, -1, - -1, -1, -1, 29, 32, 45, 46, 35, -1, 37, - 23, 24, 45, 46, 45, 46, 45, 46, -1, 32, - -1, 59, 35, -1, 37, 23, 24, -1, -1, -1, - -1, -1, -1, 59, 32, -1, 25, 35, 27, 37, - -1, -1, 23, 24, -1, 83, -1, -1, -1, 38, - 31, 32, 23, 24, 35, -1, 37, 83, 22, -1, - 31, 32, 23, 24, 35, 29, 37, -1, 22, -1, - 31, 32, 23, 24, 35, 29, 37, -1, 22, -1, - 31, 32, 23, 24, 35, 29, 37, -1, -1, -1, - 31, 32, -1, -1, 35, 59, 37, 22, -1, -1, - 23, 24, -1, -1, 29, 59, -1, -1, 72, 32, - -1, 55, 35, -1, 37, 59, -1, 81, 72, 83, - -1, 85, -1, -1, -1, -1, -1, 81, 72, 83, - 55, 85, -1, -1, 59, -1, -1, 81, -1, 83, - -1, 85, -1, -1, -1, -1, -1, 72, -1, -1, - -1, -1, -1, -1, -1, -1, 81, -1, 83, -1, - 85, -1, -1, -1, 12, 13, 3, -1, -1, -1, - -1, -1, -1, -1, 22, -1, 13, -1, -1, -1, - 17, 29, -1, -1, -1, 33, 34, -1, 36, 26, - -1, 28, -1, -1, -1, 43, -1, -1, -1, 47, - -1, -1, 39, -1, 41, 42, -1, -1, -1, -1, - -1, -1, 49, -1, -1, 52, 53, 65, -1, 67, - -1, 58, -1, -1, -1, -1, -1, 64, -1, -1, - 78, 79, 80, -1, -1, -1, -1, -1, -1, -1, - 77, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 12, 13, 3, -1, -1, -1, -1, -1, -1, -1, - 22, -1, 13, -1, -1, -1, 17, 29, -1, -1, - -1, 33, 34, -1, 36, 26, -1, 28, -1, -1, - -1, 43, -1, -1, -1, 47, -1, -1, 39, -1, - 41, 42, -1, -1, -1, -1, -1, -1, 49, -1, - -1, 52, 53, 65, -1, 67, -1, 58, -1, -1, - -1, -1, -1, 64, -1, -1, 78, 79, 80, -1, - -1, -1, -1, -1, -1, -1, 77, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 3, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 13, -1, - -1, -1, 17, -1, -1, -1, -1, -1, -1, -1, - -1, 26, -1, 28, -1, -1, 31, -1, -1, -1, - -1, -1, -1, -1, 39, -1, 41, 42, -1, -1, - -1, -1, -1, -1, 49, -1, -1, 52, 53, -1, - -1, -1, -1, 58, -1, -1, -1, -1, -1, 64, + 5, 60, 5, 7, 36, 55, 17, 36, 7, 36, + 36, 7, 33, 48, 7, 61, 60, 1, 61, 8, + 60, 2, 7, 60, 33, 5, 36, 17, 7, 36, + 31, 78, 55, 8, 36, 7, 7, 55, 16, 33, + 55, 36, 8, 8, 7, 7, 29, 8, 36, 36, + 36, 33, 60, 7, 7, 55, 33, 33, 7, 33, + 20, 7, 60, 36, 33, 7, 2, 8, 60, 36, + 8, 1, 7, 29, 8, 7, 88, 36, 2, 8, + 48, 78, 7, 33, 36, 55, 7, 7, 1, 36, + 33, 36, 8, 7, 1, 0, 60, 36, 55, 10, + 48, -1, 60, -1, 7, 33, 61, 6, 8, -1, + 8, 8, 8, 36, 7, 48, 7, 8, -1, 8, + 8, 20, 40, 40, 8, 65, 8, 78, 8, 60, + 33, 8, 76, 51, 51, -1, 40, -1, 7, 66, + 33, 50, 61, 62, 55, 54, 15, 51, 42, 61, + 62, 88, 78, 61, 62, 61, 62, 7, -1, 53, + 60, 8, 60, 60, 60, 15, 61, 62, 56, 40, + 2, 60, 56, 8, 61, 62, 56, 50, 60, 8, + 51, 54, 61, 62, 61, 61, 62, 12, 8, 29, + 29, 29, 15, -1, -1, 29, 29, 15, -1, 29, + -1, 25, 8, 27, 25, -1, 27, 29, 25, 56, + 27, 34, -1, 36, 38, 29, 34, 38, 36, -1, + 29, 38, 12, -1, 8, 60, 66, 67, 66, 67, + -1, 60, 57, 66, 67, 74, 66, 67, 63, 12, + 74, 61, 62, 29, 66, 67, 85, 25, 25, 27, + 27, 85, 66, 67, 29, 61, 62, 66, 67, 8, + 38, 38, 25, 25, 27, 27, 25, 57, 27, 25, + 25, 27, 27, 63, 15, 38, 38, 61, 62, 38, + 66, 67, 38, 38, 57, 29, -1, 29, -1, 29, + 63, 66, 67, 34, 29, 36, 29, -1, 29, -1, + -1, 18, 19, -1, -1, 36, -1, 56, -1, -1, + 18, 19, 18, 19, -1, 29, -1, -1, 18, 19, + 29, -1, 66, 67, 66, 67, 66, 67, 45, 46, + 29, 66, 67, 66, 67, 66, 67, 45, 46, 45, + 46, 29, 25, -1, 27, 45, 46, 61, 62, 29, + 59, -1, 66, 67, 8, 38, -1, 66, 67, -1, + -1, -1, 61, 62, -1, -1, -1, 66, 67, -1, + -1, -1, -1, 61, 62, 29, 85, 8, 66, 67, + -1, 61, 62, 23, 24, -1, 66, 67, 10, -1, + -1, 31, 32, -1, -1, 35, -1, 37, 29, -1, + 22, -1, 23, 24, -1, 59, -1, 29, 23, 24, + 31, 32, 66, 67, 35, -1, 37, 32, -1, -1, + 35, -1, 37, -1, -1, -1, -1, -1, 59, -1, + 10, 85, -1, -1, -1, 66, 67, 59, -1, -1, + -1, -1, 22, -1, 66, 67, -1, -1, -1, 29, + 10, -1, 74, 10, 85, -1, -1, -1, -1, -1, + -1, 83, 22, 85, -1, 22, -1, -1, -1, 29, + -1, -1, 29, -1, -1, -1, 23, 24, -1, 59, + -1, -1, -1, -1, 31, 32, 66, 67, 35, -1, + 37, -1, -1, -1, 74, 55, -1, -1, 55, 59, + -1, -1, 59, 83, -1, 85, 66, 67, -1, 66, + 67, -1, -1, -1, 74, -1, -1, 74, -1, -1, + -1, -1, -1, 83, 3, 85, 83, -1, 85, -1, + -1, -1, -1, -1, 13, -1, -1, -1, 17, -1, + -1, -1, -1, -1, 3, -1, -1, 26, -1, 28, + -1, -1, 31, -1, 13, -1, -1, -1, 17, -1, + 39, -1, 41, 42, -1, -1, -1, 26, -1, 28, + 49, -1, -1, 52, 53, -1, -1, -1, -1, 58, + 39, -1, 41, 42, -1, 64, -1, -1, -1, -1, + 49, -1, -1, 52, 53, -1, -1, -1, -1, 58, + 79, -1, -1, -1, -1, 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 77, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 11, 12, 13, -1, -1, -1, - -1, -1, -1, -1, -1, 22, -1, -1, -1, -1, - -1, -1, 29, -1, -1, -1, 33, 34, -1, 36, - -1, -1, -1, 40, -1, 42, 43, 44, -1, -1, - 47, -1, -1, -1, 51, -1, 53, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 65, -1, - 67, -1, 69, -1, 71, -1, 73, -1, -1, -1, - -1, 78, 79, 80, -1, -1, -1, -1, -1, -1, - -1, -1, 11, 12, 13, -1, -1, -1, -1, -1, - -1, -1, -1, 22, -1, -1, -1, -1, -1, -1, - 29, -1, -1, -1, 33, 34, -1, 36, -1, -1, - -1, 40, -1, 42, 43, 44, -1, -1, 47, -1, - -1, -1, 51, -1, 53, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 65, -1, 67, -1, - 69, -1, 71, 72, 73, -1, -1, -1, -1, 78, - 79, 80, -1, -1, -1, -1, -1, -1, -1, -1, - 7, -1, -1, -1, 11, 12, 13, -1, -1, -1, - -1, -1, -1, -1, -1, 22, -1, -1, -1, -1, - -1, -1, 29, -1, -1, -1, 33, 34, -1, 36, - -1, -1, -1, 40, -1, 42, 43, 44, -1, -1, - 47, -1, -1, -1, 51, -1, 53, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 65, -1, - 67, -1, 69, -1, 71, -1, 73, -1, -1, -1, - -1, 78, 79, 80, -1, -1, -1, -1, -1, -1, - -1, -1, 11, 12, 13, -1, -1, -1, -1, -1, - -1, -1, -1, 22, -1, -1, -1, -1, -1, -1, - 29, -1, -1, -1, 33, 34, -1, 36, -1, -1, - -1, 40, -1, 42, 43, 44, -1, -1, 47, -1, - -1, -1, 51, -1, 53, -1, -1, 56, -1, -1, - -1, -1, -1, -1, -1, -1, 65, -1, 67, -1, - 69, -1, 71, -1, 73, -1, -1, -1, -1, 78, - 79, 80, -1, -1, -1, -1, -1, -1, -1, -1, - 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, - -1, 22, -1, -1, -1, -1, -1, -1, 29, -1, - -1, -1, 33, 34, -1, 36, -1, -1, -1, 40, - -1, 42, 43, 44, -1, -1, 47, -1, -1, -1, - 51, -1, 53, -1, -1, 56, -1, -1, -1, -1, - -1, -1, -1, -1, 65, -1, 67, -1, 69, -1, - 71, -1, 73, -1, -1, -1, -1, 78, 79, 80, - -1, -1, -1, -1, -1, -1, -1, -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, + 79, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 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, + -1, -1, -1, 43, -1, -1, -1, 47, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 59, -1, -1, -1, -1, -1, -1, - 66, 67, 68, -1, 70, 71, 72, 73, 74, 75, - -1, -1, 78, 79, 80, 81, 82, 83, -1, -1, - -1, -1, -1, 4, 5, 6, -1, -1, 9, 10, - 11, -1, -1, 14, -1, 16, -1, -1, -1, 20, - 21, 22, -1, -1, -1, -1, -1, -1, 29, 30, - 31, 32, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 43, -1, -1, -1, 47, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 59, -1, - -1, -1, -1, -1, 65, 66, 67, 68, -1, 70, - 71, 72, 73, 74, 75, -1, -1, 78, 79, 80, - 81, 82, 83, -1, -1, -1, -1, -1, 4, 5, - 6, -1, -1, 9, 10, 11, -1, -1, 14, -1, - 16, -1, -1, -1, 20, 21, 22, -1, -1, -1, - -1, -1, -1, 29, 30, 31, 32, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 43, -1, -1, - -1, 47, -1, -1, -1, -1, -1, -1, -1, 55, - -1, -1, -1, 59, -1, -1, -1, -1, -1, 65, - 66, 67, 68, -1, 70, 71, 72, 73, 74, 75, - -1, -1, 78, 79, 80, 81, 82, 83, -1, -1, - -1, -1, -1, 4, -1, -1, -1, -1, 9, -1, - 11, 12, 13, 14, -1, -1, -1, -1, -1, -1, - 21, 22, -1, -1, -1, -1, -1, -1, 29, 30, - -1, -1, 33, 34, -1, 36, -1, -1, -1, 40, - -1, 42, 43, 44, -1, -1, 47, -1, -1, -1, - 51, -1, 53, -1, -1, -1, -1, -1, 59, -1, - 61, -1, -1, -1, 65, 66, 67, 68, 69, 70, - 71, 72, 73, 74, 75, -1, -1, 78, 79, 80, - 81, 82, -1, -1, -1, -1, -1, -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, + -1, -1, -1, -1, -1, 65, 66, 67, -1, 69, + -1, -1, -1, -1, -1, -1, -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, -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, 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, 7, -1, -1, -1, 11, 12, 13, -1, -1, + -1, -1, -1, -1, -1, -1, 22, -1, -1, -1, + -1, -1, -1, 29, -1, -1, -1, 33, 34, -1, + 36, -1, -1, -1, 40, -1, 42, 43, 44, -1, + -1, 47, -1, -1, -1, 51, -1, 53, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 65, + 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, 59, -1, 61, -1, -1, -1, 65, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - -1, -1, 78, 79, 80, 81, 82, -1, -1, -1, + 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, 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, 29, 30, @@ -677,58 +695,79 @@ const int JavaScriptGrammar::action_check [] = { -1, 42, 43, 44, -1, -1, 47, -1, -1, -1, 51, -1, 53, -1, -1, -1, -1, -1, 59, -1, 61, -1, -1, -1, 65, 66, 67, 68, 69, 70, - 71, 72, 73, 74, 75, -1, -1, 78, 79, 80, - 81, 82, -1, -1, -1, -1, -1, -1, 4, -1, - -1, -1, -1, 9, -1, 11, 12, 13, 14, -1, - -1, -1, -1, -1, -1, 21, 22, -1, -1, -1, - -1, -1, -1, 29, 30, -1, -1, 33, 34, -1, - 36, -1, -1, -1, 40, -1, 42, 43, 44, -1, - -1, 47, -1, -1, -1, 51, -1, 53, -1, -1, - -1, -1, -1, 59, -1, 61, -1, -1, -1, 65, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - -1, -1, 78, 79, 80, 81, 82, -1, 84, -1, - -1, -1, -1, 4, 5, 6, -1, -1, 9, 10, - 11, 12, 13, 14, -1, 16, -1, -1, -1, 20, - 21, 22, -1, -1, -1, -1, -1, -1, 29, 30, - 31, 32, 33, 34, -1, 36, -1, -1, -1, 40, - -1, 42, 43, 44, -1, -1, 47, -1, -1, -1, - 51, -1, 53, -1, 55, -1, -1, -1, 59, -1, - 61, -1, -1, -1, 65, 66, 67, 68, 69, 70, - 71, 72, 73, 74, 75, -1, -1, 78, 79, 80, - 81, 82, 83, -1, -1, -1, -1, -1, + 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, -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, 86, + -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, - 22, 18, 56, 22, 14, 13, 24, 60, 13, 22, - 14, 13, 80, 14, 13, 22, 14, 5, 78, 22, - 16, 14, 22, 14, 60, 22, 9, 22, 22, 14, - 22, 92, 22, 14, 13, 13, 25, 9, 13, 10, - 9, 74, 86, 13, 60, 60, 14, 13, 13, 89, - 14, 14, 14, 14, 14, 13, 91, 14, 13, 13, - 13, -1, 74, 14, 14, 6, 33, 14, 8, 7, - 10, 38, 10, -1, 33, 16, -1, 33, 14, -1, - 36, 33, -1, 35, 33, 33, 35, 35, 47, 33, - 33, 33, 27, 36, 33, 30, 35, 27, -1, 33, - 30, 35, -1, 45, 33, 49, 33, 57, 33, 38, - 57, 38, 33, 38, 35, 33, 33, 33, 35, 33, - 38, 35, 33, 33, 35, 33, -1, 43, 33, 39, - 13, 39, 15, 38, 33, 33, 33, 33, 14, 38, - 38, 38, 33, 39, 35, 33, 33, 35, 33, 33, - 14, 35, 39, 38, 33, 33, 33, 35, -1, 33, - 22, 38, 41, 37, 22, 33, 33, 29, 35, 37, - 33, 29, 25, 26, 33, 38, 35, 2, 33, 33, - -1, 57, 37, 33, 38, -1, -1, 33, 38, -1, - 44, 16, 38, 57, 40, 33, 33, 13, 33, 15, - 38, 38, 33, 38, 33, 55, 13, 38, 15, 38, - 33, 46, -1, -1, -1, 38, 33, 55, 55, 48, - 33, 38, 33, 40, 55, 38, -1, 38, 33, 42, - -1, 33, 55, 38, -1, 40, 38, -1, 40, 50, - -1, -1, 6, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 16, -1, -1, -1, -1, -1, -1, -1, + 91, 88, 15, 24, 9, 15, 13, 13, 20, 24, + 13, 15, 9, 15, 14, 62, 15, 18, 58, 9, + 18, 15, 13, 18, 13, 13, 13, 93, 24, 62, + 15, 13, 18, 13, 62, 95, 95, 18, 15, 18, + 24, 24, 13, 15, 13, 15, 24, 95, 15, 13, + 18, 13, 18, 13, 13, 13, 13, 100, -1, 15, + 15, 24, -1, -1, 15, 26, 15, 13, 18, 62, + 24, 24, 24, 18, 18, 15, 18, 24, 15, 18, + 15, 24, 18, 15, 15, 10, 15, 35, 31, 13, + -1, -1, 40, 18, 35, 18, 18, 35, 5, 40, + 13, 35, 40, 18, 24, 35, 40, 35, 35, 35, + 40, 31, 40, -1, 35, -1, 37, 35, 35, -1, + 18, 39, 49, 40, 59, 51, 35, 59, 59, 35, + 59, 40, 35, 35, 40, 37, 35, 40, 37, 35, + 35, 37, 35, 35, 80, 37, -1, 40, 43, 35, + 35, 37, 76, 35, 35, 37, 41, 35, 35, 82, + 41, 38, 40, 76, 35, 35, 35, 35, 35, 38, + 41, 41, 94, 35, 35, 37, 37, 45, -1, 94, + 47, 35, 29, 37, 35, 32, 37, 35, -1, 35, + 35, 39, 37, 39, -1, 35, 94, 37, 35, 29, + 37, 35, 32, 35, 35, -1, 40, 35, 40, 40, + -1, 35, 40, 16, 17, 18, 40, 35, 50, 35, + 35, 52, 40, 57, 40, 40, 42, 42, 46, 57, + 35, 35, 18, 57, 35, 40, 40, 42, 35, 40, + -1, 27, 28, 40, 8, 42, 10, 7, -1, -1, + 10, -1, 35, 57, 18, 35, 57, 40, 18, 2, + 40, -1, 18, -1, 44, 48, -1, -1, -1, -1, + -1, 27, -1, 16, 17, 18, -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, 6, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 16, 17, 18, -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, 98, -1, -1, -1, 93, -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 61a2eb0..5a882e8 100644 --- a/src/declarative/qml/parser/javascriptgrammar_p.h +++ b/src/declarative/qml/parser/javascriptgrammar_p.h @@ -59,8 +59,8 @@ class JavaScriptGrammar public: enum { EOF_SYMBOL = 0, - REDUCE_HERE = 88, - SHIFT_THERE = 87, + REDUCE_HERE = 90, + SHIFT_THERE = 89, T_AND = 1, T_AND_AND = 2, T_AND_EQ = 3, @@ -70,9 +70,9 @@ public: T_CATCH = 6, T_COLON = 7, T_COMMA = 8, - T_CONST = 81, + T_CONST = 83, T_CONTINUE = 9, - T_DEBUGGER = 82, + T_DEBUGGER = 84, T_DEFAULT = 10, T_DELETE = 11, T_DIVIDE_ = 12, @@ -83,7 +83,7 @@ public: T_EQ = 17, T_EQ_EQ = 18, T_EQ_EQ_EQ = 19, - T_FALSE = 80, + T_FALSE = 82, T_FINALLY = 20, T_FOR = 21, T_FUNCTION = 22, @@ -95,7 +95,7 @@ public: T_GT_GT_GT_EQ = 28, T_IDENTIFIER = 29, T_IF = 30, - T_IMPORT = 86, + T_IMPORT = 88, T_IN = 31, T_INSTANCEOF = 32, T_LBRACE = 33, @@ -108,12 +108,12 @@ public: T_MINUS = 40, T_MINUS_EQ = 41, T_MINUS_MINUS = 42, - T_MULTILINE_STRING_LITERAL = 84, + T_MULTILINE_STRING_LITERAL = 86, T_NEW = 43, T_NOT = 44, T_NOT_EQ = 45, T_NOT_EQ_EQ = 46, - T_NULL = 78, + T_NULL = 80, T_NUMERIC_LITERAL = 47, T_OR = 48, T_OR_EQ = 49, @@ -121,42 +121,44 @@ public: T_PLUS = 51, T_PLUS_EQ = 52, T_PLUS_PLUS = 53, - T_PUBLIC = 85, + T_PROPERTY = 66, + T_PUBLIC = 87, T_QUESTION = 54, T_RBRACE = 55, T_RBRACKET = 56, T_REMAINDER = 57, T_REMAINDER_EQ = 58, - T_RESERVED_WORD = 83, + T_RESERVED_WORD = 85, T_RETURN = 59, T_RPAREN = 60, T_SEMICOLON = 61, + T_SIGNAL = 67, T_STAR = 63, T_STAR_EQ = 64, T_STRING_LITERAL = 65, - T_SWITCH = 66, - T_THIS = 67, - T_THROW = 68, - T_TILDE = 69, - T_TRUE = 79, - T_TRY = 70, - T_TYPEOF = 71, - T_VAR = 72, - T_VOID = 73, - T_WHILE = 74, - T_WITH = 75, - T_XOR = 76, - T_XOR_EQ = 77, - - ACCEPT_STATE = 531, - RULE_COUNT = 304, - STATE_COUNT = 532, - TERMINAL_COUNT = 89, - NON_TERMINAL_COUNT = 100, - - GOTO_INDEX_OFFSET = 532, - GOTO_INFO_OFFSET = 1798, - GOTO_CHECK_OFFSET = 1798 + T_SWITCH = 68, + T_THIS = 69, + T_THROW = 70, + T_TILDE = 71, + T_TRUE = 81, + T_TRY = 72, + T_TYPEOF = 73, + T_VAR = 74, + T_VOID = 75, + T_WHILE = 76, + T_WITH = 77, + T_XOR = 78, + T_XOR_EQ = 79, + + ACCEPT_STATE = 565, + RULE_COUNT = 316, + STATE_COUNT = 566, + TERMINAL_COUNT = 91, + NON_TERMINAL_COUNT = 102, + + GOTO_INDEX_OFFSET = 566, + GOTO_INFO_OFFSET = 1811, + GOTO_CHECK_OFFSET = 1811 }; static const char *const spell []; diff --git a/src/declarative/qml/parser/javascriptlexer.cpp b/src/declarative/qml/parser/javascriptlexer.cpp index 90f8e44..7bbb4bf 100644 --- a/src/declarative/qml/parser/javascriptlexer.cpp +++ b/src/declarative/qml/parser/javascriptlexer.cpp @@ -291,6 +291,10 @@ int JavaScript::Lexer::findReservedWord(const QChar *c, int size) const && c[2] == QLatin1Char('p') && c[3] == QLatin1Char('o') && c[4] == QLatin1Char('r') && c[5] == QLatin1Char('t')) return JavaScriptGrammar::T_IMPORT; + else if (c[0] == QLatin1Char('s') && c[1] == QLatin1Char('i') + && c[2] == QLatin1Char('g') && c[3] == QLatin1Char('n') + && c[4] == QLatin1Char('a') && c[5] == QLatin1Char('l')) + return JavaScriptGrammar::T_IMPORT; else if (check_reserved) { if (c[0] == QLatin1Char('e') && c[1] == QLatin1Char('x') && c[2] == QLatin1Char('p') && c[3] == QLatin1Char('o') @@ -374,6 +378,11 @@ int JavaScript::Lexer::findReservedWord(const QChar *c, int size) const && c[4] == QLatin1Char('g') && c[5] == QLatin1Char('g') && c[6] == QLatin1Char('e') && c[7] == QLatin1Char('r')) return JavaScriptGrammar::T_DEBUGGER; + else if (c[0] == QLatin1Char('p') && c[1] == QLatin1Char('r') + && c[2] == QLatin1Char('o') && c[3] == QLatin1Char('p') + && c[4] == QLatin1Char('e') && c[5] == QLatin1Char('r') + && c[6] == QLatin1Char('t') && c[7] == QLatin1Char('y')) + return JavaScriptGrammar::T_PROPERTY; else if (check_reserved) { if (c[0] == QLatin1Char('a') && c[1] == QLatin1Char('b') && c[2] == QLatin1Char('s') && c[3] == QLatin1Char('t') diff --git a/src/declarative/qml/parser/javascriptparser.cpp b/src/declarative/qml/parser/javascriptparser.cpp index 58b7a5b..21dcb0f 100644 --- a/src/declarative/qml/parser/javascriptparser.cpp +++ b/src/declarative/qml/parser/javascriptparser.cpp @@ -271,116 +271,130 @@ case 25: { sym(1).Node = node; } break; -case 26: { +case 26: + +case 27: { + sym(1).sval = driver->intern(lexer->characterBuffer(), lexer->characterCount()); + break; +} + +case 29: { AST::UiPublicMember *node = makeAstNode (driver->nodePool(), sym(2).sval, sym(3).sval); - node->publicToken = loc(1); - node->attributeTypeToken = loc(2); + node->propertyToken = loc(1); + node->typeToken = loc(2); node->identifierToken = loc(3); sym(1).Node = node; } break; -case 27: { +case 30: { AST::UiPublicMember *node = makeAstNode (driver->nodePool(), sym(3).sval, sym(4).sval); node->isDefaultMember = true; - node->publicToken = loc(1); - node->attributeTypeToken = loc(3); + node->propertyToken = loc(1); + node->typeToken = loc(3); node->identifierToken = loc(4); sym(1).Node = node; } break; -case 28: { +case 31: { AST::UiPublicMember *node = makeAstNode (driver->nodePool(), sym(2).sval, sym(3).sval, sym(5).Expression); - node->publicToken = loc(1); - node->attributeTypeToken = loc(2); + node->propertyToken = loc(1); + node->typeToken = loc(2); node->identifierToken = loc(3); node->colonToken = loc(4); sym(1).Node = node; } break; -case 29: { +case 32: { AST::UiPublicMember *node = makeAstNode (driver->nodePool(), sym(3).sval, sym(4).sval, sym(6).Expression); node->isDefaultMember = true; - node->publicToken = loc(1); - node->attributeTypeToken = loc(3); + node->propertyToken = loc(1); + node->typeToken = loc(3); node->identifierToken = loc(4); node->colonToken = loc(5); sym(1).Node = node; } break; -case 30: { +case 33: { sym(1).Node = makeAstNode(driver->nodePool(), sym(1).Node); } break; -case 31: { +case 34: { sym(1).Node = makeAstNode(driver->nodePool(), sym(1).Node); } break; -case 32: +case 35: -case 33: +case 36: { AST::UiQualifiedId *node = makeAstNode (driver->nodePool(), driver->intern(lexer->characterBuffer(), lexer->characterCount())); node->identifierToken = loc(1); sym(1).Node = node; } break; -case 34: { +case 38: + +case 39: { + sym(1).sval = driver->intern(lexer->characterBuffer(), lexer->characterCount()); + break; +} + +case 40: { AST::UiQualifiedId *node = makeAstNode (driver->nodePool(), sym(1).sval); node->identifierToken = loc(1); sym(1).Node = node; } break; -case 35: { +case 41: { AST::UiQualifiedId *node = makeAstNode (driver->nodePool(), sym(1).UiQualifiedId, sym(3).sval); node->identifierToken = loc(3); sym(1).Node = node; } break; -case 36: { +case 42: { AST::ThisExpression *node = makeAstNode (driver->nodePool()); node->thisToken = loc(1); sym(1).Node = node; } break; -case 37: { +case 43: { AST::IdentifierExpression *node = makeAstNode (driver->nodePool(), sym(1).sval); node->identifierToken = loc(1); sym(1).Node = node; } break; -case 38: { +case 44: { AST::NullExpression *node = makeAstNode (driver->nodePool()); node->nullToken = loc(1); sym(1).Node = node; } break; -case 39: { +case 45: { AST::TrueLiteral *node = makeAstNode (driver->nodePool()); node->trueToken = loc(1); sym(1).Node = node; } break; -case 40: { +case 46: { AST::FalseLiteral *node = makeAstNode (driver->nodePool()); node->falseToken = loc(1); sym(1).Node = node; } break; -case 41: { +case 47: { AST::NumericLiteral *node = makeAstNode (driver->nodePool(), sym(1).dval); node->literalToken = loc(1); sym(1).Node = node; } break; -case 42: { +case 48: { AST::StringLiteral *node = makeAstNode (driver->nodePool(), sym(1).sval); node->literalToken = loc(1); sym(1).Node = node; } break; -case 43: { +case 49: { bool rx = lexer->scanRegExp(Lexer::NoPrefix); if (!rx) { diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, lexer->startLineNo(), @@ -392,7 +406,7 @@ case 43: { sym(1).Node = node; } break; -case 44: { +case 50: { bool rx = lexer->scanRegExp(Lexer::EqualPrefix); if (!rx) { diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, lexer->startLineNo(), @@ -404,21 +418,21 @@ case 44: { sym(1).Node = node; } break; -case 45: { +case 51: { AST::ArrayLiteral *node = makeAstNode (driver->nodePool(), sym(2).Elision); node->lbracketToken = loc(1); node->rbracketToken = loc(3); sym(1).Node = node; } break; -case 46: { +case 52: { AST::ArrayLiteral *node = makeAstNode (driver->nodePool(), sym(2).ElementList->finish ()); node->lbracketToken = loc(1); node->rbracketToken = loc(3); sym(1).Node = node; } break; -case 47: { +case 53: { AST::ArrayLiteral *node = makeAstNode (driver->nodePool(), sym(2).ElementList->finish (), sym(4).Elision); node->lbracketToken = loc(1); node->commaToken = loc(3); @@ -426,7 +440,7 @@ case 47: { sym(1).Node = node; } break; -case 48: { +case 54: { AST::ObjectLiteral *node = 0; if (sym(2).Node) node = makeAstNode (driver->nodePool(), @@ -438,7 +452,7 @@ case 48: { sym(1).Node = node; } break; -case 49: { +case 55: { AST::ObjectLiteral *node = makeAstNode (driver->nodePool(), sym(2).PropertyNameAndValueList->finish ()); node->lbraceToken = loc(1); @@ -446,51 +460,51 @@ case 49: { sym(1).Node = node; } break; -case 50: { +case 56: { AST::NestedExpression *node = makeAstNode(driver->nodePool(), sym(2).Expression); node->lparenToken = loc(1); node->rparenToken = loc(3); sym(1).Node = node; } break; -case 51: { +case 57: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).Elision, sym(2).Expression); } break; -case 52: { +case 58: { AST::ElementList *node = makeAstNode (driver->nodePool(), sym(1).ElementList, sym(3).Elision, sym(4).Expression); node->commaToken = loc(2); sym(1).Node = node; } break; -case 53: { +case 59: { AST::Elision *node = makeAstNode (driver->nodePool()); node->commaToken = loc(1); sym(1).Node = node; } break; -case 54: { +case 60: { AST::Elision *node = makeAstNode (driver->nodePool(), sym(1).Elision); node->commaToken = loc(2); sym(1).Node = node; } break; -case 55: { +case 61: { sym(1).Node = 0; } break; -case 56: { +case 62: { sym(1).Elision = sym(1).Elision->finish (); } break; -case 57: { +case 63: { AST::PropertyNameAndValueList *node = makeAstNode (driver->nodePool(), sym(1).PropertyName, sym(3).Expression); node->colonToken = loc(2); sym(1).Node = node; } break; -case 58: { +case 64: { AST::PropertyNameAndValueList *node = makeAstNode (driver->nodePool(), sym(1).PropertyNameAndValueList, sym(3).PropertyName, sym(5).Expression); node->commaToken = loc(2); @@ -498,46 +512,36 @@ case 58: { sym(1).Node = node; } break; -case 59: { +case 65: { AST::IdentifierPropertyName *node = makeAstNode (driver->nodePool(), sym(1).sval); node->propertyNameToken = loc(1); sym(1).Node = node; } break; -case 60: { +case 67: { + AST::IdentifierPropertyName *node = makeAstNode (driver->nodePool(), driver->intern(lexer->characterBuffer(), lexer->characterCount())); + node->propertyNameToken = loc(1); + sym(1).Node = node; +} break; + +case 68: { AST::StringLiteralPropertyName *node = makeAstNode (driver->nodePool(), sym(1).sval); node->propertyNameToken = loc(1); sym(1).Node = node; } break; -case 61: { +case 69: { AST::NumericLiteralPropertyName *node = makeAstNode (driver->nodePool(), sym(1).dval); node->propertyNameToken = loc(1); sym(1).Node = node; } break; -case 62: { +case 70: { AST::IdentifierPropertyName *node = makeAstNode (driver->nodePool(), sym(1).sval); node->propertyNameToken = loc(1); sym(1).Node = node; } break; -case 63: - -case 64: - -case 65: - -case 66: - -case 67: - -case 68: - -case 69: - -case 70: - case 71: case 72: @@ -583,25 +587,41 @@ case 91: case 92: case 93: + +case 94: + +case 95: + +case 96: + +case 97: + +case 98: + +case 99: + +case 100: + +case 101: { sym(1).sval = driver->intern(lexer->characterBuffer(), lexer->characterCount()); } break; -case 98: { +case 106: { AST::ArrayMemberExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).Expression); node->lbracketToken = loc(2); node->rbracketToken = loc(4); sym(1).Node = node; } break; -case 99: { +case 107: { AST::FieldMemberExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).sval); node->dotToken = loc(2); node->identifierToken = loc(3); sym(1).Node = node; } break; -case 100: { +case 108: { AST::NewMemberExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression, sym(4).ArgumentList); node->newToken = loc(1); node->lparenToken = loc(3); @@ -609,384 +629,384 @@ case 100: { sym(1).Node = node; } break; -case 102: { +case 110: { AST::NewExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->newToken = loc(1); sym(1).Node = node; } break; -case 103: { +case 111: { AST::CallExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).ArgumentList); node->lparenToken = loc(2); node->rparenToken = loc(4); sym(1).Node = node; } break; -case 104: { +case 112: { AST::CallExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).ArgumentList); node->lparenToken = loc(2); node->rparenToken = loc(4); sym(1).Node = node; } break; -case 105: { +case 113: { AST::ArrayMemberExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).Expression); node->lbracketToken = loc(2); node->rbracketToken = loc(4); sym(1).Node = node; } break; -case 106: { +case 114: { AST::FieldMemberExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).sval); node->dotToken = loc(2); node->identifierToken = loc(3); sym(1).Node = node; } break; -case 107: { +case 115: { sym(1).Node = 0; } break; -case 108: { +case 116: { sym(1).Node = sym(1).ArgumentList->finish(); } break; -case 109: { +case 117: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).Expression); } break; -case 110: { +case 118: { AST::ArgumentList *node = makeAstNode (driver->nodePool(), sym(1).ArgumentList, sym(3).Expression); node->commaToken = loc(2); sym(1).Node = node; } break; -case 114: { +case 122: { AST::PostIncrementExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression); node->incrementToken = loc(2); sym(1).Node = node; } break; -case 115: { +case 123: { AST::PostDecrementExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression); node->decrementToken = loc(2); sym(1).Node = node; } break; -case 117: { +case 125: { AST::DeleteExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->deleteToken = loc(1); sym(1).Node = node; } break; -case 118: { +case 126: { AST::VoidExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->voidToken = loc(1); sym(1).Node = node; } break; -case 119: { +case 127: { AST::TypeOfExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->typeofToken = loc(1); sym(1).Node = node; } break; -case 120: { +case 128: { AST::PreIncrementExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->incrementToken = loc(1); sym(1).Node = node; } break; -case 121: { +case 129: { AST::PreDecrementExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->decrementToken = loc(1); sym(1).Node = node; } break; -case 122: { +case 130: { AST::UnaryPlusExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->plusToken = loc(1); sym(1).Node = node; } break; -case 123: { +case 131: { AST::UnaryMinusExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->minusToken = loc(1); sym(1).Node = node; } break; -case 124: { +case 132: { AST::TildeExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->tildeToken = loc(1); sym(1).Node = node; } break; -case 125: { +case 133: { AST::NotExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->notToken = loc(1); sym(1).Node = node; } break; -case 127: { +case 135: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Mul, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 128: { +case 136: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Div, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 129: { +case 137: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Mod, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 131: { +case 139: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Add, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 132: { +case 140: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Sub, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 134: { +case 142: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::LShift, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 135: { +case 143: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::RShift, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 136: { +case 144: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::URShift, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 138: { +case 146: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Lt, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 139: { +case 147: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Gt, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 140: { +case 148: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Le, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 141: { +case 149: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Ge, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 142: { +case 150: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::InstanceOf, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 143: { +case 151: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::In, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 145: { +case 153: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Lt, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 146: { +case 154: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Gt, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 147: { +case 155: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Le, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 148: { +case 156: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Ge, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 149: { +case 157: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::InstanceOf, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 151: { +case 159: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Equal, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 152: { +case 160: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::NotEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 153: { +case 161: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::StrictEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 154: { +case 162: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::StrictNotEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 156: { +case 164: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Equal, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 157: { +case 165: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::NotEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 158: { +case 166: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::StrictEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 159: { +case 167: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::StrictNotEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 161: { +case 169: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::BitAnd, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 163: { +case 171: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::BitAnd, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 165: { +case 173: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::BitXor, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 167: { +case 175: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::BitXor, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 169: { +case 177: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::BitOr, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 171: { +case 179: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::BitOr, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 173: { +case 181: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::And, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 175: { +case 183: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::And, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 177: { +case 185: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Or, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 179: { +case 187: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Or, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 181: { +case 189: { AST::ConditionalExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).Expression, sym(5).Expression); node->questionToken = loc(2); @@ -994,7 +1014,7 @@ case 181: { sym(1).Node = node; } break; -case 183: { +case 191: { AST::ConditionalExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).Expression, sym(5).Expression); node->questionToken = loc(2); @@ -1002,112 +1022,112 @@ case 183: { sym(1).Node = node; } break; -case 185: { +case 193: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(2).ival, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 187: { +case 195: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(2).ival, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 188: { +case 196: { sym(1).ival = QSOperator::Assign; } break; -case 189: { +case 197: { sym(1).ival = QSOperator::InplaceMul; } break; -case 190: { +case 198: { sym(1).ival = QSOperator::InplaceDiv; } break; -case 191: { +case 199: { sym(1).ival = QSOperator::InplaceMod; } break; -case 192: { +case 200: { sym(1).ival = QSOperator::InplaceAdd; } break; -case 193: { +case 201: { sym(1).ival = QSOperator::InplaceSub; } break; -case 194: { +case 202: { sym(1).ival = QSOperator::InplaceLeftShift; } break; -case 195: { +case 203: { sym(1).ival = QSOperator::InplaceRightShift; } break; -case 196: { +case 204: { sym(1).ival = QSOperator::InplaceURightShift; } break; -case 197: { +case 205: { sym(1).ival = QSOperator::InplaceAnd; } break; -case 198: { +case 206: { sym(1).ival = QSOperator::InplaceXor; } break; -case 199: { +case 207: { sym(1).ival = QSOperator::InplaceOr; } break; -case 201: { +case 209: { AST::Expression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).Expression); node->commaToken = loc(2); sym(1).Node = node; } break; -case 202: { +case 210: { sym(1).Node = 0; } break; -case 205: { +case 213: { AST::Expression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).Expression); node->commaToken = loc(2); sym(1).Node = node; } break; -case 206: { +case 214: { sym(1).Node = 0; } break; -case 223: { +case 231: { AST::Block *node = makeAstNode (driver->nodePool(), sym(2).StatementList); node->lbraceToken = loc(1); node->rbraceToken = loc(3); sym(1).Node = node; } break; -case 224: { +case 232: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).Statement); } break; -case 225: { +case 233: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).StatementList, sym(2).Statement); } break; -case 226: { +case 234: { sym(1).Node = 0; } break; -case 227: { +case 235: { sym(1).Node = sym(1).StatementList->finish (); } break; -case 229: { +case 237: { AST::VariableStatement *node = makeAstNode (driver->nodePool(), sym(2).VariableDeclarationList->finish (/*readOnly=*/sym(1).ival == T_CONST)); node->declarationKindToken = loc(1); @@ -1115,76 +1135,76 @@ case 229: { sym(1).Node = node; } break; -case 230: { +case 238: { sym(1).ival = T_CONST; } break; -case 231: { +case 239: { sym(1).ival = T_VAR; } break; -case 232: { +case 240: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).VariableDeclaration); } break; -case 233: { +case 241: { AST::VariableDeclarationList *node = makeAstNode (driver->nodePool(), sym(1).VariableDeclarationList, sym(3).VariableDeclaration); node->commaToken = loc(2); sym(1).Node = node; } break; -case 234: { +case 242: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).VariableDeclaration); } break; -case 235: { +case 243: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).VariableDeclarationList, sym(3).VariableDeclaration); } break; -case 236: { +case 244: { AST::VariableDeclaration *node = makeAstNode (driver->nodePool(), sym(1).sval, sym(2).Expression); node->identifierToken = loc(1); sym(1).Node = node; } break; -case 237: { +case 245: { AST::VariableDeclaration *node = makeAstNode (driver->nodePool(), sym(1).sval, sym(2).Expression); node->identifierToken = loc(1); sym(1).Node = node; } break; -case 238: { +case 246: { // ### TODO: AST for initializer sym(1) = sym(2); } break; -case 239: { +case 247: { sym(1).Node = 0; } break; -case 241: { +case 249: { // ### TODO: AST for initializer sym(1) = sym(2); } break; -case 242: { +case 250: { sym(1).Node = 0; } break; -case 244: { +case 252: { AST::EmptyStatement *node = makeAstNode (driver->nodePool()); node->semicolonToken = loc(1); sym(1).Node = node; } break; -case 246: { +case 254: { AST::ExpressionStatement *node = makeAstNode (driver->nodePool(), sym(1).Expression); node->semicolonToken = loc(2); sym(1).Node = node; } break; -case 247: { +case 255: { AST::IfStatement *node = makeAstNode (driver->nodePool(), sym(3).Expression, sym(5).Statement, sym(7).Statement); node->ifToken = loc(1); node->lparenToken = loc(2); @@ -1193,7 +1213,7 @@ case 247: { sym(1).Node = node; } break; -case 248: { +case 256: { AST::IfStatement *node = makeAstNode (driver->nodePool(), sym(3).Expression, sym(5).Statement); node->ifToken = loc(1); node->lparenToken = loc(2); @@ -1201,7 +1221,7 @@ case 248: { sym(1).Node = node; } break; -case 250: { +case 258: { AST::DoWhileStatement *node = makeAstNode (driver->nodePool(), sym(2).Statement, sym(5).Expression); node->doToken = loc(1); node->whileToken = loc(3); @@ -1211,7 +1231,7 @@ case 250: { sym(1).Node = node; } break; -case 251: { +case 259: { AST::WhileStatement *node = makeAstNode (driver->nodePool(), sym(3).Expression, sym(5).Statement); node->whileToken = loc(1); node->lparenToken = loc(2); @@ -1219,7 +1239,7 @@ case 251: { sym(1).Node = node; } break; -case 252: { +case 260: { AST::ForStatement *node = makeAstNode (driver->nodePool(), sym(3).Expression, sym(5).Expression, sym(7).Expression, sym(9).Statement); node->forToken = loc(1); @@ -1230,7 +1250,7 @@ case 252: { sym(1).Node = node; } break; -case 253: { +case 261: { AST::LocalForStatement *node = makeAstNode (driver->nodePool(), sym(4).VariableDeclarationList->finish (/*readOnly=*/false), sym(6).Expression, sym(8).Expression, sym(10).Statement); @@ -1243,7 +1263,7 @@ case 253: { sym(1).Node = node; } break; -case 254: { +case 262: { AST:: ForEachStatement *node = makeAstNode (driver->nodePool(), sym(3).Expression, sym(5).Expression, sym(7).Statement); node->forToken = loc(1); @@ -1253,7 +1273,7 @@ case 254: { sym(1).Node = node; } break; -case 255: { +case 263: { AST::LocalForEachStatement *node = makeAstNode (driver->nodePool(), sym(4).VariableDeclaration, sym(6).Expression, sym(8).Statement); node->forToken = loc(1); @@ -1264,14 +1284,14 @@ case 255: { sym(1).Node = node; } break; -case 257: { +case 265: { AST::ContinueStatement *node = makeAstNode (driver->nodePool()); node->continueToken = loc(1); node->semicolonToken = loc(2); sym(1).Node = node; } break; -case 259: { +case 267: { AST::ContinueStatement *node = makeAstNode (driver->nodePool(), sym(2).sval); node->continueToken = loc(1); node->identifierToken = loc(2); @@ -1279,14 +1299,14 @@ case 259: { sym(1).Node = node; } break; -case 261: { +case 269: { AST::BreakStatement *node = makeAstNode (driver->nodePool()); node->breakToken = loc(1); node->semicolonToken = loc(2); sym(1).Node = node; } break; -case 263: { +case 271: { AST::BreakStatement *node = makeAstNode (driver->nodePool(), sym(2).sval); node->breakToken = loc(1); node->identifierToken = loc(2); @@ -1294,14 +1314,14 @@ case 263: { sym(1).Node = node; } break; -case 265: { +case 273: { AST::ReturnStatement *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->returnToken = loc(1); node->semicolonToken = loc(3); sym(1).Node = node; } break; -case 266: { +case 274: { AST::WithStatement *node = makeAstNode (driver->nodePool(), sym(3).Expression, sym(5).Statement); node->withToken = loc(1); node->lparenToken = loc(2); @@ -1309,7 +1329,7 @@ case 266: { sym(1).Node = node; } break; -case 267: { +case 275: { AST::SwitchStatement *node = makeAstNode (driver->nodePool(), sym(3).Expression, sym(5).CaseBlock); node->switchToken = loc(1); node->lparenToken = loc(2); @@ -1317,83 +1337,90 @@ case 267: { sym(1).Node = node; } break; -case 268: { +case 276: { AST::CaseBlock *node = makeAstNode (driver->nodePool(), sym(2).CaseClauses); node->lbraceToken = loc(1); node->rbraceToken = loc(3); sym(1).Node = node; } break; -case 269: { +case 277: { AST::CaseBlock *node = makeAstNode (driver->nodePool(), sym(2).CaseClauses, sym(3).DefaultClause, sym(4).CaseClauses); node->lbraceToken = loc(1); node->rbraceToken = loc(5); sym(1).Node = node; } break; -case 270: { +case 278: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).CaseClause); } break; -case 271: { +case 279: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).CaseClauses, sym(2).CaseClause); } break; -case 272: { +case 280: { sym(1).Node = 0; } break; -case 273: { +case 281: { sym(1).Node = sym(1).CaseClauses->finish (); } break; -case 274: { +case 282: { AST::CaseClause *node = makeAstNode (driver->nodePool(), sym(2).Expression, sym(4).StatementList); node->caseToken = loc(1); node->colonToken = loc(3); sym(1).Node = node; } break; -case 275: { +case 283: { AST::DefaultClause *node = makeAstNode (driver->nodePool(), sym(3).StatementList); node->defaultToken = loc(1); node->colonToken = loc(2); sym(1).Node = node; } break; -case 276: { +case 285: { + AST::LabelledStatement *node = makeAstNode (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 286: { AST::LabelledStatement *node = makeAstNode (driver->nodePool(), sym(1).sval, sym(3).Statement); node->identifierToken = loc(1); node->colonToken = loc(2); sym(1).Node = node; } break; -case 278: { +case 288: { AST::ThrowStatement *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->throwToken = loc(1); node->semicolonToken = loc(3); sym(1).Node = node; } break; -case 279: { +case 289: { AST::TryStatement *node = makeAstNode (driver->nodePool(), sym(2).Statement, sym(3).Catch); node->tryToken = loc(1); sym(1).Node = node; } break; -case 280: { +case 290: { AST::TryStatement *node = makeAstNode (driver->nodePool(), sym(2).Statement, sym(3).Finally); node->tryToken = loc(1); sym(1).Node = node; } break; -case 281: { +case 291: { AST::TryStatement *node = makeAstNode (driver->nodePool(), sym(2).Statement, sym(3).Catch, sym(4).Finally); node->tryToken = loc(1); sym(1).Node = node; } break; -case 282: { +case 292: { AST::Catch *node = makeAstNode (driver->nodePool(), sym(3).sval, sym(5).Block); node->catchToken = loc(1); node->lparenToken = loc(2); @@ -1402,20 +1429,31 @@ case 282: { sym(1).Node = node; } break; -case 283: { +case 293: { AST::Finally *node = makeAstNode (driver->nodePool(), sym(2).Block); node->finallyToken = loc(1); sym(1).Node = node; } break; -case 285: { +case 295: { AST::DebuggerStatement *node = makeAstNode (driver->nodePool()); node->debuggerToken = loc(1); node->semicolonToken = loc(2); sym(1).Node = node; } break; -case 286: { +case 297: { + AST::FunctionDeclaration *node = makeAstNode (driver->nodePool(), driver->intern(lexer->characterBuffer(), lexer->characterCount()), sym(4).FormalParameterList, sym(7).FunctionBody); + node->functionToken = loc(1); + node->identifierToken = loc(2); + node->lparenToken = loc(3); + node->rparenToken = loc(5); + node->lbraceToken = loc(6); + node->rbraceToken = loc(8); + sym(1).Node = node; +} break; + +case 298: { AST::FunctionDeclaration *node = makeAstNode (driver->nodePool(), sym(2).sval, sym(4).FormalParameterList, sym(7).FunctionBody); node->functionToken = loc(1); node->identifierToken = loc(2); @@ -1426,7 +1464,7 @@ case 286: { sym(1).Node = node; } break; -case 287: { +case 299: { AST::FunctionExpression *node = makeAstNode (driver->nodePool(), sym(2).sval, sym(4).FormalParameterList, sym(7).FunctionBody); node->functionToken = loc(1); if (sym(2).sval) @@ -1438,56 +1476,56 @@ case 287: { sym(1).Node = node; } break; -case 288: { +case 300: { AST::FormalParameterList *node = makeAstNode (driver->nodePool(), sym(1).sval); node->identifierToken = loc(1); sym(1).Node = node; } break; -case 289: { +case 301: { AST::FormalParameterList *node = makeAstNode (driver->nodePool(), sym(1).FormalParameterList, sym(3).sval); node->commaToken = loc(2); node->identifierToken = loc(3); sym(1).Node = node; } break; -case 290: { +case 302: { sym(1).Node = 0; } break; -case 291: { +case 303: { sym(1).Node = sym(1).FormalParameterList->finish (); } break; -case 292: { +case 304: { sym(1).Node = 0; } break; -case 294: { +case 306: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).SourceElements->finish ()); } break; -case 295: { +case 307: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).SourceElement); } break; -case 296: { +case 308: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).SourceElements, sym(2).SourceElement); } break; -case 297: { +case 309: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).Statement); } break; -case 298: { +case 310: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).FunctionDeclaration); } break; -case 299: { +case 311: { sym(1).sval = 0; } break; -case 301: { +case 313: { sym(1).Node = 0; } break; diff --git a/src/declarative/qml/parser/javascriptparser_p.h b/src/declarative/qml/parser/javascriptparser_p.h index 34f41a8..e1aff9c 100644 --- a/src/declarative/qml/parser/javascriptparser_p.h +++ b/src/declarative/qml/parser/javascriptparser_p.h @@ -206,9 +206,9 @@ protected: }; -#define J_SCRIPT_REGEXPLITERAL_RULE1 43 +#define J_SCRIPT_REGEXPLITERAL_RULE1 49 -#define J_SCRIPT_REGEXPLITERAL_RULE2 44 +#define J_SCRIPT_REGEXPLITERAL_RULE2 50 QT_END_NAMESPACE diff --git a/src/declarative/qml/qmlscriptparser.cpp b/src/declarative/qml/qmlscriptparser.cpp index 61cb2ee..89cde7b 100644 --- a/src/declarative/qml/qmlscriptparser.cpp +++ b/src/declarative/qml/qmlscriptparser.cpp @@ -337,46 +337,52 @@ bool ProcessAST::visit(AST::UiPublicMember *node) const QString memberType = node->memberType->asString(); const QString name = node->name->asString(); - if (node->isDefaultMember) - qWarning() << "default-ness not implemented"; - - if (memberType == QLatin1String("property")) { - _stateStack.pushProperty(QLatin1String("properties"), node->publicToken.startLine); - - Object *obj = defineObjectBinding(node->identifierToken.startLine, - 0, - QLatin1String("Property")); - - _stateStack.pushObject(obj); - - defineProperty(QLatin1String("name"), node->identifierToken.startLine, name); - if (node->expression) // default value - defineProperty(QLatin1String("value"), node->identifierToken.startLine, getPrimitive("value", node->expression)); - - _stateStack.pop(); // object - _stateStack.pop(); // properties - - } else if (memberType == QLatin1String("signal")) { - _stateStack.pushProperty(QLatin1String("signals"), node->publicToken.startLine); - - Object *obj = defineObjectBinding(node->identifierToken.startLine, - 0, - QLatin1String("Signal")); - - _stateStack.pushObject(obj); + const struct TypeNameToType { + const char *name; + Object::DynamicProperty::Type type; + } propTypeNameToTypes[] = { + { "int", Object::DynamicProperty::Int }, + { "bool", Object::DynamicProperty::Bool }, + { "double", Object::DynamicProperty::Real }, + { "real", Object::DynamicProperty::Real }, + { "string", Object::DynamicProperty::String }, + { "color", Object::DynamicProperty::Color }, + { "date", Object::DynamicProperty::Date }, + { "var", Object::DynamicProperty::Variant }, + { "variant", Object::DynamicProperty::Variant } + }; + const int propTypeNameToTypesCount = sizeof(propTypeNameToTypes) / + sizeof(propTypeNameToTypes[0]); + + bool typeFound = false; + Object::DynamicProperty::Type type; + for(int ii = 0; !typeFound && ii < propTypeNameToTypesCount; ++ii) { + if(QLatin1String(propTypeNameToTypes[ii].name) == memberType) { + type = propTypeNameToTypes[ii].type; + typeFound = true; + } + } + + if(!typeFound) { + qWarning() << "Unknown property type" << memberType; // ### FIXME + return false; + } - defineProperty(QLatin1String("name"), node->identifierToken.startLine, name); + Object::DynamicProperty property; + property.isDefaultProperty = node->isDefaultMember; + property.type = type; + property.name = name.toUtf8(); - _stateStack.pop(); // object - _stateStack.pop(); // signals - } else { - qWarning() << "bad public identifier" << memberType; // ### FIXME + if (node->expression) { // default value + property.defaultValue = new Property; + Value *value = new Value; + value->primitive = getPrimitive("value", node->expression); + property.defaultValue->values << value; } + _stateStack.top().object->dynamicProperties << property; - // ### TODO drop initializer (unless some example needs differnet properties than name and type and value. - - return false; + return true; } -- cgit v0.12 From d40df4790d6c8f6b6572c46c91ec058c86b44942 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Fri, 1 May 2009 14:41:06 +1000 Subject: Doc work. --- doc/src/declarative/animation.qdoc | 4 +- doc/src/declarative/effects.qdoc | 10 +- doc/src/declarative/index.qdoc | 100 ++++++++-------- doc/src/declarative/qtdeclarative.qdoc | 93 +++++++++++++++ doc/src/declarative/tutorial.qdoc | 2 +- doc/src/declarative/tutorial1.qdoc | 37 ++++-- doc/src/declarative/tutorial2.qdoc | 106 +++++++++++------ doc/src/declarative/tutorial3.qdoc | 126 ++++++++++++++------- doc/src/modules.qdoc | 1 + examples/declarative/slideswitch/Switch.qml | 1 - .../tutorials/helloworld/t1/tutorial1.qml | 14 +++ .../declarative/tutorials/helloworld/t2/Cell.qml | 16 +++ .../tutorials/helloworld/t2/tutorial2.qml | 27 +++++ .../declarative/tutorials/helloworld/t3/Cell.qml | 16 +++ .../tutorials/helloworld/t3/tutorial3.qml | 59 ++++++++++ examples/declarative/tutorials/t1/tutorial1.qml | 14 --- examples/declarative/tutorials/t2/Cell.qml | 16 --- examples/declarative/tutorials/t2/tutorial2.qml | 41 ------- examples/declarative/tutorials/t3/Cell.qml | 16 --- examples/declarative/tutorials/t3/tutorial3.qml | 78 ------------- src/declarative/extra/qmlsqlconnection.cpp | 45 ++++---- src/declarative/extra/qmlsqlquery.cpp | 34 +++--- src/declarative/fx/qfximageitem.cpp | 4 +- src/declarative/fx/qfxpainted.cpp | 5 +- src/declarative/fx/qfxpainted.h | 5 +- src/declarative/opengl/gltexture.cpp | 1 + src/declarative/qml/script/qmlbasicscript.cpp | 1 + src/declarative/timeline/qmltimeline.cpp | 7 +- src/declarative/util/qmlanimation.cpp | 2 +- 29 files changed, 524 insertions(+), 357 deletions(-) create mode 100644 doc/src/declarative/qtdeclarative.qdoc create mode 100644 examples/declarative/tutorials/helloworld/t1/tutorial1.qml create mode 100644 examples/declarative/tutorials/helloworld/t2/Cell.qml create mode 100644 examples/declarative/tutorials/helloworld/t2/tutorial2.qml create mode 100644 examples/declarative/tutorials/helloworld/t3/Cell.qml create mode 100644 examples/declarative/tutorials/helloworld/t3/tutorial3.qml delete mode 100644 examples/declarative/tutorials/t1/tutorial1.qml delete mode 100644 examples/declarative/tutorials/t2/Cell.qml delete mode 100644 examples/declarative/tutorials/t2/tutorial2.qml delete mode 100644 examples/declarative/tutorials/t3/Cell.qml delete mode 100644 examples/declarative/tutorials/t3/tutorial3.qml diff --git a/doc/src/declarative/animation.qdoc b/doc/src/declarative/animation.qdoc index a143d4c..cd7d1b9 100644 --- a/doc/src/declarative/animation.qdoc +++ b/doc/src/declarative/animation.qdoc @@ -1,6 +1,6 @@ /*! -\page animation.html -\target animation +\page qmlanimation.html +\target qmlanimation \title QML Animation QML supports three different forms of animation - basic property animation, diff --git a/doc/src/declarative/effects.qdoc b/doc/src/declarative/effects.qdoc index e3c68bd..6181e20 100644 --- a/doc/src/declarative/effects.qdoc +++ b/doc/src/declarative/effects.qdoc @@ -1,17 +1,15 @@ /*! \page effects.html -\target effects +\target qmleffects \title Visual Effects - \section1 Basic Effects -These effects are currently supported by all canvas backends. - \list \o Scaling (\l Item \bold scale property) \o Opacity (\l Item \bold opacity property) -\o Z-Axis Rotation (\l Item \bold rotation property) +\o Rotation (\l Item \bold rotation property, and Rotation3D) +\o Affine Transforms (\l Squish) \endlist \section1 Advanced Effects @@ -20,7 +18,7 @@ These effects are currently only supported by the OpenGL canvas backend. Support backends may be added if the performance can be made acceptable. \list -\o X/Y-Axis Rotation (see \l Transform) +\o Perspective Transforms (\l Perspective, Translation3D) \o \l Shadow \o \l Blur \o \l Reflection diff --git a/doc/src/declarative/index.qdoc b/doc/src/declarative/index.qdoc index b5e9001..fe1b46e 100644 --- a/doc/src/declarative/index.qdoc +++ b/doc/src/declarative/index.qdoc @@ -1,51 +1,51 @@ -/*! -\page qml.html -\title 'Qt Declarative' Documentation - -\target qtdeclarativemainpage - -The Qt Declarative module provides a user interface framework for building -highly dynamic and fluid applications. It is targetted at the sorts of user -interface and the sorts of hardware in embedded devices such as phones, media -players, and set-top boxes. It is also appropriate for highly custom desktop -user-interfaces, or special elements in more traditional desktop -user-interfaces. - -Building fluid applications is done declaratively, rather than procedurally. -That is, you specify \e what the UI should look like and how it should behave -in an declarative format called QML instead of specifying step-by-step \e how to -build it in a language like C++ or JavaScript. Specifying a UI declaratively -does not just include the layout of the interface items, but also the way each -individual item looks and behaves and the overall flow of the application. - -Getting Started: -\list -\o \l {qmlexamples}{Examples} -\o \l {tutorial}{Tutorial} -\o \l {qmlforcpp}{Qt Declarative Markup Language For C++ Programmers} -\endlist - -Core Features: -\list -\o \l {binding}{Data Binding} -\o \l {anchor-layout}{Layout Anchors} -\o \l {animation}{Animation} -\o \l {effects}{Visual Effects} -\o \l {components}{Components} -\o \l {qmlmodules}{Modules} -\o \l {qmlfocus}{Keyboard Focus} -\endlist - -QML Reference: -\list -\o \l {elements}{Qml Elements} -\endlist - -C++ Reference: -\list -\o \l {qtprogrammers}{QML for Qt programmers} -\o \l {qtbinding}{C++ Data Binding} -\o \l {cppitem}{C++ Components} -\endlist - +/*! + \page qml.html + \title 'Qt Declarative' Documentation + + \target qtdeclarativemainpage + + The Qt Declarative module provides a declarative framework for building + highly dynamic and fluid applications. It is targetted at the sorts of user + interface (and the sorts of hardware) in embedded devices such as phones, media + players, and set-top boxes. It is also appropriate for highly custom desktop + user-interfaces, or special elements in more traditional desktop + user-interfaces. + + Building fluid applications is done declaratively, rather than procedurally. + That is, you specify \e what the UI should look like and how it should behave + in an declarative format called QML, rather than specifying step-by-step \e how to + build it in a language like C++ or JavaScript. Specifying a UI declaratively + does not just include the layout of the interface items, but also the way each + individual item looks and behaves and the overall flow of the application. + + Getting Started: + \list + \o \l {qmlexamples}{Examples} + \o \l {tutorial}{Tutorial: 'Hello World'} + \o \l {tutorials-declarative-contacts.html}{Tutorial: 'Introduction to QML'} + \o \l {qmlforcpp}{Qt Declarative Markup Language For C++ Programmers} + \endlist + + Core Features: + \list + \o \l {binding}{Data Binding} + \o \l {anchor-layout}{Layout Anchors} + \o \l {qmlanimation}{Animation} + \o \l {qmleffects}{Visual Effects} + \o \l {components}{Components} + \o \l {qmlmodules}{Modules} + \o \l {qmlfocus}{Keyboard Focus} + \endlist + + QML Reference: + \list + \o \l {elements}{Qml Elements} + \endlist + + C++ Reference: + \list + \o \l {qtprogrammers}{QML for Qt programmers} + \o \l {qtbinding}{C++ Data Binding} + \o \l {cppitem}{C++ Components} + \endlist */ diff --git a/doc/src/declarative/qtdeclarative.qdoc b/doc/src/declarative/qtdeclarative.qdoc new file mode 100644 index 0000000..666c8ae --- /dev/null +++ b/doc/src/declarative/qtdeclarative.qdoc @@ -0,0 +1,93 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \module QtDeclarative + \title QtDeclarative Module + \ingroup modules + + \brief The Qt Declarative module provides a declarative framework for building + highly dynamic and fluid applications. + + Qt Declarative is targetted at the sorts of user + interface (and the sorts of hardware) in embedded devices such as phones, media + players, and set-top boxes. It is also appropriate for highly custom desktop + user-interfaces, or special elements in more traditional desktop + user-interfaces. + + Building fluid applications is done declaratively, rather than procedurally. + That is, you specify \e what the UI should look like and how it should behave + in an declarative format called QML, rather than specifying step-by-step \e how to + build it in a language like C++ or JavaScript. Specifying a UI declaratively + does not just include the layout of the interface items, but also the way each + individual item looks and behaves and the overall flow of the application. + + Getting Started: + \list + \o \l {qmlexamples}{Examples} + \o \l {tutorial}{Tutorial: 'Hello World'} + \o \l {tutorials-declarative-contacts.html}{Tutorial: 'Introduction to QML'} + \o \l {qmlforcpp}{Qt Declarative Markup Language For C++ Programmers} + \endlist + + Core Features: + \list + \o \l {binding}{Data Binding} + \o \l {anchor-layout}{Layout Anchors} + \o \l {qmlanimation}{Animation} + \o \l {qmleffects}{Visual Effects} + \o \l {components}{Components} + \o \l {qmlmodules}{Modules} + \o \l {qmlfocus}{Keyboard Focus} + \endlist + + QML Reference: + \list + \o \l {elements}{Qml Elements} + \endlist + + C++ Reference: + \list + \o \l {qtprogrammers}{QML for Qt programmers} + \o \l {qtbinding}{C++ Data Binding} + \o \l {cppitem}{C++ Components} + \endlist +*/ diff --git a/doc/src/declarative/tutorial.qdoc b/doc/src/declarative/tutorial.qdoc index 6fe3929..5c855ec 100644 --- a/doc/src/declarative/tutorial.qdoc +++ b/doc/src/declarative/tutorial.qdoc @@ -6,7 +6,7 @@ This tutorial gives an introduction to QML and the Fluid UI atoms. It doesn't co Chapter one starts with a minimal "Hello world" program and the following chapters introduce new concepts. -The tutorial's source code is located in the $QTDIR/examples/declarative/tutorials directory. +The tutorial's source code is located in the $QTDIR/examples/declarative/tutorials/helloworld directory. Tutorial chapters: diff --git a/doc/src/declarative/tutorial1.qdoc b/doc/src/declarative/tutorial1.qdoc index aa94c06..c2e3e22 100644 --- a/doc/src/declarative/tutorial1.qdoc +++ b/doc/src/declarative/tutorial1.qdoc @@ -10,9 +10,20 @@ This first program is a simple "Hello world" example. The picture below is a scr Here is the QML code for the application: \code - - - +Rect { + id: Page + width: 480 + height: 200 + color: "white" + Text { + id: HelloText + text: "Hello world!" + font.size: 24 + font.bold: true + y: 30 + anchors.horizontalCenter: Page.horizontalCenter + } +} \endcode \section1 Walkthrough @@ -20,7 +31,12 @@ Here is the QML code for the application: \section2 Rect element \code - +Rect { + id: Page + width: 480 + height: 200 + color: "white" +} \endcode First, we declare a root element of type \l Rect. It is one of the basic building blocks you can use to create an application in QML. @@ -30,7 +46,14 @@ The \l Rect element contains many other properties (such as \c x and \c y), but \section2 Text element \code - +Text { + id: HelloText + text: "Hello world!" + font.size: 24 + font.bold: true + y: 30 + anchors.horizontalCenter: Page.horizontalCenter +} \endcode We add a text element as a child of our root element to display the text 'Hello world!'. @@ -39,14 +62,14 @@ The \c y property is used to position the text vertically at 30 pixels from the The \c font.size and \c font.bold properties are related to fonts and use the 'dot' notation (see \l {declarative}{Declarative UI} ). -The \c anchors.horizontalCenter property refers to the horizontal center of an element. In this case, we bind the center of our text element to the center of the \e Page element. We use braces to indicate that \c Page.horizontalCenter is a bound ECMAScript expression that needs to be evaluated. It also means that if the center of \e Page changes (for example if it is resized) our text will be re-centered automatically (see \l binding). +The \c anchors.horizontalCenter property refers to the horizontal center of an element. In this case, we specify that our text element should be horizontally centered in the \e Page element. \section2 Viewing the example To view what you have created, run the qmlviewer (located in the \c bin directory) with your filename as the first argument. For example, to run the provided completed Tutorial 1 example from the install location, you would type: \code -bin/qmlviewer examples/tutorials/t1/tutorial1.qml +bin/qmlviewer $QTDIR/examples/declarative/tutorials/helloworld/t1/tutorial1.qml \endcode [\l tutorial] [Next: \l tutorial2] diff --git a/doc/src/declarative/tutorial2.qdoc b/doc/src/declarative/tutorial2.qdoc index db846b8..54f1828 100644 --- a/doc/src/declarative/tutorial2.qdoc +++ b/doc/src/declarative/tutorial2.qdoc @@ -12,29 +12,54 @@ Our color picker is made of many cells with different colors. To avoid writing t Here is the QML code for \c Cell.qml: \code - - - - - - - +Item { + id: CellContainer + width: 40 + height: 25 + properties: Property { + name: "color" + } + Rect { + anchors.fill: parent + color: CellContainer.color + } + MouseRegion { + anchors.fill: parent + onClicked: { HelloText.color = CellContainer.color } + } +} \endcode Then, we use our \c Cell component to create the color picker in the QML code for the application: \code - - - - - - - - - - - +Rect { + id: Page + width: 480 + height: 200 + color: "white" + Text { + id: HelloText + text: "Hello world!" + font.size: 24 + font.bold: true + y: 30 + anchors.horizontalCenter: Page.horizontalCenter + } + GridLayout { + id: ColorPicker + x: 0 + anchors.bottom: Page.bottom + width: 120; height: 50 + rows: 2; columns: 3 + Cell { color: "#ff0000" } + Cell { color: "#00ff00" } + Cell { color: "#0000ff" } + Cell { color: "#ffff00" } + Cell { color: "#00ffff" } + Cell { color: "#ff00ff" } + } +} \endcode \section1 Walkthrough @@ -42,21 +67,28 @@ Then, we use our \c Cell component to create the color picker in the QML code fo \section2 The Cell Component \code - +Item { + id: CellContainer + width: 40 + height: 25 +} \endcode The root element of our component is an \c Item. It is the most basic 'Fx' element in Qml and is often used as a container for other elements. \code - - - +properties: Property { + name: "color" +} \endcode We declare a \c color property. This property is accessible from \e outside our component, this allows us to instantiate the cells with different colors. \code - +Rect { + anchors.fill: parent + color: CellContainer.color +} \endcode Our cell component is basically a colored rectangle. @@ -66,24 +98,32 @@ The \c anchors.fill property is a convenient way to set the size of an element. We bind the \c color property of this \c Rect to the color property of our component. \code - +MouseRegion { + anchors.fill: parent + onClicked: { HelloText.color = CellContainer.color } +} \endcode In order to change the color of the text when clicking on a cell, we create a \c MouseRegion element with the same size as its parent. -The \c onClick property sets the \c color property of the element named \e HelloText to our cell color. +The \c onClicked property sets the \c color property of the element named \e HelloText to our cell color. \section2 The main QML file \code - - - - - - - - +GridLayout { + id: ColorPicker + x: 0 + anchors.bottom: Page.bottom + width: 120; height: 50 + rows: 2; columns: 3 + Cell { color: "#ff0000" } + Cell { color: "#00ff00" } + Cell { color: "#0000ff" } + Cell { color: "#ffff00" } + Cell { color: "#00ffff" } + Cell { color: "#ff00ff" } +} \endcode In the main QML file, the only thing we have to do is to create a color picker by putting 6 cells with different colors in a grid layout. diff --git a/doc/src/declarative/tutorial3.qdoc b/doc/src/declarative/tutorial3.qdoc index 533e179..3ac22a1 100644 --- a/doc/src/declarative/tutorial3.qdoc +++ b/doc/src/declarative/tutorial3.qdoc @@ -12,44 +12,86 @@ We want our text to jump at the bottom of the screen and become red when clicked Here is the QML code: \code - - - - - - - - - - - - - - - - - - - - - - - - - - - +Rect { + id: Page + width: 480 + height: 200 + color: "white" + Text { + id: HelloText + text: "Hello world!" + font.size: 24 + font.bold: true + y: 30 + anchors.horizontalCenter: Page.horizontalCenter + states: [ + State { + name: "down" + when: MouseRegion.pressed == true + SetProperty { + target: HelloText + property: "y" + value: 160 + } + SetProperty { + target: HelloText + property: "color" + value: "red" + } + } + ] + transitions: [ + Transition { + fromState: "*" + toState: "down" + reversible: true + ParallelAnimation { + NumericAnimation { + properties: "y" + duration: 500 + easing: "easeOutBounce" + } + ColorAnimation { duration: 500 } + } + } + ] + } + MouseRegion { id: MouseRegion; anchors.fill: HelloText } + GridLayout { + id: ColorPicker + x: 0 + anchors.bottom: Page.bottom + width: 120; height: 50 + rows: 2; columns: 3 + Cell { color: "#ff0000" } + Cell { color: "#00ff00" } + Cell { color: "#0000ff" } + Cell { color: "#ffff00" } + Cell { color: "#00ffff" } + Cell { color: "#ff00ff" } + } +} \endcode \section1 Walkthrough \code - - - - - - +states: [ + State { + name: "down" + when: MouseRegion.pressed == true + SetProperty { + target: HelloText + property: "y" + value: 160 + } + SetProperty { + target: HelloText + property: "color" + value: "red" + } + } +] \endcode First, we create a new state \e down for our text element. This state will be activated when MouseRegion is pressed, and deactivated when it is released. @@ -57,7 +99,11 @@ First, we create a new state \e down for our text element. This state will be ac The \e down state includes a set of property changes from our implicit \e {default state} (the items as they were initially defined in the QML). Specifically, we set the \c y property of the text to 160 and the \c color to red. \code - +Transition { + fromState: "*" + toState: "down" + reversible: true +} \endcode Because we don't want the text to appear at the bottom instantly but rather move smoothly, we add a transition between our two states. @@ -67,10 +113,14 @@ Because we don't want the text to appear at the bottom instantly but rather move Because we want the same transition to be run in reverse when changing back from the \e down state to the default state, we set \c reversible to \c true. This is equivalent to writing the two transitions separately. \code - - - - +ParallelAnimation { + NumericAnimation { + properties: "y" + duration: 500 + easing: "easeOutBounce" + } + ColorAnimation { duration: 500 } +} \endcode The \c ParallelAnimation element makes sure that the two animations (color and position) will start at the same time. We could also run them one after the other by using \c SequentialAnimation instead. diff --git a/doc/src/modules.qdoc b/doc/src/modules.qdoc index 7372994..acfd604 100644 --- a/doc/src/modules.qdoc +++ b/doc/src/modules.qdoc @@ -62,6 +62,7 @@ \row \o \l{QtWebKit} \o Classes for displaying and editing Web content \row \o \l{QtXml} \o Classes for handling XML \row \o \l{QtXmlPatterns} \o An XQuery & XPath engine for XML and custom data models + \row \o \l{QtDeclarative} \o An engine for declaratively building fluid user interfaces. \row \o \l{Phonon Module}{Phonon} \o Multimedia framework classes \row \o \l{Qt3Support} \o Qt 3 compatibility classes \endtable diff --git a/examples/declarative/slideswitch/Switch.qml b/examples/declarative/slideswitch/Switch.qml index 5862646..3ae7a0f 100644 --- a/examples/declarative/slideswitch/Switch.qml +++ b/examples/declarative/slideswitch/Switch.qml @@ -14,7 +14,6 @@ Item { Switch.state = "On"; } function dorelease() { - print(Knob.x); if(Knob.x == 1) { if(Switch.state == "Off") return; diff --git a/examples/declarative/tutorials/helloworld/t1/tutorial1.qml b/examples/declarative/tutorials/helloworld/t1/tutorial1.qml new file mode 100644 index 0000000..ec29f4f --- /dev/null +++ b/examples/declarative/tutorials/helloworld/t1/tutorial1.qml @@ -0,0 +1,14 @@ +Rect { + id: Page + width: 480 + height: 200 + color: "white" + Text { + id: HelloText + text: "Hello world!" + font.size: 24 + font.bold: true + y: 30 + anchors.horizontalCenter: Page.horizontalCenter + } +} diff --git a/examples/declarative/tutorials/helloworld/t2/Cell.qml b/examples/declarative/tutorials/helloworld/t2/Cell.qml new file mode 100644 index 0000000..bd5bbe7 --- /dev/null +++ b/examples/declarative/tutorials/helloworld/t2/Cell.qml @@ -0,0 +1,16 @@ +Item { + id: CellContainer + width: 40 + height: 25 + properties: Property { + name: "color" + } + Rect { + anchors.fill: parent + color: CellContainer.color + } + MouseRegion { + anchors.fill: parent + onClicked: { HelloText.color = CellContainer.color } + } +} diff --git a/examples/declarative/tutorials/helloworld/t2/tutorial2.qml b/examples/declarative/tutorials/helloworld/t2/tutorial2.qml new file mode 100644 index 0000000..4630435 --- /dev/null +++ b/examples/declarative/tutorials/helloworld/t2/tutorial2.qml @@ -0,0 +1,27 @@ +Rect { + id: Page + width: 480 + height: 200 + color: "white" + Text { + id: HelloText + text: "Hello world!" + font.size: 24 + font.bold: true + y: 30 + anchors.horizontalCenter: Page.horizontalCenter + } + GridLayout { + id: ColorPicker + x: 0 + anchors.bottom: Page.bottom + width: 120; height: 50 + rows: 2; columns: 3 + Cell { color: "#ff0000" } + Cell { color: "#00ff00" } + Cell { color: "#0000ff" } + Cell { color: "#ffff00" } + Cell { color: "#00ffff" } + Cell { color: "#ff00ff" } + } +} diff --git a/examples/declarative/tutorials/helloworld/t3/Cell.qml b/examples/declarative/tutorials/helloworld/t3/Cell.qml new file mode 100644 index 0000000..bd5bbe7 --- /dev/null +++ b/examples/declarative/tutorials/helloworld/t3/Cell.qml @@ -0,0 +1,16 @@ +Item { + id: CellContainer + width: 40 + height: 25 + properties: Property { + name: "color" + } + Rect { + anchors.fill: parent + color: CellContainer.color + } + MouseRegion { + anchors.fill: parent + onClicked: { HelloText.color = CellContainer.color } + } +} diff --git a/examples/declarative/tutorials/helloworld/t3/tutorial3.qml b/examples/declarative/tutorials/helloworld/t3/tutorial3.qml new file mode 100644 index 0000000..3ca7a2f --- /dev/null +++ b/examples/declarative/tutorials/helloworld/t3/tutorial3.qml @@ -0,0 +1,59 @@ +Rect { + id: Page + width: 480 + height: 200 + color: "white" + Text { + id: HelloText + text: "Hello world!" + font.size: 24 + font.bold: true + y: 30 + anchors.horizontalCenter: Page.horizontalCenter + states: [ + State { + name: "down" + when: MouseRegion.pressed == true + SetProperty { + target: HelloText + property: "y" + value: 160 + } + SetProperty { + target: HelloText + property: "color" + value: "red" + } + } + ] + transitions: [ + Transition { + fromState: "*" + toState: "down" + reversible: true + ParallelAnimation { + NumericAnimation { + properties: "y" + duration: 500 + easing: "easeOutBounce" + } + ColorAnimation { duration: 500 } + } + } + ] + } + MouseRegion { id: MouseRegion; anchors.fill: HelloText } + GridLayout { + id: ColorPicker + x: 0 + anchors.bottom: Page.bottom + width: 120; height: 50 + rows: 2; columns: 3 + Cell { color: "#ff0000" } + Cell { color: "#00ff00" } + Cell { color: "#0000ff" } + Cell { color: "#ffff00" } + Cell { color: "#00ffff" } + Cell { color: "#ff00ff" } + } +} diff --git a/examples/declarative/tutorials/t1/tutorial1.qml b/examples/declarative/tutorials/t1/tutorial1.qml deleted file mode 100644 index ec29f4f..0000000 --- a/examples/declarative/tutorials/t1/tutorial1.qml +++ /dev/null @@ -1,14 +0,0 @@ -Rect { - id: Page - width: 480 - height: 200 - color: "white" - Text { - id: HelloText - text: "Hello world!" - font.size: 24 - font.bold: true - y: 30 - anchors.horizontalCenter: Page.horizontalCenter - } -} diff --git a/examples/declarative/tutorials/t2/Cell.qml b/examples/declarative/tutorials/t2/Cell.qml deleted file mode 100644 index bd5bbe7..0000000 --- a/examples/declarative/tutorials/t2/Cell.qml +++ /dev/null @@ -1,16 +0,0 @@ -Item { - id: CellContainer - width: 40 - height: 25 - properties: Property { - name: "color" - } - Rect { - anchors.fill: parent - color: CellContainer.color - } - MouseRegion { - anchors.fill: parent - onClicked: { HelloText.color = CellContainer.color } - } -} diff --git a/examples/declarative/tutorials/t2/tutorial2.qml b/examples/declarative/tutorials/t2/tutorial2.qml deleted file mode 100644 index 08ea9eb..0000000 --- a/examples/declarative/tutorials/t2/tutorial2.qml +++ /dev/null @@ -1,41 +0,0 @@ -Rect { - id: Page - width: 480 - height: 200 - color: "white" - Text { - id: HelloText - text: "Hello world!" - font.size: 24 - font.bold: true - y: 30 - anchors.horizontalCenter: Page.horizontalCenter - } - GridLayout { - id: ColorPicker - x: 0 - anchors.bottom: Page.bottom - width: 120 - height: 50 - columns: 3 - rows: 2 - Cell { - color: "#ff0000" - } - Cell { - color: "#00ff00" - } - Cell { - color: "#0000ff" - } - Cell { - color: "#ffff00" - } - Cell { - color: "#00ffff" - } - Cell { - color: "#ff00ff" - } - } -} diff --git a/examples/declarative/tutorials/t3/Cell.qml b/examples/declarative/tutorials/t3/Cell.qml deleted file mode 100644 index bd5bbe7..0000000 --- a/examples/declarative/tutorials/t3/Cell.qml +++ /dev/null @@ -1,16 +0,0 @@ -Item { - id: CellContainer - width: 40 - height: 25 - properties: Property { - name: "color" - } - Rect { - anchors.fill: parent - color: CellContainer.color - } - MouseRegion { - anchors.fill: parent - onClicked: { HelloText.color = CellContainer.color } - } -} diff --git a/examples/declarative/tutorials/t3/tutorial3.qml b/examples/declarative/tutorials/t3/tutorial3.qml deleted file mode 100644 index 8e2b697..0000000 --- a/examples/declarative/tutorials/t3/tutorial3.qml +++ /dev/null @@ -1,78 +0,0 @@ -Rect { - id: Page - width: 480 - height: 200 - color: "white" - Text { - id: HelloText - text: "Hello world!" - font.size: 24 - font.bold: true - y: 30 - anchors.horizontalCenter: Page.horizontalCenter - states: [ - State { - name: "down" - when: MouseRegion.pressed == true - SetProperty { - target: HelloText - property: "y" - value: 160 - } - SetProperty { - target: HelloText - property: "color" - value: "red" - } - } - ] - transitions: [ - Transition { - fromState: "*" - toState: "down" - reversible: true - ParallelAnimation { - NumericAnimation { - properties: "y" - duration: 500 - easing: "easeOutBounce" - } - ColorAnimation { - duration: 500 - } - } - } - ] - } - MouseRegion { - id: MouseRegion - anchors.fill: HelloText - } - GridLayout { - id: ColorPicker - x: 0 - anchors.bottom: Page.bottom - width: 120 - height: 50 - columns: 3 - rows: 2 - Cell { - color: "#ff0000" - } - Cell { - color: "#00ff00" - } - Cell { - color: "#0000ff" - } - Cell { - color: "#ffff00" - } - Cell { - color: "#00ffff" - } - Cell { - color: "#ff00ff" - } - } -} diff --git a/src/declarative/extra/qmlsqlconnection.cpp b/src/declarative/extra/qmlsqlconnection.cpp index 7f1fec2..a39aa6f 100644 --- a/src/declarative/extra/qmlsqlconnection.cpp +++ b/src/declarative/extra/qmlsqlconnection.cpp @@ -67,6 +67,26 @@ public: /*! \qmlclass SqlConnection QmlSqlConnection \brief The SqlConnection element describes a connection to an SQL database. + + The SqlConnection element works in a similar way to + QSqlDatabase::addDatabase(). It allows setting the database properties + such that the connection does not need to be set up in C++ code. + It differs from QSqlDatabase::addDatabase() in that it will automatically + open the database. + + The database can then either be used from an SqlQuery element using its id + as a bind, or using its name. If the database is set up externally to + Qml the query should connect using its name. + + \qml + + qmlConnection + QSQLITE + "mydb.sqlite" + + SELECT * FROM mytable + SELECT * FROM myothertable + \endqml */ /*! @@ -142,32 +162,9 @@ public: */ /*! + \internal \class QmlSqlConnection \brief The QmlSqlConnection class manages a connection to an SQL database. - - \qmltext - - The SqlConnection element works in a similar way to - QSqlDatabase::addDatabase(). It allows setting the database properties - such that the connection does not need to be set up in C++ code. - It differs from QSqlDatabase::addDatabase() in that it will automatically - open the database. - - The database can then either be used from an SqlQuery element using its id - as a bind, or using its name. If the database is set up externally to - Qml the query should connect using its name. - - \qml - - qmlConnection - QSQLITE - "mydb.sqlite" - - SELECT * FROM mytable - SELECT * FROM myothertable - \endqml - - \endqmltext */ /*! diff --git a/src/declarative/extra/qmlsqlquery.cpp b/src/declarative/extra/qmlsqlquery.cpp index 39f4c1e..70b3bdd 100644 --- a/src/declarative/extra/qmlsqlquery.cpp +++ b/src/declarative/extra/qmlsqlquery.cpp @@ -67,16 +67,8 @@ public: /*! \qmlclass SqlBind QmlSqlBind - \brief the SqlBind element specifies a value binding for an SqlQuery element. -*/ + \brief The SqlBind element specifies a value binding for an SqlQuery element. -/*! - \class QmlSqlBind - \brief The QmlSqlBind class specifies a value binding for a QmlSqlQuery. - - \qmltext - - \qml By using bindings its possible to cause a SqlQuery to update itself when values bound through the SqlBind change. Hence in the example below the results for the SqlQuery will change as searchText changes. @@ -84,6 +76,7 @@ public: If the query is not a SELECT statement, the effects of the bound values will only apply when the SqlQuery exec() slot is called. + \qml SELECT * FROM mytable WHERE name LIKE :value @@ -97,7 +90,12 @@ public: \endqml - \endqmltext +*/ + +/*! + \internal + \class QmlSqlBind + \brief The QmlSqlBind class specifies a value binding for a QmlSqlQuery. */ /*! @@ -235,13 +233,7 @@ public: /*! \qmlclass SqlQuery QmlSqlQuery \brief The SqlQuery element describes a query into an SQL database. -*/ - -/* - \class QmlSqlQuery - \brief the QmlSqlQuery class manages a query into an SQL database. - \qmltext The SqlQuery element has three parts. The first is the query itself, which can either be specified using the query property or by the default text for the element. The second specifies the connection @@ -256,11 +248,11 @@ public: the query. If the query is a select statement it can be used as a model for a ListView. - The roles will be the columns of the result set. Use the SQL AS keyword + The roles will be the columns of the result set. Use the SQL AS keyword in the query if you want to override the column names from that of the table selected. You should also use the AS keyword if there is no appropriate table column name for the result column. - + \qml @@ -268,7 +260,11 @@ public: SELECT id AS recordId, (firstName || ' ' || lastName) AS fullName FROM mytable \endqml - \endqmltext +*/ + +/* + \class QmlSqlQuery + \brief the QmlSqlQuery class manages a query into an SQL database. */ /*! diff --git a/src/declarative/fx/qfximageitem.cpp b/src/declarative/fx/qfximageitem.cpp index 52ab009..d751845 100644 --- a/src/declarative/fx/qfximageitem.cpp +++ b/src/declarative/fx/qfximageitem.cpp @@ -58,10 +58,10 @@ QT_BEGIN_NAMESPACE /*! \class QFxImageItem - \brief The QFxImageItem class is an abstract base class for QFxView items that render using QPainter. + \brief The QFxImageItem class is an abstract base class for QFxView items that want cached painting. \ingroup group_coreitems - This is a convenience class allowing easy use of a QPainter within a custom + This is a convenience class allowing easy use of cached painting within a custom item. The contents of the item are are cached behind the scenes. The dirtyCache() function should be called if the contents change to ensure the cache is refreshed the next time painting occurs. diff --git a/src/declarative/fx/qfxpainted.cpp b/src/declarative/fx/qfxpainted.cpp index 7c88ce3..68918c3 100644 --- a/src/declarative/fx/qfxpainted.cpp +++ b/src/declarative/fx/qfxpainted.cpp @@ -45,12 +45,13 @@ QT_BEGIN_NAMESPACE /*! + \internal \class QFxPainted - \brief The QFxPainted class is an abstract base class for QFxView items that paint using QPainter. + \brief The QFxPainted class is an abstract base class for QFxView items that want cached painting. \ingroup group_coreitems - This is a convenience class allowing easy use of QPainter within a custom item. + This is a convenience class allowing easy use of cached painting within a custom item. The contents of the item are cached behind the scenes. Any time you change the contents you should call markDirty to make sure the cache is refreshed the next time painting occurs. diff --git a/src/declarative/fx/qfxpainted.h b/src/declarative/fx/qfxpainted.h index 32f5dcb..1f22414 100644 --- a/src/declarative/fx/qfxpainted.h +++ b/src/declarative/fx/qfxpainted.h @@ -44,12 +44,15 @@ #include - QT_BEGIN_HEADER QT_BEGIN_NAMESPACE QT_MODULE(Declarative) +/* +WARNING: INTENDED TO MERGE WITH QFxImageItem +*/ + class QFxPaintedPrivate; class Q_DECLARATIVE_EXPORT QFxPainted : public QFxItem { diff --git a/src/declarative/opengl/gltexture.cpp b/src/declarative/opengl/gltexture.cpp index 6d737ad..199b362 100644 --- a/src/declarative/opengl/gltexture.cpp +++ b/src/declarative/opengl/gltexture.cpp @@ -45,6 +45,7 @@ QT_BEGIN_NAMESPACE /*! + \internal \class GLTexture \brief The GLTexture class simplifies the use of OpenGL textures. */ diff --git a/src/declarative/qml/script/qmlbasicscript.cpp b/src/declarative/qml/script/qmlbasicscript.cpp index 8b38e08..603e6ba 100644 --- a/src/declarative/qml/script/qmlbasicscript.cpp +++ b/src/declarative/qml/script/qmlbasicscript.cpp @@ -252,6 +252,7 @@ struct QmlBasicScriptCompiler }; /*! + \internal \class QmlBasicScript \brief The QmlBasicScript class provides a fast implementation of a limited subset of JavaScript bindings. diff --git a/src/declarative/timeline/qmltimeline.cpp b/src/declarative/timeline/qmltimeline.cpp index 3fa0161..dcc8745 100644 --- a/src/declarative/timeline/qmltimeline.cpp +++ b/src/declarative/timeline/qmltimeline.cpp @@ -51,10 +51,6 @@ QT_BEGIN_NAMESPACE -// -// Timeline stuff -// - struct Update { Update(QmlTimeLineValue *_g, qreal _v) : g(_g), v(_v) {} @@ -868,9 +864,10 @@ void QmlTimeLine::remove(QmlTimeLineObject *v) } /*! + \internal \class QmlTimeLineValue \ingroup group_animation - \brief The QmlTimeLineValue class is modified by QmlTimeLine. + \brief The QmlTimeLineValue class provides a value that can be modified by QmlTimeLine. */ /*! diff --git a/src/declarative/util/qmlanimation.cpp b/src/declarative/util/qmlanimation.cpp index d5765c1..4b8ce4e 100644 --- a/src/declarative/util/qmlanimation.cpp +++ b/src/declarative/util/qmlanimation.cpp @@ -617,7 +617,7 @@ QAbstractAnimation *QmlPauseAnimation::qtAnimation() \brief The ColorAnimation allows you to animate color changes. \code - ColorAnimation { from: "white" to: "#c0c0c0"; duration: 100 } + ColorAnimation { from: "white"; to: "#c0c0c0"; duration: 100 } \endcode The default property animated is \c color, but like other animations, -- cgit v0.12 From 894333bd0af5bd0097a3682233c56011b0de88cc Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Fri, 1 May 2009 14:43:17 +1000 Subject: Compile --- src/declarative/fx/qfxwebview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/declarative/fx/qfxwebview.cpp b/src/declarative/fx/qfxwebview.cpp index eb2f7d2..b59e639 100644 --- a/src/declarative/fx/qfxwebview.cpp +++ b/src/declarative/fx/qfxwebview.cpp @@ -140,7 +140,7 @@ public: bool localStorageDatabaseEnabled() const { return s->testAttribute(QWebSettings::LocalStorageDatabaseEnabled); } void setLocalStorageDatabaseEnabled(bool on) { s->setAttribute(QWebSettings::LocalStorageDatabaseEnabled, on); } - QString userStyleSheetUrl() const { return s->userStyleSheetUrl(); } + QString userStyleSheetUrl() const { return s->userStyleSheetUrl().toString(); } void setUserStyleSheetUrl(const QString& url) { s->setUserStyleSheetUrl(url); } QWebSettings *s; -- cgit v0.12 From c9c707a454f274a754541df89d147c62e3598ae0 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Fri, 1 May 2009 14:59:11 +1000 Subject: Ensure baseUrl is set. userStyleSheet is still useless though - it's never resolved, and it can only be a localfile. --- src/declarative/fx/qfxwebview.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/declarative/fx/qfxwebview.cpp b/src/declarative/fx/qfxwebview.cpp index eb2f7d2..97cc6a3 100644 --- a/src/declarative/fx/qfxwebview.cpp +++ b/src/declarative/fx/qfxwebview.cpp @@ -209,12 +209,12 @@ public: /*! \qmlclass WebView - \brief The WebView element allows you to add web content to a canvas. + \brief The WebView item allows you to add web content to a canvas. \inherits Item A WebView renders web content based on a URL. - If the width and height of the element is not set, they will + If the width and height of the item is not set, they will dynamically adjust to a size appropriate for the content. This width may be large (eg. 980) for typical online web pages. @@ -237,7 +237,7 @@ public: \image webview.png - The element includes no scrolling, scaling, + The item includes no scrolling, scaling, toolbars, etc., those must be implemented around WebView. See the WebBrowser example for a demonstration of this. */ @@ -251,7 +251,7 @@ public: \image webview.png - The element includes no scrolling, scaling, + The item includes no scrolling, scaling, toolbars, etc., those must be implemented around WebView. See the WebBrowser example for a demonstration of this. @@ -939,7 +939,7 @@ QWebPage *QFxWebView::page() const QFxWebView *self = const_cast(this); QWebPage *wp = new QFxWebPage(self); - // QML elements don't default to having a background, + // QML items don't default to having a background, // even though most we pages will set one anyway. QPalette pal = QApplication::palette(); pal.setBrush(QPalette::Base, QColor::fromRgbF(0, 0, 0, 0)); @@ -1039,7 +1039,7 @@ void QFxWebView::setHtml(const QString &html, const QUrl &baseUrl) d->idealwidth>0 ? d->idealwidth : width(), d->idealheight>0 ? d->idealheight : height())); if (isComponentComplete()) - page()->mainFrame()->setHtml(html, baseUrl); + page()->mainFrame()->setHtml(html, qmlContext(this)->resolvedUrl(baseUrl)); else { d->pending = d->PendingHtml; d->pending_url = baseUrl; @@ -1055,7 +1055,7 @@ void QFxWebView::setContent(const QByteArray &data, const QString &mimeType, con d->idealheight>0 ? d->idealheight : height())); if (isComponentComplete()) - page()->mainFrame()->setContent(data,mimeType,baseUrl); + page()->mainFrame()->setContent(data,mimeType,qmlContext(this)->resolvedUrl(baseUrl)); else { d->pending = d->PendingContent; d->pending_url = baseUrl; -- cgit v0.12 From bcb550f0a6138254878cb960cc48a0c0f593c724 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Fri, 1 May 2009 15:20:09 +1000 Subject: Remove userStyleSheetUrl. Doc Only supports localfiles, not resolved against document URL if relative. --- src/declarative/fx/qfxwebview.cpp | 38 +++++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/src/declarative/fx/qfxwebview.cpp b/src/declarative/fx/qfxwebview.cpp index 84e3bc2..dac8ced 100644 --- a/src/declarative/fx/qfxwebview.cpp +++ b/src/declarative/fx/qfxwebview.cpp @@ -106,8 +106,6 @@ class QFxWebSettings : public QObject { Q_PROPERTY(bool offlineWebApplicationCacheEnabled READ offlineWebApplicationCacheEnabled WRITE setOfflineWebApplicationCacheEnabled) Q_PROPERTY(bool localStorageDatabaseEnabled READ localStorageDatabaseEnabled WRITE setLocalStorageDatabaseEnabled) - Q_PROPERTY(QString userStyleSheetUrl READ userStyleSheetUrl WRITE setUserStyleSheetUrl) - public: QFxWebSettings() {} @@ -140,9 +138,6 @@ public: bool localStorageDatabaseEnabled() const { return s->testAttribute(QWebSettings::LocalStorageDatabaseEnabled); } void setLocalStorageDatabaseEnabled(bool on) { s->setAttribute(QWebSettings::LocalStorageDatabaseEnabled, on); } - QString userStyleSheetUrl() const { return s->userStyleSheetUrl().toString(); } - void setUserStyleSheetUrl(const QString& url) { s->setUserStyleSheetUrl(url); } - QWebSettings *s; }; @@ -225,7 +220,7 @@ public: Due to WebKit limitations, the height may be more than necessary if the idealHeight is changed after the content is loaded. - \code + \qml WebView { url: "http://www.nokia.com" width: 490 @@ -233,7 +228,7 @@ public: scale: 0.5 smooth: true } - \endcode + \endqml \image webview.png @@ -955,21 +950,34 @@ QWebPage *QFxWebView::page() const return d->page; } + // The QObject interface to settings(). /*! - \qmlproperty QWebSettings WebView::settings - - This property gives access to the settings controlling the web view. + \qmlproperty bool WebView::settings::autoLoadImages + \qmlproperty bool WebView::settings::javascriptEnabled + \qmlproperty bool WebView::settings::javaEnabled + \qmlproperty bool WebView::settings::pluginsEnabled + \qmlproperty bool WebView::settings::privateBrowsingEnabled + \qmlproperty bool WebView::settings::javascriptCanOpenWindows + \qmlproperty bool WebView::settings::javascriptCanAccessClipboard + \qmlproperty bool WebView::settings::developerExtrasEnabled + \qmlproperty bool WebView::settings::linksIncludedInFocusChain + \qmlproperty bool WebView::settings::zoomTextOnly + \qmlproperty bool WebView::settings::printElementBackgrounds + \qmlproperty bool WebView::settings::offlineStorageDatabaseEnabled + \qmlproperty bool WebView::settings::offlineWebApplicationCacheEnabled + \qmlproperty bool WebView::settings::localStorageDatabaseEnabled + + These properties give access to the settings controlling the web view. See QWebSettings for the list of sub-properties. - \code + \qml WebView { settings.pluginsEnabled: true - settings.userStyleSheetUrl: "mystyle.css" ... } - \endcode + \endqml */ QObject *QFxWebView::settingsObject() const { @@ -1026,11 +1034,11 @@ QString QFxWebView::html() const The html property can be set as a string. - \code + \qml WebView { html: "

This is HTML." } - \endcode + \endqml */ void QFxWebView::setHtml(const QString &html, const QUrl &baseUrl) { -- cgit v0.12 From 2d167da27db0de589a6d72b5cfb97f1faa273bb7 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Fri, 1 May 2009 15:21:00 +1000 Subject: doc --- src/declarative/fx/qfxitem.cpp | 57 +++++++++++++++++++++++++++++------------- 1 file changed, 39 insertions(+), 18 deletions(-) diff --git a/src/declarative/fx/qfxitem.cpp b/src/declarative/fx/qfxitem.cpp index 38b5713..53e198f 100644 --- a/src/declarative/fx/qfxitem.cpp +++ b/src/declarative/fx/qfxitem.cpp @@ -206,7 +206,7 @@ void QFxContents::setItem(QFxItem *item) /*! \qmlclass Item QFxItem - \brief The Item element is the most basic of all visual canvas members. + \brief The Item is the most basic of all visual items in QML. */ /*! @@ -214,19 +214,32 @@ void QFxContents::setItem(QFxItem *item) \brief The QFxItem class is a generic QFxView item. It is the base class for all other view items. \qmltext - All visual elements in Qt Declarative inherit from QFxItem. Although QFxItem + All visual items in Qt Declarative inherit from QFxItem. Although QFxItem has no visual appearance, it defines all the properties that are - common across visual elements - like the x and y position, and the + common across visual items - like the x and y position, and the width and height. - QFxItem is also useful for grouping elements together. + QFxItem is also useful for grouping items together. \qml - - - - - + Item { + Image { + file: "tile.png" + } + Image { + x: 80 + width: 100 + height: 100 + file: "tile.png" + } + Image { + x: 190 + width: 100 + height: 100 + tile: true + file: "tile.png" + } + } \endqml \endqmltext @@ -260,7 +273,7 @@ void QFxContents::setItem(QFxItem *item) via the baselineOffset property. The baseline corresponds to the baseline of the text contained in - the element. It is useful for aligning the text in items placed + the item. It is useful for aligning the text in items placed beside each other. The default baseline is positioned at 2/3 of the height of the item. */ @@ -335,7 +348,9 @@ void QFxContents::setItem(QFxItem *item) The key event is available via the KeyEvent \a event. \qml - + Item { + onKeyPress: { if (event.key == Qt.Key_Enter) state='Enter' } + } \endqml */ @@ -347,7 +362,9 @@ void QFxContents::setItem(QFxItem *item) The key event is available in via the KeyEvent \a event. \qml - + Item { + onKeyRelease: { if (event.key == Qt.Key_Enter) state='Enter' } + } \endqml */ @@ -429,9 +446,13 @@ QFxItem::~QFxItem() \image declarative-transformorigin.png This example scales an image about its center. - \code - - \endcode + \qml + Image { + src: "myimage.png" + transformOrigin: "Center" + scale: 4 + } + \endqml The default transform origin is \c TopLeft. */ @@ -522,7 +543,7 @@ QFxItem *QFxItem::itemParent() const \qmlproperty list Item::children \qmlproperty list Item::resources - The children property contains the list of visual children of this element. + The children property contains the list of visual children of this item. The resources property contains non-visual resources that you want to reference by name. @@ -702,7 +723,7 @@ void QFxItemPrivate::children_clear() \default The data property is allows you to freely mix visual children and resources - of an element. If you assign a visual element to the data list it becomes + of an item. If you assign a visual item to the data list it becomes a child and if you assign any other object type, it is added as a resource. So you can write: @@ -1926,7 +1947,7 @@ void QFxItem::classComplete() } /*! - componentComplete() is called when all elements in the component + componentComplete() is called when all items in the component have been constructed. It is often desireable to delay some processing until the component is complete an all bindings in the component have been resolved. -- cgit v0.12 From c1830b72bc64cca5d5110ce084b580022ac8d3a0 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Fri, 1 May 2009 15:39:07 +1000 Subject: doc --- src/declarative/fx/qfxanchors.cpp | 4 +-- src/declarative/fx/qfxanimatedimageitem.cpp | 4 +-- src/declarative/fx/qfxblurfilter.cpp | 35 +++++++++++++----------- src/declarative/fx/qfxcomponentinstance.cpp | 6 ++--- src/declarative/fx/qfxcontentwrapper.cpp | 41 ++++++++++++++++++----------- src/declarative/fx/qfxevents.cpp | 33 +++++++++++------------ src/declarative/fx/qfxflickable.cpp | 2 +- 7 files changed, 68 insertions(+), 57 deletions(-) diff --git a/src/declarative/fx/qfxanchors.cpp b/src/declarative/fx/qfxanchors.cpp index f537da9..540e1cb 100644 --- a/src/declarative/fx/qfxanchors.cpp +++ b/src/declarative/fx/qfxanchors.cpp @@ -151,7 +151,7 @@ void QFxAnchors::fillChanged() /*! \property QFxAnchors::fill - \brief what item the item should fill. + \brief which item the item should fill. This is a convenience property. It is the same as anchoring the left, right, top, and bottom to another item's left, right, top, and bottom. @@ -200,7 +200,7 @@ void QFxAnchors::setFill(QFxItem *f) /*! \property QFxAnchors::centeredIn - \brief what item the item should stay centered in the middle of. + \brief which item the item should stay centered in. This is a convenience property. It is the same as anchoring the horizontalCenter and verticalCenter to another item's horizontalCenter and verticalCenter. diff --git a/src/declarative/fx/qfxanimatedimageitem.cpp b/src/declarative/fx/qfxanimatedimageitem.cpp index 5a495e9..7a1cb7f 100644 --- a/src/declarative/fx/qfxanimatedimageitem.cpp +++ b/src/declarative/fx/qfxanimatedimageitem.cpp @@ -66,7 +66,7 @@ QT_BEGIN_NAMESPACE \row \o \image animatedimageitem.gif \o - \code + \qml Item { width: anim.width; height: anim.height+8 AnimatedImage { id: anim; source: "pics/games-anim.gif" } @@ -74,7 +74,7 @@ Item { x: (anim.width-width)*anim.currentFrame/(anim.frameCount-1) } } - \endcode + \endqml \endtable */ QML_DEFINE_TYPE(QFxAnimatedImageItem, AnimatedImage); diff --git a/src/declarative/fx/qfxblurfilter.cpp b/src/declarative/fx/qfxblurfilter.cpp index ad3eebc..2bad18c 100644 --- a/src/declarative/fx/qfxblurfilter.cpp +++ b/src/declarative/fx/qfxblurfilter.cpp @@ -64,25 +64,28 @@ public: \brief The Blur filter blurs an item and its contents. \inherits Filter - Blurring reduces the clarity of a visual element. The following example + Blurring reduces the clarity of a visual item. The following example shows an icon at a blur radius of 0, 5 and 10. \table \row \o - \code - - - - - - - - - - - - \endcode + \qml +HorizontalLayout { + Image { + src: "icon.png" + filter: Blur { radius: 0 } + } + Image { + src: "icon.png" + filter: Blur { radius: 5 } + } + Image { + src: "icon.png" + filter: Blur { radius: 10 } + } +} + \endqml \row \o \image blur_example.png \endtable @@ -110,7 +113,9 @@ QFxBlurFilter::~QFxBlurFilter() /*! \qmlproperty real Blur::radius - Sets the blur kernel radius. The larger the radius the more blurry the item will appear. A radius of 0 (or less) is equivalent to no blur. + Sets the blur kernel radius. + The larger the radius the more blurry the item will appear. + A radius of 0 (or less) is equivalent to no blur. */ /*! diff --git a/src/declarative/fx/qfxcomponentinstance.cpp b/src/declarative/fx/qfxcomponentinstance.cpp index 5fb5466..9645e77 100644 --- a/src/declarative/fx/qfxcomponentinstance.cpp +++ b/src/declarative/fx/qfxcomponentinstance.cpp @@ -58,9 +58,9 @@ QML_DEFINE_TYPE(QFxComponentInstance,ComponentInstance); /*! \qmlclass ComponentInstance QFxComponentInstance - \brief The ComponentInstance element allows you to instantiate a \l{qml-component.html} {Component}. + \brief The ComponentInstance item allows you to instantiate a \l{qml-component.html} {Component}. - \code + \qml Item { Component { id: RedSquare @@ -69,7 +69,7 @@ QML_DEFINE_TYPE(QFxComponentInstance,ComponentInstance); ComponentInstance { component: RedSquare } } - \endcode + \endqml */ QFxComponentInstance::QFxComponentInstance(QFxItem *parent) : QFxItem(*(new QFxComponentInstancePrivate), parent) diff --git a/src/declarative/fx/qfxcontentwrapper.cpp b/src/declarative/fx/qfxcontentwrapper.cpp index a155d2b..2b95ff6 100644 --- a/src/declarative/fx/qfxcontentwrapper.cpp +++ b/src/declarative/fx/qfxcontentwrapper.cpp @@ -108,22 +108,31 @@ QML_DEFINE_TYPE(QFxContent,Content); specified by Content. Example: - \code - - - - - - - - - - - - ... - - - \endcode + \qml +// GroupBox component definition +Rect { + width: parent.width + color: "white" + pen.width: 2 + pen.color: "#adaeb0" + radius: 10 + clip: false + height: contents.height + VerticalLayout { + id: layout + width: parent.width + Content { } // content property will go here + } +} + +// component use +GroupBox { + content: Text { + text: "First Item" + ... + } +} + \endqml */ QT_END_NAMESPACE diff --git a/src/declarative/fx/qfxevents.cpp b/src/declarative/fx/qfxevents.cpp index 7d04f5d..195d1e5 100644 --- a/src/declarative/fx/qfxevents.cpp +++ b/src/declarative/fx/qfxevents.cpp @@ -44,17 +44,18 @@ QT_BEGIN_NAMESPACE /*! \qmlclass KeyEvent QFxKeyEvent - \brief The KeyEvent element provides information about a key event. + \brief The KeyEvent object provides information about a key event. For example, the following changes the Item's state property when the Enter key is pressed: - \code - - if (event.key == Qt.Key_Enter) state = 'ShowDetails'; - - \endcode - - The \l KeyActions element could also be used to achieve the above with + \qml +Item { + focus: true + onKeyPress: { if (event.key == Qt.Key_Enter) state = 'ShowDetails'; } +} + \endqml + + The \l KeyActions object could also be used to achieve the above with a clearer syntax. \sa KeyActions @@ -106,7 +107,7 @@ QT_BEGIN_NAMESPACE /*! \qmlclass MouseEvent QFxMouseEvent - \brief The MouseEvent element provides information about a mouse event. + \brief The MouseEvent object provides information about a mouse event. The position of the mouse can be found via the x and y properties. The button that caused the event is available via the button property. @@ -168,15 +169,11 @@ QT_BEGIN_NAMESPACE \endlist For example, to react to a Shift key + Left mouse button click: - \code - - - - - - \endcode + \qml +MouseRegion { + onClick: { if (mouse.button == Qt.LeftButton && mouse.modifiers & Qt.ShiftModifier) doSomething(); } +} + \endqml */ QML_DEFINE_NOCREATE_TYPE(QFxKeyEvent); diff --git a/src/declarative/fx/qfxflickable.cpp b/src/declarative/fx/qfxflickable.cpp index 17e44e1..52b142b 100644 --- a/src/declarative/fx/qfxflickable.cpp +++ b/src/declarative/fx/qfxflickable.cpp @@ -226,7 +226,7 @@ QML_DEFINE_TYPE(QFxFlickable,Flickable); /*! \qmlclass Flickable - \brief The Flickable element provides a surface that can be "flicked". + \brief The Flickable item provides a surface that can be "flicked". \inherits Item Flickable places its children on a surface that can be dragged and flicked. -- cgit v0.12 From 170f2857803344a198eaf71d8f15b07e3ff0e2ad Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Fri, 1 May 2009 15:46:24 +1000 Subject: Doc work. --- doc/src/declarative/elements.qdoc | 47 +++++++++++++++++++++++--------- doc/src/declarative/index.qdoc | 51 ----------------------------------- doc/src/declarative/qmlfordesign.qdoc | 42 +++++++++++++++++++++++++++++ doc/src/index.qdoc | 2 +- 4 files changed, 78 insertions(+), 64 deletions(-) delete mode 100644 doc/src/declarative/index.qdoc create mode 100644 doc/src/declarative/qmlfordesign.qdoc diff --git a/doc/src/declarative/elements.qdoc b/doc/src/declarative/elements.qdoc index 3e88e5a..b6dec25 100644 --- a/doc/src/declarative/elements.qdoc +++ b/doc/src/declarative/elements.qdoc @@ -7,10 +7,11 @@ The following table lists the Qml elements provided by the Qt Declarative module \bold {Standard Qt Declarative Elements} -\table 100% +\table 80% \header \o \bold {States} \o \bold {Animation and Transitions} +\o \bold {Working with Data} \o \bold {Utility} \row @@ -40,22 +41,30 @@ The following table lists the Qml elements provided by the Qt Declarative module \o \list -\o \l Script \o \l Bind -\o \l Connection -\o \l Component \o \l ListModel +\o \l XmlListModel +\o \l SqlQuery, \l SqlConnection, and \l SqlBind \o \l DateTimeFormatter +\o \l NumberFormatter +\endlist + +\o +\list +\o \l Script +\o \l Connection +\o \l Component \endlist \endtable \bold {Fluid UI Primitives} -\table 100% +\table 80% \header -\o \bold {Basic Items} -\o \bold {Utility} +\o \bold {Basic Visual Items} +\o \bold {Basic Interaction Items} \o \bold {Widgets} +\o \bold {Utility} \row \o @@ -65,20 +74,17 @@ The following table lists the Qml elements provided by the Qt Declarative module \o \l Text \o \l TextEdit \o \l Rect -\o \l MouseRegion -\o \l KeyActions \o \l AnimatedImage \o \l BlendedImage \endlist \o \list -\o \l Repeater -\o \l Content +\o \l MouseRegion +\o \l KeyActions \o \l FocusPanel \o \l FocusRealm \o \l KeyProxy -\o \l ComponentInstance \endlist \o @@ -88,9 +94,18 @@ The following table lists the Qml elements provided by the Qt Declarative module \o \l WebView \endlist +\o +\list +\o \l Repeater +\o \l Content +\o \l ComponentInstance +\o \l WidgetContainer +\endlist + \header \o \bold {Views} \o \bold {Layouts} +\o \bold {Transforms} \o \bold {Effects} \row @@ -122,6 +137,14 @@ The following table lists the Qml elements provided by the Qt Declarative module \o \list +\o \l Squish +\o \l Perspective +\o \l Rotation3D +\o \l Translation3D +\endlist + +\o +\list \o \l Shadow \o \l Reflection \o \l Blur diff --git a/doc/src/declarative/index.qdoc b/doc/src/declarative/index.qdoc deleted file mode 100644 index fe1b46e..0000000 --- a/doc/src/declarative/index.qdoc +++ /dev/null @@ -1,51 +0,0 @@ -/*! - \page qml.html - \title 'Qt Declarative' Documentation - - \target qtdeclarativemainpage - - The Qt Declarative module provides a declarative framework for building - highly dynamic and fluid applications. It is targetted at the sorts of user - interface (and the sorts of hardware) in embedded devices such as phones, media - players, and set-top boxes. It is also appropriate for highly custom desktop - user-interfaces, or special elements in more traditional desktop - user-interfaces. - - Building fluid applications is done declaratively, rather than procedurally. - That is, you specify \e what the UI should look like and how it should behave - in an declarative format called QML, rather than specifying step-by-step \e how to - build it in a language like C++ or JavaScript. Specifying a UI declaratively - does not just include the layout of the interface items, but also the way each - individual item looks and behaves and the overall flow of the application. - - Getting Started: - \list - \o \l {qmlexamples}{Examples} - \o \l {tutorial}{Tutorial: 'Hello World'} - \o \l {tutorials-declarative-contacts.html}{Tutorial: 'Introduction to QML'} - \o \l {qmlforcpp}{Qt Declarative Markup Language For C++ Programmers} - \endlist - - Core Features: - \list - \o \l {binding}{Data Binding} - \o \l {anchor-layout}{Layout Anchors} - \o \l {qmlanimation}{Animation} - \o \l {qmleffects}{Visual Effects} - \o \l {components}{Components} - \o \l {qmlmodules}{Modules} - \o \l {qmlfocus}{Keyboard Focus} - \endlist - - QML Reference: - \list - \o \l {elements}{Qml Elements} - \endlist - - C++ Reference: - \list - \o \l {qtprogrammers}{QML for Qt programmers} - \o \l {qtbinding}{C++ Data Binding} - \o \l {cppitem}{C++ Components} - \endlist -*/ diff --git a/doc/src/declarative/qmlfordesign.qdoc b/doc/src/declarative/qmlfordesign.qdoc new file mode 100644 index 0000000..35e47df --- /dev/null +++ b/doc/src/declarative/qmlfordesign.qdoc @@ -0,0 +1,42 @@ +/*! + \page qmlfordesigners.html + \title Qt Declarative for Designers + + \target qtdeclarativemainpage + + The Qt Declarative module provides a declarative framework for building + highly dynamic and fluid applications. It is targetted at the sorts of user + interface (and the sorts of hardware) in embedded devices such as phones, media + players, and set-top boxes. It is also appropriate for highly custom desktop + user-interfaces, or special elements in more traditional desktop + user-interfaces. + + Building fluid applications is done declaratively, rather than procedurally. + That is, you specify \e what the UI should look like and how it should behave + rather than specifying step-by-step \e how to build it. Specifying a UI declaratively + does not just include the layout of the interface items, but also the way each + individual item looks and behaves and the overall flow of the application. + + Getting Started: + \list + \o \l {qmlexamples}{Examples} + \o \l {tutorial}{Tutorial: 'Hello World'} + \o \l {tutorials-declarative-contacts.html}{Tutorial: 'Introduction to QML'} + \endlist + + Core Features: + \list + \o \l {binding}{Data Binding} + \o \l {anchor-layout}{Layout Anchors} + \o \l {qmlanimation}{Animation} + \o \l {qmleffects}{Visual Effects} + \o \l {components}{Components} + \o \l {qmlmodules}{Modules} + \o \l {qmlfocus}{Keyboard Focus} + \endlist + + QML Reference: + \list + \o \l {elements}{Qml Elements} + \endlist +*/ diff --git a/doc/src/index.qdoc b/doc/src/index.qdoc index 8a856ea..f0debdb 100644 --- a/doc/src/index.qdoc +++ b/doc/src/index.qdoc @@ -188,7 +188,7 @@
  • XML Patterns: XQuery & XPath
  • Phonon Multimedia Framework
  • Script Tools Module
  • -
  • Qt Markup Language
  • +
  • Declarative Module
  • ActiveQt Framework
  • -- cgit v0.12 From ea0284d0f4a3408d7c1219702214c263118ef52f Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Fri, 1 May 2009 15:49:36 +1000 Subject: doc --- src/declarative/fx/qfxflipable.cpp | 58 ++++++++++++++++++------------- src/declarative/fx/qfxfocuspanel.cpp | 4 +-- src/declarative/fx/qfxfocusrealm.cpp | 2 +- src/declarative/fx/qfxgridview.cpp | 4 +-- src/declarative/fx/qfxhighlightfilter.cpp | 32 ++++++++++------- src/declarative/fx/qfximage.cpp | 28 ++++++++------- src/declarative/fx/qfxkeyactions.cpp | 34 +++++++++--------- src/declarative/fx/qfxkeyproxy.cpp | 4 +-- 8 files changed, 92 insertions(+), 74 deletions(-) diff --git a/src/declarative/fx/qfxflipable.cpp b/src/declarative/fx/qfxflipable.cpp index 81ed750..db390d2 100644 --- a/src/declarative/fx/qfxflipable.cpp +++ b/src/declarative/fx/qfxflipable.cpp @@ -64,34 +64,44 @@ public: /*! \qmlclass Flipable QFxFlipable - \brief The Flipable element provides a surface that can be flipped. + \brief The Flipable item provides a surface that can be flipped. \inherits Item Flipable allows you to specify a front and a back and then flip between those sides. - \code - - - - - - - - - - - - - - - - - - - - - - \endcode + \qml +Flipable { + id: flipable + width: 40 + height: 40 + axis: Axis { + startX: 20 + startY: 0 + endX: 20 + endY: 40 + } + front: Image { src: "front.png" } + back: Image { src: "back.png" } + states: [ + State { + name: "back" + SetProperty { + target: flipable + property: "rotation" + value: 180 + } + } + ] + transitions: [ + Transition { + NumericAnimation { + easing: "easeInOutQuad" + properties: "rotation" + } + } + ] +} + \endqml \image flipable.gif */ diff --git a/src/declarative/fx/qfxfocuspanel.cpp b/src/declarative/fx/qfxfocuspanel.cpp index 67c456e..5d62e66 100644 --- a/src/declarative/fx/qfxfocuspanel.cpp +++ b/src/declarative/fx/qfxfocuspanel.cpp @@ -47,7 +47,7 @@ QML_DEFINE_TYPE(QFxFocusPanel,FocusPanel); /*! \qmlclass FocusPanel - \brief The FocusPanel element explicitly creates a focus panel. + \brief The FocusPanel object explicitly creates a focus panel. \inherits Item Focus panels assist in keyboard focus handling when building QML @@ -73,7 +73,7 @@ QFxFocusPanel::~QFxFocusPanel() /*! \qmlproperty bool FocusPanel::active - Sets whether the element is the active focus panel. + Sets whether the object is the active focus panel. */ bool QFxFocusPanel::isActive() const diff --git a/src/declarative/fx/qfxfocusrealm.cpp b/src/declarative/fx/qfxfocusrealm.cpp index da3f1b2..07849fa 100644 --- a/src/declarative/fx/qfxfocusrealm.cpp +++ b/src/declarative/fx/qfxfocusrealm.cpp @@ -47,7 +47,7 @@ QML_DEFINE_TYPE(QFxFocusRealm,FocusRealm); /*! \qmlclass FocusRealm - \brief The FocusRealm element explicitly creates a focus realm. + \brief The FocusRealm object explicitly creates a focus realm. \inherits Item Focus realms assist in keyboard focus handling when building reusable QML diff --git a/src/declarative/fx/qfxgridview.cpp b/src/declarative/fx/qfxgridview.cpp index b8acea2..8416234 100644 --- a/src/declarative/fx/qfxgridview.cpp +++ b/src/declarative/fx/qfxgridview.cpp @@ -647,7 +647,7 @@ void QFxGridViewPrivate::updateCurrent(int modelIndex) /*! \qmlclass GridView \inherits Flickable - \brief The GridView element provides a grid view of items provided by a model. + \brief The GridView item provides a grid view of items provided by a model. The model is typically provided by a QAbstractListModel "C++ model object", but can also be created directly in QML. @@ -706,7 +706,7 @@ QFxGridView::~QFxGridView() The C++ model object must be a \l QListModelInterface subclass, a \l VisualModel, or a simple list. - Models can also be created directly in QML, using the \l ListModel element. For example: + Models can also be created directly in QML, using the \l ListModel object. For example: \code diff --git a/src/declarative/fx/qfxhighlightfilter.cpp b/src/declarative/fx/qfxhighlightfilter.cpp index 70b50cd..862a698 100644 --- a/src/declarative/fx/qfxhighlightfilter.cpp +++ b/src/declarative/fx/qfxhighlightfilter.cpp @@ -73,18 +73,24 @@ public: \brief The Highlight filter adds a highlight to an item. \inherits Filter - \code - - - - - - - - - - \endcode + \qml +Text { + id: highlighttext + color: "red" + font.size: 32 + text: "Highlight" + filter: Highlight { + source: "pics/highlight.png" + xOffset: NumericAnimation { + running: true + repeat: true + from: 320 + to: -320 + duration: 2000 + } + } +} + \endqml \image highlight.gif Highlighting is only supported when Qt Declarative is compiled for OpenGL ES 2.0. @@ -114,7 +120,7 @@ QFxHighlightFilter::~QFxHighlightFilter() } /*! - \qmlproperty string Highlight::src + \qmlproperty string Highlight::source This property holds the URL of the image to be used as the highlight. */ diff --git a/src/declarative/fx/qfximage.cpp b/src/declarative/fx/qfximage.cpp index 1361d68..53c6137 100644 --- a/src/declarative/fx/qfximage.cpp +++ b/src/declarative/fx/qfximage.cpp @@ -60,36 +60,38 @@ QML_DEFINE_TYPE(QFxImage,Image); \brief The Image element allows you to add bitmaps to a scene. \inherits Item - The Image element supports untransformed, stretched, grid-scaled and tiled images. For an explanation of grid-scaling see the scaleGrid property description or the QFxScaleGrid class description. + The Image element supports untransformed, stretched, grid-scaled and tiled images. + For an explanation of grid-scaling see the scaleGrid property description + or the QFxScaleGrid class description. Examples: \table \row \o \image declarative-qtlogo1.png \o Untransformed - \code + \qml Image { source: "pics/qtlogo.png" } - \endcode + \endqml \row \o \image declarative-qtlogo2.png \o Stretched - \code + \qml Image { width: 160; height: 160; source: "pics/qtlogo.png" } - \endcode + \endqml \row \o \image declarative-qtlogo4.png \o Grid-scaled - \code + \qml Image { scaleGrid.left: 20; scaleGrid.right: 10 scaleGrid.top: 14; scaleGrid.bottom: 14 width: 160; height: 160; source: "pics/qtlogo.png" } - \endcode + \endqml \row \o \image declarative-qtlogo3.png \o Tiled - \code + \qml Image { tile: true; width: 160; height: 160; source: "pics/qtlogo.png" } - \endcode + \endqml \endtable */ @@ -101,9 +103,9 @@ QML_DEFINE_TYPE(QFxImage,Image); \ingroup group_coreitems Example: - \code + \qml Image { source: "pics/star.png" } - \endcode + \endqml A QFxImage object can be instantiated in Qml using the tag \l Image. */ @@ -198,13 +200,13 @@ QFxScaleGrid *QFxImage::scaleGrid() bitmap file to its size. If tiling is enabled, the bitmap is repeated as a set of unscaled tiles, clipped to the size of the Image. - \code + \qml Item { Image { source: "tile.png" } Image { x: 80; width: 100; height: 100; src: "tile.png" } Image { x: 190; width: 100; height: 100; tile: true; src: "tile.png" } } - \endcode + \endqml \image declarative-image_tile.png If both tiling and the scaleGrid are set, tiling takes precedence. diff --git a/src/declarative/fx/qfxkeyactions.cpp b/src/declarative/fx/qfxkeyactions.cpp index 52a013a..a07f047 100644 --- a/src/declarative/fx/qfxkeyactions.cpp +++ b/src/declarative/fx/qfxkeyactions.cpp @@ -169,22 +169,22 @@ void QFxKeyActionsPrivate::setBit(int b, bool v) /*! \qmlclass KeyActions - \brief The KeyActions element enables simple key handling. + \brief The KeyActions item enables simple key handling. \inherits Item KeyActions is typically used in basic key handling scenarios where writing JavaScript key handling routines would be unnecessarily complicated. The - KeyActions element has a collection of properties that correspond to a - selection of common keys. When a given key is pressed, the element executes + KeyActions item has a collection of properties that correspond to a + selection of common keys. When a given key is pressed, the item executes the action script assigned to the matching property. If no action has - been set the KeyActions element does nothing. + been set the KeyActions item does nothing. To receive (and susequently respond to) key presses, the KeyActions class - must be in the current focus chain, just like any other element. + must be in the current focus chain, just like any other item. For basic mouse handling, see \l MouseRegion. - KeyActions is an invisible element: it is never painted. + KeyActions is an invisible item: it is never painted. */ QFxKeyActions::QFxKeyActions(QFxItem *parent) : QFxItem(parent), d(new QFxKeyActionsPrivate) @@ -221,7 +221,7 @@ void QFxKeyActionsPrivate::setKeyExpr(Qt::Key k, const QString &expr) \qmlproperty bool KeyActions::enabled Enables or disables KeyActions' key handling. When not enabled, the - KeyActions instance does not respond to any key presses. The element is + KeyActions instance does not respond to any key presses. The item is enabled by default. */ bool QFxKeyActions::enabled() const @@ -244,9 +244,9 @@ void QFxKeyActions::setEnabled(bool e) The action to take for the given letter. The following example sets actions for the 'c' and 'x' keys. - \code + \qml KeyActions { keyC: "print('c is for cookie')"; keyX: "print('I like cookies')" } - \endcode + \endqml */ QString QFxKeyActions::key_A() const { @@ -518,9 +518,9 @@ void QFxKeyActions::setKey_Z(const QString &s) The action to take for the given arrow key. The following example sets actions for the left and right arrow keys. - \code + \qml KeyActions { leftArrow: "print('You pressed left')"; rightArrow: "print('You pressed right')" } - \endcode + \endqml */ QString QFxKeyActions::key_Left() const @@ -569,9 +569,9 @@ void QFxKeyActions::setKey_Down(const QString &s) The action to take for the given number key. The following example sets actions for the '5' and '6' keys. - \code + \qml KeyActions { digit5: "print('5 is a prime number')"; digit6: "print('6 is a composite number')"; focus: true } - \endcode + \endqml */ QString QFxKeyActions::key_0() const @@ -744,9 +744,9 @@ void QFxKeyActions::setKey_Space(const QString &s) The action to take for the given utility key. The following example sets an action for the space key. - \code + \qml KeyActions { space: "print('Space pressed')" } - \endcode + \endqml */ /*! @@ -765,9 +765,9 @@ void QFxKeyActions::setKey_Space(const QString &s) The action to take for the given device key. The following example sets an action for the hangup key. - \code + \qml KeyActions { hangup: "print('Go away now')" } - \endcode + \endqml */ QString QFxKeyActions::key_Back() const diff --git a/src/declarative/fx/qfxkeyproxy.cpp b/src/declarative/fx/qfxkeyproxy.cpp index 6d92441..6d9c6ab 100644 --- a/src/declarative/fx/qfxkeyproxy.cpp +++ b/src/declarative/fx/qfxkeyproxy.cpp @@ -47,7 +47,7 @@ QML_DEFINE_TYPE(QFxKeyProxy,KeyProxy); /*! \qmlclass KeyProxy - \brief The KeyProxy element proxies key presses to a number of other elements. + \brief The KeyProxy item proxies key presses to a number of other items. \inherits Item */ @@ -55,7 +55,7 @@ QML_DEFINE_TYPE(QFxKeyProxy,KeyProxy); /*! \internal \class QFxKeyProxy - \brief The QFxKeyProxy class proxies key presses to a number of other elements. + \brief The QFxKeyProxy class proxies key presses to a number of other items. \ingroup group_utility */ -- cgit v0.12 From 6aeccc0f8b592d835d9ec32daecc0b5d104f132b Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Fri, 1 May 2009 16:11:54 +1000 Subject: doc --- src/declarative/fx/qfxlayouts.cpp | 360 +++++++++++++++++++--------------- src/declarative/fx/qfxlistview.cpp | 4 +- src/declarative/fx/qfxmouseregion.cpp | 8 +- src/declarative/fx/qfxparticles.cpp | 166 +++++++++++----- src/declarative/fx/qfxpath.cpp | 36 ++-- src/declarative/fx/qfxrect.cpp | 58 ++++-- 6 files changed, 381 insertions(+), 251 deletions(-) diff --git a/src/declarative/fx/qfxlayouts.cpp b/src/declarative/fx/qfxlayouts.cpp index 76afeb0..85b198e 100644 --- a/src/declarative/fx/qfxlayouts.cpp +++ b/src/declarative/fx/qfxlayouts.cpp @@ -127,15 +127,18 @@ void QFxBaseLayout::setMargin(int s) \property QFxBaseLayout::move \brief the transition when moving an item. - \code - - - - - - - - \endcode + \qml +BaseLayout { + id: layout + y: 0 + move: Transition { + NumericAnimation { + properties: "y" + ease: "easeOutBounce" + } + } +} + \endqml */ QmlTransition *QFxBaseLayout::move() const { @@ -153,15 +156,21 @@ void QFxBaseLayout::setMove(QmlTransition *mt) \property QFxBaseLayout::add \brief the transition when adding an item. - \code - - - - - - - - \endcode + \qml +BaseLayout { + id: layout + y: 0 + add: Transition { + NumericAnimation { + target: layout.item + properties: "opacity" + from: 0 + to: 1 + duration: 500 + } + } +} + \endqml */ QmlTransition *QFxBaseLayout::add() const { @@ -182,15 +191,21 @@ void QFxBaseLayout::setAdd(QmlTransition *add) Note that the item may be 'removed' because its opacity is zero. This can make certain transitions difficult to see. - \code - - - - - - - - \endcode + \qml +BaseLayout { + id: layout + y: 0 + remove: Transition { + NumericAnimation { + target: layout.item + properties: "opacity" + from: 1 + to: 0 + duration: 500 + } + } +} + \endqml */ QmlTransition *QFxBaseLayout::remove() const { @@ -433,10 +448,10 @@ void QFxBaseLayout::applyRemove(const QList >& changes, QML_DEFINE_TYPE(QFxVerticalLayout, VerticalLayout); /*! \qmlclass VerticalLayout - \brief The VerticalLayout element arranges its children in a vertical layout. + \brief The VerticalLayout item arranges its children in a vertical layout. \inherits Item - The VerticalLayout element arranges its child elements so that they are vertically + The VerticalLayout item arranges its child items so that they are vertically aligned and not overlapping. Spacing between items can be added, as can a margin around all the items. The below example lays out differently shaped rectangles using a VerticalLayout. @@ -444,32 +459,34 @@ QML_DEFINE_TYPE(QFxVerticalLayout, VerticalLayout); \row \o \image verticalLayout_example.png \o - \code - - - - - - \endcode + \qml +VerticalLayout { + spacing: 2 + Rect { color: "red"; width: 50; height: 50 } + Rect { color: "green"; width: 20; height: 50 } + Rect { color: "blue"; width: 50; height: 20 } +} + \endqml \endtable VerticalLayout also provides for transitions to be set when items are added, moved, - or removed in the layout. Adding and removing apply both to elements which are deleted + or removed in the layout. Adding and removing apply both to items which are deleted or have their position in the document changed so as to no longer be children of the layout, - as well as to elements which have their opacity set to or from zero so as to appear or disappear. + as well as to items which have their opacity set to or from zero so as to appear or disappear. \table \row \o \image verticalLayout_transition.gif \o - \code - - ... - ... - ... - ... - - \endcode + \qml +VerticalLayout { + spacing: 2 + remove: ... + add: ... + move: ... + ... +} + \endqml \endtable @@ -486,17 +503,20 @@ QML_DEFINE_TYPE(QFxVerticalLayout, VerticalLayout); \row \o \image layout-remove.gif \o - \code - - - - - - - - \endcode + \qml +VerticalLayout { + id: layout + remove: Transition { + NumericAnimation { + target: layout.item + properties: "opacity" + from: 1 + to: 0 + duration: 500 + } + } +} + \endqml \endtable */ @@ -510,17 +530,20 @@ QML_DEFINE_TYPE(QFxVerticalLayout, VerticalLayout); \row \o \image layout-add.gif \o - \code - - - - - - - - \endcode + \qml +VerticalLayout { + id: layout + add: Transition { + NumericAnimation { + target: layout.item + properties: "opacity" + from: 0 + to: 1 + duration: 500 + } + } +} + \endqml \endtable */ @@ -534,15 +557,17 @@ QML_DEFINE_TYPE(QFxVerticalLayout, VerticalLayout); \row \o \image layout-move.gif \o - \code - - - - - - - - \endcode + \qml +VerticalLayout { + id: layout + move: Transition { + NumericAnimation { + properties: "y" + ease: "easeOutBounce" + } + } +} + \endqml \endtable */ /*! @@ -624,19 +649,20 @@ void QFxVerticalLayout::doLayout() QML_DEFINE_TYPE(QFxHorizontalLayout,HorizontalLayout); /*! \qmlclass HorizontalLayout - \brief The HorizontalLayout element arranges its children in a horizontal layout. + \brief The HorizontalLayout item arranges its children in a horizontal layout. \inherits Item - The HorizontalLayout element arranges its child elements so that they are horizontally aligned and not overlapping. Spacing can be added between the items, and a margin around all items can also be added. It also provides for transitions to be set when items are added, moved, or removed in the layout. Adding and removing apply both to elements which are deleted or have their position in the document changed so as to no longer be children of the layout, as well as to elements which have their opacity set to or from zero so as to appear or disappear. + The HorizontalLayout item arranges its child items so that they are horizontally aligned and not overlapping. Spacing can be added between the items, and a margin around all items can also be added. It also provides for transitions to be set when items are added, moved, or removed in the layout. Adding and removing apply both to items which are deleted or have their position in the document changed so as to no longer be children of the layout, as well as to items which have their opacity set to or from zero so as to appear or disappear. The below example lays out differently shaped rectangles using a HorizontalLayout. - \code - - - - - - \endcode + \qml +HorizontalLayout { + spacing: 2 + Rect { color: "red"; width: 50; height: 50 } + Rect { color: "green"; width: 20; height: 50 } + Rect { color: "blue"; width: 50; height: 20 } +} + \endqml \image horizontalLayout_example.png */ @@ -648,15 +674,20 @@ QML_DEFINE_TYPE(QFxHorizontalLayout,HorizontalLayout); Note that if the item counts as removed because its opacity is zero it will not be visible during the transition unless you set the opacity in the transition, like in the below example. - \code - - - - - - - - \endcode + \qml +HorizontalLayout { + id: layout + remove: Transition { + NumericAnimation { + target: layout.item + properties: "opacity" + from: 1 + to: 0 + duration: 500 + } + } +} + \endqml */ /*! @@ -665,15 +696,20 @@ QML_DEFINE_TYPE(QFxHorizontalLayout,HorizontalLayout); Added can mean that either the object has been created or reparented, and thus is now a child or the layout, or that the object has had its opacity increased from zero, and thus is now visible. - \code - - - - - - - - \endcode + \qml +HorizontalLayout { + id: layout + add: Transition { + NumericAnimation { + target: layout.item + properties: "opacity" + from: 0 + to: 1 + duration: 500 + } + } +} + \endqml */ /*! @@ -682,15 +718,17 @@ QML_DEFINE_TYPE(QFxHorizontalLayout,HorizontalLayout); This can happen when other items are added or removed from the layout, or when items resize themselves. - \code - - - - - - - - \endcode + \qml +HorizontalLayout { + id: layout + move: Transition { + NumericAnimation { + properties: "x" + ease: "easeOutBounce" + } + } +} + \endqml */ /*! @@ -776,21 +814,21 @@ QML_DEFINE_TYPE(QFxGridLayout,GridLayout); /*! \qmlclass GridLayout QFxGridLayout - \brief The GridLayout element arranges its children in a grid layout. + \brief The GridLayout item arranges its children in a grid layout. \inherits Item - The GridLayout element arranges its child elements so that they are + The GridLayout item arranges its child items so that they are aligned in a grid and are not overlapping. Spacing can be added between the items, and a margin around all the items can also be defined. It also provides for transitions to be set when items are added, moved, or removed in the layout. Adding and removing apply - both to elements which are deleted or have their position in the + both to items which are deleted or have their position in the document changed so as to no longer be children of the layout, as - well as to elements which have their opacity set to or from zero so + well as to items which have their opacity set to or from zero so as to appear or disappear. The GridLayout defaults to using four columns, and as many rows as - are necessary to fit all the child elements. The number of rows + are necessary to fit all the child items. The number of rows and/or the number of columns can be constrained by setting the rows or columns properties. The grid layout calculates a grid with rectangular cells of sufficient size to hold all items, and then @@ -802,15 +840,17 @@ QML_DEFINE_TYPE(QFxGridLayout,GridLayout); \row \o \image gridLayout_example.png \o - \code - - - - - - - - \endcode + \qml +GridLayout { + columns: 3 + spacing: 2 + Rect { color: "red"; width: 50; height: 50 } + Rect { color: "green"; width: 20; height: 50 } + Rect { color: "blue"; width: 50; height: 20 } + Rect { color: "cyan"; width: 50; height: 50 } + Rect { color: "magenta"; width: 10; height: 10 } +} + \endqml \endtable */ /*! @@ -826,15 +866,20 @@ QML_DEFINE_TYPE(QFxGridLayout,GridLayout); zero it will not be visible during the transition unless you set the opacity in the transition, like in the below example. - \code - - - - - - - - \endcode + \qml +GridLayout { + id: layout + remove: Transition { + NumericAnimation { + target: layout.item + properties: "opacity" + from: 1 + to: 0 + duration: 500 + } + } +} + \endqml */ /*! @@ -846,15 +891,20 @@ QML_DEFINE_TYPE(QFxGridLayout,GridLayout); object has had its opacity increased from zero, and thus is now visible. - \code - - - - - - - - \endcode + \qml +GridLayout { + id: layout + add: Transition { + NumericAnimation { + target: layout.item + properties: "opacity" + from: 0 + to: 1 + duration: 500 + } + } +} + \endqml */ /*! @@ -864,15 +914,17 @@ QML_DEFINE_TYPE(QFxGridLayout,GridLayout); This can happen when other items are added or removed from the layout, or when items resize themselves. - \code - - - - - - - - \endcode + \qml +GridLayout { + id: layout + move: Transition { + NumericAnimation { + properties: "x,y" + ease: "easeOutBounce" + } + } +} + \endqml */ /*! diff --git a/src/declarative/fx/qfxlistview.cpp b/src/declarative/fx/qfxlistview.cpp index 98fa606..9d076d0 100644 --- a/src/declarative/fx/qfxlistview.cpp +++ b/src/declarative/fx/qfxlistview.cpp @@ -795,7 +795,7 @@ void QFxListViewPrivate::fixupX() /*! \qmlclass ListView \inherits Flickable - \brief The ListView element provides a list view of items provided by a model. + \brief The ListView item provides a list view of items provided by a model. The model is typically provided by a QAbstractListModel "C++ model object", but can also be created directly in QML. The items are laid out vertically or horizontally and may be flicked to scroll. @@ -840,7 +840,7 @@ QFxListView::~QFxListView() The C++ model object must be a \l QAbstractItemModel subclass, a \l VisualModel, or a simple list. - Models can also be created directly in QML, using the \l ListModel element. + Models can also be created directly in QML, using a \l ListModel. */ QVariant QFxListView::model() const { diff --git a/src/declarative/fx/qfxmouseregion.cpp b/src/declarative/fx/qfxmouseregion.cpp index 3b318e3..a60ddc4 100644 --- a/src/declarative/fx/qfxmouseregion.cpp +++ b/src/declarative/fx/qfxmouseregion.cpp @@ -145,12 +145,12 @@ void QFxDrag::setYmax(int m) /*! \qmlclass MouseRegion - \brief The MouseRegion element enables simple mouse handling. + \brief The MouseRegion item enables simple mouse handling. \inherits Item - A MouseRegion is typically used in conjunction with a visible element, + A MouseRegion is typically used in conjunction with a visible item, where the MouseRegion effectively 'proxies' mouse handling for that - element. For example, we can put a MouseRegion in a Rect that changes + item. For example, we can put a MouseRegion in a Rect that changes the Rect color to red when clicked: \snippet doc/src/snippets/declarative/mouseregion.qml 0 @@ -164,7 +164,7 @@ void QFxDrag::setYmax(int m) For basic key handling, see \l KeyActions. - MouseRegion is an invisible element: it is never painted. + MouseRegion is an invisible item: it is never painted. \sa MouseEvent */ diff --git a/src/declarative/fx/qfxparticles.cpp b/src/declarative/fx/qfxparticles.cpp index 16b3570..45de1a3 100644 --- a/src/declarative/fx/qfxparticles.cpp +++ b/src/declarative/fx/qfxparticles.cpp @@ -151,7 +151,7 @@ void QFxParticleMotion::destroy(QFxParticle &particle) /*! \qmlclass ParticleMotionLinear - \brief The ParticleMotionLinear element moves particles linearly. + \brief The ParticleMotionLinear object moves particles linearly. \sa Particles */ @@ -175,7 +175,7 @@ void QFxParticleMotionLinear::advance(QFxParticle &p, int interval) /*! \qmlclass ParticleMotionGravity - \brief The ParticleMotionGravity element moves particles towards a point. + \brief The ParticleMotionGravity object moves particles towards a point. \sa Particles */ @@ -234,23 +234,37 @@ void QFxParticleMotionGravity::advance(QFxParticle &p, int interval) /*! \qmlclass ParticleMotionWander - \brief The ParticleMotionWander element moves particles in a somewhat random fashion. + \brief The ParticleMotionWander object moves particles in a somewhat random fashion. The particles will continue roughly in the original direction, however will randomly drift to each side. The code below produces an effect similar to falling snow. - \code - - - - - - \endcode + \qml +Rect { + width: 240 + height: 320 + color: "black" + + Particles { + y: 0 + width: parent.width + height: 30 + src: "star.png" + lifeSpan: 5000 + count: 50 + angle: 70 + angleDeviation: 36 + velocity: 30 + velocityDeviation: 10 + ParticleMotionWander { + xvariance: 30 + pace: 100 + } + } +} + \endqml \sa Particles */ @@ -508,35 +522,59 @@ QML_DEFINE_TYPE(QFxParticles,Particles); /*! \qmlclass Particles - \brief The Particles element generates and moves particles. + \brief The Particles object generates and moves particles. \inherits Item - The particles created by this element cannot be dealt with directly, they can only be controlled through the parameters of the Particles element. The particles are all the same pixmap, specified by the user. + The particles created by this object cannot be dealt with directly, they can only be controlled through the parameters of the Particles object. The particles are all the same pixmap, specified by the user. - The particles are painted relative to the parent of the Particles element. Moving the - Particles element will not move the particles already emitted. + The particles are painted relative to the parent of the Particles object. Moving the + Particles object will not move the particles already emitted. The below example creates two differently behaving particle sources. The top one has particles falling from the top like snow, the lower one has particles expelled up like a fountain. - \code - - - - - - - - - \endcode + \qml +Rect { + width: 240 + height: 320 + color: "black" + Particles { + y: 0 + width: parent.width + height: 30 + src: "star.png" + lifeSpan: 5000 + count: 50 + angle: 70 + angleDeviation: 36 + velocity: 30 + velocityDeviation: 10 + ParticleMotionWander { + xvariance: 30 + pace: 100 + } + } + Particles { + y: 300 + x: 120 + width: 1 + height: 1 + src: "star.png" + lifeSpan: 5000 + count: 200 + angle: 270 + angleDeviation: 45 + velocity: 50 + velocityDeviation: 30 + ParticleMotionGravity { + yattractor: 1000 + xattractor: 0 + acceleration: 25 + } + } +} + \endqml \image particles.gif */ @@ -658,9 +696,13 @@ void QFxParticles::setCount(int cnt) example, the following creates particles whose lifeSpan will vary from 150ms to 250ms: - \code - - \endcode + \qml +Particles { + src: "star.png" + lifeSpan: 200 + lifeSpanDeviation: 100 +} + \endqml */ /*! @@ -691,9 +733,13 @@ void QFxParticles::setLifeSpan(int ls) example, the following creates particles whose lifeSpan will vary from 150ms to 250ms: -\code - -\endcode +\qml +Particles { + src: "star.png" + lifeSpan: 200 + lifeSpanDeviation: 100 +} +\endqml \sa QFxParticles::lifeSpan */ @@ -765,9 +811,13 @@ void QFxParticles::setFadeOutDuration(int dur) example, the following creates particles whose initial direction will vary from 15 degrees to 105 degrees: - \code - - \endcode + \qml +Particles { + src: "star.png" + angle: 60 + angleDeviation: 90 +} + \endqml */ /*! @@ -796,9 +846,13 @@ void QFxParticles::setAngle(qreal angle) example, the following creates particles whose initial direction will vary from 15 degrees to 105 degrees: -\code - -\endcode +\qml +Particles { + src: "star.png" + angle: 60 + angleDeviation: 90 +} +\endqml \sa QFxParticles::angle */ @@ -824,9 +878,13 @@ void QFxParticles::setAngleDeviation(qreal dev) example, the following creates particles whose initial velocity will vary from 40 to 60. - \code - - \endcode + \qml +Particles { + src: "star.png" + velocity: 50 + velocityDeviation: 20 +} + \endqml */ /*! @@ -855,9 +913,13 @@ void QFxParticles::setVelocity(qreal velocity) example, the following creates particles whose initial velocity will vary from 40 to 60. -\code - -\endcode +\qml +Particles { + src: "star.png" + velocity: 50 + velocityDeviation: 20 +} +\endqml \sa QFxParticles::velocity */ diff --git a/src/declarative/fx/qfxpath.cpp b/src/declarative/fx/qfxpath.cpp index 26aa10e..e11658c 100644 --- a/src/declarative/fx/qfxpath.cpp +++ b/src/declarative/fx/qfxpath.cpp @@ -57,9 +57,9 @@ QML_DEFINE_TYPE(QFxPathCubic,PathCubic); /*! \qmlclass PathElement - \brief PathElement is the base path element. + \brief PathElement is the base path type. - This element is the base for all path elements. It cannot + This type is the base for all path types. It cannot be instantiated. \sa Path, PathAttribute, PathPercent, PathLine, PathQuad, PathCubic @@ -73,13 +73,13 @@ QML_DEFINE_TYPE(QFxPathCubic,PathCubic); /*! \qmlclass Path QFxPath - \brief The Path element defines a path for use by \l PathView. + \brief A Path object defines a path for use by \l PathView. A Path is composed of one or more path segments - PathLine, PathQuad, PathCubic. - The spacing of the items along the Path can be adjusted via the - PathPercent element. + The spacing of the items along the Path can be adjusted via a + PathPercent object. PathAttribute allows named attributes with values to be defined along the path. @@ -151,11 +151,11 @@ void QFxPath::setStartY(qreal y) /*! \qmlproperty list Path::pathElements - This property holds the elements composing the path. + This property holds the objects composing the path. \default - A path can contain the following path elements: + A path can contain the following path objects: \list \i \l PathLine - a straight line to a given position. \i \l PathQuad - a quadratic Bezier curve to a given position with a control point. @@ -478,7 +478,7 @@ void QFxCurve::setY(qreal y) \qmlclass PathAttribute \brief The PathAttribute allows setting an attribute at a given position in a Path. - The PathAttribute element allows attibutes consisting of a name and a + The PathAttribute object allows attibutes consisting of a name and a value to be specified for the endpoints of path segments. The attributes are exposed to the delegate as \l {Attached Properties}. The value of an attribute at any particular point is interpolated from the PathAttributes @@ -557,12 +557,12 @@ void QFxPathAttribute::setValue(qreal value) The example below creates a path consisting of a straight line from 0,100 to 200,100: - \code + \qml Path { startX: 0; startY: 100 PathLine { x: 200; y: 100 } } - \endcode + \endqml \sa Path, PathQuad, PathCubic */ @@ -599,12 +599,12 @@ void QFxPathLine::addToPath(QPainterPath &path) \row \o \image declarative-pathquad.png \o - \code + \qml Path { startX: 0; startY: 0 PathQuad x: 200; y: 0; controlX: 100; controlY: 150 } } - \endcode + \endqml \endtable \sa Path, PathCubic, PathLine @@ -683,7 +683,7 @@ void QFxPathQuad::addToPath(QPainterPath &path) \row \o \image declarative-pathcubic.png \o - \code + \qml Path { startX: 20; startY: 0 PathCubic { @@ -691,7 +691,7 @@ void QFxPathQuad::addToPath(QPainterPath &path) control2X: 210; control2Y: 90 } } - \endcode + \endqml \endtable \sa Path, PathQuad, PathLine @@ -813,18 +813,18 @@ void QFxPathCubic::addToPath(QPainterPath &path) \row \o \image declarative-nopercent.png \o - \code + \qml Path { startX: 20; startY: 0 PathQuad { x: 50; y: 80; controlX: 0; controlY: 80 } PathLine { x: 150; y: 80 } PathQuad { x: 180; y: 0; controlX: 200; controlY: 80 } } - \endcode + \endqml \row \o \image declarative-percent.png \o - \code + \qml Path { startX: 20; startY: 0 PathQuad { x: 50; y: 80; controlX: 0; controlY: 80 } @@ -834,7 +834,7 @@ void QFxPathCubic::addToPath(QPainterPath &path) PathQuad { x: 180; y: 0; controlX: 200; controlY: 80 } PathPercent { value: 1 } } - \endcode + \endqml \endtable \sa Path diff --git a/src/declarative/fx/qfxrect.cpp b/src/declarative/fx/qfxrect.cpp index 8aaddba..371aa0c 100644 --- a/src/declarative/fx/qfxrect.cpp +++ b/src/declarative/fx/qfxrect.cpp @@ -53,9 +53,9 @@ QML_DEFINE_TYPE(QFxPen,Pen); \brief The QFxPen class provides a pen used for drawing rect borders on a QFxView. Example: - \code + \qml Rect { pen.width: 2; pen.color: "red" ... } - \endcode + \endqml */ /*! \property QFxPen::width @@ -72,13 +72,13 @@ QML_DEFINE_TYPE(QFxPen,Pen); color is most commonly specified in hexidecimal notation (#RRGGBB) or as an \l {http://www.w3.org/TR/SVG/types.html#ColorKeywords}{SVG color keyword name} (as defined by the World Wide Web Consortium). For example: - \code + \qml // rect with green border using hexidecimal notation Rect { pen.color: "#00FF00" } // rect with steelblue border using SVG color name Rect { pen.color: "steelblue" } - \endcode + \endqml For the full set of ways to specify color, see Qt's QColor::setNamedColor documentation. */ @@ -96,14 +96,22 @@ QML_DEFINE_TYPE(QFxRect,Rect); /*! \qmlclass Rect QFxRect - \brief The Rect element allows you to add rectangles to a scene. + \brief The Rect item allows you to add rectangles to a scene. \inherits Item - A Rect is painted having a solid fill (color) and an optional border (pen). You can also create rounded rectangles using the radius property. - - \code - Rect { width: 100; height: 100; color: "red"; pen.color: "black"; pen.width: 5; radius: 10 } - \endcode + A Rect is painted having a solid fill (color) and an optional border (pen). + You can also create rounded rectangles using the radius property. + + \qml + Rect { + width: 100 + height: 100 + color: "red" + pen.color: "black" + pen.width: 5 + radius: 10 + } + \endqml \image declarative-rect.png */ @@ -113,11 +121,19 @@ QML_DEFINE_TYPE(QFxRect,Rect); \class QFxRect \brief The QFxRect class provides a rect item that you can add to a QFxView. - A Rect is painted having a solid fill (color) and an optional border (pen). You can also create rounded rectangles using the radius property. - - \code - Rect { width: 100; height: 100; color: "red"; pen.color: "black"; pen.width: 5; radius: 10 } - \endcode + A Rect is painted having a solid fill (color) and an optional border (pen). + You can also create rounded rectangles using the radius property. + + \qml + Rect { + width: 100 + height: 100 + color: "red" + pen.color: "black" + pen.width: 5 + radius: 10 + } + \endqml \image declarative-rect.png @@ -216,13 +232,13 @@ void QFxRect::dump(int depth) \qmlproperty color Rect::color This property holds the color used to fill the rect. - \code + \qml // green rect using hexidecimal notation Rect { color: "#00FF00" } // steelblue rect using SVG color name Rect { color: "steelblue" } - \endcode + \endqml */ /*! @@ -259,10 +275,10 @@ void QFxRect::setColor(const QColor &c) This color will be drawn over the rect's color when the rect is painted. The tint color should usually be mostly transparent, or you will not be able to see the underlying color. The below example provides a slight red tint by having the tint color be pure red which is only 1/16th opaque. - \code + \qml Rect { x: 0; width: 80; height: 80; color: "lightsteelblue" } Rect { x: 100; width: 80; height: 80; color: "lightsteelblue"; tintColor: "#10FF0000" } - \endcode + \endqml \image declarative-rect_tint.png This attribute is not intended to be used with a single color over the lifetime of an user interface. It is most useful when a subtle change is intended to be conveyed due to some event; you can then use the tint color to more effectively tune the visible color. @@ -320,13 +336,13 @@ QColor QFxRectPrivate::getColor() This property allows for the easy construction of simple horizontal gradients. Other gradients may by formed by adding rotation to the rect. The gradient will blend linearly from the rect's main color to the color specified for gradient color. - \code + \qml Rect { y: 0; width: 80; height: 80; color: "lightsteelblue" } Rect { y: 100; width: 80; height: 80; color: "lightsteelblue"; gradientColor="blue" } Rect { rotation: 90; x: 80; y: 200; width: 80; height: 80; color="lightsteelblue" gradientColor: "blue" } // The x offset is needed because the rotation is from the top left corner - \endcode + \endqml \image declarative-rect_gradient.png */ -- cgit v0.12 From 8f52aee209aa64ef6719126547c767583870bd9f Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Fri, 1 May 2009 16:26:59 +1000 Subject: doc --- src/declarative/fx/qfxreflectionfilter.cpp | 69 ++++++++++++++---------------- src/declarative/fx/qfxrepeater.cpp | 8 ++-- src/declarative/fx/qfxshadowfilter.cpp | 28 ++++++++---- src/declarative/fx/qfxtext.cpp | 28 ++++++------ src/declarative/fx/qfxtextedit.cpp | 69 +++++++++++++++++------------- src/declarative/fx/qfxtransform.cpp | 43 +++++++++++-------- 6 files changed, 136 insertions(+), 109 deletions(-) diff --git a/src/declarative/fx/qfxreflectionfilter.cpp b/src/declarative/fx/qfxreflectionfilter.cpp index e02bc16..a55f374 100644 --- a/src/declarative/fx/qfxreflectionfilter.cpp +++ b/src/declarative/fx/qfxreflectionfilter.cpp @@ -69,35 +69,30 @@ public: Here is an example of various Reflections applied to an image. - \code - - - - - - - - - - - - - - - - - - - - - - - - - - - - \endcode + \qml +HorizontalLayout { + Image { + src: "icon.png" + filter: Reflection { } + } + Image { + src: "icon.png" + filter: Reflection { offset: 1 } + } + Image { + src: "icon.png" + filter: Reflection { offset: 1; alpha: 0.5 } + } + Image { + src: "icon.png" + filter: Reflection { offset: 1; alpha: 0.5; height: 50 } + } + Image { + src: "icon.png" + filter: Reflection { offset: 1; alpha: 0.5; height: 50; scale: 0.5 } + } +} + \endqml \image reflection_example.png @@ -149,13 +144,15 @@ void QFxReflectionFilter::setAlpha(qreal a) it is set to 50, the bottom 50 pixels of the item are reflected. Data binding could be used to reflect a percentage of the item. - \code - - - - - - \endcode + \qml +Image { + id: myImage + src: "album.png" + filter: Reflection { + height: myImage.height * 0.5 + } +} + \endqml */ /*! \qmlproperty int Reflection::offset diff --git a/src/declarative/fx/qfxrepeater.cpp b/src/declarative/fx/qfxrepeater.cpp index f9fc878..23b4e01 100644 --- a/src/declarative/fx/qfxrepeater.cpp +++ b/src/declarative/fx/qfxrepeater.cpp @@ -77,13 +77,13 @@ QML_DEFINE_TYPE(QFxRepeater,Repeater); \qmlclass Repeater \inherits Item - \brief The Repeater element allows you to repeat a component based on a data source. + \brief The Repeater item allows you to repeat a component based on a data source. - The Repeater element is used when you want to create a large number of + The Repeater item is used when you want to create a large number of similar items. For each entry in the data source, an item is instantiated in a context seeded with data from the data source. If the repeater will be instantiating a large number of instances, it may be more efficient to - use one of Qt Declarative's \l {xmlViews}{view elements}. + use one of Qt Declarative's \l {xmlViews}{view items}. The data source may be either an object list, a string list or a Qt model. In each case, the data element and the index is exposed to each instantiated @@ -92,7 +92,7 @@ QML_DEFINE_TYPE(QFxRepeater,Repeater); or object) is available as the \c modelData property. In the case of a Qt model, all roles are available as named properties just like in the view classes. - Items instantiated by the Repeater elemented are inserted, in order, as + Items instantiated by the Repeater are inserted, in order, as children of the Repeater's parent. The insertion starts immediately after the repeater's position in its parent stacking list. This is to allow you to use a Repeater inside a layout. The following QML example shows how diff --git a/src/declarative/fx/qfxshadowfilter.cpp b/src/declarative/fx/qfxshadowfilter.cpp index 38d1c31..4d34f74 100644 --- a/src/declarative/fx/qfxshadowfilter.cpp +++ b/src/declarative/fx/qfxshadowfilter.cpp @@ -73,14 +73,26 @@ public: \row \o \image shadow_example.png \o - \code - - - - - - - \endcode + \qml +Rect { + radius: 5 + color: "lightsteelblue" + width: 100 + height: 100 + filter: Shadow { + yOffset: 8 + xOffset: 8 + } +} + +Image { + src: "pics/qtlogo.png" + filter: Shadow { + yOffset: 8 + xOffset: 8 + } +} + \endqml \endtable Shadows are only supported when Qt Qt Declarative is compiled for OpenGL ES 2.0. diff --git a/src/declarative/fx/qfxtext.cpp b/src/declarative/fx/qfxtext.cpp index f1aefb9..a43219d 100644 --- a/src/declarative/fx/qfxtext.cpp +++ b/src/declarative/fx/qfxtext.cpp @@ -61,15 +61,15 @@ QML_DEFINE_TYPE(QFxText,Text); /*! \qmlclass Text QFxText - \brief The Text element allows you to add formatted text to a scene. + \brief The Text item allows you to add formatted text to a scene. \inherits Item It can display both plain and rich text. For example: - \code + \qml Text { text: "Hello World!"; font.family: "Helvetica"; font.size: 24; color: "red" } Text { text: "Hello World!" } - \endcode + \endqml \image declarative-text.png @@ -94,10 +94,10 @@ QML_DEFINE_TYPE(QFxText,Text); Text was designed for read-only text; it does not allow for any text editing. It can display both plain and rich text. For example: - \code + \qml Text { text: "Hello World!"; font.family: "Helvetica"; font.size: 24; color: "red" } Text { text: "Hello World!" } - \endcode + \endqml \image text.png @@ -105,7 +105,7 @@ QML_DEFINE_TYPE(QFxText,Text); much room is needed and set it accordingly. Unless \c wrap is set, it will always prefer width to height (all text will be placed on a single line). - The \c elideMode can alternatively be used to fit a line of plain text to a set width. + The \c elide property can alternatively be used to fit a line of plain text to a set width. A QFxText object can be instantiated in Qml using the tag \c Text. */ @@ -212,13 +212,13 @@ void QFxText::setColor(const QColor &color) The text color. - \code + \qml //green text using hexadecimal notation Text { color: "#00FF00"; ... } //steelblue text using SVG color name Text { color: "steelblue"; ... } - \endcode + \endqml */ QColor QFxText::color() const @@ -234,14 +234,14 @@ QColor QFxText::color() const Supported text styles are \c Normal, \c Outline, \c Raised and \c Sunken. - \code + \qml HorizontalLayout { Text { font.size: 24; text: "Normal" } Text { font.size: 24; text: "Raised"; style: "Raised"; styleColor: "#AAAAAA" } Text { font.size: 24; text: "Outline"; style: "Outline"; styleColor: "red" } Text { font.size: 24; text: "Sunken"; style: "Sunken"; styleColor: "#AAAAAA" } } - \endcode + \endqml \image declarative-textstyle.png */ @@ -302,7 +302,7 @@ QColor QFxText::styleColor() const \qmlproperty enumeration Text::hAlign \qmlproperty enumeration Text::vAlign - Sets the horizontal and vertical alignment of the text within the Text elements + Sets the horizontal and vertical alignment of the text within the Text items width and height. By default, the text is top-left aligned. The valid values for \c hAlign are \c AlignLeft, \c AlignRight and @@ -349,7 +349,7 @@ void QFxText::setVAlign(VAlignment align) /*! \qmlproperty bool Text::wrap - Set this property to wrap the text to the Text element's width. The text will only + Set this property to wrap the text to the Text item's width. The text will only wrap if an explicit width has been set. Wrapping is done on word boundaries (i.e. it is a "word-wrap"). If the text cannot be @@ -378,9 +378,9 @@ void QFxText::setWrap(bool w) } /*! - \qmlproperty Qt::TextElideMode Text::elideMode + \qmlproperty Qt::TextElideMode Text::elide - Set this property to elide parts of the text fit to the Text element's width. + Set this property to elide parts of the text fit to the Text item's width. The text will only elide if an explicit width has been set. This property cannot be used with wrap enabled or with rich text. diff --git a/src/declarative/fx/qfxtextedit.cpp b/src/declarative/fx/qfxtextedit.cpp index 807fcbf..84e209b 100644 --- a/src/declarative/fx/qfxtextedit.cpp +++ b/src/declarative/fx/qfxtextedit.cpp @@ -62,15 +62,21 @@ QML_DEFINE_TYPE(QFxTextEdit, TextEdit); /*! \qmlclass TextEdit - \brief The TextEdit element allows you to add editable formatted text to a scene. + \brief The TextEdit item allows you to add editable formatted text to a scene. It can display both plain and rich text. For example: \qml - - Hello World!]]/> - +TextEdit { + id: edit + text: "Hello World!" + focus: true + focusable: true + font.family: "Helvetica" + font.size: 20 + color: "blue" + width: 240 +} \endqml \image declarative-textedit.gif @@ -177,19 +183,24 @@ void QFxTextEdit::setText(const QString &text) \table \row \o - \code - - - Hello World!]]]]> - - - Hello World!]]]]> - - - Hello World!]]]]> - - - \endcode + \qml +VerticalLayout { + TextEdit { + font.size: 24 + text: "Hello World!" + } + TextEdit { + font.size: 24 + textFormat: "RichText" + text: "Hello World!" + } + TextEdit { + font.size: 24 + textFormat: "PlainText" + text: "Hello World!" + } +} + \endqml \o \image declarative-textformat.png \endtable */ @@ -247,13 +258,13 @@ QmlFont *QFxTextEdit::font() The text color. - \code - - + \qml +// green text using hexadecimal notation +TextEdit { color: "#00FF00"; ... } - - - \endcode +// steelblue text using SVG color name +TextEdit { color: "steelblue"; ... } + \endqml */ /*! @@ -284,7 +295,7 @@ void QFxTextEdit::setColor(const QColor &color) \qmlproperty enumeration TextEdit::hAlign \qmlproperty enumeration TextEdit::vAlign - Sets the horizontal and vertical alignment of the text within the TextEdit elements + Sets the horizontal and vertical alignment of the text within the TextEdit items width and height. By default, the text is top-left aligned. The valid values for \c hAlign are \c AlignLeft, \c AlignRight and @@ -345,7 +356,8 @@ bool QFxTextEdit::wrap() const /*! \qmlproperty bool TextEdit::wrap - Set this property to wrap the text to the TextEdit element's width. The text will only wrap if an explicit width has been set. + Set this property to wrap the text to the TextEdit item's width. + The text will only wrap if an explicit width has been set. Wrapping is done on word boundaries (i.e. it is a "word-wrap"). Wrapping is off by default. */ @@ -410,7 +422,7 @@ void QFxTextEdit::componentComplete() /*! \qmlproperty bool TextEdit::readOnly - Whether the user an interact with the TextEdit element. If this + Whether the user an interact with the TextEdit item. If this property is set to true the text cannot be edited by user interaction. By default this property is false. @@ -418,8 +430,7 @@ void QFxTextEdit::componentComplete() /*! \property QFxTextEdit::readOnly - \brief If this property is true the text can not be edited by - user interaction. + \brief If this property is true the text can not be edited by user interaction. Changing this property will modify the text interaction flags. If you require more specific control about how user interaction diff --git a/src/declarative/fx/qfxtransform.cpp b/src/declarative/fx/qfxtransform.cpp index 8ff4c54..1fe02d1 100644 --- a/src/declarative/fx/qfxtransform.cpp +++ b/src/declarative/fx/qfxtransform.cpp @@ -85,16 +85,16 @@ void QFxTransform::update() /*! \qmlclass Axis - \brief The Axis element defines an axis that can be used for rotation or translation. + \brief A Axis object defines an axis that can be used for rotation or translation. An axis is specified by 2 points in 3D space: a start point and an end point. While technically the axis is the line running through these two points (and thus many different sets of two points could define the same axis), the distance between the points does matter for translation along an axis. - \code + \qml Axis { startX: 0; startY: 0; endX: 20; endY: 30 } - \endcode + \endqml */ QML_DEFINE_TYPE(QFxAxis, Axis); @@ -179,7 +179,7 @@ void QFxAxis::setEndZ(qreal z) /*! \qmlclass Rotation3D - \brief The Rotation3D element provides a way to rotate an Item around an axis. + \brief A Rotation3D object provides a way to rotate an Item around an axis. Here is an example of various rotations applied to an \l Image. \snippet doc/src/snippets/declarative/rotation.qml 0 @@ -317,16 +317,23 @@ void QFxRotation3D::update() /*! \qmlclass Translation3D - \brief The Translation3D element provides a way to move an Item along an axis. + \brief A Translation3D object provides a way to move an Item along an axis. The following example translates the image to 10, 3. - \code - - - - - - \endcode + \qml +Image { + src: "logo.png" + transform: [ + Translation3D { + axis.startX: 0 + axis.startY: 0 + axis.endX: 1 + axis.endY: .3 + distance: 10 + } + ] +} + \endqml */ QML_DEFINE_TYPE(QFxTranslation3D,Translation3D); @@ -367,9 +374,9 @@ QFxAxis *QFxTranslation3D::axis() in the example below, a distance of 1 would translate to 100, 50, while a distance of 0.5 would translate to 50, 25. - \code + \qml Translation3D { axis.startX: 0; axis.startY: 0; axis.endX: 100; axis.endY: 50 } - \endcode + \endqml */ qreal QFxTranslation3D::distance() const { @@ -444,7 +451,7 @@ void QFxTranslation3D::update() /*! \qmlclass Perspective - \brief The Perspective element specifies a perspective transformation. + \brief A Perspective object specifies a perspective transformation. A Perspective transform only affects an item when running under OpenGL; when running under software rasterization it has no effect. @@ -501,10 +508,10 @@ QMatrix4x4 QFxPerspective::transform() const /*! \qmlclass Squish - \brief The Squish element allows you to distort an items appearance by 'squishing' it. + \brief A Squish object allows you to distort an items appearance by 'squishing' it. Here is an example of various \l Image squishes. - \code + \qml Rect { id: Screen width: 360; height: 80 @@ -556,7 +563,7 @@ QMatrix4x4 QFxPerspective::transform() const } } } - \endcode + \endqml \image squish.png */ -- cgit v0.12 From 569389e7ab3d052da8bf549827776ffb4d154dba Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Fri, 1 May 2009 16:28:20 +1000 Subject: Correct doc. --- src/declarative/fx/qfxblurfilter.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/declarative/fx/qfxblurfilter.cpp b/src/declarative/fx/qfxblurfilter.cpp index 2bad18c..baa2253 100644 --- a/src/declarative/fx/qfxblurfilter.cpp +++ b/src/declarative/fx/qfxblurfilter.cpp @@ -73,15 +73,15 @@ public: \qml HorizontalLayout { Image { - src: "icon.png" + source: "icon.png" filter: Blur { radius: 0 } } Image { - src: "icon.png" + source: "icon.png" filter: Blur { radius: 5 } } Image { - src: "icon.png" + source: "icon.png" filter: Blur { radius: 10 } } } -- cgit v0.12 From 20e0828d3dcb806a67e29f31447621af1a3d8ea9 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Fri, 1 May 2009 16:31:14 +1000 Subject: Rename QFxView::setXml to QFxView::setQml. --- doc/src/declarative/binding.qdoc | 8 +++---- examples/declarative/contacts/main.cpp | 6 ++--- examples/declarative/minehunt/main.cpp | 4 ++-- src/declarative/test/qfxtestview.cpp | 4 ++-- src/declarative/util/qfxview.cpp | 41 +++++++++++++++------------------- src/declarative/util/qfxview.h | 16 ++++++------- 6 files changed, 37 insertions(+), 42 deletions(-) diff --git a/doc/src/declarative/binding.qdoc b/doc/src/declarative/binding.qdoc index b711a08..1d4f9a1 100644 --- a/doc/src/declarative/binding.qdoc +++ b/doc/src/declarative/binding.qdoc @@ -87,16 +87,16 @@ void setBrightness(int b) Next, make an instance of this class visible to the Qml bind engine: \code QFxView *view = new QFxView; -view->setXml("MyUI.qml"); +view->setUrl("MyUI.qml"); MyScreen *screen = new MyScreen; -QmlBindContext *ctxt = view->bindContext(); -ctxt->setProperty("screen", screen); +QmlBindContext *ctxt = view->rootContext(); +ctxt->setContextProperty("screen", screen); view->execute(); \endcode -\note Bindings must be made after setXml() but before execute(). +\note Bindings must be made after setUrl() but before execute(). Finally, in Qml you can make the appropriate bindings, so in \c "MyUI.qml": diff --git a/examples/declarative/contacts/main.cpp b/examples/declarative/contacts/main.cpp index 6bf9daf..bda6565 100644 --- a/examples/declarative/contacts/main.cpp +++ b/examples/declarative/contacts/main.cpp @@ -7,7 +7,7 @@ #include #include -const char *defaultFileName("contacts.xml"); +const char *defaultFileName("contacts.qml"); class Contacts : public QWidget { @@ -43,8 +43,8 @@ Contacts::Contacts(const QString &fileName, int width, int height, QWidget *pare QFile file(fileName); file.open(QFile::ReadOnly); - QString xml = file.readAll(); - canvas->setXml(xml, fileName); + QString qml = file.readAll(); + canvas->setQml(qml, fileName); canvas->execute(); } diff --git a/examples/declarative/minehunt/main.cpp b/examples/declarative/minehunt/main.cpp index 9db717b..7f10757 100644 --- a/examples/declarative/minehunt/main.cpp +++ b/examples/declarative/minehunt/main.cpp @@ -130,8 +130,8 @@ MyWidget::MyWidget(int width, int height, QWidget *parent, Qt::WindowFlags flags QFile file(fileName); file.open(QFile::ReadOnly); - QString xml = file.readAll(); - canvas->setXml(xml, fileName); + QString qml = file.readAll(); + canvas->setQml(qml, fileName); QmlContext *ctxt = canvas->rootContext(); ctxt->activate(); diff --git a/src/declarative/test/qfxtestview.cpp b/src/declarative/test/qfxtestview.cpp index 67b6c15..94bcb30 100644 --- a/src/declarative/test/qfxtestview.cpp +++ b/src/declarative/test/qfxtestview.cpp @@ -59,8 +59,8 @@ QFxTestView::QFxTestView(const QString &filename, const QString &testdir) QFile file(filename); file.open(QFile::ReadOnly); - QString xml = QString::fromUtf8(file.readAll()); - setXml(xml, filename); + QString qml = QString::fromUtf8(file.readAll()); + setQml(qml, filename); execute(); } diff --git a/src/declarative/util/qfxview.cpp b/src/declarative/util/qfxview.cpp index aefe3e4..cac73a0 100644 --- a/src/declarative/util/qfxview.cpp +++ b/src/declarative/util/qfxview.cpp @@ -97,7 +97,7 @@ public: QFxItem *root; QUrl source; - QString xml; + QString qml; QmlEngine engine; QmlComponent *component; @@ -113,20 +113,15 @@ public: QFxView currently provides a minimal interface for displaying QML files, and connecting between QML and C++ Qt objects. - Typcial usage: + Typical usage: \code ... QFxView *view = new QFxView(this); vbox->addWidget(view); - QFile file(fileName); - file.open(QFile::ReadOnly); - QString xml = file.readAll(); - view->setXml(xml, fileName); - - QFileInfo fi(file); - view->setPath(fi.path()); - + QUrl url(fileName); + view->setUrl(url); + ... view->execute(); ... \endcode @@ -185,31 +180,31 @@ QFxView::~QFxView() } /*! - Sets the source to the \a url. The XML string is set to + Sets the source to the \a url. The QML string is set to empty. */ void QFxView::setUrl(const QUrl& url) { d->source = url; - d->xml = QString(); + d->qml = QString(); } /*! Sets the source to the URL from the \a filename, and sets - the XML string to \a xml. + the QML string to \a qml. */ -void QFxView::setXml(const QString &xml, const QString &filename) +void QFxView::setQml(const QString &qml, const QString &filename) { d->source = QUrl::fromLocalFile(filename); - d->xml = xml; + d->qml = qml; } /*! - Returns the XML string. + Returns the QML string. */ -QString QFxView::xml() const +QString QFxView::qml() const { - return d->xml; + return d->qml; } /*! @@ -240,10 +235,10 @@ void QFxView::execute() { rootContext()->activate(); - if (d->xml.isEmpty()) { + if (d->qml.isEmpty()) { d->component = new QmlComponent(&d->engine, d->source, this); } else { - d->component = new QmlComponent(&d->engine, d->xml.toUtf8(), d->source); + d->component = new QmlComponent(&d->engine, d->qml.toUtf8(), d->source); } if (!d->component->isLoading()) { @@ -324,17 +319,17 @@ void QFxView::timerEvent(QTimerEvent* e) } /*! - Creates a \l{QmlComponent} {component} from the \a xml + Creates a \l{QmlComponent} {component} from the \a qml string, and returns it as an \l {QFxItem} {item}. If the \a parent item is provided, it becomes the new item's parent. \a parent should be in this view's item hierarchy. */ -QFxItem* QFxView::addItem(const QString &xml, QFxItem* parent) +QFxItem* QFxView::addItem(const QString &qml, QFxItem* parent) { if (!d->root) return 0; - QmlComponent component(&d->engine, xml.toUtf8(), QUrl()); + QmlComponent component(&d->engine, qml.toUtf8(), QUrl()); QObject *obj = component.create(); if (obj){ QFxItem *item = static_cast(obj); diff --git a/src/declarative/util/qfxview.h b/src/declarative/util/qfxview.h index c658f07..d2cacf4 100644 --- a/src/declarative/util/qfxview.h +++ b/src/declarative/util/qfxview.h @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#ifndef _QFXVIEW_H_ -#define _QFXVIEW_H_ +#ifndef QFXVIEW_H +#define QFXVIEW_H #include #include @@ -48,12 +48,12 @@ #include #include - QT_BEGIN_HEADER QT_BEGIN_NAMESPACE QT_MODULE(Declarative) + class QFxItem; class QmlEngine; class QmlContext; @@ -70,14 +70,14 @@ public: virtual ~QFxView(); void setUrl(const QUrl&); - void setXml(const QString &xml, const QString &filename=QString()); - QString xml() const; + void setQml(const QString &qml, const QString &filename=QString()); + QString qml() const; QmlEngine* engine(); QmlContext* rootContext(); virtual void execute(); virtual void reset(); - virtual QFxItem* addItem(const QString &xml, QFxItem* parent=0); + virtual QFxItem* addItem(const QString &qml, QFxItem* parent=0); virtual void clearItems(); virtual QFxItem *root() const; @@ -102,8 +102,8 @@ private: QFxViewPrivate *d; }; - QT_END_NAMESPACE QT_END_HEADER -#endif // _QFXVIEW_H_ + +#endif // QFXVIEW_H -- cgit v0.12 From dac26313fcfc3862a7f2aeaa58bb2afe0d494ec9 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Fri, 1 May 2009 16:39:43 +1000 Subject: doc --- src/declarative/qml/qmlcomponent.cpp | 24 ++-- src/declarative/qml/qmldom.cpp | 214 +++++++++++++++++++-------------- src/declarative/util/qmlconnection.cpp | 56 +++++---- 3 files changed, 174 insertions(+), 120 deletions(-) diff --git a/src/declarative/qml/qmlcomponent.cpp b/src/declarative/qml/qmlcomponent.cpp index 2c3ebd6..c316f03 100644 --- a/src/declarative/qml/qmlcomponent.cpp +++ b/src/declarative/qml/qmlcomponent.cpp @@ -89,16 +89,20 @@ bool QmlComponentPrivate::isXml(const QByteArray &ba) file, or for defining a component that logically belongs with the file containing it. - \code - - - - - - - - - \endcode + \qml +Item { + Component { + id: RedSquare + Rect { + color: "red" + width: 10 + height: 10 + } + } + ComponentInstance { component: RedSquare } + ComponentInstance { component: RedSquare; x: 20 } +} + \endqml */ QML_DEFINE_TYPE(QmlComponent,Component); diff --git a/src/declarative/qml/qmldom.cpp b/src/declarative/qml/qmldom.cpp index 937c244..cf0a2fb 100644 --- a/src/declarative/qml/qmldom.cpp +++ b/src/declarative/qml/qmldom.cpp @@ -220,11 +220,13 @@ QByteArray QmlDomDocument::save() const document has no root. In the sample QML below, the root object will be the QFxItem type. - \code - - - - \endcode + \qml +Item { + Text { + text: "Hello World" + } +} + \endqml */ QmlDomObject QmlDomDocument::rootObject() const { @@ -296,9 +298,13 @@ QmlDomProperty &QmlDomProperty::operator=(const QmlDomProperty &other) /*! Return the name of this property. - \code - - \endcode + \qml +Text { + x: 10 + y: 10 + font.bold: true +} + \endqml As illustrated above, a property name can be a simple string, such as "x" or "y", or a more complex "dot property", such as "font.bold". In both cases @@ -318,9 +324,13 @@ QByteArray QmlDomProperty::propertyName() const Return the name of this property, split into multiple parts in the case of dot properties. - \code - - \endcode + \qml +Text { + x: 10 + y: 10 + font.bold: true +} + \endqml For each of the properties shown above, this method would return ("x"), ("y") and ("font", "bold"). @@ -337,10 +347,10 @@ QList QmlDomProperty::propertyNameParts() const Return true if this property is used as a default property in the QML document. - \code - - hello - \endcode + \qml + +hello + \endqml The above two examples return the same DOM tree, except that the second has the default property flag set on the text property. Observe that whether @@ -456,9 +466,12 @@ QmlDomObjectPrivate::properties(QmlParser::Property *property) const Each QmlDomProperty represents a QML property assignment on the instantiated object. For example, - \code - - \endcode + \qml +QGraphicsWidget { + opacity: 0.5 + size: "100x100" +} + \endqml describes a single QmlDomObject - "QGraphicsWidget" - with two properties, "opacity" and "size". Obviously QGraphicsWidget has many more properties than just @@ -525,9 +538,9 @@ bool QmlDomObject::isValid() const Returns the type name of this object. For example, the type of this object would be "QGraphicsWidget". - \code - - \endcode + \qml +QGraphicsWidget { } + \endqml */ QByteArray QmlDomObject::objectType() const { @@ -540,9 +553,9 @@ QByteArray QmlDomObject::objectType() const has been assigned. For example, the object id of this object would be "MyText". - \code - - \endcode + \qml +Text { id: MyText } + \endqml */ QByteArray QmlDomObject::objectId() const { @@ -565,9 +578,12 @@ void QmlDomObject::setObjectId(const QByteArray &id) Returns the list of assigned properties on this object. In the following example, "text" and "x" properties would be returned. - \code - - \endcode + \qml +Text { + text: "Hello world!" + x: 100 +} + \endqml */ QList QmlDomObject::properties() const { @@ -605,9 +621,9 @@ QList QmlDomObject::properties() const In the example below, \c {object.property("src")} would return a valid QmlDomProperty, and \c {object.property("tile")} an invalid QmlDomProperty. - \code - - \endcode + \qml +Image { src: "sample.jpg" } + \endqml */ QmlDomProperty QmlDomObject::property(const QByteArray &name) const { @@ -730,9 +746,13 @@ QmlDomBasicValuePrivate::~QmlDomBasicValuePrivate() example below, the "x", "y" and "color" properties are being assigned literal values. - \code - - \endcode + \qml +Rect { + x: 10 + y: 10 + color: "red" +} + \endqml */ /*! @@ -771,9 +791,9 @@ QmlDomValueLiteral &QmlDomValueLiteral::operator=(const QmlDomValueLiteral &othe Return the literal value. In the example below, the literal value will be the string "10". - \code - - \endcode + \qml +Rect { x: 10 } + \endqml */ QString QmlDomValueLiteral::literal() const { @@ -797,9 +817,9 @@ void QmlDomValueLiteral::setLiteral(const QString &value) A property binding is an ECMAScript expression assigned to a property. In the example below, the "x" property is being assigned a property binding. - \code - - \endcode + \qml +Rect { x: Other.x } + \endqml */ /*! @@ -837,9 +857,9 @@ QmlDomValueBinding &QmlDomValueBinding::operator=(const QmlDomValueBinding &othe Return the binding expression. In the example below, the string "Other.x" will be returned. - \code - - \endcode + \qml +Rect { x: Other.x } + \endqml */ QString QmlDomValueBinding::binding() const { @@ -867,13 +887,16 @@ void QmlDomValueBinding::setBinding(const QString &expression) class. In the example below, the "x" property is being assigned the NumericAnimation value source. - \code - - - - - - \endcode + \qml +Rect { + x: NumericAnimation { + from: 0 + to: 100 + repeat: true + running: true + } +} + \endqml */ /*! @@ -912,13 +935,16 @@ QmlDomValueValueSource &QmlDomValueValueSource::operator=(const QmlDomValueValue In the example below, an object representing the NumericAnimation will be returned. - \code - - - - - - \endcode + \qml +Rect { + x: NumericAnimation { + from: 0 + to: 100 + repeat: true + running: true + } +} + \endqml */ QmlDomObject QmlDomValueValueSource::object() const { @@ -972,9 +998,12 @@ QmlDomValuePrivate::~QmlDomValuePrivate() For example, in the following example, - \code - - \endcode + \qml +Text { + text: "Hello World!" + y: Other.y +} + \endqml The text property is being assigned a literal, and the y property a property binding. To output the values assigned to the text and y properties in the @@ -1213,24 +1242,27 @@ QmlDomList QmlDomValue::toList() const Lists of values can be assigned to properties. For example, the following example assigns multiple objects to Item's "children" property - \code - - - - - - - \endcode + \qml +Item { + children: [ + Text { }, + Rect { } + ] +} + \endqml Lists can also be implicitly created by assigning multiple \l {QmlDomValueValueSource}{value sources} or constants to a property. - \code - - - - - - \endcode + \qml +Item { + x: 10 + x: NumericAnimation { + running: false + from: 0 + to: 100 + } +} + \endqml */ /*! @@ -1301,13 +1333,16 @@ void QmlDomList::setValues(const QList &values) following example shows the definition of a sub-component with the id "ListDelegate". - \code - - - - - - \endcode + \qml +Item { + Component { + id: ListDelegate + Text { + text: modelData.text + } + } +} + \endqml Like QmlDomDocument's, components contain a single root object. */ @@ -1347,13 +1382,16 @@ QmlDomComponent &QmlDomComponent::operator=(const QmlDomComponent &other) Returns the component's root object. In the example below, the root object is the "Text" object. - \code - - - - - - \endcode + \qml +Item { + Component { + id: ListDelegate + Text { + text: modelData.text + } + } +} + \endqml */ QmlDomObject QmlDomComponent::componentRoot() const { diff --git a/src/declarative/util/qmlconnection.cpp b/src/declarative/util/qmlconnection.cpp index 5cd4371..8f6c908 100644 --- a/src/declarative/util/qmlconnection.cpp +++ b/src/declarative/util/qmlconnection.cpp @@ -62,7 +62,7 @@ public: /*! \qmlclass Connection QmlConnection - \brief The Connection element describes generalized connections to signals. + \brief A Connection object describes generalized connections to signals. JavaScript-in-HTML style signal properties do not allow: \list @@ -73,31 +73,40 @@ public: \i signals in classes with coincidentally-named on properties \endlist - When any of these is needed, the Connection element can be used instead. + When any of these is needed, the Connection object can be used instead. Where a signal could be connected like this: - \code - - \endcode + \qml +MouseRegion { + onClicked: { foo(x+123,y+456) } +} + \endqml - An equivalent binding can be made with a Connection element: + An equivalent binding can be made with a Connection object: - \code - - - - \endcode + \qml +MouseRegion { + Connection { + signal: "clicked(x,y)" + script: { foo(x+123,y+456) } + } +} + \endqml - More generally, the Connection element can be a child of some other element than + More generally, the Connection object can be a child of some other object than the sender of the signal, and the script is the default attribute: - \code - - ... - - foo(x+123,y+456) - - \endcode + \qml +MouseRegion { + id: mr +} +... +Connection { + sender: mr + signal: "clicked(x,y)" + script: { foo(x+123,y+456) } +} + \endqml */ /*! @@ -257,9 +266,12 @@ void QmlConnection::setScript(const QString& script) The signal must have its formal parameter names given in parentheses: - \code - - \endcode + \qml +Connection { + signal: "clicked(x,y)" + script: { ... } +} + \endqml */ /*! -- cgit v0.12 From 311ccc09dfe1defd2e51838737fe88d60d1047b4 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Fri, 1 May 2009 17:04:56 +1000 Subject: Add QML signal declaration syntax Syntax is signal Currently signal parameters aren't supported --- src/declarative/qml/parser/javascript.g | 12 + src/declarative/qml/parser/javascriptast_p.h | 5 +- src/declarative/qml/parser/javascriptgrammar.cpp | 1164 +++++++++++----------- src/declarative/qml/parser/javascriptgrammar_p.h | 12 +- src/declarative/qml/parser/javascriptlexer.cpp | 2 +- src/declarative/qml/parser/javascriptparser.cpp | 385 +++---- src/declarative/qml/parser/javascriptparser_p.h | 4 +- src/declarative/qml/qmlscriptparser.cpp | 91 +- 8 files changed, 851 insertions(+), 824 deletions(-) diff --git a/src/declarative/qml/parser/javascript.g b/src/declarative/qml/parser/javascript.g index a318ccb..350ba9f 100644 --- a/src/declarative/qml/parser/javascript.g +++ b/src/declarative/qml/parser/javascript.g @@ -660,6 +660,18 @@ case $rule_number: { UiPropertyType: T_IDENTIFIER ; +UiObjectMember: T_SIGNAL T_IDENTIFIER ; +/. +case $rule_number: { + AST::UiPublicMember *node = makeAstNode (driver->nodePool(), (JavaScriptNameIdImpl *)0, sym(2).sval); + node->type = AST::UiPublicMember::Signal; + node->propertyToken = loc(1); + node->typeToken = loc(2); + node->identifierToken = loc(3); + sym(1).Node = node; +} break; +./ + UiObjectMember: T_PROPERTY UiPropertyType T_IDENTIFIER ; /. case $rule_number: { diff --git a/src/declarative/qml/parser/javascriptast_p.h b/src/declarative/qml/parser/javascriptast_p.h index f32a48c..3a22fff 100644 --- a/src/declarative/qml/parser/javascriptast_p.h +++ b/src/declarative/qml/parser/javascriptast_p.h @@ -2326,13 +2326,13 @@ public: UiPublicMember(JavaScriptNameIdImpl *memberType, JavaScriptNameIdImpl *name) - : memberType(memberType), name(name), expression(0), isDefaultMember(false) + : type(Property), memberType(memberType), name(name), expression(0), isDefaultMember(false) { kind = K; } UiPublicMember(JavaScriptNameIdImpl *memberType, JavaScriptNameIdImpl *name, ExpressionNode *expression) - : memberType(memberType), name(name), expression(expression), isDefaultMember(false) + : type(Property), memberType(memberType), name(name), expression(expression), isDefaultMember(false) { kind = K; } virtual SourceLocation firstSourceLocation() const @@ -2354,6 +2354,7 @@ public: virtual void accept0(Visitor *visitor); // attributes + enum { Signal, Property } type; JavaScriptNameIdImpl *memberType; JavaScriptNameIdImpl *name; ExpressionNode *expression; diff --git a/src/declarative/qml/parser/javascriptgrammar.cpp b/src/declarative/qml/parser/javascriptgrammar.cpp index 3fac1ed..b42f419 100644 --- a/src/declarative/qml/parser/javascriptgrammar.cpp +++ b/src/declarative/qml/parser/javascriptgrammar.cpp @@ -58,480 +58,478 @@ const int JavaScriptGrammar::lhs [] = { 91, 92, 92, 95, 95, 96, 96, 94, 93, 93, 98, 98, 100, 100, 99, 97, 99, 97, 99, 97, 102, 103, 103, 97, 99, 97, 105, 105, 105, 97, - 97, 97, 97, 97, 97, 101, 101, 109, 109, 109, - 101, 101, 110, 110, 110, 110, 110, 110, 110, 110, - 110, 110, 110, 110, 110, 110, 110, 112, 112, 116, - 116, 111, 111, 114, 114, 117, 117, 117, 117, 117, - 117, 118, 118, 118, 118, 118, 118, 118, 118, 118, + 97, 97, 97, 97, 97, 97, 101, 101, 109, 109, + 109, 101, 101, 110, 110, 110, 110, 110, 110, 110, + 110, 110, 110, 110, 110, 110, 110, 110, 112, 112, + 116, 116, 111, 111, 114, 114, 117, 117, 117, 117, + 117, 117, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, - 118, 118, 119, 119, 120, 120, 120, 120, 120, 123, - 123, 124, 124, 124, 124, 122, 122, 125, 125, 126, - 126, 127, 127, 127, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 129, 129, 129, 129, 130, 130, - 130, 131, 131, 131, 131, 132, 132, 132, 132, 132, - 132, 132, 133, 133, 133, 133, 133, 133, 134, 134, - 134, 134, 134, 135, 135, 135, 135, 135, 136, 136, - 137, 137, 138, 138, 139, 139, 140, 140, 141, 141, - 142, 142, 143, 143, 144, 144, 145, 145, 146, 146, - 147, 147, 115, 115, 148, 148, 149, 149, 149, 149, - 149, 149, 149, 149, 149, 149, 149, 149, 106, 106, - 150, 150, 151, 151, 152, 152, 104, 104, 104, 104, + 118, 118, 118, 119, 119, 120, 120, 120, 120, 120, + 123, 123, 124, 124, 124, 124, 122, 122, 125, 125, + 126, 126, 127, 127, 127, 128, 128, 128, 128, 128, + 128, 128, 128, 128, 128, 129, 129, 129, 129, 130, + 130, 130, 131, 131, 131, 131, 132, 132, 132, 132, + 132, 132, 132, 133, 133, 133, 133, 133, 133, 134, + 134, 134, 134, 134, 135, 135, 135, 135, 135, 136, + 136, 137, 137, 138, 138, 139, 139, 140, 140, 141, + 141, 142, 142, 143, 143, 144, 144, 145, 145, 146, + 146, 147, 147, 115, 115, 148, 148, 149, 149, 149, + 149, 149, 149, 149, 149, 149, 149, 149, 149, 106, + 106, 150, 150, 151, 151, 152, 152, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, - 104, 153, 168, 168, 167, 167, 108, 108, 169, 169, - 170, 170, 172, 172, 171, 173, 176, 174, 174, 177, - 175, 175, 154, 155, 155, 156, 156, 157, 157, 157, - 157, 157, 157, 157, 158, 158, 158, 158, 159, 159, - 159, 159, 160, 160, 161, 163, 178, 178, 181, 181, - 179, 179, 182, 180, 162, 162, 162, 164, 164, 165, - 165, 165, 183, 184, 166, 166, 107, 107, 107, 121, - 188, 188, 185, 185, 186, 186, 189, 190, 190, 191, - 191, 187, 187, 113, 113, 192}; + 104, 104, 153, 168, 168, 167, 167, 108, 108, 169, + 169, 170, 170, 172, 172, 171, 173, 176, 174, 174, + 177, 175, 175, 154, 155, 155, 156, 156, 157, 157, + 157, 157, 157, 157, 157, 158, 158, 158, 158, 159, + 159, 159, 159, 160, 160, 161, 163, 178, 178, 181, + 181, 179, 179, 182, 180, 162, 162, 162, 164, 164, + 165, 165, 165, 183, 184, 166, 166, 107, 107, 107, + 121, 188, 188, 185, 185, 186, 186, 189, 190, 190, + 191, 191, 187, 187, 113, 113, 192}; const int JavaScriptGrammar:: rhs[] = { 2, 1, 1, 1, 2, 3, 3, 0, 1, 2, 1, 3, 2, 3, 4, 4, 2, 2, 5, 5, - 1, 2, 2, 3, 3, 3, 1, 1, 1, 3, - 4, 5, 6, 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, 1, 1, 1, + 1, 2, 2, 3, 3, 3, 1, 1, 1, 2, + 3, 4, 5, 6, 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, 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, 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, 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, - 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, 8, 8, - 1, 3, 0, 1, 0, 1, 1, 1, 2, 1, - 1, 0, 1, 0, 1, 2}; + 3, 0, 1, 1, 3, 0, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 3, 1, 2, 0, 1, 3, 3, 1, + 1, 1, 3, 1, 3, 2, 2, 2, 0, 1, + 2, 0, 1, 1, 2, 2, 7, 5, 7, 7, + 5, 9, 10, 7, 8, 2, 2, 3, 3, 2, + 2, 3, 3, 3, 3, 5, 5, 3, 5, 1, + 2, 0, 1, 4, 3, 3, 3, 3, 3, 3, + 3, 3, 4, 5, 2, 2, 2, 8, 8, 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, 34, 41, 239, 0, 0, 38, 39, 36, 37, - 40, 240, 9, 1, 0, 0, 35, 0, 29, 28, - 27, 0, 31, 0, 142, 209, 173, 181, 177, 121, - 193, 169, 33, 106, 44, 122, 185, 189, 110, 139, - 120, 125, 105, 159, 146, 0, 50, 51, 47, 312, - 38, 314, 62, 0, 0, 0, 0, 0, 45, 48, - 0, 0, 39, 49, 43, 0, 46, 0, 0, 135, - 0, 0, 122, 141, 124, 123, 0, 0, 0, 137, - 138, 136, 140, 0, 170, 0, 0, 0, 0, 160, - 0, 0, 0, 0, 0, 0, 150, 0, 0, 0, - 144, 145, 143, 148, 152, 151, 149, 147, 162, 161, - 163, 0, 178, 0, 174, 0, 0, 116, 103, 115, - 104, 72, 73, 74, 99, 75, 100, 76, 77, 78, + 5, 35, 42, 240, 0, 0, 39, 40, 37, 38, + 41, 241, 9, 1, 0, 0, 36, 0, 29, 28, + 27, 0, 32, 0, 143, 210, 174, 182, 178, 122, + 194, 170, 34, 107, 45, 123, 186, 190, 111, 140, + 121, 126, 106, 160, 147, 0, 51, 52, 48, 313, + 39, 315, 63, 0, 0, 0, 0, 0, 46, 49, + 0, 0, 40, 41, 50, 44, 0, 47, 0, 0, + 136, 0, 0, 123, 142, 125, 124, 0, 0, 0, + 138, 139, 137, 141, 0, 171, 0, 0, 0, 0, + 161, 0, 0, 0, 0, 0, 0, 151, 0, 0, + 0, 145, 146, 144, 149, 153, 152, 150, 148, 163, + 162, 164, 0, 179, 0, 175, 0, 0, 117, 104, + 116, 105, 73, 74, 75, 100, 76, 101, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, - 101, 89, 90, 91, 92, 93, 94, 95, 96, 97, - 98, 102, 0, 0, 114, 210, 117, 0, 118, 0, - 119, 113, 0, 206, 199, 197, 204, 205, 203, 202, - 208, 201, 200, 198, 207, 194, 0, 182, 0, 0, - 186, 0, 0, 190, 0, 0, 116, 108, 0, 107, - 0, 112, 126, 0, 313, 303, 304, 0, 301, 0, - 302, 0, 305, 217, 224, 223, 231, 219, 0, 220, - 306, 0, 311, 221, 222, 227, 225, 308, 307, 310, - 228, 0, 0, 0, 0, 0, 312, 38, 0, 314, - 39, 211, 253, 40, 0, 0, 0, 0, 0, 229, - 230, 218, 226, 254, 255, 300, 309, 0, 269, 270, - 271, 272, 0, 265, 266, 267, 268, 295, 296, 0, - 0, 0, 0, 0, 258, 259, 215, 213, 175, 183, - 179, 195, 171, 216, 0, 122, 187, 191, 164, 153, - 0, 0, 172, 0, 0, 0, 0, 165, 0, 0, - 0, 0, 0, 157, 155, 158, 156, 154, 167, 166, - 168, 0, 180, 0, 176, 0, 214, 122, 0, 196, - 211, 212, 0, 211, 0, 0, 261, 0, 0, 0, - 263, 0, 184, 0, 0, 188, 0, 0, 192, 251, - 0, 243, 252, 246, 0, 250, 0, 211, 244, 0, - 211, 0, 0, 262, 0, 0, 0, 264, 38, 39, - 40, 303, 0, 0, 305, 0, 299, 303, 0, 0, - 305, 0, 298, 303, 0, 0, 305, 0, 297, 0, - 287, 0, 0, 0, 257, 0, 256, 0, 315, 0, - 71, 233, 236, 0, 72, 239, 75, 100, 77, 78, - 47, 82, 83, 38, 84, 87, 45, 48, 39, 211, - 40, 49, 90, 43, 92, 46, 94, 95, 240, 97, - 98, 102, 0, 64, 0, 0, 66, 70, 68, 56, - 67, 69, 0, 65, 55, 234, 232, 110, 111, 116, - 0, 109, 0, 286, 0, 273, 274, 0, 285, 0, - 0, 0, 276, 281, 279, 282, 0, 0, 280, 281, - 0, 277, 0, 278, 235, 284, 0, 235, 283, 0, - 288, 289, 0, 235, 290, 291, 0, 0, 292, 0, - 0, 0, 293, 294, 128, 127, 0, 0, 0, 260, - 0, 0, 0, 275, 0, 63, 0, 60, 62, 53, - 0, 59, 54, 61, 58, 52, 0, 57, 132, 130, - 134, 131, 129, 133, 0, 0, 0, 0, 18, 13, - 0, 14, 10, 0, 30, 0, 32, 0, 0, 26, - 38, 62, 21, 0, 24, 16, 38, 0, 11, 0, - 17, 0, 20, 12, 0, 25, 38, 62, 15, 0, - 19, 22, 23, 42, 248, 241, 0, 249, 245, 0, - 247, 237, 0, 238, 242, 316}; + 89, 102, 90, 91, 92, 93, 94, 95, 96, 97, + 98, 99, 103, 0, 0, 115, 211, 118, 0, 119, + 0, 120, 114, 0, 207, 200, 198, 205, 206, 204, + 203, 209, 202, 201, 199, 208, 195, 0, 183, 0, + 0, 187, 0, 0, 191, 0, 0, 117, 109, 0, + 108, 0, 113, 127, 0, 314, 304, 305, 0, 302, + 0, 303, 0, 306, 218, 225, 224, 232, 220, 0, + 221, 307, 0, 312, 222, 223, 228, 226, 309, 308, + 311, 229, 0, 0, 0, 0, 0, 313, 39, 0, + 315, 40, 212, 254, 41, 0, 0, 0, 0, 0, + 230, 231, 219, 227, 255, 256, 301, 310, 0, 270, + 271, 272, 273, 0, 266, 267, 268, 269, 296, 297, + 0, 0, 0, 0, 0, 259, 260, 216, 214, 176, + 184, 180, 196, 172, 217, 0, 123, 188, 192, 165, + 154, 0, 0, 173, 0, 0, 0, 0, 166, 0, + 0, 0, 0, 0, 158, 156, 159, 157, 155, 168, + 167, 169, 0, 181, 0, 177, 0, 215, 123, 0, + 197, 212, 213, 0, 212, 0, 0, 262, 0, 0, + 0, 264, 0, 185, 0, 0, 189, 0, 0, 193, + 252, 0, 244, 253, 247, 0, 251, 0, 212, 245, + 0, 212, 0, 0, 263, 0, 0, 0, 265, 39, + 40, 41, 304, 0, 0, 306, 0, 300, 304, 0, + 0, 306, 0, 299, 304, 0, 0, 306, 0, 298, + 0, 288, 0, 0, 0, 258, 0, 257, 0, 316, + 0, 72, 234, 237, 0, 73, 240, 76, 101, 78, + 79, 48, 83, 84, 39, 85, 88, 46, 49, 40, + 212, 41, 50, 91, 44, 93, 47, 95, 96, 241, + 98, 99, 103, 0, 65, 0, 0, 67, 71, 69, + 57, 68, 70, 0, 66, 56, 235, 233, 111, 112, + 117, 0, 110, 0, 287, 0, 274, 275, 0, 286, + 0, 0, 0, 277, 282, 280, 283, 0, 0, 281, + 282, 0, 278, 0, 279, 236, 285, 0, 236, 284, + 0, 289, 290, 0, 236, 291, 292, 0, 0, 293, + 0, 0, 0, 294, 295, 129, 128, 0, 0, 0, + 261, 0, 0, 0, 276, 0, 64, 0, 61, 63, + 54, 0, 60, 55, 62, 59, 53, 0, 58, 133, + 131, 135, 132, 130, 134, 0, 0, 0, 0, 18, + 13, 0, 14, 10, 0, 31, 0, 33, 30, 0, + 0, 26, 39, 63, 21, 0, 24, 16, 39, 0, + 11, 0, 17, 0, 20, 12, 0, 25, 39, 63, + 15, 0, 19, 22, 23, 43, 249, 242, 0, 250, + 246, 0, 248, 238, 0, 239, 243, 317}; const int JavaScriptGrammar::goto_default [] = { - 6, 5, 23, 1, 4, 3, 22, 537, 538, 518, - 24, 533, 534, 229, 523, 218, 222, 251, 44, 52, - 496, 494, 389, 388, 35, 495, 387, 390, 129, 48, - 43, 167, 50, 39, 166, 45, 51, 79, 49, 34, - 54, 53, 288, 41, 282, 36, 278, 38, 280, 37, - 279, 46, 286, 47, 287, 40, 281, 277, 318, 444, - 283, 284, 213, 217, 219, 223, 224, 215, 214, 226, - 252, 225, 230, 249, 250, 216, 393, 392, 25, 556, - 555, 340, 341, 558, 343, 557, 342, 452, 456, 459, - 455, 454, 474, 475, 207, 221, 203, 206, 220, 228, - 227, 0}; + 6, 5, 23, 1, 4, 3, 22, 539, 540, 519, + 24, 535, 536, 230, 524, 219, 223, 252, 44, 52, + 497, 495, 390, 389, 35, 496, 388, 391, 130, 48, + 43, 168, 50, 39, 167, 45, 51, 80, 49, 34, + 54, 53, 289, 41, 283, 36, 279, 38, 281, 37, + 280, 46, 287, 47, 288, 40, 282, 278, 319, 445, + 284, 285, 214, 218, 220, 224, 225, 216, 215, 227, + 253, 226, 231, 250, 251, 217, 394, 393, 25, 558, + 557, 341, 342, 560, 344, 559, 343, 453, 457, 460, + 456, 455, 475, 476, 208, 222, 204, 207, 221, 229, + 228, 0}; const int JavaScriptGrammar::action_index [] = { - -12, -91, 60, -91, 63, 378, 95, 113, -91, -91, - -91, -91, -91, -91, 73, 162, 72, 166, -91, -91, - -91, -91, -91, 420, 131, 160, -91, 161, -91, -91, - -91, 44, 75, 700, 129, -91, 87, 52, 49, 182, - -91, 300, 71, -91, -91, 541, 76, 91, 259, 227, - -91, -91, -91, 360, 317, 700, -91, -91, -91, 170, - -91, 1198, 66, 700, 700, 700, 620, 700, -91, -91, - 700, 700, -91, -91, -91, 700, -91, 700, 700, -91, - 700, 700, 106, 175, -91, -91, 700, 700, 700, -91, - -91, -91, 210, 700, 283, 700, 700, 700, 700, 453, - 700, 700, 700, 700, 700, 700, 222, 700, 700, 700, - 96, 83, 82, 244, 317, 176, 241, 238, 453, 453, - 379, 700, 74, 700, 93, 1111, 700, 700, -91, -91, + -13, -91, 64, -91, 63, 406, 96, 108, -91, -91, + -91, -91, -91, -91, 60, 146, 68, 189, -91, -91, + 71, -91, -91, 383, 151, 178, -91, 208, -91, -91, + -91, 44, 62, 686, 101, -91, 81, 41, 10, 261, + -91, 288, 70, -91, -91, 527, 95, 86, 265, 235, + -91, -91, -91, 439, 237, 686, -91, -91, -91, 173, + -91, 1184, 98, 686, 686, 686, 606, 686, -91, -91, + 686, 686, -91, -91, -91, -91, 686, -91, 686, 686, + -91, 686, 686, 74, 147, -91, -91, 686, 686, 686, + -91, -91, -91, 203, 686, 290, 686, 686, 686, 686, + 365, 686, 686, 686, 686, 686, 686, 237, 686, 686, + 686, 82, 79, 77, 303, 231, 198, 197, 237, 439, + 355, 439, 686, 65, 686, 92, 1097, 686, 686, -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, 153, 700, -91, -91, 84, 69, -91, 700, - -91, -91, 700, -91, -91, -91, -91, -91, -91, -91, - -91, -91, -91, -91, -91, -91, 700, 67, 700, 700, - 64, 65, 700, -91, 1111, 700, 700, -91, 112, -91, - 42, -91, -91, 41, -91, 167, 62, 36, -91, 265, - -91, 57, 1546, -91, -91, -91, -91, -91, 216, -91, - -91, 43, -91, -91, -91, -91, -91, -91, 1546, -91, - -91, 286, 320, 92, 1459, 48, 256, 68, 33, 1720, - 80, 700, -91, 86, 77, 700, 50, 53, 61, -91, - -91, -91, -91, -91, -91, -91, -91, 105, -91, -91, - -91, -91, 121, -91, -91, -91, -91, -91, -91, 56, - 55, 700, 165, 124, -91, -91, 780, -91, 70, 32, - 3, -91, 292, 59, 45, 521, 168, 127, 385, 317, - 191, 700, 294, 700, 700, 700, 700, 385, 700, 700, - 700, 700, 700, 223, 183, 179, 237, 245, 385, 385, - 385, 700, -47, 700, 16, 700, -91, 541, 700, -91, - 700, 11, -43, 700, -44, 1459, -91, 700, 118, 1459, - -91, 700, -35, 700, 700, 19, 15, 700, -91, 10, - 123, -1, -91, -91, 700, -91, 225, 700, -91, -46, - 700, -59, 1459, -91, 700, 171, 1459, -91, -32, -26, - -27, 260, -37, 24, 1546, 30, -91, 267, 8, 31, - 1546, 0, -91, 214, -8, 18, 1546, -18, -91, 1459, - -91, 700, 103, 1459, 22, 1459, -91, 28, 25, -23, - -91, -91, 1459, -15, 312, 47, 301, 94, 700, 1459, - 38, 5, 269, 29, 27, 620, 51, 58, 54, 944, - 46, 1, -29, 4, 700, 79, -9, 700, 21, 700, - -10, -7, 700, -91, 1285, 7, -91, -91, -91, -91, - -91, -91, 700, -91, -91, -91, -91, 177, -91, 700, - -40, -91, 1459, -91, 88, -91, -91, 1459, -91, 700, - 102, -21, -91, 20, -91, -3, 89, 700, -91, -5, - -4, -91, -50, -91, 1459, -91, 109, 1459, -91, 194, - -91, -91, 101, 1459, 40, -91, 14, 23, -91, 186, - 2, 26, -91, -91, -91, -91, 700, 100, 1459, -91, - 700, 104, 1459, -91, 116, 35, 1024, -91, 34, -91, - 860, -91, -91, -91, -91, -91, 111, -91, -91, -91, - -91, -91, -91, -91, -2, 13, 12, 443, -91, -91, - 440, -91, -91, 17, 37, 700, 39, 1633, 258, -91, - 97, 369, -91, 81, -91, -91, 6, 251, -91, 150, - -91, 291, -91, -91, 1372, -91, 107, 346, -91, 120, - -91, -91, -91, -91, -11, -91, 180, -91, -91, 700, - -91, -91, 178, -91, -91, -91, + -91, -91, -91, 124, 686, -91, -91, 171, 61, -91, + 686, -91, -91, 686, -91, -91, -91, -91, -91, -91, + -91, -91, -91, -91, -91, -91, -91, 686, 66, 686, + 686, 97, 91, 686, -91, 1097, 686, 686, -91, 117, + -91, 14, -91, -91, 40, -91, 182, 69, 43, -91, + 236, -91, 47, 1445, -91, -91, -91, -91, -91, 209, + -91, -91, 32, -91, -91, -91, -91, -91, -91, 1445, + -91, -91, 310, 308, 83, 1358, 35, 217, 72, 58, + 1706, 85, 686, -91, 76, 59, 686, 51, 50, 55, + -91, -91, -91, -91, -91, -91, -91, -91, 120, -91, + -91, -91, -91, 125, -91, -91, -91, -91, -91, -91, + 42, 49, 686, 148, 127, -91, -91, 766, -91, 80, + 54, -14, -91, 267, 57, 11, 507, 88, 114, 371, + 303, 164, 686, 271, 686, 686, 686, 686, 371, 686, + 686, 686, 686, 686, 237, 237, 230, 303, 234, 371, + 371, 371, 686, -40, 686, -1, 686, -91, 527, 686, + -91, 686, -4, -51, 686, -57, 1358, -91, 686, 139, + 1358, -91, 686, -39, 686, 686, 88, -2, 686, -91, + 0, 134, -18, -91, -91, 686, -91, 221, 686, -91, + -50, 686, -45, 1358, -91, 686, 149, 1358, -91, -30, + -29, -28, 162, -48, -31, 1445, -54, -91, 176, -42, + 12, 1445, -5, -91, 238, -6, 23, 1445, 3, -91, + 1358, -91, 686, 105, 1358, 33, 1358, -91, 36, 38, + -7, -91, -91, 1358, 7, 285, 56, 292, 93, 686, + 1358, 9, 31, 282, 53, 30, 606, 46, 48, 52, + 930, 37, 17, -10, 21, 686, 20, -8, 686, 16, + 686, -17, -16, 686, -91, 1271, 15, -91, -91, -91, + -91, -91, -91, 686, -91, -91, -91, -91, 156, -91, + 686, 8, -91, 1358, -91, 99, -91, -91, 1358, -91, + 686, 102, 2, -91, 27, -91, 26, 94, 686, -91, + 24, 29, -91, -15, -91, 1358, -91, 100, 1358, -91, + 192, -91, -91, 103, 1358, 19, -91, 5, 4, -91, + 185, -27, 1, -91, -91, -91, -91, 686, 112, 1358, + -91, 686, 123, 1358, -91, 107, 22, 846, -91, 13, + -91, 1010, -91, -91, -91, -91, -91, 116, -91, -91, + -91, -91, -91, -91, -91, 6, 25, 34, 429, -91, + -91, 426, -91, -91, 28, 45, 686, 39, -91, 1619, + 212, -91, 104, 356, -91, 73, -91, -91, 18, 145, + -91, 131, -91, 296, -91, -91, 1532, -91, 141, 332, + -91, 142, -91, -91, -91, -91, -3, -91, 159, -91, + -91, 686, -91, -91, 167, -91, -91, -91, - -102, -102, -102, -102, 93, 197, -102, -102, -102, -102, - -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, - -102, -102, -102, 340, -102, -1, -102, 0, -102, -102, - -102, -102, -102, -2, -102, -102, -102, -102, -102, -102, - -102, -102, -102, -102, -102, -40, -102, -102, -102, -102, - -102, -102, -102, -102, -102, 163, -102, -102, -102, 2, - -102, -102, -102, 15, 146, 149, 170, 155, -102, -102, - 101, 138, -102, -102, -102, 79, -102, 160, 104, -102, - 123, 131, -102, -102, -102, -102, 108, 118, 114, -102, - -102, -102, -102, 105, -102, 115, 119, 130, 129, -102, - 122, 107, 91, 83, 94, 97, -102, 82, 154, 152, + -102, -102, -102, -102, -4, 194, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, - -102, 133, -102, 132, -102, 244, 44, 37, -102, -102, + -102, -102, -102, 345, -102, 2, -102, 3, -102, -102, + -102, -102, -102, -7, -102, -102, -102, -102, -102, -102, + -102, -102, -102, -102, -102, -49, -102, -102, -102, -102, + -102, -102, -102, -102, -102, 154, -102, -102, -102, 6, + -102, -102, -102, 7, 143, 140, 141, 155, -102, -102, + 97, 101, -102, -102, -102, -102, 79, -102, 83, 108, + -102, 133, 125, -102, -102, -102, -102, 118, 111, 59, + -102, -102, -102, -102, 104, -102, 115, 123, 126, 124, + -102, 122, 102, 89, 82, 95, 165, -102, 80, 146, + 148, -102, -102, -102, -102, -102, -102, -102, -102, -102, + -102, -102, 149, -102, 153, -102, 249, 43, 35, -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, 16, -102, -102, -102, -102, -102, 22, - -102, -102, 17, -102, -102, -102, -102, -102, -102, -102, - -102, -102, -102, -102, -102, -102, 73, -102, 74, 46, - -102, -102, 48, -102, 214, 49, 80, -102, -102, -102, - -102, -102, -102, -102, -102, 50, -102, -102, -102, 55, + -102, -102, -102, -102, 16, -102, -102, -102, -102, -102, + 21, -102, -102, 17, -102, -102, -102, -102, -102, -102, + -102, -102, -102, -102, -102, -102, -102, 74, -102, 34, + 48, -102, -102, 44, -102, 220, 49, 81, -102, -102, + -102, -102, -102, -102, -102, -102, 55, -102, -102, -102, + 52, -102, -102, -102, -102, -102, -102, -102, -102, -102, + -102, -102, -102, -102, -102, -102, -102, -102, -102, -43, + -102, -102, 56, 20, -102, 15, -102, 57, -102, -102, + 65, -102, 46, -102, -102, -102, 50, -6, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, - -102, -102, -102, -102, -102, -102, -102, -102, -43, -102, - -102, 58, 21, -102, 18, -102, 56, -102, -102, 54, - -102, 63, -102, -102, -102, 51, 7, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, + -102, -102, 51, -102, -102, -102, -102, 60, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, - -102, 60, -102, -102, -102, -102, 59, -102, -102, -102, + -102, 58, 219, -102, 216, 191, 201, 182, -102, 62, + 63, 71, 73, 64, -102, -102, -102, -102, -102, -102, + -102, -102, 181, -102, 199, -102, 200, -102, -102, 192, + -102, 68, -102, -102, 69, -102, 31, -102, 27, -102, + 22, -102, 159, -102, 167, 166, -102, -102, 173, -102, + -102, -102, -102, -102, -102, 180, -102, 72, 67, -102, + -102, 66, -102, 42, -102, 45, -102, 38, -102, -102, + -102, -102, 75, -102, -102, -65, -102, -102, 92, -102, + -102, -62, -102, -102, 103, -102, -102, -61, -102, -102, + 36, -102, 33, -102, 39, -102, 41, -102, -102, -102, + -102, -102, -102, 40, -102, 32, -102, 29, -102, 137, + 18, -102, -102, 19, -102, -102, 147, -102, -102, -102, + 24, -102, -102, -102, -102, 28, -102, -16, 158, -102, + 96, -102, -102, 53, -102, 37, -102, -102, -102, -102, + -102, -102, -102, 47, -102, -102, -102, -102, -102, -102, + 120, -102, -102, 54, -102, -102, -102, -102, -1, -102, + -10, -102, -102, -102, -102, -102, -91, -102, -13, -102, + -77, -102, -102, -102, -102, 76, -102, -102, 127, -102, + -102, -102, -102, -102, 13, -78, -102, -102, -35, -102, + 14, -102, -48, -102, -102, -102, -102, 4, -102, 8, + -102, 1, -102, 0, -102, -102, -102, 12, -102, 5, + -102, -17, -102, -102, -102, -102, -102, -102, -102, -102, + -102, -102, -102, -102, -102, -102, -102, -102, 253, -102, + -102, 345, -102, -102, -102, -102, -9, -102, -102, 10, + 11, -102, 98, 70, -102, -102, -102, -102, 9, -102, + -102, -102, -102, 234, -102, -102, -3, -102, -5, 243, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, - 61, 220, -102, 185, 203, 184, 195, -102, 72, 52, - 70, 62, 66, -102, -102, -102, -102, -102, -102, -102, - -102, 217, -102, 182, -102, 196, -102, -102, 199, -102, - 69, -102, -102, 71, -102, 31, -102, 28, -102, 29, - -102, 168, -102, 169, 176, -102, -102, 166, -102, -102, - -102, -102, -102, -102, 172, -102, 77, 68, -102, -102, - 65, -102, 43, -102, 45, -102, 38, -102, -102, -102, - -102, 78, -102, -102, -48, -102, -102, 85, -102, -102, - -60, -102, -102, 102, -102, -102, -59, -102, -102, 36, - -102, 33, -102, 40, -102, 42, -102, -102, -102, -102, - -102, -102, 41, -102, 34, -102, 32, -102, 139, 20, - -102, -102, 19, -102, -102, 153, -102, -102, -102, 23, - -102, -102, -102, -102, 30, -102, -28, 160, -102, 98, - -102, -102, 53, -102, 39, -102, -102, -102, -102, -102, - -102, -102, 47, -102, -102, -102, -102, -102, -102, 57, - -102, -102, -6, -102, -102, -102, -102, -3, -102, -10, - -102, -102, -102, -102, -102, -91, -102, -4, -102, -87, - -102, -102, -102, -102, 76, -102, -102, 87, -102, -102, - -102, -102, -102, 13, -66, -102, -102, -33, -102, 14, - -102, -47, -102, -102, -102, -102, 6, -102, 11, -102, - 1, -102, 9, -102, -102, -102, -15, -102, -12, -102, - 4, -102, -102, -102, -102, -102, -102, -102, -102, -102, - -102, -102, -102, -102, -102, -102, -102, 257, -102, -102, - 340, -102, -102, -102, -102, -13, -102, 12, 5, -102, - 3, 75, -102, -102, -102, -102, 10, -102, -102, -102, - -102, 236, -102, -102, -7, -102, -5, 240, -102, -102, - -102, -102, -102, -102, -102, -102, -102, -102, -102, -21, - -102, -102, 64, -102, -102, -102}; + -102, -21, -102, -102, 61, -102, -102, -102}; const int JavaScriptGrammar::action_info [] = { - 457, 352, 457, 464, 361, 463, 559, 449, -69, 373, - 367, -91, 453, 311, 432, 350, 325, 291, 323, 163, - 441, 331, 337, 363, 473, 457, 486, 344, -96, 490, - 354, 313, 434, 424, 361, 422, -66, 378, 385, 517, - 436, 276, 497, 503, 525, -80, 524, 163, 373, 367, - 479, 376, 375, 447, -99, 372, 473, 364, -88, 473, - 477, 442, 481, 381, 370, -70, 186, 315, 369, 381, - 209, 291, 192, 32, 497, 379, 2, 205, 186, 163, - 311, 313, 33, 473, 276, 366, -93, 442, 93, 486, - 212, 271, 169, 447, 93, 565, 211, 490, 255, 460, - 121, 0, 201, 0, 379, 517, 320, 476, 163, 0, - 163, 163, 163, 449, 379, 121, 467, 163, 0, 163, - 163, 477, 80, 80, 498, 7, 163, 123, 541, 171, - 517, 346, 270, 81, 81, 0, 80, 0, 527, 27, - 517, 188, 552, 551, 461, 189, 528, 81, 84, 446, - 445, 2, 123, 268, 267, 268, 267, 544, 0, 85, - 488, 163, 451, 383, 492, 528, 261, 260, 199, 80, - 331, 507, 499, 163, 9, 8, 550, 333, 329, 163, - 81, 334, 266, 265, 347, 275, 274, 86, 562, 60, - 28, 514, 194, 0, 0, 28, 60, 125, 0, 60, - 0, 107, 163, 108, 107, 0, 108, 60, 107, 164, - 108, 195, 0, 439, 109, 60, 126, 109, 127, 0, - 60, 109, 86, 0, 163, 273, 72, 20, 515, 516, - 0, 356, 87, 72, 20, 30, 72, 20, 88, 86, - 30, 563, 561, 60, 72, 20, 29, 107, 107, 108, - 108, 29, 72, 20, 60, 471, 470, 72, 20, 541, - 109, 109, 107, 107, 108, 108, 107, 87, 108, 107, - 107, 108, 108, 88, 194, 109, 109, 254, 253, 109, - 72, 20, 109, 109, 87, 358, 0, 60, 0, 60, - 88, 72, 20, 195, 60, 196, 60, 0, 60, 0, - 0, 95, 96, 0, 0, -312, 0, 542, 0, 0, - 293, 294, 293, 294, 0, 60, 0, 0, 95, 96, - 536, 0, 359, 360, 72, 20, 72, 20, 97, 98, - 60, 72, 20, 72, 20, 72, 20, 295, 296, 295, - 296, 60, 107, 0, 108, 97, 98, 259, 258, 60, - 19, 0, 72, 20, 497, 109, 0, 72, 20, 0, - 0, 0, 264, 263, 0, 0, 0, 72, 20, 0, - 0, 0, 0, 259, 258, 536, 18, 497, 72, 20, - 0, 264, 263, 100, 101, 0, 72, 20, 14, 0, - 0, 102, 103, 0, 0, 104, 0, 105, 536, 0, - 15, 0, 100, 101, 0, 19, 0, 16, 298, 299, - 102, 103, 72, 20, 104, 0, 105, 300, 0, 0, - 301, 0, 302, 0, 0, 0, 0, 0, 19, 0, - 14, 18, 0, 0, 0, 72, 20, 19, 0, 0, - 0, 0, 15, 0, 17, 20, 0, 0, 0, 16, - 14, 0, 21, 14, 18, 0, 0, 0, 0, 0, - 0, 13, 15, 18, 0, 15, 0, 0, 0, 16, - 0, 0, 16, 0, 0, 0, 100, 101, 0, 19, - 0, 0, 0, 0, 102, 103, 17, 20, 104, 0, - 105, 0, 0, 0, 21, 521, 0, 0, 519, 19, - 0, 0, 19, 13, 0, 18, 17, 20, 0, 17, - 20, 0, 0, 0, 21, 0, 0, 21, 0, 0, - 0, 0, 0, 13, 173, 18, 13, 0, 18, 0, - 0, 0, 0, 0, 174, 0, 0, 0, 175, 0, - 0, 0, 0, 0, 173, 0, 0, 176, 0, 177, - 0, 0, 327, 0, 174, 0, 0, 0, 175, 0, - 178, 0, 179, 84, 0, 0, 0, 176, 0, 177, - 180, 0, 0, 181, 85, 0, 0, 0, 0, 182, - 178, 0, 179, 84, 0, 183, 0, 0, 0, 0, - 180, 0, 0, 181, 85, 0, 0, 0, 0, 182, - 184, 0, 0, 0, 0, 183, 0, 0, 0, 0, + 292, 367, 365, 326, 164, 338, 362, 368, 374, 312, + 324, 351, 364, 355, 561, 353, -81, 345, 370, 487, + 491, 498, 433, -97, -70, 474, 450, -94, -92, 458, + 504, 458, 458, 482, 474, 454, 465, 474, 314, 478, + 464, 480, 362, 423, 448, 371, 425, 164, 435, 386, + 373, 518, 526, -89, 376, -71, 377, 525, 379, 443, + -67, 368, 437, -100, 314, 316, 382, 277, 442, 33, + 374, 277, 321, 32, 202, 2, 206, 210, 164, 380, + 213, 292, 94, 448, 474, 272, 487, 256, 124, 122, + 332, 491, 443, 94, 382, 450, 567, 187, 193, 187, + 528, 518, 312, 212, 461, 0, 498, 468, 164, 477, + 164, 380, 0, 164, 122, 499, 85, 81, 271, 81, + 164, 172, 81, 478, 164, 164, 27, 86, 82, 7, + 82, 164, 164, 82, 554, 553, 189, 518, 546, 0, + 190, 81, 347, 124, 269, 268, 530, 164, 380, 462, + 543, 2, 82, 543, 269, 268, 164, 164, 529, 87, + 447, 446, 452, 500, 334, 384, 530, 564, 335, 9, + 8, 195, 489, 200, 518, 515, 508, 0, 0, 170, + 165, 262, 261, 493, 0, 0, 267, 266, 276, 275, + 196, 60, 440, 60, 0, 348, 60, 0, 552, 330, + 164, 544, 60, 0, 88, 60, 0, 60, 274, 357, + 89, 60, 516, 517, 60, 87, 0, 164, 28, 0, + 565, 563, 108, 108, 109, 109, 0, 0, 72, 73, + 72, 73, 0, 72, 73, 110, 110, 28, 0, 72, + 73, 60, 72, 73, 72, 73, 359, 87, 72, 73, + 60, 72, 73, 472, 471, 108, 108, 109, 109, 108, + 88, 109, 108, 30, 109, 60, 89, 60, 110, 110, + 255, 254, 110, 0, 29, 110, 126, 0, 72, 73, + 195, 0, 30, 360, 361, 294, 295, 72, 73, 294, + 295, 0, 88, 29, 0, 127, 0, 128, 89, 196, + 0, 197, 72, 73, 72, 73, 96, 97, 96, 97, + 0, 60, 296, 297, 60, 0, 296, 297, -313, 0, + 0, 60, 0, 0, 0, 538, 0, 0, 108, 0, + 109, 0, 0, 98, 99, 98, 99, 60, 0, 60, + 498, 110, 0, 0, 0, 0, 260, 259, 72, 73, + 0, 72, 73, 265, 264, 19, 0, 0, 72, 73, + 0, 538, 72, 73, 498, 0, 0, 0, 0, 265, + 264, 260, 259, 0, 72, 73, 72, 73, 101, 102, + 0, 18, 0, 0, 0, 538, 103, 104, 101, 102, + 105, 19, 106, 14, 299, 300, 103, 104, 72, 73, + 105, 0, 106, 301, 0, 15, 302, 0, 303, 0, + 0, 0, 16, 0, 0, 19, 14, 18, 0, 0, + 0, 0, 72, 73, 0, 0, 0, 0, 15, 0, + 0, 0, 0, 0, 0, 16, 14, 0, 0, 14, + 0, 18, 19, 0, 0, 0, 0, 0, 15, 17, + 20, 15, 0, 0, 0, 16, 0, 21, 16, 0, + 0, 0, 101, 102, 0, 19, 13, 0, 18, 0, + 103, 104, 17, 20, 105, 0, 106, 0, 0, 0, + 21, 522, 0, 0, 520, 19, 0, 0, 19, 13, + 0, 18, 17, 20, 0, 17, 20, 0, 0, 0, + 21, 0, 0, 21, 0, 0, 0, 0, 0, 13, + 174, 18, 13, 0, 18, 0, 0, 0, 0, 0, + 175, 0, 0, 0, 176, 0, 0, 0, 0, 0, + 174, 0, 0, 177, 0, 178, 0, 0, 328, 0, + 175, 0, 0, 0, 176, 0, 179, 0, 180, 85, + 0, 0, 0, 177, 0, 178, 181, 0, 0, 182, + 86, 0, 0, 0, 0, 183, 179, 0, 180, 85, + 0, 184, 0, 0, 0, 0, 181, 0, 0, 182, + 86, 0, 0, 0, 0, 183, 185, 0, 0, 0, + 0, 184, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 185, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 56, 57, + 0, 0, 0, 0, 0, 0, 0, 0, 59, 0, + 0, 0, 0, 0, 0, 60, 0, 0, 0, 61, + 62, 0, 63, 0, 0, 0, 0, 0, 0, 66, + 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 184, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 56, 57, 0, 0, 0, 0, 0, 0, - 0, 0, 59, 0, 0, 0, 0, 0, 0, 60, - 0, 0, 0, 61, 62, 0, 63, 0, 0, 0, - 0, 0, 0, 66, 0, 0, 0, 69, 0, 0, + 0, 74, 72, 73, 0, 75, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 68, 77, 58, 0, + 0, 0, 0, 0, 0, 0, 0, 55, 56, 57, + 0, 0, 0, 0, 0, 0, 0, 0, 59, 0, + 0, 0, 0, 0, 0, 60, 0, 0, 0, 61, + 62, 0, 63, 0, 0, 0, 64, 0, 65, 66, + 67, 0, 0, 69, 0, 0, 0, 70, 0, 71, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 73, 72, 20, 0, 74, + 0, 74, 72, 73, 0, 75, 0, 76, 0, 78, + 0, 79, 0, 0, 0, 0, 68, 77, 58, 0, + 0, 0, 0, 0, 0, 0, 0, 55, 56, 57, + 0, 0, 0, 0, 0, 0, 0, 0, 59, 0, + 0, 0, 0, 0, 0, 60, 0, 0, 0, 61, + 62, 0, 63, 0, 0, 0, 64, 0, 65, 66, + 67, 0, 0, 69, 0, 0, 0, 70, 0, 71, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 76, 58, 0, 0, 0, 0, 0, 0, 0, - 0, 55, 56, 57, 0, 0, 0, 0, 0, 0, - 0, 0, 59, 0, 0, 0, 0, 0, 0, 60, - 0, 0, 0, 61, 62, 0, 63, 0, 0, 0, - 64, 0, 65, 66, 67, 0, 0, 69, 0, 0, - 0, 70, 0, 71, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 73, 72, 20, 0, 74, - 0, 75, 0, 77, 0, 78, 0, 0, 0, 0, - 68, 76, 58, 0, 0, 0, 0, 0, 0, 0, + 0, 74, 72, 73, 0, 75, 0, 76, 0, 78, + 291, 79, 0, 0, 0, 0, 68, 77, 58, 0, + 0, 0, 0, 0, 0, 0, 0, 55, 56, 57, + 0, 0, 0, 0, 0, 0, 0, 0, 59, 0, + 0, 0, 0, 0, 0, 60, 0, 0, 0, 61, + 62, 0, 63, 0, 0, 0, 64, 0, 65, 66, + 67, 0, 0, 69, 0, 0, 0, 70, 0, 71, + 0, 0, 506, 0, 0, 0, 0, 0, 0, 0, + 0, 74, 72, 73, 0, 75, 0, 76, 0, 78, + 0, 79, 0, 0, 0, 0, 68, 77, 58, 0, + 0, 0, 0, 0, 0, 0, 0, -90, 0, 0, 0, 55, 56, 57, 0, 0, 0, 0, 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, 0, 60, 0, 0, 0, 61, 62, 0, 63, 0, 0, 0, 64, 0, 65, 66, 67, 0, 0, 69, 0, 0, 0, 70, 0, 71, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 73, 72, 20, 0, 74, - 0, 75, 0, 77, 290, 78, 0, 0, 0, 0, - 68, 76, 58, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 74, 72, 73, 0, 75, + 0, 76, 0, 78, 0, 79, 0, 0, 0, 0, + 68, 77, 58, 0, 0, 0, 0, 0, 0, 0, 0, 55, 56, 57, 0, 0, 0, 0, 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, 0, 60, 0, 0, 0, 61, 62, 0, 63, 0, 0, 0, 64, 0, 65, 66, 67, 0, 0, 69, 0, 0, - 0, 70, 0, 71, 0, 0, 502, 0, 0, 0, - 0, 0, 0, 0, 0, 73, 72, 20, 0, 74, - 0, 75, 0, 77, 0, 78, 0, 0, 0, 0, - 68, 76, 58, 0, 0, 0, 0, 0, 0, 0, - 0, -89, 0, 0, 0, 55, 56, 57, 0, 0, - 0, 0, 0, 0, 0, 0, 59, 0, 0, 0, - 0, 0, 0, 60, 0, 0, 0, 61, 62, 0, - 63, 0, 0, 0, 64, 0, 65, 66, 67, 0, - 0, 69, 0, 0, 0, 70, 0, 71, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 73, - 72, 20, 0, 74, 0, 75, 0, 77, 0, 78, - 0, 0, 0, 0, 68, 76, 58, 0, 0, 0, - 0, 0, 0, 0, 0, 55, 56, 57, 0, 0, - 0, 0, 0, 0, 0, 0, 59, 0, 0, 0, - 0, 0, 0, 60, 0, 0, 0, 61, 62, 0, - 63, 0, 0, 0, 64, 0, 65, 66, 67, 0, - 0, 69, 0, 0, 0, 70, 0, 71, 0, 0, - 505, 0, 0, 0, 0, 0, 0, 0, 0, 73, - 72, 20, 0, 74, 0, 75, 0, 77, 0, 78, - 0, 0, 0, 0, 68, 76, 58, 0, 0, 0, - 0, 0, 0, 0, 0, 131, 132, 133, 0, 0, - 135, 137, 138, 0, 0, 139, 0, 140, 0, 0, - 0, 142, 143, 144, 0, 0, 0, 0, 0, 0, - 60, 145, 146, 147, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 148, 0, 0, 0, 0, 0, + 0, 70, 0, 71, 0, 0, 503, 0, 0, 0, + 0, 0, 0, 0, 0, 74, 72, 73, 0, 75, + 0, 76, 0, 78, 0, 79, 0, 0, 0, 0, + 68, 77, 58, 0, 0, 0, 0, 0, 0, 0, + 0, 132, 133, 134, 0, 0, 136, 138, 139, 0, + 0, 140, 0, 141, 0, 0, 0, 143, 144, 145, + 0, 0, 0, 0, 0, 0, 60, 146, 147, 148, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 151, 0, 0, 0, 0, 0, 0, 72, 20, 152, - 153, 154, 0, 156, 157, 158, 159, 160, 161, 0, - 0, 149, 155, 141, 134, 136, 150, 0, 0, 0, - 0, 0, 131, 132, 133, 0, 0, 135, 137, 138, - 0, 0, 139, 0, 140, 0, 0, 0, 142, 143, - 144, 0, 0, 0, 0, 0, 0, 426, 145, 146, - 147, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 148, 0, 0, 0, 427, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 151, 0, 0, - 0, 0, 0, 431, 428, 430, 152, 153, 154, 0, - 156, 157, 158, 159, 160, 161, 0, 0, 149, 155, - 141, 134, 136, 150, 0, 0, 0, 0, 0, 131, - 132, 133, 0, 0, 135, 137, 138, 0, 0, 139, - 0, 140, 0, 0, 0, 142, 143, 144, 0, 0, - 0, 0, 0, 0, 426, 145, 146, 147, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 148, 0, - 0, 0, 427, 0, 0, 0, 0, 0, 0, 0, - 429, 0, 0, 0, 151, 0, 0, 0, 0, 0, - 431, 428, 430, 152, 153, 154, 0, 156, 157, 158, - 159, 160, 161, 0, 0, 149, 155, 141, 134, 136, - 150, 0, 0, 0, 0, 0, 231, 0, 0, 0, - 0, 232, 0, 55, 56, 57, 234, 0, 0, 0, - 0, 0, 0, 235, 59, 0, 0, 0, 0, 0, - 0, 546, 238, 0, 0, 239, 547, 0, 63, 0, + 149, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 152, 0, 0, 0, + 0, 0, 0, 72, 73, 153, 154, 155, 0, 157, + 158, 159, 160, 161, 162, 0, 0, 150, 156, 142, + 135, 137, 151, 0, 0, 0, 0, 0, 132, 133, + 134, 0, 0, 136, 138, 139, 0, 0, 140, 0, + 141, 0, 0, 0, 143, 144, 145, 0, 0, 0, + 0, 0, 0, 427, 146, 147, 148, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 149, 0, 0, + 0, 428, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 152, 0, 0, 0, 0, 0, 432, + 429, 431, 153, 154, 155, 0, 157, 158, 159, 160, + 161, 162, 0, 0, 150, 156, 142, 135, 137, 151, + 0, 0, 0, 0, 0, 132, 133, 134, 0, 0, + 136, 138, 139, 0, 0, 140, 0, 141, 0, 0, + 0, 143, 144, 145, 0, 0, 0, 0, 0, 0, + 427, 146, 147, 148, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 149, 0, 0, 0, 428, 0, + 0, 0, 0, 0, 0, 0, 430, 0, 0, 0, + 152, 0, 0, 0, 0, 0, 432, 429, 431, 153, + 154, 155, 0, 157, 158, 159, 160, 161, 162, 0, + 0, 150, 156, 142, 135, 137, 151, 0, 0, 0, + 0, 0, 232, 0, 0, 0, 0, 233, 0, 55, + 56, 57, 235, 0, 0, 0, 0, 0, 0, 236, + 59, 0, 0, 0, 0, 0, 0, 238, 239, 0, + 0, 240, 62, 0, 63, 0, 0, 0, 64, 0, + 65, 66, 67, 0, 0, 69, 0, 0, 0, 70, + 0, 71, 0, 0, 0, 0, 0, 242, 0, 243, + 0, 0, 0, 74, 241, 244, 245, 75, 246, 76, + 247, 78, 21, 79, 248, 249, 0, 0, 68, 77, + 58, 13, 234, 0, 0, 0, 0, 0, 0, 232, + 0, 0, 0, 0, 233, 0, 55, 56, 57, 235, + 0, 0, 0, 0, 0, 0, 236, 237, 0, 0, + 0, 0, 0, 0, 238, 239, 0, 0, 240, 62, + 0, 63, 0, 0, 0, 64, 0, 65, 66, 67, + 0, 0, 69, 0, 0, 0, 70, 0, 71, 0, + 0, 0, 0, 0, 242, 0, 243, 0, 0, 0, + 74, 241, 244, 245, 75, 246, 76, 247, 78, 21, + 79, 248, 249, 0, 0, 68, 77, 58, 13, 234, + 0, 0, 0, 0, 0, 0, 232, 0, 0, 0, + 0, 233, 0, 55, 56, 57, 235, 0, 0, 0, + 0, 0, 0, 236, 59, 0, 0, 0, 0, 0, + 0, 548, 239, 0, 0, 240, 549, 0, 63, 0, 0, 0, 64, 0, 65, 66, 67, 0, 0, 69, 0, 0, 0, 70, 0, 71, 0, 0, 0, 0, - 0, 241, 0, 242, 0, 0, 0, 73, 240, 243, - 244, 74, 245, 75, 246, 77, 21, 78, 247, 248, - 0, 0, 68, 76, 58, 13, 233, 0, 0, 0, - 0, 0, 0, 231, 0, 0, 0, 0, 232, 0, - 55, 56, 57, 234, 0, 0, 0, 0, 0, 0, - 235, 59, 0, 0, 0, 0, 0, 0, 237, 238, - 0, 0, 239, 62, 0, 63, 0, 0, 0, 64, + 0, 242, 0, 243, 0, 0, 0, 74, 241, 244, + 245, 75, 246, 76, 247, 78, 21, 79, 248, 249, + 0, 0, 68, 77, 58, 13, 234, 0, 0, 0, + 0, 0, 0, 232, 0, 0, 0, 0, 233, 0, + 55, 56, 57, 235, 0, 0, 0, 0, 0, 0, + 236, 59, 0, 0, 0, 0, 0, 0, 532, 239, + 0, 0, 240, 533, 0, 63, 0, 0, 0, 64, 0, 65, 66, 67, 0, 0, 69, 0, 0, 0, - 70, 0, 71, 0, 0, 0, 0, 0, 241, 0, - 242, 0, 0, 0, 73, 240, 243, 244, 74, 245, - 75, 246, 77, 21, 78, 247, 248, 0, 0, 68, - 76, 58, 13, 233, 0, 0, 0, 0, 0, 0, - 231, 0, 0, 0, 0, 232, 0, 55, 56, 57, - 234, 0, 0, 0, 0, 0, 0, 235, 236, 0, - 0, 0, 0, 0, 0, 237, 238, 0, 0, 239, - 62, 0, 63, 0, 0, 0, 64, 0, 65, 66, - 67, 0, 0, 69, 0, 0, 0, 70, 0, 71, - 0, 0, 0, 0, 0, 241, 0, 242, 0, 0, - 0, 73, 240, 243, 244, 74, 245, 75, 246, 77, - 21, 78, 247, 248, 0, 0, 68, 76, 58, 13, - 233, 0, 0, 0, 0, 0, 0, 231, 0, 0, - 0, 0, 232, 0, 55, 56, 57, 234, 0, 0, - 0, 0, 0, 0, 235, 59, 0, 0, 0, 0, - 0, 0, 530, 238, 0, 0, 239, 531, 0, 63, - 0, 0, 0, 64, 0, 65, 66, 67, 0, 0, - 69, 0, 0, 0, 70, 0, 71, 0, 0, 0, - 0, 0, 241, 0, 242, 0, 0, 0, 73, 240, - 243, 244, 74, 245, 75, 246, 77, 21, 78, 247, - 248, 0, 0, 68, 76, 58, 13, 233, 0, 532, - 0, 0, 0, 0, 394, 132, 133, 0, 0, 396, - 137, 398, 56, 57, 399, 0, 140, 0, 0, 0, - 142, 401, 402, 0, 0, 0, 0, 0, 0, 403, - 404, 146, 147, 239, 62, 0, 63, 0, 0, 0, - 64, 0, 65, 405, 67, 0, 0, 407, 0, 0, - 0, 70, 0, 71, 0, -235, 0, 0, 0, 409, - 0, 242, 0, 0, 0, 411, 408, 410, 412, 413, - 414, 75, 416, 417, 418, 419, 420, 421, 0, 0, - 406, 415, 400, 395, 397, 150, 0, 0, 0, 0, - 0, + 70, 0, 71, 0, 0, 0, 0, 0, 242, 0, + 243, 0, 0, 0, 74, 241, 244, 245, 75, 246, + 76, 247, 78, 21, 79, 248, 249, 0, 0, 68, + 77, 58, 13, 234, 0, 534, 0, 0, 0, 0, + 395, 133, 134, 0, 0, 397, 138, 399, 56, 57, + 400, 0, 141, 0, 0, 0, 143, 402, 403, 0, + 0, 0, 0, 0, 0, 404, 405, 147, 148, 240, + 62, 0, 63, 0, 0, 0, 64, 0, 65, 406, + 67, 0, 0, 408, 0, 0, 0, 70, 0, 71, + 0, -236, 0, 0, 0, 410, 0, 243, 0, 0, + 0, 412, 409, 411, 413, 414, 415, 76, 417, 418, + 419, 420, 421, 422, 0, 0, 407, 416, 401, 396, + 398, 151, 0, 0, 0, 0, 0, - 458, 462, 526, 560, 548, 450, 545, 443, 500, 504, - 448, 466, 535, 42, 31, 482, 491, 554, 172, 540, - 204, 487, 493, 553, 489, 529, 391, 478, 501, 483, - 506, 269, 480, 269, 472, 371, 377, 204, 321, 262, - 165, 185, 330, 328, 326, 469, 170, 365, 382, 380, - 262, 357, 257, 384, 435, 386, 353, 256, 0, 162, - 355, 168, 0, 0, 198, 425, 469, 391, 208, 472, - 191, 433, 193, 210, 204, 272, 257, 423, 321, 339, - 321, 168, 554, 321, 321, 539, 321, 82, 440, 391, - 0, 0, 304, 12, 285, 339, 208, 82, 10, 289, - 391, 82, 306, 208, 168, 82, 307, 82, 82, 82, - 305, 200, 303, 0, 82, 0, 513, 82, 82, 0, - 208, 110, 187, 115, 351, 190, 82, 349, 322, 82, - 324, 114, 82, 82, 116, 485, 82, 117, 511, 82, - 82, 485, 82, 82, 564, 89, 0, 113, 94, 82, - 82, 91, 465, 82, 82, 90, 99, 82, 82, 348, - 118, 83, 106, 468, 82, 82, 82, 82, 82, 92, - 120, 119, 362, 82, 82, 512, 202, 124, 0, 368, - 122, 82, 437, 508, 82, 438, 509, 82, 0, 82, - 82, 112, 510, 111, 0, 82, 374, 484, 82, 437, - 202, 317, 438, 82, 82, 0, 289, 317, 289, 289, - 0, 317, 289, 11, 26, 12, 289, 82, 332, 82, - 82, 335, 289, 338, 289, 289, 309, 297, 314, 345, - 82, 317, 128, 336, 317, 289, 289, 310, 82, 289, - 0, 130, 197, 289, 543, 308, 539, 549, 0, 0, - 539, 0, 82, 316, 12, 82, 319, 289, 12, 520, - 289, 0, 128, 0, 292, 312, 0, 0, 0, 0, - 0, 130, 0, 11, 26, 12, 0, 0, 0, 0, + 459, 10, 467, 562, 550, 451, 527, 502, 42, 173, + 547, 463, 449, 494, 483, 479, 492, 31, 542, 488, + 556, 490, 507, 531, 205, 501, 392, 484, 270, 555, + 366, 270, 481, 372, 378, 331, 505, 205, 263, 322, + 166, 186, 329, 470, 327, 171, 473, 263, 383, 381, + 258, 358, 385, 436, 387, 354, 473, 257, 163, 169, + 356, 322, 0, 426, 199, 470, 273, 444, 194, 83, + 211, 434, 192, 209, 258, 205, 340, 424, 392, 556, + 541, 322, 322, 322, 322, 191, 0, 0, 12, 392, + 340, 0, 0, 209, 83, 286, 92, 83, 83, 83, + 290, 0, 304, 305, 308, 169, 83, 537, 83, 83, + 209, 306, 201, 307, 83, 83, 514, 83, 83, 111, + 485, 209, 116, 188, 83, 352, 350, 323, 325, 115, + 83, 83, 83, 486, 512, 117, 83, 83, 513, 83, + 392, 566, 114, 83, 169, 486, 83, 95, 91, 0, + 83, 441, 466, 83, 349, 90, 100, 83, 83, 83, + 83, 83, 107, 93, 119, 121, 0, 120, 83, 363, + 438, 84, 83, 439, 203, 83, 438, 510, 83, 439, + 509, 83, 0, 83, 83, 112, 369, 113, 83, 83, + 83, 203, 511, 83, 83, 485, 123, 375, 125, 290, + 83, 318, 83, 469, 0, 118, 290, 290, 318, 333, + 11, 26, 12, 290, 0, 318, 83, 83, 0, 336, + 290, 290, 290, 337, 311, 0, 83, 318, 0, 313, + 339, 290, 290, 309, 83, 318, 83, 346, 129, 290, + 290, 290, 545, 310, 541, 315, 0, 131, 198, 320, + 551, 83, 12, 541, 83, 521, 290, 317, 298, 290, + 0, 12, 0, 293, 0, 0, 0, 129, 0, 11, + 26, 12, 0, 0, 0, 0, 131, 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, 522, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 11, 26, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 523, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 11, 26, 12, 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, @@ -539,80 +537,103 @@ const int JavaScriptGrammar::action_info [] = { 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 [] = { - 5, 60, 5, 7, 36, 55, 17, 36, 7, 36, - 36, 7, 33, 48, 7, 61, 60, 1, 61, 8, - 60, 2, 7, 60, 33, 5, 36, 17, 7, 36, - 31, 78, 55, 8, 36, 7, 7, 55, 16, 33, - 55, 36, 8, 8, 7, 7, 29, 8, 36, 36, - 36, 33, 60, 7, 7, 55, 33, 33, 7, 33, - 20, 7, 60, 36, 33, 7, 2, 8, 60, 36, - 8, 1, 7, 29, 8, 7, 88, 36, 2, 8, - 48, 78, 7, 33, 36, 55, 7, 7, 1, 36, - 33, 36, 8, 7, 1, 0, 60, 36, 55, 10, - 48, -1, 60, -1, 7, 33, 61, 6, 8, -1, - 8, 8, 8, 36, 7, 48, 7, 8, -1, 8, - 8, 20, 40, 40, 8, 65, 8, 78, 8, 60, - 33, 8, 76, 51, 51, -1, 40, -1, 7, 66, - 33, 50, 61, 62, 55, 54, 15, 51, 42, 61, - 62, 88, 78, 61, 62, 61, 62, 7, -1, 53, - 60, 8, 60, 60, 60, 15, 61, 62, 56, 40, - 2, 60, 56, 8, 61, 62, 56, 50, 60, 8, - 51, 54, 61, 62, 61, 61, 62, 12, 8, 29, - 29, 29, 15, -1, -1, 29, 29, 15, -1, 29, - -1, 25, 8, 27, 25, -1, 27, 29, 25, 56, - 27, 34, -1, 36, 38, 29, 34, 38, 36, -1, - 29, 38, 12, -1, 8, 60, 66, 67, 66, 67, - -1, 60, 57, 66, 67, 74, 66, 67, 63, 12, - 74, 61, 62, 29, 66, 67, 85, 25, 25, 27, - 27, 85, 66, 67, 29, 61, 62, 66, 67, 8, - 38, 38, 25, 25, 27, 27, 25, 57, 27, 25, - 25, 27, 27, 63, 15, 38, 38, 61, 62, 38, - 66, 67, 38, 38, 57, 29, -1, 29, -1, 29, - 63, 66, 67, 34, 29, 36, 29, -1, 29, -1, - -1, 18, 19, -1, -1, 36, -1, 56, -1, -1, - 18, 19, 18, 19, -1, 29, -1, -1, 18, 19, - 29, -1, 66, 67, 66, 67, 66, 67, 45, 46, - 29, 66, 67, 66, 67, 66, 67, 45, 46, 45, - 46, 29, 25, -1, 27, 45, 46, 61, 62, 29, - 59, -1, 66, 67, 8, 38, -1, 66, 67, -1, - -1, -1, 61, 62, -1, -1, -1, 66, 67, -1, - -1, -1, -1, 61, 62, 29, 85, 8, 66, 67, - -1, 61, 62, 23, 24, -1, 66, 67, 10, -1, - -1, 31, 32, -1, -1, 35, -1, 37, 29, -1, - 22, -1, 23, 24, -1, 59, -1, 29, 23, 24, - 31, 32, 66, 67, 35, -1, 37, 32, -1, -1, - 35, -1, 37, -1, -1, -1, -1, -1, 59, -1, - 10, 85, -1, -1, -1, 66, 67, 59, -1, -1, - -1, -1, 22, -1, 66, 67, -1, -1, -1, 29, - 10, -1, 74, 10, 85, -1, -1, -1, -1, -1, - -1, 83, 22, 85, -1, 22, -1, -1, -1, 29, - -1, -1, 29, -1, -1, -1, 23, 24, -1, 59, - -1, -1, -1, -1, 31, 32, 66, 67, 35, -1, - 37, -1, -1, -1, 74, 55, -1, -1, 55, 59, - -1, -1, 59, 83, -1, 85, 66, 67, -1, 66, - 67, -1, -1, -1, 74, -1, -1, 74, -1, -1, - -1, -1, -1, 83, 3, 85, 83, -1, 85, -1, - -1, -1, -1, -1, 13, -1, -1, -1, 17, -1, - -1, -1, -1, -1, 3, -1, -1, 26, -1, 28, - -1, -1, 31, -1, 13, -1, -1, -1, 17, -1, - 39, -1, 41, 42, -1, -1, -1, 26, -1, 28, - 49, -1, -1, 52, 53, -1, -1, -1, -1, 58, - 39, -1, 41, 42, -1, 64, -1, -1, -1, -1, - 49, -1, -1, 52, 53, -1, -1, -1, -1, 58, - 79, -1, -1, -1, -1, 64, -1, -1, -1, -1, + 1, 55, 33, 60, 8, 7, 36, 36, 36, 48, + 61, 61, 60, 31, 17, 60, 7, 17, 60, 36, + 36, 8, 7, 7, 7, 33, 36, 7, 7, 5, + 8, 5, 5, 60, 33, 33, 7, 33, 78, 20, + 55, 36, 36, 7, 7, 33, 8, 8, 55, 16, + 55, 33, 7, 7, 60, 7, 33, 29, 55, 7, + 7, 36, 55, 7, 78, 8, 36, 36, 60, 7, + 36, 36, 61, 29, 60, 88, 36, 8, 8, 7, + 33, 1, 1, 7, 33, 36, 36, 55, 78, 48, + 2, 36, 7, 1, 36, 36, 0, 2, 7, 2, + 29, 33, 48, 60, 10, -1, 8, 7, 8, 6, + 8, 7, -1, 8, 48, 8, 42, 40, 76, 40, + 8, 60, 40, 20, 8, 8, 66, 53, 51, 65, + 51, 8, 8, 51, 61, 62, 50, 33, 7, -1, + 54, 40, 8, 78, 61, 62, 15, 8, 7, 55, + 8, 88, 51, 8, 61, 62, 8, 8, 7, 12, + 61, 62, 60, 56, 50, 60, 15, 8, 54, 61, + 62, 15, 60, 56, 33, 29, 60, -1, -1, 8, + 56, 61, 62, 60, -1, -1, 61, 62, 61, 62, + 34, 29, 36, 29, -1, 61, 29, -1, 56, 60, + 8, 56, 29, -1, 57, 29, -1, 29, 60, 60, + 63, 29, 66, 67, 29, 12, -1, 8, 29, -1, + 61, 62, 25, 25, 27, 27, -1, -1, 66, 67, + 66, 67, -1, 66, 67, 38, 38, 29, -1, 66, + 67, 29, 66, 67, 66, 67, 29, 12, 66, 67, + 29, 66, 67, 61, 62, 25, 25, 27, 27, 25, + 57, 27, 25, 74, 27, 29, 63, 29, 38, 38, + 61, 62, 38, -1, 85, 38, 15, -1, 66, 67, + 15, -1, 74, 66, 67, 18, 19, 66, 67, 18, + 19, -1, 57, 85, -1, 34, -1, 36, 63, 34, + -1, 36, 66, 67, 66, 67, 18, 19, 18, 19, + -1, 29, 45, 46, 29, -1, 45, 46, 36, -1, + -1, 29, -1, -1, -1, 29, -1, -1, 25, -1, + 27, -1, -1, 45, 46, 45, 46, 29, -1, 29, + 8, 38, -1, -1, -1, -1, 61, 62, 66, 67, + -1, 66, 67, 61, 62, 59, -1, -1, 66, 67, + -1, 29, 66, 67, 8, -1, -1, -1, -1, 61, + 62, 61, 62, -1, 66, 67, 66, 67, 23, 24, + -1, 85, -1, -1, -1, 29, 31, 32, 23, 24, + 35, 59, 37, 10, 23, 24, 31, 32, 66, 67, + 35, -1, 37, 32, -1, 22, 35, -1, 37, -1, + -1, -1, 29, -1, -1, 59, 10, 85, -1, -1, + -1, -1, 66, 67, -1, -1, -1, -1, 22, -1, + -1, -1, -1, -1, -1, 29, 10, -1, -1, 10, + -1, 85, 59, -1, -1, -1, -1, -1, 22, 66, + 67, 22, -1, -1, -1, 29, -1, 74, 29, -1, + -1, -1, 23, 24, -1, 59, 83, -1, 85, -1, + 31, 32, 66, 67, 35, -1, 37, -1, -1, -1, + 74, 55, -1, -1, 55, 59, -1, -1, 59, 83, + -1, 85, 66, 67, -1, 66, 67, -1, -1, -1, + 74, -1, -1, 74, -1, -1, -1, -1, -1, 83, + 3, 85, 83, -1, 85, -1, -1, -1, -1, -1, + 13, -1, -1, -1, 17, -1, -1, -1, -1, -1, + 3, -1, -1, 26, -1, 28, -1, -1, 31, -1, + 13, -1, -1, -1, 17, -1, 39, -1, 41, 42, + -1, -1, -1, 26, -1, 28, 49, -1, -1, 52, + 53, -1, -1, -1, -1, 58, 39, -1, 41, 42, + -1, 64, -1, -1, -1, -1, 49, -1, -1, 52, + 53, -1, -1, -1, -1, 58, 79, -1, -1, -1, + -1, 64, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 79, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 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, -1, -1, -1, 43, + -1, -1, -1, 47, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 79, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 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, - -1, -1, -1, 43, -1, -1, -1, 47, -1, -1, + -1, 65, 66, 67, -1, 69, -1, -1, -1, -1, + -1, -1, -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, -1, -1, -1, -1, 65, 66, 67, -1, 69, + -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, - 80, 81, 82, -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, 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, 7, -1, -1, -1, 11, 12, 13, -1, -1, -1, -1, -1, -1, -1, -1, 22, -1, -1, -1, -1, -1, -1, 29, -1, -1, -1, 33, 34, -1, 36, -1, -1, -1, @@ -625,61 +646,54 @@ const int JavaScriptGrammar::action_check [] = { -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, 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, 7, -1, -1, -1, 11, 12, 13, -1, -1, - -1, -1, -1, -1, -1, -1, 22, -1, -1, -1, - -1, -1, -1, 29, -1, -1, -1, 33, 34, -1, - 36, -1, -1, -1, 40, -1, 42, 43, 44, -1, - -1, 47, -1, -1, -1, 51, -1, 53, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 65, - 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, 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, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 59, -1, -1, -1, -1, -1, -1, 66, 67, 68, + -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, 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, + -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, 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, + 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, - 85, -1, -1, -1, -1, -1, 4, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 4, -1, -1, -1, -1, 9, -1, 11, 12, 13, 14, -1, -1, -1, -1, -1, -1, 21, 22, -1, -1, -1, -1, -1, -1, 29, 30, -1, -1, 33, 34, -1, 36, -1, @@ -696,72 +710,54 @@ const int JavaScriptGrammar::action_check [] = { 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, + 81, 82, 83, 84, -1, 86, -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, 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, -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, 86, - -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, + 84, 85, -1, -1, -1, -1, -1, - 91, 88, 15, 24, 9, 15, 13, 13, 20, 24, - 13, 15, 9, 15, 14, 62, 15, 18, 58, 9, - 18, 15, 13, 18, 13, 13, 13, 93, 24, 62, - 15, 13, 18, 13, 62, 95, 95, 18, 15, 18, - 24, 24, 13, 15, 13, 15, 24, 95, 15, 13, - 18, 13, 18, 13, 13, 13, 13, 100, -1, 15, - 15, 24, -1, -1, 15, 26, 15, 13, 18, 62, - 24, 24, 24, 18, 18, 15, 18, 24, 15, 18, - 15, 24, 18, 15, 15, 10, 15, 35, 31, 13, - -1, -1, 40, 18, 35, 18, 18, 35, 5, 40, - 13, 35, 40, 18, 24, 35, 40, 35, 35, 35, - 40, 31, 40, -1, 35, -1, 37, 35, 35, -1, - 18, 39, 49, 40, 59, 51, 35, 59, 59, 35, - 59, 40, 35, 35, 40, 37, 35, 40, 37, 35, - 35, 37, 35, 35, 80, 37, -1, 40, 43, 35, - 35, 37, 76, 35, 35, 37, 41, 35, 35, 82, - 41, 38, 40, 76, 35, 35, 35, 35, 35, 38, - 41, 41, 94, 35, 35, 37, 37, 45, -1, 94, - 47, 35, 29, 37, 35, 32, 37, 35, -1, 35, - 35, 39, 37, 39, -1, 35, 94, 37, 35, 29, - 37, 35, 32, 35, 35, -1, 40, 35, 40, 40, - -1, 35, 40, 16, 17, 18, 40, 35, 50, 35, - 35, 52, 40, 57, 40, 40, 42, 42, 46, 57, - 35, 35, 18, 57, 35, 40, 40, 42, 35, 40, - -1, 27, 28, 40, 8, 42, 10, 7, -1, -1, - 10, -1, 35, 57, 18, 35, 57, 40, 18, 2, - 40, -1, 18, -1, 44, 48, -1, -1, -1, -1, - -1, 27, -1, 16, 17, 18, -1, -1, -1, -1, + 91, 5, 15, 24, 9, 15, 15, 24, 15, 58, + 13, 88, 13, 13, 62, 93, 15, 14, 9, 15, + 18, 13, 15, 13, 18, 20, 13, 62, 13, 18, + 95, 13, 18, 95, 95, 13, 24, 18, 18, 15, + 24, 24, 15, 15, 13, 24, 62, 18, 15, 13, + 18, 13, 13, 13, 13, 13, 62, 100, 15, 24, + 15, 15, -1, 26, 15, 15, 15, 13, 24, 35, + 18, 24, 24, 18, 18, 18, 18, 24, 13, 18, + 10, 15, 15, 15, 15, 51, -1, -1, 18, 13, + 18, -1, -1, 18, 35, 35, 37, 35, 35, 35, + 40, -1, 40, 40, 40, 24, 35, 9, 35, 35, + 18, 40, 31, 40, 35, 35, 37, 35, 35, 39, + 37, 18, 40, 49, 35, 59, 59, 59, 59, 40, + 35, 35, 35, 37, 37, 40, 35, 35, 37, 35, + 13, 80, 40, 35, 24, 37, 35, 43, 37, -1, + 35, 31, 76, 35, 82, 37, 41, 35, 35, 35, + 35, 35, 40, 38, 41, 41, -1, 41, 35, 94, + 29, 38, 35, 32, 37, 35, 29, 37, 35, 32, + 37, 35, -1, 35, 35, 39, 94, 39, 35, 35, + 35, 37, 37, 35, 35, 37, 47, 94, 45, 40, + 35, 35, 35, 76, -1, 40, 40, 40, 35, 50, + 16, 17, 18, 40, -1, 35, 35, 35, -1, 52, + 40, 40, 40, 57, 42, -1, 35, 35, -1, 48, + 57, 40, 40, 42, 35, 35, 35, 57, 18, 40, + 40, 40, 8, 42, 10, 46, -1, 27, 28, 57, + 7, 35, 18, 10, 35, 2, 40, 57, 42, 40, + -1, 18, -1, 44, -1, -1, -1, 18, -1, 16, + 17, 18, -1, -1, -1, -1, 27, -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, 6, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 16, 17, 18, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 6, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 16, 17, 18, -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, @@ -769,5 +765,5 @@ const int JavaScriptGrammar::action_check [] = { -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 5a882e8..58e73f6 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 = 565, - RULE_COUNT = 316, - STATE_COUNT = 566, + ACCEPT_STATE = 567, + RULE_COUNT = 317, + STATE_COUNT = 568, TERMINAL_COUNT = 91, NON_TERMINAL_COUNT = 102, - GOTO_INDEX_OFFSET = 566, - GOTO_INFO_OFFSET = 1811, - GOTO_CHECK_OFFSET = 1811 + GOTO_INDEX_OFFSET = 568, + GOTO_INFO_OFFSET = 1797, + GOTO_CHECK_OFFSET = 1797 }; static const char *const spell []; diff --git a/src/declarative/qml/parser/javascriptlexer.cpp b/src/declarative/qml/parser/javascriptlexer.cpp index 7bbb4bf..c0a4b63 100644 --- a/src/declarative/qml/parser/javascriptlexer.cpp +++ b/src/declarative/qml/parser/javascriptlexer.cpp @@ -294,7 +294,7 @@ int JavaScript::Lexer::findReservedWord(const QChar *c, int size) const else if (c[0] == QLatin1Char('s') && c[1] == QLatin1Char('i') && c[2] == QLatin1Char('g') && c[3] == QLatin1Char('n') && c[4] == QLatin1Char('a') && c[5] == QLatin1Char('l')) - return JavaScriptGrammar::T_IMPORT; + return JavaScriptGrammar::T_SIGNAL; else if (check_reserved) { if (c[0] == QLatin1Char('e') && c[1] == QLatin1Char('x') && c[2] == QLatin1Char('p') && c[3] == QLatin1Char('o') diff --git a/src/declarative/qml/parser/javascriptparser.cpp b/src/declarative/qml/parser/javascriptparser.cpp index 21dcb0f..601e2a2 100644 --- a/src/declarative/qml/parser/javascriptparser.cpp +++ b/src/declarative/qml/parser/javascriptparser.cpp @@ -279,7 +279,8 @@ case 27: { } case 29: { - AST::UiPublicMember *node = makeAstNode (driver->nodePool(), sym(2).sval, sym(3).sval); + AST::UiPublicMember *node = makeAstNode (driver->nodePool(), (JavaScriptNameIdImpl *)0, sym(2).sval); + node->type = AST::UiPublicMember::Signal; node->propertyToken = loc(1); node->typeToken = loc(2); node->identifierToken = loc(3); @@ -287,6 +288,14 @@ case 29: { } break; case 30: { + AST::UiPublicMember *node = makeAstNode (driver->nodePool(), sym(2).sval, sym(3).sval); + node->propertyToken = loc(1); + node->typeToken = loc(2); + node->identifierToken = loc(3); + sym(1).Node = node; +} break; + +case 31: { AST::UiPublicMember *node = makeAstNode (driver->nodePool(), sym(3).sval, sym(4).sval); node->isDefaultMember = true; node->propertyToken = loc(1); @@ -295,7 +304,7 @@ case 30: { sym(1).Node = node; } break; -case 31: { +case 32: { AST::UiPublicMember *node = makeAstNode (driver->nodePool(), sym(2).sval, sym(3).sval, sym(5).Expression); node->propertyToken = loc(1); @@ -305,7 +314,7 @@ case 31: { sym(1).Node = node; } break; -case 32: { +case 33: { AST::UiPublicMember *node = makeAstNode (driver->nodePool(), sym(3).sval, sym(4).sval, sym(6).Expression); node->isDefaultMember = true; @@ -316,85 +325,85 @@ case 32: { sym(1).Node = node; } break; -case 33: { +case 34: { sym(1).Node = makeAstNode(driver->nodePool(), sym(1).Node); } break; -case 34: { +case 35: { sym(1).Node = makeAstNode(driver->nodePool(), sym(1).Node); } break; -case 35: - case 36: + +case 37: { AST::UiQualifiedId *node = makeAstNode (driver->nodePool(), driver->intern(lexer->characterBuffer(), lexer->characterCount())); node->identifierToken = loc(1); sym(1).Node = node; } break; -case 38: +case 39: -case 39: { +case 40: { sym(1).sval = driver->intern(lexer->characterBuffer(), lexer->characterCount()); break; } -case 40: { +case 41: { AST::UiQualifiedId *node = makeAstNode (driver->nodePool(), sym(1).sval); node->identifierToken = loc(1); sym(1).Node = node; } break; -case 41: { +case 42: { AST::UiQualifiedId *node = makeAstNode (driver->nodePool(), sym(1).UiQualifiedId, sym(3).sval); node->identifierToken = loc(3); sym(1).Node = node; } break; -case 42: { +case 43: { AST::ThisExpression *node = makeAstNode (driver->nodePool()); node->thisToken = loc(1); sym(1).Node = node; } break; -case 43: { +case 44: { AST::IdentifierExpression *node = makeAstNode (driver->nodePool(), sym(1).sval); node->identifierToken = loc(1); sym(1).Node = node; } break; -case 44: { +case 45: { AST::NullExpression *node = makeAstNode (driver->nodePool()); node->nullToken = loc(1); sym(1).Node = node; } break; -case 45: { +case 46: { AST::TrueLiteral *node = makeAstNode (driver->nodePool()); node->trueToken = loc(1); sym(1).Node = node; } break; -case 46: { +case 47: { AST::FalseLiteral *node = makeAstNode (driver->nodePool()); node->falseToken = loc(1); sym(1).Node = node; } break; -case 47: { +case 48: { AST::NumericLiteral *node = makeAstNode (driver->nodePool(), sym(1).dval); node->literalToken = loc(1); sym(1).Node = node; } break; -case 48: { +case 49: { AST::StringLiteral *node = makeAstNode (driver->nodePool(), sym(1).sval); node->literalToken = loc(1); sym(1).Node = node; } break; -case 49: { +case 50: { bool rx = lexer->scanRegExp(Lexer::NoPrefix); if (!rx) { diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, lexer->startLineNo(), @@ -406,7 +415,7 @@ case 49: { sym(1).Node = node; } break; -case 50: { +case 51: { bool rx = lexer->scanRegExp(Lexer::EqualPrefix); if (!rx) { diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, lexer->startLineNo(), @@ -418,21 +427,21 @@ case 50: { sym(1).Node = node; } break; -case 51: { +case 52: { AST::ArrayLiteral *node = makeAstNode (driver->nodePool(), sym(2).Elision); node->lbracketToken = loc(1); node->rbracketToken = loc(3); sym(1).Node = node; } break; -case 52: { +case 53: { AST::ArrayLiteral *node = makeAstNode (driver->nodePool(), sym(2).ElementList->finish ()); node->lbracketToken = loc(1); node->rbracketToken = loc(3); sym(1).Node = node; } break; -case 53: { +case 54: { AST::ArrayLiteral *node = makeAstNode (driver->nodePool(), sym(2).ElementList->finish (), sym(4).Elision); node->lbracketToken = loc(1); node->commaToken = loc(3); @@ -440,7 +449,7 @@ case 53: { sym(1).Node = node; } break; -case 54: { +case 55: { AST::ObjectLiteral *node = 0; if (sym(2).Node) node = makeAstNode (driver->nodePool(), @@ -452,7 +461,7 @@ case 54: { sym(1).Node = node; } break; -case 55: { +case 56: { AST::ObjectLiteral *node = makeAstNode (driver->nodePool(), sym(2).PropertyNameAndValueList->finish ()); node->lbraceToken = loc(1); @@ -460,51 +469,51 @@ case 55: { sym(1).Node = node; } break; -case 56: { +case 57: { AST::NestedExpression *node = makeAstNode(driver->nodePool(), sym(2).Expression); node->lparenToken = loc(1); node->rparenToken = loc(3); sym(1).Node = node; } break; -case 57: { +case 58: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).Elision, sym(2).Expression); } break; -case 58: { +case 59: { AST::ElementList *node = makeAstNode (driver->nodePool(), sym(1).ElementList, sym(3).Elision, sym(4).Expression); node->commaToken = loc(2); sym(1).Node = node; } break; -case 59: { +case 60: { AST::Elision *node = makeAstNode (driver->nodePool()); node->commaToken = loc(1); sym(1).Node = node; } break; -case 60: { +case 61: { AST::Elision *node = makeAstNode (driver->nodePool(), sym(1).Elision); node->commaToken = loc(2); sym(1).Node = node; } break; -case 61: { +case 62: { sym(1).Node = 0; } break; -case 62: { +case 63: { sym(1).Elision = sym(1).Elision->finish (); } break; -case 63: { +case 64: { AST::PropertyNameAndValueList *node = makeAstNode (driver->nodePool(), sym(1).PropertyName, sym(3).Expression); node->colonToken = loc(2); sym(1).Node = node; } break; -case 64: { +case 65: { AST::PropertyNameAndValueList *node = makeAstNode (driver->nodePool(), sym(1).PropertyNameAndValueList, sym(3).PropertyName, sym(5).Expression); node->commaToken = loc(2); @@ -512,38 +521,36 @@ case 64: { sym(1).Node = node; } break; -case 65: { +case 66: { AST::IdentifierPropertyName *node = makeAstNode (driver->nodePool(), sym(1).sval); node->propertyNameToken = loc(1); sym(1).Node = node; } break; -case 67: { +case 68: { AST::IdentifierPropertyName *node = makeAstNode (driver->nodePool(), driver->intern(lexer->characterBuffer(), lexer->characterCount())); node->propertyNameToken = loc(1); sym(1).Node = node; } break; -case 68: { +case 69: { AST::StringLiteralPropertyName *node = makeAstNode (driver->nodePool(), sym(1).sval); node->propertyNameToken = loc(1); sym(1).Node = node; } break; -case 69: { +case 70: { AST::NumericLiteralPropertyName *node = makeAstNode (driver->nodePool(), sym(1).dval); node->propertyNameToken = loc(1); sym(1).Node = node; } break; -case 70: { +case 71: { AST::IdentifierPropertyName *node = makeAstNode (driver->nodePool(), sym(1).sval); node->propertyNameToken = loc(1); sym(1).Node = node; } break; -case 71: - case 72: case 73: @@ -603,25 +610,27 @@ case 99: case 100: case 101: + +case 102: { sym(1).sval = driver->intern(lexer->characterBuffer(), lexer->characterCount()); } break; -case 106: { +case 107: { AST::ArrayMemberExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).Expression); node->lbracketToken = loc(2); node->rbracketToken = loc(4); sym(1).Node = node; } break; -case 107: { +case 108: { AST::FieldMemberExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).sval); node->dotToken = loc(2); node->identifierToken = loc(3); sym(1).Node = node; } break; -case 108: { +case 109: { AST::NewMemberExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression, sym(4).ArgumentList); node->newToken = loc(1); node->lparenToken = loc(3); @@ -629,384 +638,384 @@ case 108: { sym(1).Node = node; } break; -case 110: { +case 111: { AST::NewExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->newToken = loc(1); sym(1).Node = node; } break; -case 111: { +case 112: { AST::CallExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).ArgumentList); node->lparenToken = loc(2); node->rparenToken = loc(4); sym(1).Node = node; } break; -case 112: { +case 113: { AST::CallExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).ArgumentList); node->lparenToken = loc(2); node->rparenToken = loc(4); sym(1).Node = node; } break; -case 113: { +case 114: { AST::ArrayMemberExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).Expression); node->lbracketToken = loc(2); node->rbracketToken = loc(4); sym(1).Node = node; } break; -case 114: { +case 115: { AST::FieldMemberExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).sval); node->dotToken = loc(2); node->identifierToken = loc(3); sym(1).Node = node; } break; -case 115: { +case 116: { sym(1).Node = 0; } break; -case 116: { +case 117: { sym(1).Node = sym(1).ArgumentList->finish(); } break; -case 117: { +case 118: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).Expression); } break; -case 118: { +case 119: { AST::ArgumentList *node = makeAstNode (driver->nodePool(), sym(1).ArgumentList, sym(3).Expression); node->commaToken = loc(2); sym(1).Node = node; } break; -case 122: { +case 123: { AST::PostIncrementExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression); node->incrementToken = loc(2); sym(1).Node = node; } break; -case 123: { +case 124: { AST::PostDecrementExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression); node->decrementToken = loc(2); sym(1).Node = node; } break; -case 125: { +case 126: { AST::DeleteExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->deleteToken = loc(1); sym(1).Node = node; } break; -case 126: { +case 127: { AST::VoidExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->voidToken = loc(1); sym(1).Node = node; } break; -case 127: { +case 128: { AST::TypeOfExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->typeofToken = loc(1); sym(1).Node = node; } break; -case 128: { +case 129: { AST::PreIncrementExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->incrementToken = loc(1); sym(1).Node = node; } break; -case 129: { +case 130: { AST::PreDecrementExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->decrementToken = loc(1); sym(1).Node = node; } break; -case 130: { +case 131: { AST::UnaryPlusExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->plusToken = loc(1); sym(1).Node = node; } break; -case 131: { +case 132: { AST::UnaryMinusExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->minusToken = loc(1); sym(1).Node = node; } break; -case 132: { +case 133: { AST::TildeExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->tildeToken = loc(1); sym(1).Node = node; } break; -case 133: { +case 134: { AST::NotExpression *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->notToken = loc(1); sym(1).Node = node; } break; -case 135: { +case 136: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Mul, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 136: { +case 137: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Div, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 137: { +case 138: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Mod, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 139: { +case 140: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Add, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 140: { +case 141: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Sub, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 142: { +case 143: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::LShift, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 143: { +case 144: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::RShift, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 144: { +case 145: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::URShift, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 146: { +case 147: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Lt, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 147: { +case 148: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Gt, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 148: { +case 149: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Le, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 149: { +case 150: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Ge, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 150: { +case 151: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::InstanceOf, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 151: { +case 152: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::In, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 153: { +case 154: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Lt, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 154: { +case 155: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Gt, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 155: { +case 156: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Le, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 156: { +case 157: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Ge, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 157: { +case 158: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::InstanceOf, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 159: { +case 160: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Equal, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 160: { +case 161: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::NotEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 161: { +case 162: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::StrictEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 162: { +case 163: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::StrictNotEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 164: { +case 165: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Equal, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 165: { +case 166: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::NotEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 166: { +case 167: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::StrictEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 167: { +case 168: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::StrictNotEqual, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 169: { +case 170: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::BitAnd, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 171: { +case 172: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::BitAnd, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 173: { +case 174: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::BitXor, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 175: { +case 176: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::BitXor, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 177: { +case 178: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::BitOr, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 179: { +case 180: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::BitOr, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 181: { +case 182: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::And, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 183: { +case 184: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::And, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 185: { +case 186: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Or, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 187: { +case 188: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, QSOperator::Or, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 189: { +case 190: { AST::ConditionalExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).Expression, sym(5).Expression); node->questionToken = loc(2); @@ -1014,7 +1023,7 @@ case 189: { sym(1).Node = node; } break; -case 191: { +case 192: { AST::ConditionalExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).Expression, sym(5).Expression); node->questionToken = loc(2); @@ -1022,112 +1031,112 @@ case 191: { sym(1).Node = node; } break; -case 193: { +case 194: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(2).ival, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 195: { +case 196: { AST::BinaryExpression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(2).ival, sym(3).Expression); node->operatorToken = loc(2); sym(1).Node = node; } break; -case 196: { +case 197: { sym(1).ival = QSOperator::Assign; } break; -case 197: { +case 198: { sym(1).ival = QSOperator::InplaceMul; } break; -case 198: { +case 199: { sym(1).ival = QSOperator::InplaceDiv; } break; -case 199: { +case 200: { sym(1).ival = QSOperator::InplaceMod; } break; -case 200: { +case 201: { sym(1).ival = QSOperator::InplaceAdd; } break; -case 201: { +case 202: { sym(1).ival = QSOperator::InplaceSub; } break; -case 202: { +case 203: { sym(1).ival = QSOperator::InplaceLeftShift; } break; -case 203: { +case 204: { sym(1).ival = QSOperator::InplaceRightShift; } break; -case 204: { +case 205: { sym(1).ival = QSOperator::InplaceURightShift; } break; -case 205: { +case 206: { sym(1).ival = QSOperator::InplaceAnd; } break; -case 206: { +case 207: { sym(1).ival = QSOperator::InplaceXor; } break; -case 207: { +case 208: { sym(1).ival = QSOperator::InplaceOr; } break; -case 209: { +case 210: { AST::Expression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).Expression); node->commaToken = loc(2); sym(1).Node = node; } break; -case 210: { +case 211: { sym(1).Node = 0; } break; -case 213: { +case 214: { AST::Expression *node = makeAstNode (driver->nodePool(), sym(1).Expression, sym(3).Expression); node->commaToken = loc(2); sym(1).Node = node; } break; -case 214: { +case 215: { sym(1).Node = 0; } break; -case 231: { +case 232: { AST::Block *node = makeAstNode (driver->nodePool(), sym(2).StatementList); node->lbraceToken = loc(1); node->rbraceToken = loc(3); sym(1).Node = node; } break; -case 232: { +case 233: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).Statement); } break; -case 233: { +case 234: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).StatementList, sym(2).Statement); } break; -case 234: { +case 235: { sym(1).Node = 0; } break; -case 235: { +case 236: { sym(1).Node = sym(1).StatementList->finish (); } break; -case 237: { +case 238: { AST::VariableStatement *node = makeAstNode (driver->nodePool(), sym(2).VariableDeclarationList->finish (/*readOnly=*/sym(1).ival == T_CONST)); node->declarationKindToken = loc(1); @@ -1135,76 +1144,76 @@ case 237: { sym(1).Node = node; } break; -case 238: { +case 239: { sym(1).ival = T_CONST; } break; -case 239: { +case 240: { sym(1).ival = T_VAR; } break; -case 240: { +case 241: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).VariableDeclaration); } break; -case 241: { +case 242: { AST::VariableDeclarationList *node = makeAstNode (driver->nodePool(), sym(1).VariableDeclarationList, sym(3).VariableDeclaration); node->commaToken = loc(2); sym(1).Node = node; } break; -case 242: { +case 243: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).VariableDeclaration); } break; -case 243: { +case 244: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).VariableDeclarationList, sym(3).VariableDeclaration); } break; -case 244: { +case 245: { AST::VariableDeclaration *node = makeAstNode (driver->nodePool(), sym(1).sval, sym(2).Expression); node->identifierToken = loc(1); sym(1).Node = node; } break; -case 245: { +case 246: { AST::VariableDeclaration *node = makeAstNode (driver->nodePool(), sym(1).sval, sym(2).Expression); node->identifierToken = loc(1); sym(1).Node = node; } break; -case 246: { +case 247: { // ### TODO: AST for initializer sym(1) = sym(2); } break; -case 247: { +case 248: { sym(1).Node = 0; } break; -case 249: { +case 250: { // ### TODO: AST for initializer sym(1) = sym(2); } break; -case 250: { +case 251: { sym(1).Node = 0; } break; -case 252: { +case 253: { AST::EmptyStatement *node = makeAstNode (driver->nodePool()); node->semicolonToken = loc(1); sym(1).Node = node; } break; -case 254: { +case 255: { AST::ExpressionStatement *node = makeAstNode (driver->nodePool(), sym(1).Expression); node->semicolonToken = loc(2); sym(1).Node = node; } break; -case 255: { +case 256: { AST::IfStatement *node = makeAstNode (driver->nodePool(), sym(3).Expression, sym(5).Statement, sym(7).Statement); node->ifToken = loc(1); node->lparenToken = loc(2); @@ -1213,7 +1222,7 @@ case 255: { sym(1).Node = node; } break; -case 256: { +case 257: { AST::IfStatement *node = makeAstNode (driver->nodePool(), sym(3).Expression, sym(5).Statement); node->ifToken = loc(1); node->lparenToken = loc(2); @@ -1221,7 +1230,7 @@ case 256: { sym(1).Node = node; } break; -case 258: { +case 259: { AST::DoWhileStatement *node = makeAstNode (driver->nodePool(), sym(2).Statement, sym(5).Expression); node->doToken = loc(1); node->whileToken = loc(3); @@ -1231,7 +1240,7 @@ case 258: { sym(1).Node = node; } break; -case 259: { +case 260: { AST::WhileStatement *node = makeAstNode (driver->nodePool(), sym(3).Expression, sym(5).Statement); node->whileToken = loc(1); node->lparenToken = loc(2); @@ -1239,7 +1248,7 @@ case 259: { sym(1).Node = node; } break; -case 260: { +case 261: { AST::ForStatement *node = makeAstNode (driver->nodePool(), sym(3).Expression, sym(5).Expression, sym(7).Expression, sym(9).Statement); node->forToken = loc(1); @@ -1250,7 +1259,7 @@ case 260: { sym(1).Node = node; } break; -case 261: { +case 262: { AST::LocalForStatement *node = makeAstNode (driver->nodePool(), sym(4).VariableDeclarationList->finish (/*readOnly=*/false), sym(6).Expression, sym(8).Expression, sym(10).Statement); @@ -1263,7 +1272,7 @@ case 261: { sym(1).Node = node; } break; -case 262: { +case 263: { AST:: ForEachStatement *node = makeAstNode (driver->nodePool(), sym(3).Expression, sym(5).Expression, sym(7).Statement); node->forToken = loc(1); @@ -1273,7 +1282,7 @@ case 262: { sym(1).Node = node; } break; -case 263: { +case 264: { AST::LocalForEachStatement *node = makeAstNode (driver->nodePool(), sym(4).VariableDeclaration, sym(6).Expression, sym(8).Statement); node->forToken = loc(1); @@ -1284,14 +1293,14 @@ case 263: { sym(1).Node = node; } break; -case 265: { +case 266: { AST::ContinueStatement *node = makeAstNode (driver->nodePool()); node->continueToken = loc(1); node->semicolonToken = loc(2); sym(1).Node = node; } break; -case 267: { +case 268: { AST::ContinueStatement *node = makeAstNode (driver->nodePool(), sym(2).sval); node->continueToken = loc(1); node->identifierToken = loc(2); @@ -1299,14 +1308,14 @@ case 267: { sym(1).Node = node; } break; -case 269: { +case 270: { AST::BreakStatement *node = makeAstNode (driver->nodePool()); node->breakToken = loc(1); node->semicolonToken = loc(2); sym(1).Node = node; } break; -case 271: { +case 272: { AST::BreakStatement *node = makeAstNode (driver->nodePool(), sym(2).sval); node->breakToken = loc(1); node->identifierToken = loc(2); @@ -1314,14 +1323,14 @@ case 271: { sym(1).Node = node; } break; -case 273: { +case 274: { AST::ReturnStatement *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->returnToken = loc(1); node->semicolonToken = loc(3); sym(1).Node = node; } break; -case 274: { +case 275: { AST::WithStatement *node = makeAstNode (driver->nodePool(), sym(3).Expression, sym(5).Statement); node->withToken = loc(1); node->lparenToken = loc(2); @@ -1329,7 +1338,7 @@ case 274: { sym(1).Node = node; } break; -case 275: { +case 276: { AST::SwitchStatement *node = makeAstNode (driver->nodePool(), sym(3).Expression, sym(5).CaseBlock); node->switchToken = loc(1); node->lparenToken = loc(2); @@ -1337,90 +1346,90 @@ case 275: { sym(1).Node = node; } break; -case 276: { +case 277: { AST::CaseBlock *node = makeAstNode (driver->nodePool(), sym(2).CaseClauses); node->lbraceToken = loc(1); node->rbraceToken = loc(3); sym(1).Node = node; } break; -case 277: { +case 278: { AST::CaseBlock *node = makeAstNode (driver->nodePool(), sym(2).CaseClauses, sym(3).DefaultClause, sym(4).CaseClauses); node->lbraceToken = loc(1); node->rbraceToken = loc(5); sym(1).Node = node; } break; -case 278: { +case 279: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).CaseClause); } break; -case 279: { +case 280: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).CaseClauses, sym(2).CaseClause); } break; -case 280: { +case 281: { sym(1).Node = 0; } break; -case 281: { +case 282: { sym(1).Node = sym(1).CaseClauses->finish (); } break; -case 282: { +case 283: { AST::CaseClause *node = makeAstNode (driver->nodePool(), sym(2).Expression, sym(4).StatementList); node->caseToken = loc(1); node->colonToken = loc(3); sym(1).Node = node; } break; -case 283: { +case 284: { AST::DefaultClause *node = makeAstNode (driver->nodePool(), sym(3).StatementList); node->defaultToken = loc(1); node->colonToken = loc(2); sym(1).Node = node; } break; -case 285: { +case 286: { AST::LabelledStatement *node = makeAstNode (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 286: { +case 287: { AST::LabelledStatement *node = makeAstNode (driver->nodePool(), sym(1).sval, sym(3).Statement); node->identifierToken = loc(1); node->colonToken = loc(2); sym(1).Node = node; } break; -case 288: { +case 289: { AST::ThrowStatement *node = makeAstNode (driver->nodePool(), sym(2).Expression); node->throwToken = loc(1); node->semicolonToken = loc(3); sym(1).Node = node; } break; -case 289: { +case 290: { AST::TryStatement *node = makeAstNode (driver->nodePool(), sym(2).Statement, sym(3).Catch); node->tryToken = loc(1); sym(1).Node = node; } break; -case 290: { +case 291: { AST::TryStatement *node = makeAstNode (driver->nodePool(), sym(2).Statement, sym(3).Finally); node->tryToken = loc(1); sym(1).Node = node; } break; -case 291: { +case 292: { AST::TryStatement *node = makeAstNode (driver->nodePool(), sym(2).Statement, sym(3).Catch, sym(4).Finally); node->tryToken = loc(1); sym(1).Node = node; } break; -case 292: { +case 293: { AST::Catch *node = makeAstNode (driver->nodePool(), sym(3).sval, sym(5).Block); node->catchToken = loc(1); node->lparenToken = loc(2); @@ -1429,20 +1438,20 @@ case 292: { sym(1).Node = node; } break; -case 293: { +case 294: { AST::Finally *node = makeAstNode (driver->nodePool(), sym(2).Block); node->finallyToken = loc(1); sym(1).Node = node; } break; -case 295: { +case 296: { AST::DebuggerStatement *node = makeAstNode (driver->nodePool()); node->debuggerToken = loc(1); node->semicolonToken = loc(2); sym(1).Node = node; } break; -case 297: { +case 298: { AST::FunctionDeclaration *node = makeAstNode (driver->nodePool(), driver->intern(lexer->characterBuffer(), lexer->characterCount()), sym(4).FormalParameterList, sym(7).FunctionBody); node->functionToken = loc(1); node->identifierToken = loc(2); @@ -1453,7 +1462,7 @@ case 297: { sym(1).Node = node; } break; -case 298: { +case 299: { AST::FunctionDeclaration *node = makeAstNode (driver->nodePool(), sym(2).sval, sym(4).FormalParameterList, sym(7).FunctionBody); node->functionToken = loc(1); node->identifierToken = loc(2); @@ -1464,7 +1473,7 @@ case 298: { sym(1).Node = node; } break; -case 299: { +case 300: { AST::FunctionExpression *node = makeAstNode (driver->nodePool(), sym(2).sval, sym(4).FormalParameterList, sym(7).FunctionBody); node->functionToken = loc(1); if (sym(2).sval) @@ -1476,56 +1485,56 @@ case 299: { sym(1).Node = node; } break; -case 300: { +case 301: { AST::FormalParameterList *node = makeAstNode (driver->nodePool(), sym(1).sval); node->identifierToken = loc(1); sym(1).Node = node; } break; -case 301: { +case 302: { AST::FormalParameterList *node = makeAstNode (driver->nodePool(), sym(1).FormalParameterList, sym(3).sval); node->commaToken = loc(2); node->identifierToken = loc(3); sym(1).Node = node; } break; -case 302: { +case 303: { sym(1).Node = 0; } break; -case 303: { +case 304: { sym(1).Node = sym(1).FormalParameterList->finish (); } break; -case 304: { +case 305: { sym(1).Node = 0; } break; -case 306: { +case 307: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).SourceElements->finish ()); } break; -case 307: { +case 308: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).SourceElement); } break; -case 308: { +case 309: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).SourceElements, sym(2).SourceElement); } break; -case 309: { +case 310: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).Statement); } break; -case 310: { +case 311: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).FunctionDeclaration); } break; -case 311: { +case 312: { sym(1).sval = 0; } break; -case 313: { +case 314: { sym(1).Node = 0; } break; diff --git a/src/declarative/qml/parser/javascriptparser_p.h b/src/declarative/qml/parser/javascriptparser_p.h index e1aff9c..497fae8 100644 --- a/src/declarative/qml/parser/javascriptparser_p.h +++ b/src/declarative/qml/parser/javascriptparser_p.h @@ -206,9 +206,9 @@ protected: }; -#define J_SCRIPT_REGEXPLITERAL_RULE1 49 +#define J_SCRIPT_REGEXPLITERAL_RULE1 50 -#define J_SCRIPT_REGEXPLITERAL_RULE2 50 +#define J_SCRIPT_REGEXPLITERAL_RULE2 51 QT_END_NAMESPACE diff --git a/src/declarative/qml/qmlscriptparser.cpp b/src/declarative/qml/qmlscriptparser.cpp index 89cde7b..8039b5c 100644 --- a/src/declarative/qml/qmlscriptparser.cpp +++ b/src/declarative/qml/qmlscriptparser.cpp @@ -334,53 +334,62 @@ bool ProcessAST::visit(AST::UiImport *node) // UiMemberType: "property" | "signal" bool ProcessAST::visit(AST::UiPublicMember *node) { - const QString memberType = node->memberType->asString(); - const QString name = node->name->asString(); + if(node->type == AST::UiPublicMember::Signal) { + const QString name = node->name->asString(); - const struct TypeNameToType { - const char *name; + Object::DynamicSignal signal; + signal.name = name.toUtf8(); + + _stateStack.top().object->dynamicSignals << signal; + } else { + const QString memberType = node->memberType->asString(); + const QString name = node->name->asString(); + + const struct TypeNameToType { + const char *name; + Object::DynamicProperty::Type type; + } propTypeNameToTypes[] = { + { "int", Object::DynamicProperty::Int }, + { "bool", Object::DynamicProperty::Bool }, + { "double", Object::DynamicProperty::Real }, + { "real", Object::DynamicProperty::Real }, + { "string", Object::DynamicProperty::String }, + { "color", Object::DynamicProperty::Color }, + { "date", Object::DynamicProperty::Date }, + { "var", Object::DynamicProperty::Variant }, + { "variant", Object::DynamicProperty::Variant } + }; + const int propTypeNameToTypesCount = sizeof(propTypeNameToTypes) / + sizeof(propTypeNameToTypes[0]); + + bool typeFound = false; Object::DynamicProperty::Type type; - } propTypeNameToTypes[] = { - { "int", Object::DynamicProperty::Int }, - { "bool", Object::DynamicProperty::Bool }, - { "double", Object::DynamicProperty::Real }, - { "real", Object::DynamicProperty::Real }, - { "string", Object::DynamicProperty::String }, - { "color", Object::DynamicProperty::Color }, - { "date", Object::DynamicProperty::Date }, - { "var", Object::DynamicProperty::Variant }, - { "variant", Object::DynamicProperty::Variant } - }; - const int propTypeNameToTypesCount = sizeof(propTypeNameToTypes) / - sizeof(propTypeNameToTypes[0]); - - bool typeFound = false; - Object::DynamicProperty::Type type; - for(int ii = 0; !typeFound && ii < propTypeNameToTypesCount; ++ii) { - if(QLatin1String(propTypeNameToTypes[ii].name) == memberType) { - type = propTypeNameToTypes[ii].type; - typeFound = true; + for(int ii = 0; !typeFound && ii < propTypeNameToTypesCount; ++ii) { + if(QLatin1String(propTypeNameToTypes[ii].name) == memberType) { + type = propTypeNameToTypes[ii].type; + typeFound = true; + } + } + + if(!typeFound) { + qWarning() << "Unknown property type" << memberType; // ### FIXME + return false; } - } - - if(!typeFound) { - qWarning() << "Unknown property type" << memberType; // ### FIXME - return false; - } - Object::DynamicProperty property; - property.isDefaultProperty = node->isDefaultMember; - property.type = type; - property.name = name.toUtf8(); + Object::DynamicProperty property; + property.isDefaultProperty = node->isDefaultMember; + property.type = type; + property.name = name.toUtf8(); - if (node->expression) { // default value - property.defaultValue = new Property; - Value *value = new Value; - value->primitive = getPrimitive("value", node->expression); - property.defaultValue->values << value; - } + if (node->expression) { // default value + property.defaultValue = new Property; + Value *value = new Value; + value->primitive = getPrimitive("value", node->expression); + property.defaultValue->values << value; + } - _stateStack.top().object->dynamicProperties << property; + _stateStack.top().object->dynamicProperties << property; + } return true; } -- cgit v0.12 From f5e2c51efd24445e46c3dcad30e9137b1beecc1d Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Fri, 1 May 2009 18:05:51 +1000 Subject: Correctly set the JsIdentifier sval --- src/declarative/qml/parser/javascript.g | 9 +++++++-- src/declarative/qml/parser/javascriptparser.cpp | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/declarative/qml/parser/javascript.g b/src/declarative/qml/parser/javascript.g index 350ba9f..f1d8826 100644 --- a/src/declarative/qml/parser/javascript.g +++ b/src/declarative/qml/parser/javascript.g @@ -753,12 +753,17 @@ case $rule_number: JsIdentifier: T_IDENTIFIER; JsIdentifier: T_PROPERTY ; /. -case $rule_number: +case $rule_number: { + QString s = QLatin1String(JavaScriptGrammar::spell[T_PROPERTY]); + sym(1).sval = driver->intern(s.constData(), s.length()); + break; +} ./ JsIdentifier: T_SIGNAL ; /. case $rule_number: { - sym(1).sval = driver->intern(lexer->characterBuffer(), lexer->characterCount()); + QString s = QLatin1String(JavaScriptGrammar::spell[T_SIGNAL]); + sym(1).sval = driver->intern(s.constData(), s.length()); break; } ./ diff --git a/src/declarative/qml/parser/javascriptparser.cpp b/src/declarative/qml/parser/javascriptparser.cpp index 601e2a2..f0b1f10 100644 --- a/src/declarative/qml/parser/javascriptparser.cpp +++ b/src/declarative/qml/parser/javascriptparser.cpp @@ -342,10 +342,15 @@ case 37: sym(1).Node = node; } break; -case 39: +case 39: { + QString s = QLatin1String(JavaScriptGrammar::spell[T_PROPERTY]); + sym(1).sval = driver->intern(s.constData(), s.length()); + break; +} case 40: { - sym(1).sval = driver->intern(lexer->characterBuffer(), lexer->characterCount()); + QString s = QLatin1String(JavaScriptGrammar::spell[T_SIGNAL]); + sym(1).sval = driver->intern(s.constData(), s.length()); break; } -- cgit v0.12 From afd8fd8cbf0ae3f7d7febc4f4a00628c7bd5c541 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Fri, 1 May 2009 18:24:14 +1000 Subject: Use QML properties syntax --- demos/declarative/calculator/CalcButton.qml | 10 +++----- .../phonebrowser/content/LikeOMeter.qml | 6 ++--- .../phonebrowser/content/MediaButton.qml | 5 ++-- .../phonebrowser/content/PhoneInfoContainer.qml | 16 +++++------- .../declarative/phonebrowser/content/ScrollBar.qml | 5 ++-- demos/declarative/phonebrowser/content/Star.qml | 8 +++--- demos/declarative/phonebrowser/phonebrowser.qml | 2 +- demos/declarative/webbrowser/webbrowser.qml | 30 +++++----------------- examples/declarative/dial/DialLibrary/Dial.qml | 8 +++--- examples/declarative/follow/pong.qml | 8 +++--- .../declarative/listview/content/MediaButton.qml | 5 ++-- examples/declarative/listview/recipes.qml | 7 ++--- examples/declarative/minehunt/Description.qml | 4 +-- examples/declarative/minehunt/Explosion.qml | 7 ++--- examples/declarative/minehunt/minehunt.qml | 14 +++------- examples/declarative/scrollbar/ScrollBar.qml | 14 +++------- examples/declarative/slideswitch/Switch.qml | 6 ++--- .../contacts/1_Drawing_and_Animation/GroupBox.qml | 10 +++----- .../tutorials/contacts/2_Reuse/3/Contact.qml | 1 + .../declarative/tutorials/helloworld/t2/Cell.qml | 6 ++--- .../declarative/tutorials/helloworld/t3/Cell.qml | 5 ++-- examples/declarative/velocity/Day.qml | 10 +++----- .../declarative/webview/content/SpinSquare.qml | 11 +++----- 23 files changed, 68 insertions(+), 130 deletions(-) diff --git a/demos/declarative/calculator/CalcButton.qml b/demos/declarative/calculator/CalcButton.qml index f4ccdae..8203710 100644 --- a/demos/declarative/calculator/CalcButton.qml +++ b/demos/declarative/calculator/CalcButton.qml @@ -1,11 +1,9 @@ Item { - id: Button; width: 50; height: 30 + property string operation + property bool toggable : false + property bool toggled : false - properties: [ - Property { name: "operation"; type: "string" }, - Property { name: "toggable"; value: false }, - Property { name: "toggled"; value: false } - ] + id: Button; width: 50; height: 30 Script { function buttonClicked(operation) { diff --git a/demos/declarative/phonebrowser/content/LikeOMeter.qml b/demos/declarative/phonebrowser/content/LikeOMeter.qml index 31b8195..d928f48 100644 --- a/demos/declarative/phonebrowser/content/LikeOMeter.qml +++ b/demos/declarative/phonebrowser/content/LikeOMeter.qml @@ -1,9 +1,7 @@ Item { + property var rating : 2 + id: Container - properties: Property { - name: "rating" - value: 2 - } HorizontalLayout { Star { rating: 0 diff --git a/demos/declarative/phonebrowser/content/MediaButton.qml b/demos/declarative/phonebrowser/content/MediaButton.qml index bb2510a..7aec2e4 100644 --- a/demos/declarative/phonebrowser/content/MediaButton.qml +++ b/demos/declarative/phonebrowser/content/MediaButton.qml @@ -1,11 +1,10 @@ Item { + property var text + id: Container signals: Signal { name: "clicked" } - properties: Property { - name: "text" - } Image { id: Image source: "pics/button.png" diff --git a/demos/declarative/phonebrowser/content/PhoneInfoContainer.qml b/demos/declarative/phonebrowser/content/PhoneInfoContainer.qml index da475b1..597c3ee 100644 --- a/demos/declarative/phonebrowser/content/PhoneInfoContainer.qml +++ b/demos/declarative/phonebrowser/content/PhoneInfoContainer.qml @@ -1,15 +1,13 @@ Flipable { id: Container - properties: [ - Property { name: "frontContainer"; value: ContainerFront }, - Property { name: "flickableArea"; value: Flickable }, - Property { name: "phoneTitle"; value: "N/A" }, - Property { name: "phoneDescription"; value: "..." }, - Property { name: "phoneSpecifications"; value: "" }, - Property { name: "phoneUrl"; value: "" }, - Property { name: "rating"; value: 2 } - ] + property var frontContainer : ContainerFront + property var flickableArea : Flickable + property var phoneTitle : "N/A" + property var phoneDescription : "..." + property var phoneSpecifications : "" + property var phoneUrl : "" + property var rating : 2 signals: Signal { name: "closed" } diff --git a/demos/declarative/phonebrowser/content/ScrollBar.qml b/demos/declarative/phonebrowser/content/ScrollBar.qml index a0f2925..e65f92f 100644 --- a/demos/declarative/phonebrowser/content/ScrollBar.qml +++ b/demos/declarative/phonebrowser/content/ScrollBar.qml @@ -1,8 +1,7 @@ Item { + property var flickableArea + id: Container - properties: Property { - name: "flickableArea" - } Rect { radius: 5 color: "black" diff --git a/demos/declarative/phonebrowser/content/Star.qml b/demos/declarative/phonebrowser/content/Star.qml index ebcd78b..d53c529 100644 --- a/demos/declarative/phonebrowser/content/Star.qml +++ b/demos/declarative/phonebrowser/content/Star.qml @@ -1,13 +1,11 @@ Item { + property var rating + property var on + id: Container width: 24 height: 24 - properties: [ - Property { name: "rating" }, - Property { name: "on" } - ] - signals: Signal { name: "clicked" } diff --git a/demos/declarative/phonebrowser/phonebrowser.qml b/demos/declarative/phonebrowser/phonebrowser.qml index 85d352d..ce74367 100644 --- a/demos/declarative/phonebrowser/phonebrowser.qml +++ b/demos/declarative/phonebrowser/phonebrowser.qml @@ -3,7 +3,7 @@ import "content" Item { id: MainWindow; width: 800; height: 480 - properties: Property { name: "minimized"; value: false } + property var minimized : false Item { id: Background diff --git a/demos/declarative/webbrowser/webbrowser.qml b/demos/declarative/webbrowser/webbrowser.qml index 709d649..c754543 100644 --- a/demos/declarative/webbrowser/webbrowser.qml +++ b/demos/declarative/webbrowser/webbrowser.qml @@ -3,10 +3,7 @@ import "content" Item { id: WebBrowser - properties: Property { - name: "url" - value: "http://www.qtsoftware.com" - } + property var url : "http://www.qtsoftware.com" width: 640 height: 480 @@ -163,11 +160,8 @@ Item { onClicked: { proxy.focus=true } } } - properties: Property { - name: "progressOff" - value: 1 - type: "Real" - } + + property real progressOff : 1 states: [ State { name: "Normal" @@ -210,16 +204,8 @@ Item { anchors.left: parent.left anchors.right: parent.right - properties: Property { - name: "centerX" - value: 0 - type: "Real" - } - properties: Property { - name: "centerY" - value: 0 - type: "Real" - } + property real centerX : 0 + property real centerY : 0 WebView { id: WebView @@ -237,11 +223,7 @@ Item { onUrlChanged: { Flick.xPosition=0; Flick.yPosition=0; zoomOut() } onDoubleClick: { toggleZoom() } - properties: Property { - name: "zoomedOut" - type: "real" - value: 1 - } + property real zoomedOut : 1 } Rect { id: WebViewTint diff --git a/examples/declarative/dial/DialLibrary/Dial.qml b/examples/declarative/dial/DialLibrary/Dial.qml index fe8528d..485188a 100644 --- a/examples/declarative/dial/DialLibrary/Dial.qml +++ b/examples/declarative/dial/DialLibrary/Dial.qml @@ -1,11 +1,9 @@ Item { + property real value : 0 + width: 210 height: 210 - properties: Property { - name: "value" - type: "real" - value: 0 - } + Image { id: Background source: "background.svg" diff --git a/examples/declarative/follow/pong.qml b/examples/declarative/follow/pong.qml index 32ee049..582b04c 100644 --- a/examples/declarative/follow/pong.qml +++ b/examples/declarative/follow/pong.qml @@ -5,14 +5,14 @@ Rect { // Make a ball to bounce Rect { + // Add a property for the target y coordinate + property var targetY : Page.height-10 + property var direction : "right" + id: Ball color: "#00ee00" x: 20; width: 20; height: 20; z: 1 - // Add a property for the target y coordinate - properties: Property { name: "targetY"; value: Page.height-10 } - properties: Property { name: "direction"; value: "right" } - // Move the ball to the right and back to the left repeatedly x: SequentialAnimation { running: true; repeat: true diff --git a/examples/declarative/listview/content/MediaButton.qml b/examples/declarative/listview/content/MediaButton.qml index bb2510a..7aec2e4 100644 --- a/examples/declarative/listview/content/MediaButton.qml +++ b/examples/declarative/listview/content/MediaButton.qml @@ -1,11 +1,10 @@ Item { + property var text + id: Container signals: Signal { name: "clicked" } - properties: Property { - name: "text" - } Image { id: Image source: "pics/button.png" diff --git a/examples/declarative/listview/recipes.qml b/examples/declarative/listview/recipes.qml index db8604e..8863d1c 100644 --- a/examples/declarative/listview/recipes.qml +++ b/examples/declarative/listview/recipes.qml @@ -18,11 +18,8 @@ Rect { // We can bind multiple element's opacity to this one property, // rather than having a "SetProperty" line for each element we // want to fade. - properties: Property { - name: "detailsOpacity" - value: 0 - type: "real" - } + property real detailsOpacity : 0 + // A simple rounded rectangle for the background Rect { id: background diff --git a/examples/declarative/minehunt/Description.qml b/examples/declarative/minehunt/Description.qml index f59c8f9..0241ae5 100644 --- a/examples/declarative/minehunt/Description.qml +++ b/examples/declarative/minehunt/Description.qml @@ -1,9 +1,7 @@ Item { id: Page height: MyText.height + 20 - properties: Property { - name: "text" - } + property var text MouseRegion { anchors.fill: parent drag.target: Page diff --git a/examples/declarative/minehunt/Explosion.qml b/examples/declarative/minehunt/Explosion.qml index 8d868bc..2886559 100644 --- a/examples/declarative/minehunt/Explosion.qml +++ b/examples/declarative/minehunt/Explosion.qml @@ -1,9 +1,6 @@ Item { - properties: Property { - name: "explode" - type: "Bool" - value: false - } + property bool explode : false + Particles { width: 38 height: 21 diff --git a/examples/declarative/minehunt/minehunt.qml b/examples/declarative/minehunt/minehunt.qml index cde2612..58397b0 100644 --- a/examples/declarative/minehunt/minehunt.qml +++ b/examples/declarative/minehunt/minehunt.qml @@ -2,16 +2,10 @@ Item { id: field width: 370 height: 480 - properties: Property { - name: "clickx" - type: "Int" - value: 0 - } - properties: Property { - name: "clicky" - type: "Int" - value: 0 - } + + property int clickx : 0 + property int clicky : 0 + resources: [ Component { id: tile diff --git a/examples/declarative/scrollbar/ScrollBar.qml b/examples/declarative/scrollbar/ScrollBar.qml index e3ca0c2..929c72a 100644 --- a/examples/declarative/scrollbar/ScrollBar.qml +++ b/examples/declarative/scrollbar/ScrollBar.qml @@ -5,16 +5,10 @@ Item { // height of the page, i.e. a pageSize of 0.5 means that you can see 50% // of the height of the view. // orientation can be either 'Vertical' or 'Horizontal' - properties: Property { - name: "position" - } - properties: Property { - name: "pageSize" - } - properties: Property { - name: "orientation" - value: "Vertical" - } + property var position + property var pageSize + property var orientation : "Vertical" + // A light, semi-transparent background Rect { id: Background diff --git a/examples/declarative/slideswitch/Switch.qml b/examples/declarative/slideswitch/Switch.qml index 3ae7a0f..6777277 100644 --- a/examples/declarative/slideswitch/Switch.qml +++ b/examples/declarative/slideswitch/Switch.qml @@ -2,9 +2,9 @@ Item { id: Switch width: Groove.width height: Groove.height - properties: Property { - name: "on" - } + + property var on + Script { function toggle() { diff --git a/examples/declarative/tutorials/contacts/1_Drawing_and_Animation/GroupBox.qml b/examples/declarative/tutorials/contacts/1_Drawing_and_Animation/GroupBox.qml index 665c072..edaae72 100644 --- a/examples/declarative/tutorials/contacts/1_Drawing_and_Animation/GroupBox.qml +++ b/examples/declarative/tutorials/contacts/1_Drawing_and_Animation/GroupBox.qml @@ -2,12 +2,10 @@ FocusRealm { id: groupBox width: Math.max(270, subItem.width+40) height: Math.max(70, subItem.height+40) - properties: Property { - name: "contents" - } - properties: Property { - name: "label" - } + + property var contents + property var label + Rect { id: wrapper x: 5 diff --git a/examples/declarative/tutorials/contacts/2_Reuse/3/Contact.qml b/examples/declarative/tutorials/contacts/2_Reuse/3/Contact.qml index 33ac627..23560ce 100644 --- a/examples/declarative/tutorials/contacts/2_Reuse/3/Contact.qml +++ b/examples/declarative/tutorials/contacts/2_Reuse/3/Contact.qml @@ -2,6 +2,7 @@ Item { id: contactDetails width: 230 height: layout.height + properties: Property { name: "contactid" value: "" diff --git a/examples/declarative/tutorials/helloworld/t2/Cell.qml b/examples/declarative/tutorials/helloworld/t2/Cell.qml index bd5bbe7..0109251 100644 --- a/examples/declarative/tutorials/helloworld/t2/Cell.qml +++ b/examples/declarative/tutorials/helloworld/t2/Cell.qml @@ -1,10 +1,10 @@ Item { + property var color + id: CellContainer width: 40 height: 25 - properties: Property { - name: "color" - } + Rect { anchors.fill: parent color: CellContainer.color diff --git a/examples/declarative/tutorials/helloworld/t3/Cell.qml b/examples/declarative/tutorials/helloworld/t3/Cell.qml index bd5bbe7..e779406 100644 --- a/examples/declarative/tutorials/helloworld/t3/Cell.qml +++ b/examples/declarative/tutorials/helloworld/t3/Cell.qml @@ -1,10 +1,9 @@ Item { + property var color + id: CellContainer width: 40 height: 25 - properties: Property { - name: "color" - } Rect { anchors.fill: parent color: CellContainer.color diff --git a/examples/declarative/velocity/Day.qml b/examples/declarative/velocity/Day.qml index 7d26e88..c70a211 100644 --- a/examples/declarative/velocity/Day.qml +++ b/examples/declarative/velocity/Day.qml @@ -1,16 +1,12 @@ Rect { + property string day + property var stickies + width: 400 height: 500 radius: 7 pen.color: "black" id: Page - properties: Property { - name: "day" - type: "string" - } - properties: Property { - name: "stickies" - } Image { x: 10 y: 10 diff --git a/examples/declarative/webview/content/SpinSquare.qml b/examples/declarative/webview/content/SpinSquare.qml index 5c14506..5e4735e 100644 --- a/examples/declarative/webview/content/SpinSquare.qml +++ b/examples/declarative/webview/content/SpinSquare.qml @@ -1,13 +1,8 @@ Item { + properties var period : 250 + properties var color : "black" id: Root - properties: Property { - name: "period" - value: 250 - } - properties: Property { - name: "color" - value: "black" - } + Item { x: Root.width/2 y: Root.height/2 -- cgit v0.12 From 1fbb8472ccb3fe7c1c92e960e37f31b7077f999f Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Fri, 1 May 2009 18:26:02 +1000 Subject: Use QML signal syntax --- demos/declarative/phonebrowser/content/MediaButton.qml | 4 +--- demos/declarative/phonebrowser/content/PhoneInfoContainer.qml | 3 +-- demos/declarative/phonebrowser/content/Star.qml | 4 +--- examples/declarative/listview/content/MediaButton.qml | 4 +--- 4 files changed, 4 insertions(+), 11 deletions(-) diff --git a/demos/declarative/phonebrowser/content/MediaButton.qml b/demos/declarative/phonebrowser/content/MediaButton.qml index 7aec2e4..cad36bd 100644 --- a/demos/declarative/phonebrowser/content/MediaButton.qml +++ b/demos/declarative/phonebrowser/content/MediaButton.qml @@ -1,10 +1,8 @@ Item { property var text + signal clicked id: Container - signals: Signal { - name: "clicked" - } Image { id: Image source: "pics/button.png" diff --git a/demos/declarative/phonebrowser/content/PhoneInfoContainer.qml b/demos/declarative/phonebrowser/content/PhoneInfoContainer.qml index 597c3ee..ea20d4e 100644 --- a/demos/declarative/phonebrowser/content/PhoneInfoContainer.qml +++ b/demos/declarative/phonebrowser/content/PhoneInfoContainer.qml @@ -8,8 +8,7 @@ Flipable { property var phoneSpecifications : "" property var phoneUrl : "" property var rating : 2 - - signals: Signal { name: "closed" } + signal closed axis: Axis { startX: Container.width / 2; endX: Container.width / 2; endY: 1 } diff --git a/demos/declarative/phonebrowser/content/Star.qml b/demos/declarative/phonebrowser/content/Star.qml index d53c529..cdbb28b 100644 --- a/demos/declarative/phonebrowser/content/Star.qml +++ b/demos/declarative/phonebrowser/content/Star.qml @@ -1,14 +1,12 @@ Item { property var rating property var on + signal clicked id: Container width: 24 height: 24 - signals: Signal { - name: "clicked" - } Image { id: Image source: "pics/ghns_star.png" diff --git a/examples/declarative/listview/content/MediaButton.qml b/examples/declarative/listview/content/MediaButton.qml index 7aec2e4..cad36bd 100644 --- a/examples/declarative/listview/content/MediaButton.qml +++ b/examples/declarative/listview/content/MediaButton.qml @@ -1,10 +1,8 @@ Item { property var text + signal clicked id: Container - signals: Signal { - name: "clicked" - } Image { id: Image source: "pics/button.png" -- cgit v0.12 From 5a4c65819d162f5c9bba6d25a52522d8ed5d1ddc Mon Sep 17 00:00:00 2001 From: Roberto Raggi Date: Mon, 4 May 2009 10:34:56 +0200 Subject: Fixed 5 shift/reduce conflicts introduced by T_SIGNAL and T_PROPERTY. --- src/declarative/qml/parser/javascript.g | 32 +- src/declarative/qml/parser/javascriptgrammar.cpp | 1119 +++++++++++----------- src/declarative/qml/parser/javascriptgrammar_p.h | 12 +- src/declarative/qml/parser/javascriptparser.cpp | 47 +- 4 files changed, 582 insertions(+), 628 deletions(-) diff --git a/src/declarative/qml/parser/javascript.g b/src/declarative/qml/parser/javascript.g index f1d8826..0da7571 100644 --- a/src/declarative/qml/parser/javascript.g +++ b/src/declarative/qml/parser/javascript.g @@ -45,7 +45,7 @@ %parser JavaScriptGrammar %decl javascriptparser_p.h %impl javascriptparser.cpp -%expect 8 +%expect 2 %expect-rr 1 %token T_AND "&" T_AND_AND "&&" T_AND_EQ "&=" @@ -86,7 +86,7 @@ %token T_IMPORT "import" %nonassoc SHIFT_THERE -%nonassoc T_IDENTIFIER T_COLON +%nonassoc T_IDENTIFIER T_COLON T_SIGNAL T_PROPERTY %nonassoc REDUCE_HERE %start UiProgram @@ -737,9 +737,8 @@ case $rule_number: { ./ UiQualifiedId: T_RESERVED_WORD ; -/. -case $rule_number: -./ +/.case $rule_number: ./ + UiQualifiedId: T_RETURN ; /. case $rule_number: @@ -751,6 +750,7 @@ case $rule_number: ./ JsIdentifier: T_IDENTIFIER; + JsIdentifier: T_PROPERTY ; /. case $rule_number: { @@ -759,6 +759,7 @@ case $rule_number: { break; } ./ + JsIdentifier: T_SIGNAL ; /. case $rule_number: { @@ -1043,6 +1044,8 @@ case $rule_number: { ./ PropertyName: T_SIGNAL ; +/.case $rule_number:./ + PropertyName: T_PROPERTY ; /. case $rule_number: { @@ -2445,6 +2448,8 @@ case $rule_number: { ./ LabelledStatement: T_SIGNAL T_COLON Statement ; +/.case $rule_number:./ + LabelledStatement: T_PROPERTY T_COLON Statement ; /. case $rule_number: { @@ -2535,22 +2540,7 @@ case $rule_number: { } break; ./ -FunctionDeclaration: T_FUNCTION T_SIGNAL T_LPAREN FormalParameterListOpt T_RPAREN T_LBRACE FunctionBodyOpt T_RBRACE ; -FunctionDeclaration: T_FUNCTION T_PROPERTY T_LPAREN FormalParameterListOpt T_RPAREN T_LBRACE FunctionBodyOpt T_RBRACE ; -/. -case $rule_number: { - AST::FunctionDeclaration *node = makeAstNode (driver->nodePool(), driver->intern(lexer->characterBuffer(), lexer->characterCount()), sym(4).FormalParameterList, sym(7).FunctionBody); - node->functionToken = loc(1); - node->identifierToken = loc(2); - node->lparenToken = loc(3); - node->rparenToken = loc(5); - node->lbraceToken = loc(6); - node->rbraceToken = loc(8); - sym(1).Node = node; -} break; -./ - -FunctionDeclaration: T_FUNCTION T_IDENTIFIER T_LPAREN FormalParameterListOpt T_RPAREN T_LBRACE FunctionBodyOpt T_RBRACE ; +FunctionDeclaration: T_FUNCTION JsIdentifier T_LPAREN FormalParameterListOpt T_RPAREN T_LBRACE FunctionBodyOpt T_RBRACE ; /. case $rule_number: { AST::FunctionDeclaration *node = makeAstNode (driver->nodePool(), sym(2).sval, sym(4).FormalParameterList, sym(7).FunctionBody); diff --git a/src/declarative/qml/parser/javascriptgrammar.cpp b/src/declarative/qml/parser/javascriptgrammar.cpp index b42f419..a33f343 100644 --- a/src/declarative/qml/parser/javascriptgrammar.cpp +++ b/src/declarative/qml/parser/javascriptgrammar.cpp @@ -84,9 +84,9 @@ const int JavaScriptGrammar::lhs [] = { 157, 157, 157, 157, 157, 158, 158, 158, 158, 159, 159, 159, 159, 160, 160, 161, 163, 178, 178, 181, 181, 179, 179, 182, 180, 162, 162, 162, 164, 164, - 165, 165, 165, 183, 184, 166, 166, 107, 107, 107, - 121, 188, 188, 185, 185, 186, 186, 189, 190, 190, - 191, 191, 187, 187, 113, 113, 192}; + 165, 165, 165, 183, 184, 166, 166, 107, 121, 188, + 188, 185, 185, 186, 186, 189, 190, 190, 191, 191, + 187, 187, 113, 113, 192}; const int JavaScriptGrammar:: rhs[] = { 2, 1, 1, 1, 2, 3, 3, 0, 1, 2, @@ -118,9 +118,9 @@ const int JavaScriptGrammar:: rhs[] = { 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, 8, - 8, 1, 3, 0, 1, 0, 1, 1, 1, 2, - 1, 1, 0, 1, 0, 1, 2}; + 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, @@ -128,8 +128,8 @@ const int JavaScriptGrammar::action_default [] = { 41, 241, 9, 1, 0, 0, 36, 0, 29, 28, 27, 0, 32, 0, 143, 210, 174, 182, 178, 122, 194, 170, 34, 107, 45, 123, 186, 190, 111, 140, - 121, 126, 106, 160, 147, 0, 51, 52, 48, 313, - 39, 315, 63, 0, 0, 0, 0, 0, 46, 49, + 121, 126, 106, 160, 147, 0, 51, 52, 48, 311, + 39, 313, 63, 0, 0, 0, 0, 0, 46, 49, 0, 0, 40, 41, 50, 44, 0, 47, 0, 0, 136, 0, 0, 123, 142, 125, 124, 0, 0, 0, 138, 139, 137, 141, 0, 171, 0, 0, 0, 0, @@ -143,12 +143,12 @@ const int JavaScriptGrammar::action_default [] = { 0, 120, 114, 0, 207, 200, 198, 205, 206, 204, 203, 209, 202, 201, 199, 208, 195, 0, 183, 0, 0, 187, 0, 0, 191, 0, 0, 117, 109, 0, - 108, 0, 113, 127, 0, 314, 304, 305, 0, 302, - 0, 303, 0, 306, 218, 225, 224, 232, 220, 0, - 221, 307, 0, 312, 222, 223, 228, 226, 309, 308, - 311, 229, 0, 0, 0, 0, 0, 313, 39, 0, - 315, 40, 212, 254, 41, 0, 0, 0, 0, 0, - 230, 231, 219, 227, 255, 256, 301, 310, 0, 270, + 108, 0, 113, 127, 0, 312, 302, 303, 0, 300, + 0, 301, 0, 304, 218, 225, 224, 232, 220, 0, + 221, 305, 0, 310, 222, 223, 228, 226, 307, 306, + 309, 229, 0, 0, 0, 0, 0, 311, 39, 0, + 313, 40, 212, 254, 41, 0, 0, 0, 0, 0, + 230, 231, 219, 227, 255, 256, 299, 308, 0, 270, 271, 272, 273, 0, 266, 267, 268, 269, 296, 297, 0, 0, 0, 0, 0, 259, 260, 216, 214, 176, 184, 180, 196, 172, 217, 0, 123, 188, 192, 165, @@ -158,612 +158,589 @@ const int JavaScriptGrammar::action_default [] = { 197, 212, 213, 0, 212, 0, 0, 262, 0, 0, 0, 264, 0, 185, 0, 0, 189, 0, 0, 193, 252, 0, 244, 253, 247, 0, 251, 0, 212, 245, - 0, 212, 0, 0, 263, 0, 0, 0, 265, 39, - 40, 41, 304, 0, 0, 306, 0, 300, 304, 0, - 0, 306, 0, 299, 304, 0, 0, 306, 0, 298, - 0, 288, 0, 0, 0, 258, 0, 257, 0, 316, - 0, 72, 234, 237, 0, 73, 240, 76, 101, 78, - 79, 48, 83, 84, 39, 85, 88, 46, 49, 40, - 212, 41, 50, 91, 44, 93, 47, 95, 96, 241, - 98, 99, 103, 0, 65, 0, 0, 67, 71, 69, - 57, 68, 70, 0, 66, 56, 235, 233, 111, 112, - 117, 0, 110, 0, 287, 0, 274, 275, 0, 286, - 0, 0, 0, 277, 282, 280, 283, 0, 0, 281, - 282, 0, 278, 0, 279, 236, 285, 0, 236, 284, - 0, 289, 290, 0, 236, 291, 292, 0, 0, 293, - 0, 0, 0, 294, 295, 129, 128, 0, 0, 0, - 261, 0, 0, 0, 276, 0, 64, 0, 61, 63, - 54, 0, 60, 55, 62, 59, 53, 0, 58, 133, - 131, 135, 132, 130, 134, 0, 0, 0, 0, 18, - 13, 0, 14, 10, 0, 31, 0, 33, 30, 0, - 0, 26, 39, 63, 21, 0, 24, 16, 39, 0, - 11, 0, 17, 0, 20, 12, 0, 25, 39, 63, - 15, 0, 19, 22, 23, 43, 249, 242, 0, 250, - 246, 0, 248, 238, 0, 239, 243, 317}; + 0, 212, 0, 0, 263, 0, 0, 0, 265, 312, + 302, 0, 0, 304, 0, 298, 0, 288, 0, 0, + 0, 258, 0, 257, 0, 314, 0, 72, 234, 237, + 0, 73, 240, 76, 101, 78, 79, 48, 83, 84, + 39, 85, 88, 46, 49, 40, 212, 41, 50, 91, + 44, 93, 47, 95, 96, 241, 98, 99, 103, 0, + 65, 0, 0, 67, 71, 69, 57, 68, 70, 0, + 66, 56, 235, 233, 111, 112, 117, 0, 110, 0, + 287, 0, 274, 275, 0, 286, 0, 0, 0, 277, + 282, 280, 283, 0, 0, 281, 282, 0, 278, 0, + 279, 236, 285, 0, 236, 284, 0, 289, 290, 0, + 236, 291, 292, 0, 0, 293, 0, 0, 0, 294, + 295, 129, 128, 0, 0, 0, 261, 0, 0, 0, + 276, 0, 64, 0, 61, 63, 54, 0, 60, 55, + 62, 59, 53, 0, 58, 133, 131, 135, 132, 130, + 134, 0, 0, 18, 13, 0, 14, 10, 0, 31, + 0, 33, 30, 0, 0, 26, 39, 63, 21, 0, + 24, 16, 39, 0, 11, 0, 17, 0, 20, 12, + 0, 25, 39, 63, 15, 0, 19, 22, 23, 43, + 249, 242, 0, 250, 246, 0, 248, 238, 0, 239, + 243, 315}; const int JavaScriptGrammar::goto_default [] = { - 6, 5, 23, 1, 4, 3, 22, 539, 540, 519, - 24, 535, 536, 230, 524, 219, 223, 252, 44, 52, - 497, 495, 390, 389, 35, 496, 388, 391, 130, 48, + 6, 5, 23, 1, 4, 3, 22, 523, 524, 503, + 24, 519, 520, 378, 508, 219, 11, 252, 44, 52, + 483, 481, 376, 375, 35, 482, 374, 377, 130, 48, 43, 168, 50, 39, 167, 45, 51, 80, 49, 34, 54, 53, 289, 41, 283, 36, 279, 38, 281, 37, - 280, 46, 287, 47, 288, 40, 282, 278, 319, 445, + 280, 46, 287, 47, 288, 40, 282, 278, 319, 431, 284, 285, 214, 218, 220, 224, 225, 216, 215, 227, - 253, 226, 231, 250, 251, 217, 394, 393, 25, 558, - 557, 341, 342, 560, 344, 559, 343, 453, 457, 460, - 456, 455, 475, 476, 208, 222, 204, 207, 221, 229, + 253, 226, 231, 250, 251, 217, 380, 379, 25, 542, + 541, 341, 342, 544, 344, 543, 343, 439, 443, 446, + 442, 441, 461, 462, 208, 222, 204, 207, 221, 229, 228, 0}; const int JavaScriptGrammar::action_index [] = { - -13, -91, 64, -91, 63, 406, 96, 108, -91, -91, - -91, -91, -91, -91, 60, 146, 68, 189, -91, -91, - 71, -91, -91, 383, 151, 178, -91, 208, -91, -91, - -91, 44, 62, 686, 101, -91, 81, 41, 10, 261, - -91, 288, 70, -91, -91, 527, 95, 86, 265, 235, - -91, -91, -91, 439, 237, 686, -91, -91, -91, 173, - -91, 1184, 98, 686, 686, 686, 606, 686, -91, -91, - 686, 686, -91, -91, -91, -91, 686, -91, 686, 686, - -91, 686, 686, 74, 147, -91, -91, 686, 686, 686, - -91, -91, -91, 203, 686, 290, 686, 686, 686, 686, - 365, 686, 686, 686, 686, 686, 686, 237, 686, 686, - 686, 82, 79, 77, 303, 231, 198, 197, 237, 439, - 355, 439, 686, 65, 686, 92, 1097, 686, 686, -91, + 62, -91, -18, -91, -40, 362, 44, 117, -91, -91, + -91, -91, -91, -91, -12, 144, 20, 130, -91, -91, + 14, -91, -91, 356, 127, 195, -91, 158, -91, -91, + -91, 11, 34, 678, 125, -91, 41, -9, -27, 204, + -91, 263, 58, -91, -91, 519, 61, 63, 220, 131, + -91, -91, -91, 330, 159, 678, -91, -91, -91, 154, + -91, 1176, 53, 678, 678, 678, 598, 678, -91, -91, + 678, 678, -91, -91, -91, -91, 678, -91, 678, 678, + -91, 678, 678, 118, 221, -91, -91, 678, 678, 678, + -91, -91, -91, 217, 678, 269, 678, 678, 678, 678, + 311, 678, 678, 678, 678, 678, 678, 228, 678, 678, + 678, 104, 65, 64, 187, 164, 214, 295, 295, 431, + 431, 345, 678, -7, 678, 90, 1089, 678, 678, -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, -91, 124, 686, -91, -91, 171, 61, -91, - 686, -91, -91, 686, -91, -91, -91, -91, -91, -91, - -91, -91, -91, -91, -91, -91, -91, 686, 66, 686, - 686, 97, 91, 686, -91, 1097, 686, 686, -91, 117, - -91, 14, -91, -91, 40, -91, 182, 69, 43, -91, - 236, -91, 47, 1445, -91, -91, -91, -91, -91, 209, - -91, -91, 32, -91, -91, -91, -91, -91, -91, 1445, - -91, -91, 310, 308, 83, 1358, 35, 217, 72, 58, - 1706, 85, 686, -91, 76, 59, 686, 51, 50, 55, - -91, -91, -91, -91, -91, -91, -91, -91, 120, -91, - -91, -91, -91, 125, -91, -91, -91, -91, -91, -91, - 42, 49, 686, 148, 127, -91, -91, 766, -91, 80, - 54, -14, -91, 267, 57, 11, 507, 88, 114, 371, - 303, 164, 686, 271, 686, 686, 686, 686, 371, 686, - 686, 686, 686, 686, 237, 237, 230, 303, 234, 371, - 371, 371, 686, -40, 686, -1, 686, -91, 527, 686, - -91, 686, -4, -51, 686, -57, 1358, -91, 686, 139, - 1358, -91, 686, -39, 686, 686, 88, -2, 686, -91, - 0, 134, -18, -91, -91, 686, -91, 221, 686, -91, - -50, 686, -45, 1358, -91, 686, 149, 1358, -91, -30, - -29, -28, 162, -48, -31, 1445, -54, -91, 176, -42, - 12, 1445, -5, -91, 238, -6, 23, 1445, 3, -91, - 1358, -91, 686, 105, 1358, 33, 1358, -91, 36, 38, - -7, -91, -91, 1358, 7, 285, 56, 292, 93, 686, - 1358, 9, 31, 282, 53, 30, 606, 46, 48, 52, - 930, 37, 17, -10, 21, 686, 20, -8, 686, 16, - 686, -17, -16, 686, -91, 1271, 15, -91, -91, -91, - -91, -91, -91, 686, -91, -91, -91, -91, 156, -91, - 686, 8, -91, 1358, -91, 99, -91, -91, 1358, -91, - 686, 102, 2, -91, 27, -91, 26, 94, 686, -91, - 24, 29, -91, -15, -91, 1358, -91, 100, 1358, -91, - 192, -91, -91, 103, 1358, 19, -91, 5, 4, -91, - 185, -27, 1, -91, -91, -91, -91, 686, 112, 1358, - -91, 686, 123, 1358, -91, 107, 22, 846, -91, 13, - -91, 1010, -91, -91, -91, -91, -91, 116, -91, -91, - -91, -91, -91, -91, -91, 6, 25, 34, 429, -91, - -91, 426, -91, -91, 28, 45, 686, 39, -91, 1619, - 212, -91, 104, 356, -91, 73, -91, -91, 18, 145, - -91, 131, -91, 296, -91, -91, 1532, -91, 141, 332, - -91, 142, -91, -91, -91, -91, -3, -91, 159, -91, - -91, 686, -91, -91, 167, -91, -91, -91, + -91, -91, -91, 113, 678, -91, -91, 42, -8, -91, + 678, -91, -91, 678, -91, -91, -91, -91, -91, -91, + -91, -91, -91, -91, -91, -91, -91, 678, 22, 678, + 678, 29, 5, 678, -91, 1089, 678, 678, -91, 110, + -91, 51, -91, -91, 36, -91, 184, 85, 60, -91, + 151, -91, 56, 1437, -91, -91, -91, -91, -91, 166, + -91, -91, 28, -91, -91, -91, -91, -91, -91, 1437, + -91, -91, 290, 244, 102, 1350, 49, 178, 73, 39, + 1698, 70, 678, -91, 72, 46, 678, 43, 37, 38, + -91, -91, -91, -91, -91, -91, -91, -91, 68, -91, + -91, -91, -91, 71, -91, -91, -91, -91, -91, -91, + 50, 54, 678, 88, 66, -91, -91, 842, -91, 87, + 47, 45, -91, 257, 59, 26, 486, 84, 146, 363, + 295, 205, 678, 249, 678, 678, 678, 678, 363, 678, + 678, 678, 678, 678, 295, 295, 295, 295, 295, 293, + 363, 363, 678, -21, 678, 18, 678, -91, 519, 678, + -91, 678, 13, -37, 678, -38, 1350, -91, 678, 98, + 1350, -91, 678, -28, 678, 678, 16, 8, 678, -91, + 0, 229, -15, -91, -91, 678, -91, 219, 678, -91, + -34, 678, -32, 1350, -91, 678, 89, 1350, -91, -6, + 197, -24, 1, 1437, -23, -91, 1350, -91, 678, 94, + 1350, 17, 1350, -91, 6, 15, -26, -91, -91, 1350, + -30, 231, 7, 278, 76, 678, 1350, -5, -36, 260, + -3, -29, 598, -4, -1, -91, 762, -91, 3, 19, + 4, 678, -2, -25, 678, 2, 678, -35, -10, 678, + -91, 1263, 52, -91, -91, -91, -91, -91, -91, 678, + -91, -91, -91, -91, 167, -91, 678, 21, -91, 1350, + -91, 74, -91, -91, 1350, -91, 678, 91, 25, -91, + 105, -91, 105, 97, 678, -91, 105, 55, -91, 23, + -91, 1350, -91, 101, 1350, -91, 208, -91, -91, 92, + 1350, 40, -91, 33, 35, -91, 180, 24, 31, -91, + -91, -91, -91, 678, 86, 1350, -91, 678, 93, 1350, + -91, 106, 57, 922, -91, 48, -91, 1002, -91, -91, + -91, -91, -91, 132, -91, -91, -91, -91, -91, -91, + -91, 10, 424, -91, -91, 421, -91, -91, 9, 30, + 678, 27, -91, 1611, 156, -91, 134, 342, -91, 95, + -91, -91, 12, 116, -91, 124, -91, 270, -91, -91, + 1524, -91, 112, 352, -91, 114, -91, -91, -91, -91, + 32, -91, 169, -91, -91, 678, -91, -91, 139, -91, + -91, -91, - -102, -102, -102, -102, -4, 194, -102, -102, -102, -102, + -102, -102, -102, -102, 34, 63, -102, -102, -102, -102, + -102, -102, -102, -102, -102, 53, -102, -102, -102, -102, + -102, -102, -102, 235, -102, 9, -102, 4, -102, -102, + -102, -102, -102, -5, -102, -102, -102, -102, -102, -102, + -102, -102, -102, -102, -102, -51, -102, -102, -102, -102, + -102, -102, -102, -102, -102, 156, -102, -102, -102, 18, + -102, -102, -102, -11, 95, 88, 90, 79, -102, -102, + 80, 100, -102, -102, -102, -102, 114, -102, 101, 107, + -102, 73, 131, -102, -102, -102, -102, 108, 111, 115, + -102, -102, -102, -102, 165, -102, 83, 85, 118, 71, + -102, 120, 144, 145, 143, 147, 159, -102, 122, 129, + 66, -102, -102, -102, -102, -102, -102, -102, -102, -102, + -102, -102, 41, -102, 65, -102, 77, 26, 19, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, - -102, -102, -102, 345, -102, 2, -102, 3, -102, -102, - -102, -102, -102, -7, -102, -102, -102, -102, -102, -102, - -102, -102, -102, -102, -102, -49, -102, -102, -102, -102, - -102, -102, -102, -102, -102, 154, -102, -102, -102, 6, - -102, -102, -102, 7, 143, 140, 141, 155, -102, -102, - 97, 101, -102, -102, -102, -102, 79, -102, 83, 108, - -102, 133, 125, -102, -102, -102, -102, 118, 111, 59, - -102, -102, -102, -102, 104, -102, 115, 123, 126, 124, - -102, 122, 102, 89, 82, 95, 165, -102, 80, 146, - 148, -102, -102, -102, -102, -102, -102, -102, -102, -102, - -102, -102, 149, -102, 153, -102, 249, 43, 35, -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, 27, -102, -102, -102, -102, -102, + 28, -102, -102, 42, -102, -102, -102, -102, -102, -102, + -102, -102, -102, -102, -102, -102, -102, 139, -102, 138, + -1, -102, -102, 1, -102, 230, -10, 55, -102, -102, + -102, -102, -102, -102, -102, -102, -3, -102, -102, -102, + -4, -102, -102, 86, -102, -102, -102, -102, -102, -102, + -102, -102, -102, -102, -102, -102, -102, -102, -102, 254, + -102, -102, 56, 50, -102, 46, -102, -6, -102, -102, + -102, -102, -2, -102, -102, -102, 17, -28, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, - -102, -102, -102, -102, 16, -102, -102, -102, -102, -102, - 21, -102, -102, 17, -102, -102, -102, -102, -102, -102, - -102, -102, -102, -102, -102, -102, -102, 74, -102, 34, - 48, -102, -102, 44, -102, 220, 49, 81, -102, -102, - -102, -102, -102, -102, -102, -102, 55, -102, -102, -102, - 52, -102, -102, -102, -102, -102, -102, -102, -102, -102, - -102, -102, -102, -102, -102, -102, -102, -102, -102, -43, - -102, -102, 56, 20, -102, 15, -102, 57, -102, -102, - 65, -102, 46, -102, -102, -102, 50, -6, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, + -102, -102, 5, -102, -102, -102, -102, 146, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, - -102, -102, 51, -102, -102, -102, -102, 60, -102, -102, + -102, 43, 225, -102, 237, 226, 197, 196, -102, 127, + 136, 137, 135, 93, -102, -102, -102, -102, -102, -102, + -102, -102, 174, -102, 180, -102, 170, -102, -102, 183, + -102, 68, -102, -102, 70, -102, 49, -102, 48, -102, + 47, -102, 193, -102, 161, 219, -102, -102, 189, -102, + -102, -102, -102, -102, -102, 190, -102, 59, 72, -102, + -102, 75, -102, 57, -102, 58, -102, 51, -102, -102, + 64, -102, -102, 203, -102, -102, 44, -102, 32, -102, + 31, -102, 29, -102, -102, -102, -102, -102, -102, 40, + -102, 37, -102, 38, -102, 61, 36, -102, -102, 30, + -102, -102, 62, -102, -102, -102, 35, -102, -102, -102, + -102, 39, -102, 3, 128, -102, 155, -102, -102, 22, + -102, 14, -102, -102, -102, -102, -102, -102, -102, 13, + -102, -102, -102, -102, -102, -102, 123, -102, -102, 45, + -102, -102, -102, -102, 25, -102, 52, -102, -102, -102, + -102, -102, -80, -102, 54, -102, -72, -102, -102, -102, + -102, -73, -102, -102, -76, -102, -102, -102, -102, -102, + -102, -87, -102, -102, -45, -102, 12, -102, -31, -102, + -102, -102, -102, 20, -102, 15, -102, 98, -102, 6, + -102, -102, -102, 0, -102, 2, -102, -16, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, - -102, 58, 219, -102, 216, 191, 201, 182, -102, 62, - 63, 71, 73, 64, -102, -102, -102, -102, -102, -102, - -102, -102, 181, -102, 199, -102, 200, -102, -102, 192, - -102, 68, -102, -102, 69, -102, 31, -102, 27, -102, - 22, -102, 159, -102, 167, 166, -102, -102, 173, -102, - -102, -102, -102, -102, -102, 180, -102, 72, 67, -102, - -102, 66, -102, 42, -102, 45, -102, 38, -102, -102, - -102, -102, 75, -102, -102, -65, -102, -102, 92, -102, - -102, -62, -102, -102, 103, -102, -102, -61, -102, -102, - 36, -102, 33, -102, 39, -102, 41, -102, -102, -102, - -102, -102, -102, 40, -102, 32, -102, 29, -102, 137, - 18, -102, -102, 19, -102, -102, 147, -102, -102, -102, - 24, -102, -102, -102, -102, 28, -102, -16, 158, -102, - 96, -102, -102, 53, -102, 37, -102, -102, -102, -102, - -102, -102, -102, 47, -102, -102, -102, -102, -102, -102, - 120, -102, -102, 54, -102, -102, -102, -102, -1, -102, - -10, -102, -102, -102, -102, -102, -91, -102, -13, -102, - -77, -102, -102, -102, -102, 76, -102, -102, 127, -102, - -102, -102, -102, -102, 13, -78, -102, -102, -35, -102, - 14, -102, -48, -102, -102, -102, -102, 4, -102, 8, - -102, 1, -102, 0, -102, -102, -102, 12, -102, 5, - -102, -17, -102, -102, -102, -102, -102, -102, -102, -102, - -102, -102, -102, -102, -102, -102, -102, -102, 253, -102, - -102, 345, -102, -102, -102, -102, -9, -102, -102, 10, - 11, -102, 98, 70, -102, -102, -102, -102, 9, -102, - -102, -102, -102, 234, -102, -102, -3, -102, -5, 243, - -102, -102, -102, -102, -102, -102, -102, -102, -102, -102, - -102, -21, -102, -102, 61, -102, -102, -102}; + -102, -102, 232, -102, -102, 238, -102, -102, -102, -102, + 11, -102, -102, 16, -9, -102, -7, 74, -102, -102, + -102, -102, 24, -102, -102, -102, -102, 194, -102, -102, + 8, -102, -8, 188, -102, -102, -102, -102, -102, -102, + -102, -102, -102, -102, -102, 21, -102, -102, 60, -102, + -102, -102}; const int JavaScriptGrammar::action_info [] = { - 292, 367, 365, 326, 164, 338, 362, 368, 374, 312, - 324, 351, 364, 355, 561, 353, -81, 345, 370, 487, - 491, 498, 433, -97, -70, 474, 450, -94, -92, 458, - 504, 458, 458, 482, 474, 454, 465, 474, 314, 478, - 464, 480, 362, 423, 448, 371, 425, 164, 435, 386, - 373, 518, 526, -89, 376, -71, 377, 525, 379, 443, - -67, 368, 437, -100, 314, 316, 382, 277, 442, 33, - 374, 277, 321, 32, 202, 2, 206, 210, 164, 380, - 213, 292, 94, 448, 474, 272, 487, 256, 124, 122, - 332, 491, 443, 94, 382, 450, 567, 187, 193, 187, - 528, 518, 312, 212, 461, 0, 498, 468, 164, 477, - 164, 380, 0, 164, 122, 499, 85, 81, 271, 81, - 164, 172, 81, 478, 164, 164, 27, 86, 82, 7, - 82, 164, 164, 82, 554, 553, 189, 518, 546, 0, - 190, 81, 347, 124, 269, 268, 530, 164, 380, 462, - 543, 2, 82, 543, 269, 268, 164, 164, 529, 87, - 447, 446, 452, 500, 334, 384, 530, 564, 335, 9, - 8, 195, 489, 200, 518, 515, 508, 0, 0, 170, - 165, 262, 261, 493, 0, 0, 267, 266, 276, 275, - 196, 60, 440, 60, 0, 348, 60, 0, 552, 330, - 164, 544, 60, 0, 88, 60, 0, 60, 274, 357, - 89, 60, 516, 517, 60, 87, 0, 164, 28, 0, - 565, 563, 108, 108, 109, 109, 0, 0, 72, 73, - 72, 73, 0, 72, 73, 110, 110, 28, 0, 72, - 73, 60, 72, 73, 72, 73, 359, 87, 72, 73, - 60, 72, 73, 472, 471, 108, 108, 109, 109, 108, - 88, 109, 108, 30, 109, 60, 89, 60, 110, 110, - 255, 254, 110, 0, 29, 110, 126, 0, 72, 73, - 195, 0, 30, 360, 361, 294, 295, 72, 73, 294, - 295, 0, 88, 29, 0, 127, 0, 128, 89, 196, - 0, 197, 72, 73, 72, 73, 96, 97, 96, 97, - 0, 60, 296, 297, 60, 0, 296, 297, -313, 0, - 0, 60, 0, 0, 0, 538, 0, 0, 108, 0, - 109, 0, 0, 98, 99, 98, 99, 60, 0, 60, - 498, 110, 0, 0, 0, 0, 260, 259, 72, 73, - 0, 72, 73, 265, 264, 19, 0, 0, 72, 73, - 0, 538, 72, 73, 498, 0, 0, 0, 0, 265, - 264, 260, 259, 0, 72, 73, 72, 73, 101, 102, - 0, 18, 0, 0, 0, 538, 103, 104, 101, 102, - 105, 19, 106, 14, 299, 300, 103, 104, 72, 73, - 105, 0, 106, 301, 0, 15, 302, 0, 303, 0, - 0, 0, 16, 0, 0, 19, 14, 18, 0, 0, - 0, 0, 72, 73, 0, 0, 0, 0, 15, 0, - 0, 0, 0, 0, 0, 16, 14, 0, 0, 14, - 0, 18, 19, 0, 0, 0, 0, 0, 15, 17, - 20, 15, 0, 0, 0, 16, 0, 21, 16, 0, - 0, 0, 101, 102, 0, 19, 13, 0, 18, 0, - 103, 104, 17, 20, 105, 0, 106, 0, 0, 0, - 21, 522, 0, 0, 520, 19, 0, 0, 19, 13, - 0, 18, 17, 20, 0, 17, 20, 0, 0, 0, - 21, 0, 0, 21, 0, 0, 0, 0, 0, 13, - 174, 18, 13, 0, 18, 0, 0, 0, 0, 0, - 175, 0, 0, 0, 176, 0, 0, 0, 0, 0, - 174, 0, 0, 177, 0, 178, 0, 0, 328, 0, - 175, 0, 0, 0, 176, 0, 179, 0, 180, 85, - 0, 0, 0, 177, 0, 178, 181, 0, 0, 182, - 86, 0, 0, 0, 0, 183, 179, 0, 180, 85, - 0, 184, 0, 0, 0, 0, 181, 0, 0, 182, - 86, 0, 0, 0, 0, 183, 185, 0, 0, 0, - 0, 184, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 185, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 56, 57, - 0, 0, 0, 0, 0, 0, 0, 0, 59, 0, - 0, 0, 0, 0, 0, 60, 0, 0, 0, 61, - 62, 0, 63, 0, 0, 0, 0, 0, 0, 66, - 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 74, 72, 73, 0, 75, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 68, 77, 58, 0, - 0, 0, 0, 0, 0, 0, 0, 55, 56, 57, - 0, 0, 0, 0, 0, 0, 0, 0, 59, 0, - 0, 0, 0, 0, 0, 60, 0, 0, 0, 61, - 62, 0, 63, 0, 0, 0, 64, 0, 65, 66, - 67, 0, 0, 69, 0, 0, 0, 70, 0, 71, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 74, 72, 73, 0, 75, 0, 76, 0, 78, - 0, 79, 0, 0, 0, 0, 68, 77, 58, 0, - 0, 0, 0, 0, 0, 0, 0, 55, 56, 57, - 0, 0, 0, 0, 0, 0, 0, 0, 59, 0, - 0, 0, 0, 0, 0, 60, 0, 0, 0, 61, - 62, 0, 63, 0, 0, 0, 64, 0, 65, 66, - 67, 0, 0, 69, 0, 0, 0, 70, 0, 71, + 277, 473, -81, -89, -67, -94, -71, 368, 460, -97, + -70, -92, 193, 409, -100, 338, 355, 345, 332, 292, + 312, 164, 326, 411, 324, 423, 477, 351, 353, 421, + 360, 187, 365, 372, 363, 164, 362, 510, 509, 122, + 32, 33, 94, 512, 551, 502, 360, 7, 2, 545, + 170, 124, 172, 502, 27, 436, 484, 314, 440, 419, + 464, 484, 451, 187, 460, 490, 164, 316, 460, 466, + 122, 124, 206, 473, 477, 368, 460, 429, 450, 434, + 366, 428, 436, 256, 468, 277, 332, 321, 292, 213, + 272, 94, 0, 210, 164, 312, 164, 164, 463, 164, + 0, 164, 164, 0, 81, 81, 164, 447, 454, 164, + 444, 202, 464, 189, 485, 82, 82, 190, 164, 366, + 212, 164, 527, 314, 527, 0, 271, 276, 275, 262, + 261, 530, 267, 266, 513, 433, 432, 269, 268, 514, + 164, 366, 514, 87, 81, 502, 475, 0, 274, 357, + 2, 438, 448, 479, 370, 82, 538, 537, 330, 28, + 85, 0, 486, 269, 268, 81, 200, 502, 60, 165, + 536, 86, 528, 60, 164, 0, 82, 548, 9, 8, + 60, 0, 195, 60, 108, 60, 109, 28, 88, 108, + 0, 109, 494, 0, 89, 0, 334, 110, 0, 0, + 335, 196, 110, 426, 30, 72, 73, 60, 0, 60, + 72, 73, 108, 60, 109, 29, 164, 72, 73, 126, + 72, 73, 72, 73, 60, 110, 60, 255, 254, 87, + 549, 547, 30, 87, 60, 195, 0, 347, 127, 108, + 128, 109, 0, 29, 72, 73, 72, 73, 60, 0, + 72, 73, 110, 108, 196, 109, 197, 0, 0, 0, + 60, 72, 73, 72, 73, 0, 110, 294, 295, 458, + 457, 72, 73, 60, 88, 294, 295, 0, 88, 0, + 89, 96, 97, 0, 89, 72, 73, 96, 97, 60, + 348, 0, 260, 259, 296, 297, -311, 72, 73, 522, + 0, 0, 296, 297, 0, 265, 264, 60, 98, 99, + 72, 73, 0, 0, 98, 99, 299, 300, 0, 60, + 108, 0, 109, 0, 0, 301, 72, 73, 302, 19, + 303, 0, 0, 110, 101, 102, 72, 73, 0, 265, + 264, 0, 103, 104, 72, 73, 105, 0, 106, 0, + 484, 260, 259, 101, 102, 18, 72, 73, 0, 0, + 484, 103, 104, 0, 0, 105, 14, 106, 101, 102, + 0, 522, 14, 0, 0, 0, 103, 104, 15, 0, + 105, 522, 106, 0, 15, 16, 299, 300, 0, 0, + 0, 16, 0, 0, 0, 301, 0, 0, 302, 0, + 303, 19, 0, 0, 0, 0, 0, 0, 72, 73, + 0, 19, 0, 0, 0, 19, 0, 0, 72, 73, + 0, 19, 17, 20, 0, 0, 0, 18, 17, 20, + 21, 14, 0, 0, 14, 0, 21, 18, 0, 13, + 0, 18, 0, 15, 0, 13, 15, 18, 0, 0, + 16, 0, 0, 16, 101, 102, 0, 0, 0, 0, + 0, 0, 103, 104, 0, 0, 105, 0, 106, 0, + 0, 0, 0, 0, 0, 0, 506, 0, 0, 504, + 19, 0, 0, 19, 0, 0, 0, 17, 20, 174, + 17, 20, 0, 0, 0, 21, 0, 0, 21, 175, + 0, 0, 0, 176, 13, 0, 18, 13, 0, 18, + 0, 0, 177, 0, 178, 0, 0, 328, 0, 0, + 0, 0, 174, 0, 0, 179, 0, 180, 85, 0, + 0, 0, 175, 0, 0, 181, 176, 0, 182, 86, + 0, 0, 0, 0, 183, 177, 0, 178, 0, 0, + 184, 0, 0, 0, 0, 0, 0, 0, 179, 0, + 180, 85, 0, 0, 0, 185, 0, 0, 181, 0, + 0, 182, 86, 0, 0, 0, 0, 183, 0, 0, + 0, 0, 0, 184, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 185, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 74, 72, 73, 0, 75, 0, 76, 0, 78, - 291, 79, 0, 0, 0, 0, 68, 77, 58, 0, - 0, 0, 0, 0, 0, 0, 0, 55, 56, 57, - 0, 0, 0, 0, 0, 0, 0, 0, 59, 0, - 0, 0, 0, 0, 0, 60, 0, 0, 0, 61, - 62, 0, 63, 0, 0, 0, 64, 0, 65, 66, - 67, 0, 0, 69, 0, 0, 0, 70, 0, 71, - 0, 0, 506, 0, 0, 0, 0, 0, 0, 0, - 0, 74, 72, 73, 0, 75, 0, 76, 0, 78, - 0, 79, 0, 0, 0, 0, 68, 77, 58, 0, - 0, 0, 0, 0, 0, 0, 0, -90, 0, 0, - 0, 55, 56, 57, 0, 0, 0, 0, 0, 0, - 0, 0, 59, 0, 0, 0, 0, 0, 0, 60, - 0, 0, 0, 61, 62, 0, 63, 0, 0, 0, - 64, 0, 65, 66, 67, 0, 0, 69, 0, 0, - 0, 70, 0, 71, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 74, 72, 73, 0, 75, - 0, 76, 0, 78, 0, 79, 0, 0, 0, 0, - 68, 77, 58, 0, 0, 0, 0, 0, 0, 0, - 0, 55, 56, 57, 0, 0, 0, 0, 0, 0, - 0, 0, 59, 0, 0, 0, 0, 0, 0, 60, - 0, 0, 0, 61, 62, 0, 63, 0, 0, 0, - 64, 0, 65, 66, 67, 0, 0, 69, 0, 0, - 0, 70, 0, 71, 0, 0, 503, 0, 0, 0, - 0, 0, 0, 0, 0, 74, 72, 73, 0, 75, - 0, 76, 0, 78, 0, 79, 0, 0, 0, 0, - 68, 77, 58, 0, 0, 0, 0, 0, 0, 0, - 0, 132, 133, 134, 0, 0, 136, 138, 139, 0, - 0, 140, 0, 141, 0, 0, 0, 143, 144, 145, - 0, 0, 0, 0, 0, 0, 60, 146, 147, 148, + 56, 57, 0, 0, 0, 0, 0, 0, 0, 0, + 59, 0, 0, 0, 0, 0, 0, 60, 0, 0, + 0, 61, 62, 0, 63, 0, 0, 0, 0, 0, + 0, 66, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 149, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 152, 0, 0, 0, - 0, 0, 0, 72, 73, 153, 154, 155, 0, 157, - 158, 159, 160, 161, 162, 0, 0, 150, 156, 142, - 135, 137, 151, 0, 0, 0, 0, 0, 132, 133, - 134, 0, 0, 136, 138, 139, 0, 0, 140, 0, - 141, 0, 0, 0, 143, 144, 145, 0, 0, 0, - 0, 0, 0, 427, 146, 147, 148, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 149, 0, 0, - 0, 428, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 152, 0, 0, 0, 0, 0, 432, - 429, 431, 153, 154, 155, 0, 157, 158, 159, 160, - 161, 162, 0, 0, 150, 156, 142, 135, 137, 151, - 0, 0, 0, 0, 0, 132, 133, 134, 0, 0, - 136, 138, 139, 0, 0, 140, 0, 141, 0, 0, - 0, 143, 144, 145, 0, 0, 0, 0, 0, 0, - 427, 146, 147, 148, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 149, 0, 0, 0, 428, 0, - 0, 0, 0, 0, 0, 0, 430, 0, 0, 0, - 152, 0, 0, 0, 0, 0, 432, 429, 431, 153, - 154, 155, 0, 157, 158, 159, 160, 161, 162, 0, - 0, 150, 156, 142, 135, 137, 151, 0, 0, 0, - 0, 0, 232, 0, 0, 0, 0, 233, 0, 55, - 56, 57, 235, 0, 0, 0, 0, 0, 0, 236, - 59, 0, 0, 0, 0, 0, 0, 238, 239, 0, - 0, 240, 62, 0, 63, 0, 0, 0, 64, 0, + 0, 0, 0, 74, 72, 73, 0, 75, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 77, + 58, 0, 0, 0, 0, 0, 0, 0, 0, 55, + 56, 57, 0, 0, 0, 0, 0, 0, 0, 0, + 59, 0, 0, 0, 0, 0, 0, 60, 0, 0, + 0, 61, 62, 0, 63, 0, 0, 0, 64, 0, 65, 66, 67, 0, 0, 69, 0, 0, 0, 70, - 0, 71, 0, 0, 0, 0, 0, 242, 0, 243, - 0, 0, 0, 74, 241, 244, 245, 75, 246, 76, - 247, 78, 21, 79, 248, 249, 0, 0, 68, 77, - 58, 13, 234, 0, 0, 0, 0, 0, 0, 232, - 0, 0, 0, 0, 233, 0, 55, 56, 57, 235, - 0, 0, 0, 0, 0, 0, 236, 237, 0, 0, - 0, 0, 0, 0, 238, 239, 0, 0, 240, 62, - 0, 63, 0, 0, 0, 64, 0, 65, 66, 67, - 0, 0, 69, 0, 0, 0, 70, 0, 71, 0, - 0, 0, 0, 0, 242, 0, 243, 0, 0, 0, - 74, 241, 244, 245, 75, 246, 76, 247, 78, 21, - 79, 248, 249, 0, 0, 68, 77, 58, 13, 234, - 0, 0, 0, 0, 0, 0, 232, 0, 0, 0, - 0, 233, 0, 55, 56, 57, 235, 0, 0, 0, - 0, 0, 0, 236, 59, 0, 0, 0, 0, 0, - 0, 548, 239, 0, 0, 240, 549, 0, 63, 0, + 0, 71, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 74, 72, 73, 0, 75, 0, 76, + 0, 78, 0, 79, 0, 0, 0, 0, 68, 77, + 58, 0, 0, 0, 0, 0, 0, 0, 0, -90, + 0, 0, 0, 55, 56, 57, 0, 0, 0, 0, + 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, + 0, 60, 0, 0, 0, 61, 62, 0, 63, 0, 0, 0, 64, 0, 65, 66, 67, 0, 0, 69, 0, 0, 0, 70, 0, 71, 0, 0, 0, 0, - 0, 242, 0, 243, 0, 0, 0, 74, 241, 244, - 245, 75, 246, 76, 247, 78, 21, 79, 248, 249, - 0, 0, 68, 77, 58, 13, 234, 0, 0, 0, - 0, 0, 0, 232, 0, 0, 0, 0, 233, 0, - 55, 56, 57, 235, 0, 0, 0, 0, 0, 0, - 236, 59, 0, 0, 0, 0, 0, 0, 532, 239, - 0, 0, 240, 533, 0, 63, 0, 0, 0, 64, - 0, 65, 66, 67, 0, 0, 69, 0, 0, 0, - 70, 0, 71, 0, 0, 0, 0, 0, 242, 0, - 243, 0, 0, 0, 74, 241, 244, 245, 75, 246, - 76, 247, 78, 21, 79, 248, 249, 0, 0, 68, - 77, 58, 13, 234, 0, 534, 0, 0, 0, 0, - 395, 133, 134, 0, 0, 397, 138, 399, 56, 57, - 400, 0, 141, 0, 0, 0, 143, 402, 403, 0, - 0, 0, 0, 0, 0, 404, 405, 147, 148, 240, - 62, 0, 63, 0, 0, 0, 64, 0, 65, 406, - 67, 0, 0, 408, 0, 0, 0, 70, 0, 71, - 0, -236, 0, 0, 0, 410, 0, 243, 0, 0, - 0, 412, 409, 411, 413, 414, 415, 76, 417, 418, - 419, 420, 421, 422, 0, 0, 407, 416, 401, 396, - 398, 151, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 74, 72, 73, + 0, 75, 0, 76, 0, 78, 0, 79, 0, 0, + 0, 0, 68, 77, 58, 0, 0, 0, 0, 0, + 0, 0, 0, 55, 56, 57, 0, 0, 0, 0, + 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, + 0, 60, 0, 0, 0, 61, 62, 0, 63, 0, + 0, 0, 64, 0, 65, 66, 67, 0, 0, 69, + 0, 0, 0, 70, 0, 71, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 74, 72, 73, + 0, 75, 0, 76, 0, 78, 291, 79, 0, 0, + 0, 0, 68, 77, 58, 0, 0, 0, 0, 0, + 0, 0, 0, 55, 56, 57, 0, 0, 0, 0, + 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, + 0, 60, 0, 0, 0, 61, 62, 0, 63, 0, + 0, 0, 64, 0, 65, 66, 67, 0, 0, 69, + 0, 0, 0, 70, 0, 71, 0, 0, 492, 0, + 0, 0, 0, 0, 0, 0, 0, 74, 72, 73, + 0, 75, 0, 76, 0, 78, 0, 79, 0, 0, + 0, 0, 68, 77, 58, 0, 0, 0, 0, 0, + 0, 0, 0, 55, 56, 57, 0, 0, 0, 0, + 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, + 0, 60, 0, 0, 0, 61, 62, 0, 63, 0, + 0, 0, 64, 0, 65, 66, 67, 0, 0, 69, + 0, 0, 0, 70, 0, 71, 0, 0, 489, 0, + 0, 0, 0, 0, 0, 0, 0, 74, 72, 73, + 0, 75, 0, 76, 0, 78, 0, 79, 0, 0, + 0, 0, 68, 77, 58, 0, 0, 0, 0, 0, + 0, 0, 0, 132, 133, 134, 0, 0, 136, 138, + 139, 0, 0, 140, 0, 141, 0, 0, 0, 143, + 144, 145, 0, 0, 0, 0, 0, 0, 60, 146, + 147, 148, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 149, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 152, 0, + 0, 0, 0, 0, 0, 72, 73, 153, 154, 155, + 0, 157, 158, 159, 160, 161, 162, 0, 0, 150, + 156, 142, 135, 137, 151, 0, 0, 0, 0, 0, + 132, 133, 134, 0, 0, 136, 138, 139, 0, 0, + 140, 0, 141, 0, 0, 0, 143, 144, 145, 0, + 0, 0, 0, 0, 0, 413, 146, 147, 148, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 149, + 0, 0, 0, 414, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 152, 0, 0, 0, 0, + 0, 418, 415, 417, 153, 154, 155, 0, 157, 158, + 159, 160, 161, 162, 0, 0, 150, 156, 142, 135, + 137, 151, 0, 0, 0, 0, 0, 132, 133, 134, + 0, 0, 136, 138, 139, 0, 0, 140, 0, 141, + 0, 0, 0, 143, 144, 145, 0, 0, 0, 0, + 0, 0, 413, 146, 147, 148, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 149, 0, 0, 0, + 414, 0, 0, 0, 0, 0, 0, 0, 416, 0, + 0, 0, 152, 0, 0, 0, 0, 0, 418, 415, + 417, 153, 154, 155, 0, 157, 158, 159, 160, 161, + 162, 0, 0, 150, 156, 142, 135, 137, 151, 0, + 0, 0, 0, 0, 232, 0, 0, 0, 0, 233, + 0, 55, 56, 57, 235, 0, 0, 0, 0, 0, + 0, 236, 59, 0, 0, 0, 0, 0, 0, 238, + 239, 0, 0, 240, 62, 0, 63, 0, 0, 0, + 64, 0, 65, 66, 67, 0, 0, 69, 0, 0, + 0, 70, 0, 71, 0, 0, 0, 0, 0, 242, + 0, 243, 0, 0, 0, 74, 241, 244, 245, 75, + 246, 76, 247, 78, 21, 79, 248, 249, 0, 0, + 68, 77, 58, 13, 234, 0, 0, 0, 0, 0, + 0, 232, 0, 0, 0, 0, 233, 0, 55, 56, + 57, 235, 0, 0, 0, 0, 0, 0, 236, 237, + 0, 0, 0, 0, 0, 0, 238, 239, 0, 0, + 240, 62, 0, 63, 0, 0, 0, 64, 0, 65, + 66, 67, 0, 0, 69, 0, 0, 0, 70, 0, + 71, 0, 0, 0, 0, 0, 242, 0, 243, 0, + 0, 0, 74, 241, 244, 245, 75, 246, 76, 247, + 78, 21, 79, 248, 249, 0, 0, 68, 77, 58, + 13, 234, 0, 0, 0, 0, 0, 0, 232, 0, + 0, 0, 0, 233, 0, 55, 56, 57, 235, 0, + 0, 0, 0, 0, 0, 236, 59, 0, 0, 0, + 0, 0, 0, 532, 239, 0, 0, 240, 533, 0, + 63, 0, 0, 0, 64, 0, 65, 66, 67, 0, + 0, 69, 0, 0, 0, 70, 0, 71, 0, 0, + 0, 0, 0, 242, 0, 243, 0, 0, 0, 74, + 241, 244, 245, 75, 246, 76, 247, 78, 21, 79, + 248, 249, 0, 0, 68, 77, 58, 13, 234, 0, + 0, 0, 0, 0, 0, 232, 0, 0, 0, 0, + 233, 0, 55, 56, 57, 235, 0, 0, 0, 0, + 0, 0, 236, 59, 0, 0, 0, 0, 0, 0, + 516, 239, 0, 0, 240, 517, 0, 63, 0, 0, + 0, 64, 0, 65, 66, 67, 0, 0, 69, 0, + 0, 0, 70, 0, 71, 0, 0, 0, 0, 0, + 242, 0, 243, 0, 0, 0, 74, 241, 244, 245, + 75, 246, 76, 247, 78, 21, 79, 248, 249, 0, + 0, 68, 77, 58, 13, 234, 0, 518, 0, 0, + 0, 0, 381, 133, 134, 0, 0, 383, 138, 385, + 56, 57, 386, 0, 141, 0, 0, 0, 143, 388, + 389, 0, 0, 0, 0, 0, 0, 390, 391, 147, + 148, 240, 62, 0, 63, 0, 0, 0, 64, 0, + 65, 392, 67, 0, 0, 394, 0, 0, 0, 70, + 0, 71, 0, -236, 0, 0, 0, 396, 0, 243, + 0, 0, 0, 398, 395, 397, 399, 400, 401, 76, + 403, 404, 405, 406, 407, 408, 0, 0, 393, 402, + 387, 382, 384, 151, 0, 0, 0, 0, 0, - 459, 10, 467, 562, 550, 451, 527, 502, 42, 173, - 547, 463, 449, 494, 483, 479, 492, 31, 542, 488, - 556, 490, 507, 531, 205, 501, 392, 484, 270, 555, - 366, 270, 481, 372, 378, 331, 505, 205, 263, 322, - 166, 186, 329, 470, 327, 171, 473, 263, 383, 381, - 258, 358, 385, 436, 387, 354, 473, 257, 163, 169, - 356, 322, 0, 426, 199, 470, 273, 444, 194, 83, - 211, 434, 192, 209, 258, 205, 340, 424, 392, 556, - 541, 322, 322, 322, 322, 191, 0, 0, 12, 392, - 340, 0, 0, 209, 83, 286, 92, 83, 83, 83, - 290, 0, 304, 305, 308, 169, 83, 537, 83, 83, - 209, 306, 201, 307, 83, 83, 514, 83, 83, 111, - 485, 209, 116, 188, 83, 352, 350, 323, 325, 115, - 83, 83, 83, 486, 512, 117, 83, 83, 513, 83, - 392, 566, 114, 83, 169, 486, 83, 95, 91, 0, - 83, 441, 466, 83, 349, 90, 100, 83, 83, 83, - 83, 83, 107, 93, 119, 121, 0, 120, 83, 363, - 438, 84, 83, 439, 203, 83, 438, 510, 83, 439, - 509, 83, 0, 83, 83, 112, 369, 113, 83, 83, - 83, 203, 511, 83, 83, 485, 123, 375, 125, 290, - 83, 318, 83, 469, 0, 118, 290, 290, 318, 333, - 11, 26, 12, 290, 0, 318, 83, 83, 0, 336, - 290, 290, 290, 337, 311, 0, 83, 318, 0, 313, - 339, 290, 290, 309, 83, 318, 83, 346, 129, 290, - 290, 290, 545, 310, 541, 315, 0, 131, 198, 320, - 551, 83, 12, 541, 83, 521, 290, 317, 298, 290, - 0, 12, 0, 293, 0, 0, 0, 129, 0, 11, - 26, 12, 0, 0, 0, 0, 131, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 455, 534, 521, 452, 493, 199, 465, 173, 488, 539, + 42, 445, 359, 322, 211, 209, 449, 470, 31, 480, + 273, 531, 487, 192, 491, 194, 511, 540, 476, 515, + 467, 469, 456, 526, 459, 474, 205, 420, 435, 10, + 412, 163, 373, 169, 371, 546, 410, 369, 205, 270, + 322, 166, 171, 422, 456, 258, 263, 367, 430, 270, + 331, 340, 327, 329, 358, 459, 186, 437, 263, 453, + 354, 501, 0, 356, 258, 0, 83, 340, 540, 169, + 26, 12, 209, 322, 525, 322, 201, 322, 123, 0, + 322, 424, 12, 0, 425, 129, 83, 0, 203, 230, + 83, 83, 223, 0, 131, 113, 83, 0, 83, 0, + 125, 84, 121, 478, 83, 83, 497, 498, 83, 424, + 83, 0, 425, 83, 100, 496, 119, 323, 83, 325, + 83, 350, 495, 308, 352, 83, 83, 499, 471, 0, + 550, 349, 83, 83, 472, 90, 83, 169, 91, 83, + 83, 500, 92, 83, 427, 83, 0, 83, 361, 120, + 107, 111, 83, 83, 83, 471, 83, 304, 112, 93, + 83, 83, 83, 83, 83, 307, 305, 306, 83, 83, + 83, 286, 83, 116, 114, 115, 290, 117, 188, 191, + 83, 83, 472, 203, 83, 535, 83, 0, 525, 118, + 83, 290, 529, 0, 525, 318, 12, 0, 95, 83, + 290, 0, 12, 336, 290, 83, 230, 0, 318, 223, + 290, 0, 313, 290, 318, 318, 315, 317, 83, 290, + 290, 83, 83, 290, 505, 0, 290, 290, 311, 310, + 320, 507, 0, 333, 507, 0, 339, 346, 129, 26, + 12, 0, 26, 12, 318, 26, 12, 131, 198, 290, + 83, 83, 0, 0, 0, 290, 290, 230, 309, 293, + 223, 0, 83, 0, 0, 0, 337, 290, 0, 298, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 364, 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, 523, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 11, 26, 12, 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, 0, 0, 0}; + 0, 0, 0, 0, 257, 0}; const int JavaScriptGrammar::action_check [] = { - 1, 55, 33, 60, 8, 7, 36, 36, 36, 48, - 61, 61, 60, 31, 17, 60, 7, 17, 60, 36, - 36, 8, 7, 7, 7, 33, 36, 7, 7, 5, - 8, 5, 5, 60, 33, 33, 7, 33, 78, 20, - 55, 36, 36, 7, 7, 33, 8, 8, 55, 16, - 55, 33, 7, 7, 60, 7, 33, 29, 55, 7, - 7, 36, 55, 7, 78, 8, 36, 36, 60, 7, - 36, 36, 61, 29, 60, 88, 36, 8, 8, 7, - 33, 1, 1, 7, 33, 36, 36, 55, 78, 48, - 2, 36, 7, 1, 36, 36, 0, 2, 7, 2, - 29, 33, 48, 60, 10, -1, 8, 7, 8, 6, - 8, 7, -1, 8, 48, 8, 42, 40, 76, 40, - 8, 60, 40, 20, 8, 8, 66, 53, 51, 65, - 51, 8, 8, 51, 61, 62, 50, 33, 7, -1, - 54, 40, 8, 78, 61, 62, 15, 8, 7, 55, - 8, 88, 51, 8, 61, 62, 8, 8, 7, 12, - 61, 62, 60, 56, 50, 60, 15, 8, 54, 61, - 62, 15, 60, 56, 33, 29, 60, -1, -1, 8, - 56, 61, 62, 60, -1, -1, 61, 62, 61, 62, - 34, 29, 36, 29, -1, 61, 29, -1, 56, 60, - 8, 56, 29, -1, 57, 29, -1, 29, 60, 60, - 63, 29, 66, 67, 29, 12, -1, 8, 29, -1, - 61, 62, 25, 25, 27, 27, -1, -1, 66, 67, - 66, 67, -1, 66, 67, 38, 38, 29, -1, 66, - 67, 29, 66, 67, 66, 67, 29, 12, 66, 67, - 29, 66, 67, 61, 62, 25, 25, 27, 27, 25, - 57, 27, 25, 74, 27, 29, 63, 29, 38, 38, - 61, 62, 38, -1, 85, 38, 15, -1, 66, 67, - 15, -1, 74, 66, 67, 18, 19, 66, 67, 18, - 19, -1, 57, 85, -1, 34, -1, 36, 63, 34, - -1, 36, 66, 67, 66, 67, 18, 19, 18, 19, - -1, 29, 45, 46, 29, -1, 45, 46, 36, -1, - -1, 29, -1, -1, -1, 29, -1, -1, 25, -1, - 27, -1, -1, 45, 46, 45, 46, 29, -1, 29, - 8, 38, -1, -1, -1, -1, 61, 62, 66, 67, - -1, 66, 67, 61, 62, 59, -1, -1, 66, 67, - -1, 29, 66, 67, 8, -1, -1, -1, -1, 61, - 62, 61, 62, -1, 66, 67, 66, 67, 23, 24, - -1, 85, -1, -1, -1, 29, 31, 32, 23, 24, - 35, 59, 37, 10, 23, 24, 31, 32, 66, 67, - 35, -1, 37, 32, -1, 22, 35, -1, 37, -1, - -1, -1, 29, -1, -1, 59, 10, 85, -1, -1, - -1, -1, 66, 67, -1, -1, -1, -1, 22, -1, - -1, -1, -1, -1, -1, 29, 10, -1, -1, 10, - -1, 85, 59, -1, -1, -1, -1, -1, 22, 66, - 67, 22, -1, -1, -1, 29, -1, 74, 29, -1, - -1, -1, 23, 24, -1, 59, 83, -1, 85, -1, - 31, 32, 66, 67, 35, -1, 37, -1, -1, -1, - 74, 55, -1, -1, 55, 59, -1, -1, 59, 83, - -1, 85, 66, 67, -1, 66, 67, -1, -1, -1, - 74, -1, -1, 74, -1, -1, -1, -1, -1, 83, - 3, 85, 83, -1, 85, -1, -1, -1, -1, -1, - 13, -1, -1, -1, 17, -1, -1, -1, -1, -1, - 3, -1, -1, 26, -1, 28, -1, -1, 31, -1, - 13, -1, -1, -1, 17, -1, 39, -1, 41, 42, - -1, -1, -1, 26, -1, 28, 49, -1, -1, 52, - 53, -1, -1, -1, -1, 58, 39, -1, 41, 42, - -1, 64, -1, -1, -1, -1, 49, -1, -1, 52, - 53, -1, -1, -1, -1, 58, 79, -1, -1, -1, - -1, 64, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 79, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 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, -1, -1, -1, 43, - -1, -1, -1, 47, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 65, 66, 67, -1, 69, -1, -1, -1, -1, - -1, -1, -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, + 36, 36, 7, 7, 7, 7, 7, 36, 33, 7, + 7, 7, 7, 7, 7, 7, 31, 17, 2, 1, + 48, 8, 60, 8, 61, 55, 36, 61, 60, 55, + 36, 2, 55, 16, 33, 8, 60, 7, 29, 48, + 29, 7, 1, 29, 0, 33, 36, 65, 88, 17, + 8, 78, 60, 33, 66, 36, 8, 78, 33, 7, + 20, 8, 7, 2, 33, 8, 8, 8, 33, 36, + 48, 78, 36, 36, 36, 36, 33, 7, 55, 7, + 7, 60, 36, 55, 60, 36, 2, 61, 1, 33, + 36, 1, -1, 8, 8, 48, 8, 8, 6, 8, + -1, 8, 8, -1, 40, 40, 8, 10, 7, 8, + 5, 60, 20, 50, 8, 51, 51, 54, 8, 7, + 60, 8, 8, 78, 8, -1, 76, 61, 62, 61, + 62, 7, 61, 62, 7, 61, 62, 61, 62, 15, + 8, 7, 15, 12, 40, 33, 60, -1, 60, 60, + 88, 60, 55, 60, 60, 51, 61, 62, 60, 29, + 42, -1, 56, 61, 62, 40, 56, 33, 29, 56, + 56, 53, 56, 29, 8, -1, 51, 8, 61, 62, + 29, -1, 15, 29, 25, 29, 27, 29, 57, 25, + -1, 27, 60, -1, 63, -1, 50, 38, -1, -1, + 54, 34, 38, 36, 74, 66, 67, 29, -1, 29, + 66, 67, 25, 29, 27, 85, 8, 66, 67, 15, + 66, 67, 66, 67, 29, 38, 29, 61, 62, 12, + 61, 62, 74, 12, 29, 15, -1, 8, 34, 25, + 36, 27, -1, 85, 66, 67, 66, 67, 29, -1, + 66, 67, 38, 25, 34, 27, 36, -1, -1, -1, + 29, 66, 67, 66, 67, -1, 38, 18, 19, 61, + 62, 66, 67, 29, 57, 18, 19, -1, 57, -1, + 63, 18, 19, -1, 63, 66, 67, 18, 19, 29, + 61, -1, 61, 62, 45, 46, 36, 66, 67, 29, + -1, -1, 45, 46, -1, 61, 62, 29, 45, 46, + 66, 67, -1, -1, 45, 46, 23, 24, -1, 29, + 25, -1, 27, -1, -1, 32, 66, 67, 35, 59, + 37, -1, -1, 38, 23, 24, 66, 67, -1, 61, + 62, -1, 31, 32, 66, 67, 35, -1, 37, -1, + 8, 61, 62, 23, 24, 85, 66, 67, -1, -1, + 8, 31, 32, -1, -1, 35, 10, 37, 23, 24, + -1, 29, 10, -1, -1, -1, 31, 32, 22, -1, + 35, 29, 37, -1, 22, 29, 23, 24, -1, -1, + -1, 29, -1, -1, -1, 32, -1, -1, 35, -1, + 37, 59, -1, -1, -1, -1, -1, -1, 66, 67, + -1, 59, -1, -1, -1, 59, -1, -1, 66, 67, + -1, 59, 66, 67, -1, -1, -1, 85, 66, 67, + 74, 10, -1, -1, 10, -1, 74, 85, -1, 83, + -1, 85, -1, 22, -1, 83, 22, 85, -1, -1, + 29, -1, -1, 29, 23, 24, -1, -1, -1, -1, + -1, -1, 31, 32, -1, -1, 35, -1, 37, -1, + -1, -1, -1, -1, -1, -1, 55, -1, -1, 55, + 59, -1, -1, 59, -1, -1, -1, 66, 67, 3, + 66, 67, -1, -1, -1, 74, -1, -1, 74, 13, + -1, -1, -1, 17, 83, -1, 85, 83, -1, 85, + -1, -1, 26, -1, 28, -1, -1, 31, -1, -1, + -1, -1, 3, -1, -1, 39, -1, 41, 42, -1, + -1, -1, 13, -1, -1, 49, 17, -1, 52, 53, + -1, -1, -1, -1, 58, 26, -1, 28, -1, -1, + 64, -1, -1, -1, -1, -1, -1, -1, 39, -1, + 41, 42, -1, -1, -1, 79, -1, -1, 49, -1, + -1, 52, 53, -1, -1, -1, -1, 58, -1, -1, + -1, -1, -1, 64, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 79, -1, -1, -1, -1, -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, 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, 7, -1, -1, - -1, 11, 12, 13, -1, -1, -1, -1, -1, -1, - -1, -1, 22, -1, -1, -1, -1, -1, -1, 29, - -1, -1, -1, 33, 34, -1, 36, -1, -1, -1, - 40, -1, 42, 43, 44, -1, -1, 47, -1, -1, - -1, 51, -1, 53, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 65, 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, 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, + 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, -1, -1, + -1, 43, -1, -1, -1, 47, -1, -1, -1, -1, -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, -1, -1, 65, 66, 67, -1, 69, -1, -1, + -1, -1, -1, -1, -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, 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, -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, 53, -1, -1, -1, -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, 7, + -1, -1, -1, 11, 12, 13, -1, -1, -1, -1, + -1, -1, -1, -1, 22, -1, -1, -1, -1, -1, + -1, 29, -1, -1, -1, 33, 34, -1, 36, -1, + -1, -1, 40, -1, 42, 43, 44, -1, -1, 47, + -1, -1, -1, 51, -1, 53, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 65, 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, 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, -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, 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, 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, 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, -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, 86, -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, - 91, 5, 15, 24, 9, 15, 15, 24, 15, 58, - 13, 88, 13, 13, 62, 93, 15, 14, 9, 15, - 18, 13, 15, 13, 18, 20, 13, 62, 13, 18, - 95, 13, 18, 95, 95, 13, 24, 18, 18, 15, - 24, 24, 15, 15, 13, 24, 62, 18, 15, 13, - 18, 13, 13, 13, 13, 13, 62, 100, 15, 24, - 15, 15, -1, 26, 15, 15, 15, 13, 24, 35, - 18, 24, 24, 18, 18, 18, 18, 24, 13, 18, - 10, 15, 15, 15, 15, 51, -1, -1, 18, 13, - 18, -1, -1, 18, 35, 35, 37, 35, 35, 35, - 40, -1, 40, 40, 40, 24, 35, 9, 35, 35, - 18, 40, 31, 40, 35, 35, 37, 35, 35, 39, - 37, 18, 40, 49, 35, 59, 59, 59, 59, 40, - 35, 35, 35, 37, 37, 40, 35, 35, 37, 35, - 13, 80, 40, 35, 24, 37, 35, 43, 37, -1, - 35, 31, 76, 35, 82, 37, 41, 35, 35, 35, - 35, 35, 40, 38, 41, 41, -1, 41, 35, 94, - 29, 38, 35, 32, 37, 35, 29, 37, 35, 32, - 37, 35, -1, 35, 35, 39, 94, 39, 35, 35, - 35, 37, 37, 35, 35, 37, 47, 94, 45, 40, - 35, 35, 35, 76, -1, 40, 40, 40, 35, 50, - 16, 17, 18, 40, -1, 35, 35, 35, -1, 52, - 40, 40, 40, 57, 42, -1, 35, 35, -1, 48, - 57, 40, 40, 42, 35, 35, 35, 57, 18, 40, - 40, 40, 8, 42, 10, 46, -1, 27, 28, 57, - 7, 35, 18, 10, 35, 2, 40, 57, 42, 40, - -1, 18, -1, 44, -1, -1, -1, 18, -1, 16, - 17, 18, -1, -1, -1, -1, 27, -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, 6, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 16, 17, 18, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 76, 9, 9, 76, 15, 15, 93, 58, 24, 18, + 15, 91, 18, 15, 18, 18, 88, 62, 14, 13, + 15, 13, 20, 24, 24, 24, 15, 18, 13, 13, + 18, 62, 15, 9, 62, 15, 18, 24, 13, 5, + 26, 15, 13, 24, 13, 24, 24, 15, 18, 13, + 15, 24, 24, 13, 15, 18, 18, 13, 13, 13, + 13, 18, 13, 15, 13, 62, 24, 15, 18, 15, + 13, 18, -1, 15, 18, -1, 35, 18, 18, 24, + 17, 18, 18, 15, 10, 15, 31, 15, 47, -1, + 15, 29, 18, -1, 32, 18, 35, -1, 37, 13, + 35, 35, 16, -1, 27, 39, 35, -1, 35, -1, + 45, 38, 41, 15, 35, 35, 37, 37, 35, 29, + 35, -1, 32, 35, 41, 37, 41, 59, 35, 59, + 35, 59, 37, 40, 59, 35, 35, 37, 37, -1, + 80, 82, 35, 35, 37, 37, 35, 24, 37, 35, + 35, 37, 37, 35, 31, 35, -1, 35, 94, 41, + 40, 39, 35, 35, 35, 37, 35, 40, 39, 38, + 35, 35, 35, 35, 35, 40, 40, 40, 35, 35, + 35, 35, 35, 40, 40, 40, 40, 40, 49, 51, + 35, 35, 37, 37, 35, 7, 35, -1, 10, 40, + 35, 40, 8, -1, 10, 35, 18, -1, 43, 35, + 40, -1, 18, 52, 40, 35, 13, -1, 35, 16, + 40, -1, 48, 40, 35, 35, 46, 57, 35, 40, + 40, 35, 35, 40, 2, -1, 40, 40, 42, 42, + 57, 6, -1, 50, 6, -1, 57, 57, 18, 17, + 18, -1, 17, 18, 35, 17, 18, 27, 28, 40, + 35, 35, -1, -1, -1, 40, 40, 13, 42, 44, + 16, -1, 35, -1, -1, -1, 57, 40, -1, 42, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 95, -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, 100, -1}; diff --git a/src/declarative/qml/parser/javascriptgrammar_p.h b/src/declarative/qml/parser/javascriptgrammar_p.h index 58e73f6..c01d1cc 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 = 567, - RULE_COUNT = 317, - STATE_COUNT = 568, + ACCEPT_STATE = 551, + RULE_COUNT = 315, + STATE_COUNT = 552, TERMINAL_COUNT = 91, NON_TERMINAL_COUNT = 102, - GOTO_INDEX_OFFSET = 568, - GOTO_INFO_OFFSET = 1797, - GOTO_CHECK_OFFSET = 1797 + GOTO_INDEX_OFFSET = 552, + GOTO_INFO_OFFSET = 1789, + GOTO_CHECK_OFFSET = 1789 }; static const char *const spell []; diff --git a/src/declarative/qml/parser/javascriptparser.cpp b/src/declarative/qml/parser/javascriptparser.cpp index f0b1f10..b241297 100644 --- a/src/declarative/qml/parser/javascriptparser.cpp +++ b/src/declarative/qml/parser/javascriptparser.cpp @@ -332,9 +332,7 @@ case 34: { case 35: { sym(1).Node = makeAstNode(driver->nodePool(), sym(1).Node); } break; - -case 36: - +case 36: case 37: { AST::UiQualifiedId *node = makeAstNode (driver->nodePool(), driver->intern(lexer->characterBuffer(), lexer->characterCount())); @@ -531,7 +529,7 @@ case 66: { node->propertyNameToken = loc(1); sym(1).Node = node; } break; - +case 67: case 68: { AST::IdentifierPropertyName *node = makeAstNode (driver->nodePool(), driver->intern(lexer->characterBuffer(), lexer->characterCount())); node->propertyNameToken = loc(1); @@ -1394,7 +1392,7 @@ case 284: { node->colonToken = loc(2); sym(1).Node = node; } break; - +case 285: case 286: { AST::LabelledStatement *node = makeAstNode (driver->nodePool(), driver->intern(lexer->characterBuffer(), lexer->characterCount()), sym(3).Statement); node->identifierToken = loc(1); @@ -1456,18 +1454,7 @@ case 296: { sym(1).Node = node; } break; -case 298: { - AST::FunctionDeclaration *node = makeAstNode (driver->nodePool(), driver->intern(lexer->characterBuffer(), lexer->characterCount()), sym(4).FormalParameterList, sym(7).FunctionBody); - node->functionToken = loc(1); - node->identifierToken = loc(2); - node->lparenToken = loc(3); - node->rparenToken = loc(5); - node->lbraceToken = loc(6); - node->rbraceToken = loc(8); - sym(1).Node = node; -} break; - -case 299: { +case 297: { AST::FunctionDeclaration *node = makeAstNode (driver->nodePool(), sym(2).sval, sym(4).FormalParameterList, sym(7).FunctionBody); node->functionToken = loc(1); node->identifierToken = loc(2); @@ -1478,7 +1465,7 @@ case 299: { sym(1).Node = node; } break; -case 300: { +case 298: { AST::FunctionExpression *node = makeAstNode (driver->nodePool(), sym(2).sval, sym(4).FormalParameterList, sym(7).FunctionBody); node->functionToken = loc(1); if (sym(2).sval) @@ -1490,56 +1477,56 @@ case 300: { sym(1).Node = node; } break; -case 301: { +case 299: { AST::FormalParameterList *node = makeAstNode (driver->nodePool(), sym(1).sval); node->identifierToken = loc(1); sym(1).Node = node; } break; -case 302: { +case 300: { AST::FormalParameterList *node = makeAstNode (driver->nodePool(), sym(1).FormalParameterList, sym(3).sval); node->commaToken = loc(2); node->identifierToken = loc(3); sym(1).Node = node; } break; -case 303: { +case 301: { sym(1).Node = 0; } break; -case 304: { +case 302: { sym(1).Node = sym(1).FormalParameterList->finish (); } break; -case 305: { +case 303: { sym(1).Node = 0; } break; -case 307: { +case 305: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).SourceElements->finish ()); } break; -case 308: { +case 306: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).SourceElement); } break; -case 309: { +case 307: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).SourceElements, sym(2).SourceElement); } break; -case 310: { +case 308: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).Statement); } break; -case 311: { +case 309: { sym(1).Node = makeAstNode (driver->nodePool(), sym(1).FunctionDeclaration); } break; -case 312: { +case 310: { sym(1).sval = 0; } break; -case 314: { +case 312: { sym(1).Node = 0; } break; -- cgit v0.12 From 6f7b9cfd130135dd398cd7f2e1ac30fd08971aae Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Mon, 4 May 2009 13:31:33 +0200 Subject: qdoc: Corrected some qdoc warnings. --- doc/src/tutorials/declarative.qdoc | 8 ++++---- .../declarative/tutorials/contacts/2_Reuse/3/RemoveButton.qml | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/doc/src/tutorials/declarative.qdoc b/doc/src/tutorials/declarative.qdoc index 16dad6e..bde71da 100644 --- a/doc/src/tutorials/declarative.qdoc +++ b/doc/src/tutorials/declarative.qdoc @@ -404,7 +404,7 @@ These properties and signals are accessed from the contact field the same way standard system components are accessed. - \snippet declarative/tutorials/contacts/2_Reuse/2/RemoveButton.qml use properties and signals + \snippet declarative/tutorials/contacts/2_Reuse/2/ContactField.qml use properties and signals Now when the remove button is expanded, it will expand to the width of the contact field. Also when the user confirms the remove action, the @@ -438,7 +438,7 @@ that state. In the FieldText element a similar approach is used to fade out the label of the FieldText when the user enters some text of their own. - \snippet declarative/tutorials/contacts/3_Reuse/2/FieldText.qml behavior + \snippet declarative/tutorials/contacts/2_Reuse/3/FieldText.qml behavior fieldText is the enclosing component and textEdit is a TextEdit element provided by Qt. In the QML code above, the opacity of the textLabel is @@ -587,7 +587,7 @@ We then add a transition so that this becomes animated: - \snippet declarative/tutorials/contacts/3_Collections/2/ContactView.qml transition + \snippet declarative/tutorials/contacts/3_Collections/2/ContactView.qml transitions This allows the user to click on an item to enter the open state. @@ -600,7 +600,7 @@ And connect it's clicked value to some script to set the state of the delegate back to its default state. - \snippet declarative/tutorials/contacts/3_Collections/2/ContactView.qml connection + \snippet declarative/tutorials/contacts/3_Collections/2/ContactView.qml connections Something worth noting at this point is that every delegate created has this connection. It is important to check whether the delegate is the one in the open state, and diff --git a/examples/declarative/tutorials/contacts/2_Reuse/3/RemoveButton.qml b/examples/declarative/tutorials/contacts/2_Reuse/3/RemoveButton.qml index 309ee5a..8d82e89 100644 --- a/examples/declarative/tutorials/contacts/2_Reuse/3/RemoveButton.qml +++ b/examples/declarative/tutorials/contacts/2_Reuse/3/RemoveButton.qml @@ -1,3 +1,4 @@ +//! [all] Rect { id: removeButton width: 30 @@ -120,3 +121,4 @@ Rect { } ] } +//! [all] -- cgit v0.12 From d77e368795cf27131cdb625800c6d654aef6dd4e Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Mon, 4 May 2009 13:43:57 +0200 Subject: Fix QmlDom breakage Two actual copies of QmlScriptParser & the parse tree were instantiated in QmlDocument::load, with the result that the additions that the compiler stored in the one parse tree were not seen by the Dom classes, using the other one. Reviewed-by: erikv --- src/declarative/qml/qmldom.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/declarative/qml/qmldom.cpp b/src/declarative/qml/qmldom.cpp index cf0a2fb..f8cf194 100644 --- a/src/declarative/qml/qmldom.cpp +++ b/src/declarative/qml/qmldom.cpp @@ -154,12 +154,6 @@ bool QmlDomDocument::load(QmlEngine *engine, const QByteArray &data) d->error = QString(); - QmlScriptParser parser; - if (!parser.parse(data)) { - d->error = parser.errorDescription(); - return false; - } - QmlCompiledComponent component; QmlCompiler compiler; @@ -184,8 +178,8 @@ bool QmlDomDocument::load(QmlEngine *engine, const QByteArray &data) } if (td->data.tree()) { - component.dump(0, parser.tree()); - d->root = parser.tree(); + component.dump(0, td->data.tree()); + d->root = td->data.tree(); d->root->addref(); } -- cgit v0.12 From 225942d32c358386de7c869ad3363bfdc990fef2 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Mon, 4 May 2009 14:11:44 +0200 Subject: Fix script snippet in test example --- tests/auto/declarative/qmldom/tst_qmldom.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/declarative/qmldom/tst_qmldom.cpp b/tests/auto/declarative/qmldom/tst_qmldom.cpp index 7e7e067..390e79a 100644 --- a/tests/auto/declarative/qmldom/tst_qmldom.cpp +++ b/tests/auto/declarative/qmldom/tst_qmldom.cpp @@ -63,7 +63,7 @@ void tst_qmldom::loadProperties() void tst_qmldom::loadChildObject() { - QByteArray qml = "Item { Item }"; + QByteArray qml = "Item { Item {} }"; //QByteArray qml = " "; QmlDomDocument document; -- cgit v0.12 From e5c47d29f829fc2a02e18ea48f6440cc5a1cc5ae Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Mon, 4 May 2009 14:20:12 +0200 Subject: Fixed initialization for QmlDomValueBinding. --- src/declarative/qml/qmldom.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/declarative/qml/qmldom.cpp b/src/declarative/qml/qmldom.cpp index f8cf194..25fe00c 100644 --- a/src/declarative/qml/qmldom.cpp +++ b/src/declarative/qml/qmldom.cpp @@ -819,7 +819,8 @@ Rect { x: Other.x } /*! Construct an empty QmlDomValueBinding. */ -QmlDomValueBinding::QmlDomValueBinding() +QmlDomValueBinding::QmlDomValueBinding(): + d(new QmlDomBasicValuePrivate) { } -- cgit v0.12 From 6df2e157391dd812ee8b71c2373411f2580117d1 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Mon, 4 May 2009 14:22:20 +0200 Subject: qdoc: Corrected some qdoc warnings. --- doc/src/snippets/qprocess-environment/main.cpp | 2 +- src/3rdparty/easing/legal.qdoc | 2 +- src/corelib/animation/qabstractanimation.cpp | 2 +- src/corelib/animation/qanimationgroup.cpp | 2 +- src/corelib/animation/qparallelanimationgroup.cpp | 2 +- src/corelib/animation/qpauseanimation.cpp | 2 +- src/corelib/animation/qpropertyanimation.cpp | 2 +- src/corelib/animation/qsequentialanimationgroup.cpp | 2 +- src/corelib/animation/qvariantanimation.cpp | 2 +- src/corelib/kernel/qcoreevent.cpp | 2 +- src/declarative/qml/qmlcontext.cpp | 18 ++++++++---------- 11 files changed, 18 insertions(+), 20 deletions(-) diff --git a/doc/src/snippets/qprocess-environment/main.cpp b/doc/src/snippets/qprocess-environment/main.cpp index 148518b..c8681e7 100644 --- a/doc/src/snippets/qprocess-environment/main.cpp +++ b/doc/src/snippets/qprocess-environment/main.cpp @@ -62,7 +62,7 @@ env.insert("TMPDIR", "C:\\MyApp\\temp"); // Add an environment variable env["PATH"] += ";C:\\Bin"; process.setEnvironment(env); process.start("myapp"); -//! [0] +//! [1] } } diff --git a/src/3rdparty/easing/legal.qdoc b/src/3rdparty/easing/legal.qdoc index 25f67e1..1be5f66 100644 --- a/src/3rdparty/easing/legal.qdoc +++ b/src/3rdparty/easing/legal.qdoc @@ -1,7 +1,7 @@ /*! \page legal-easing.html \title Easing Equations by Robert Penner -\ingroup animation +\ingroup group_animation \legalese \code diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp index 6c55a77..f2d8668 100644 --- a/src/corelib/animation/qabstractanimation.cpp +++ b/src/corelib/animation/qabstractanimation.cpp @@ -41,7 +41,7 @@ /*! \class QAbstractAnimation - \ingroup animation + \ingroup group_animation \brief The QAbstractAnimation class provides an abstract base class for animations. \since 4.5 \preliminary diff --git a/src/corelib/animation/qanimationgroup.cpp b/src/corelib/animation/qanimationgroup.cpp index c4066ce..8c9f358 100644 --- a/src/corelib/animation/qanimationgroup.cpp +++ b/src/corelib/animation/qanimationgroup.cpp @@ -43,7 +43,7 @@ \class QAnimationGroup \brief The QAnimationGroup class is an abstract base class for group of animations. \since 4.5 - \ingroup animation + \ingroup group_animation \preliminary QAnimationGroup represents a group of animations, such as parallel or sequential, diff --git a/src/corelib/animation/qparallelanimationgroup.cpp b/src/corelib/animation/qparallelanimationgroup.cpp index 407ffde..a75f85c 100644 --- a/src/corelib/animation/qparallelanimationgroup.cpp +++ b/src/corelib/animation/qparallelanimationgroup.cpp @@ -43,7 +43,7 @@ \class QParallelAnimationGroup \brief The QParallelAnimationGroup class provides a parallel group of animations. \since 4.5 - \ingroup animation + \ingroup group_animation \preliminary The animations are all started at the same time, and run in parallel. The animation group diff --git a/src/corelib/animation/qpauseanimation.cpp b/src/corelib/animation/qpauseanimation.cpp index 30ea92c..86c3049 100644 --- a/src/corelib/animation/qpauseanimation.cpp +++ b/src/corelib/animation/qpauseanimation.cpp @@ -43,7 +43,7 @@ \class QPauseAnimation \brief The QPauseAnimation class provides a pause for QSequentialAnimationGroup. \since 4.5 - \ingroup animation + \ingroup group_animation \preliminary */ diff --git a/src/corelib/animation/qpropertyanimation.cpp b/src/corelib/animation/qpropertyanimation.cpp index 9a0c5bc..6b03c33 100644 --- a/src/corelib/animation/qpropertyanimation.cpp +++ b/src/corelib/animation/qpropertyanimation.cpp @@ -42,7 +42,7 @@ /*! \class QPropertyAnimation \brief The QPropertyAnimation class animates properties for QObject(and QWidget) - \ingroup animation + \ingroup group_animation \preliminary This class is part of {The Animation Framework}. You can use QPropertyAnimation diff --git a/src/corelib/animation/qsequentialanimationgroup.cpp b/src/corelib/animation/qsequentialanimationgroup.cpp index 61ff98d..45673c2 100644 --- a/src/corelib/animation/qsequentialanimationgroup.cpp +++ b/src/corelib/animation/qsequentialanimationgroup.cpp @@ -43,7 +43,7 @@ \class QSequentialAnimationGroup \brief The QSequentialAnimationGroup class provides a sequential group of animations. \since 4.5 - \ingroup animation + \ingroup group_animation \preliminary The first animation in the group is started first, and when it finishes, the next animation diff --git a/src/corelib/animation/qvariantanimation.cpp b/src/corelib/animation/qvariantanimation.cpp index 9f8cbf0..29819e5 100644 --- a/src/corelib/animation/qvariantanimation.cpp +++ b/src/corelib/animation/qvariantanimation.cpp @@ -54,7 +54,7 @@ QT_BEGIN_NAMESPACE /*! \class QVariantAnimation - \ingroup animation + \ingroup group_animation \brief The QVariantAnimation class provides an abstract base class for animations. \since 4.5 \preliminary diff --git a/src/corelib/kernel/qcoreevent.cpp b/src/corelib/kernel/qcoreevent.cpp index 4b4dfe5..efd0938 100644 --- a/src/corelib/kernel/qcoreevent.cpp +++ b/src/corelib/kernel/qcoreevent.cpp @@ -291,7 +291,7 @@ QEvent::~QEvent() /*! \property QEvent::accepted - the accept flag of the event object + \brief The accept flag of the event object Setting the accept parameter indicates that the event receiver wants the event. Unwanted events might be propagated to the parent diff --git a/src/declarative/qml/qmlcontext.cpp b/src/declarative/qml/qmlcontext.cpp index c1acdc7..30857ad 100644 --- a/src/declarative/qml/qmlcontext.cpp +++ b/src/declarative/qml/qmlcontext.cpp @@ -261,10 +261,10 @@ QmlContext *QmlContext::parentContext() const Add a default \a object to this context. The object will be added after any existing default objects. */ -void QmlContext::addDefaultObject(QObject *defaultObject) +void QmlContext::addDefaultObject(QObject *object) { Q_D(QmlContext); - d->addDefaultObject(defaultObject, QmlContextPrivate::NormalPriority); + d->addDefaultObject(object, QmlContextPrivate::NormalPriority); } /*! @@ -340,13 +340,11 @@ QmlContext *QmlContext::activeContext() /*! Resolves the URL \a src relative to the URL of the - containing component. + containing component. If \a src is absolute, it is + simply returned. If there is no containing component, + an empty URL is returned. - If \a src is absolute, it is simply returned. - - If there is no containing component, an empty URL is returned. - - \sa componentUrl + \sa QmlEngine::componentUrl() */ QUrl QmlContext::resolvedUrl(const QUrl &src) { @@ -372,10 +370,10 @@ QUrl QmlContext::resolvedUrl(const QUrl &src) /*! Resolves the component URI \a src relative to the URL of the containing component, and according to the - \link QmlEngine::nameSpacePaths() namespace paths\endlink of the + \l {QmlEngine::nameSpacePaths()} {namespace paths} of the context's engine, returning the resolved URL. - \sa componentUrl + \sa QmlEngine::componentUrl() */ QUrl QmlContext::resolvedUri(const QUrl &src) { -- cgit v0.12 From bf5b41134f180eea75add8673287e04d3ea5287d Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Mon, 4 May 2009 14:28:58 +0200 Subject: Fix example in documentation src has been replaced by source in QFxImage --- src/declarative/qml/qmldom.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/declarative/qml/qmldom.cpp b/src/declarative/qml/qmldom.cpp index f8cf194..d673428 100644 --- a/src/declarative/qml/qmldom.cpp +++ b/src/declarative/qml/qmldom.cpp @@ -612,11 +612,11 @@ QList QmlDomObject::properties() const Returns the object's \a name property if a value has been assigned to it, or an invalid QmlDomProperty otherwise. - In the example below, \c {object.property("src")} would return a valid + In the example below, \c {object.property("source")} would return a valid QmlDomProperty, and \c {object.property("tile")} an invalid QmlDomProperty. \qml -Image { src: "sample.jpg" } +Image { source: "sample.jpg" } \endqml */ QmlDomProperty QmlDomObject::property(const QByteArray &name) const -- cgit v0.12 From d4085c032d06bfe21ff3fef5657ceca201d18feb Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Mon, 4 May 2009 14:33:45 +0200 Subject: Fixed initialization for QmlDomValueValueSource. --- src/declarative/qml/qmldom.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/declarative/qml/qmldom.cpp b/src/declarative/qml/qmldom.cpp index 25fe00c..e4e36b3 100644 --- a/src/declarative/qml/qmldom.cpp +++ b/src/declarative/qml/qmldom.cpp @@ -897,7 +897,8 @@ Rect { /*! Construct an empty QmlDomValueValueSource. */ -QmlDomValueValueSource::QmlDomValueValueSource() +QmlDomValueValueSource::QmlDomValueValueSource(): + d(new QmlDomBasicValuePrivate) { } -- cgit v0.12 From 15765bc59d2569803d5b1b200e26919e27d00bcd Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Mon, 4 May 2009 15:07:56 +0200 Subject: Added (failing) testcase for QmlDomValueValueSource. --- tests/auto/declarative/qmldom/tst_qmldom.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tests/auto/declarative/qmldom/tst_qmldom.cpp b/tests/auto/declarative/qmldom/tst_qmldom.cpp index 390e79a..91fe7a6 100644 --- a/tests/auto/declarative/qmldom/tst_qmldom.cpp +++ b/tests/auto/declarative/qmldom/tst_qmldom.cpp @@ -16,6 +16,8 @@ private slots: void loadProperties(); void loadChildObject(); + void testValueSource(); + private: QmlEngine engine; }; @@ -85,6 +87,23 @@ void tst_qmldom::loadChildObject() QVERIFY(childItem.objectType() == "Item"); } +void tst_qmldom::testValueSource() +{ + QByteArray qml = "Rect { height: Follow { spring: 1.4; damping: .15; source: Math.min(Math.max(-130, value*2.2 - 130), 133); }}"; + + QmlEngine freshEngine; + QmlDomDocument document; + QVERIFY(document.load(&freshEngine, qml)); + + QmlDomObject rootItem = document.rootObject(); + QVERIFY(rootItem.isValid()); + QmlDomProperty heightProperty = rootItem.properties().at(0); + QVERIFY(heightProperty.propertyName() == "height"); + QVERIFY(heightProperty.value().isValueSource()); + const QmlDomValueValueSource valueSource = heightProperty.value().toValueSource(); + QVERIFY(valueSource.object().isValid()); +} + QTEST_MAIN(tst_qmldom) #include "tst_qmldom.moc" -- cgit v0.12 From ba8d03242f720c11ed89092f3f1a0d8a41f35a04 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Mon, 4 May 2009 15:09:22 +0200 Subject: qdoc: Corrected some qdoc warnings. --- src/declarative/fx/qfxitem.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/declarative/fx/qfxitem.cpp b/src/declarative/fx/qfxitem.cpp index 53e198f..84dc484 100644 --- a/src/declarative/fx/qfxitem.cpp +++ b/src/declarative/fx/qfxitem.cpp @@ -1604,12 +1604,20 @@ void QFxItem::setKeepMouseGrab(bool keep) d->_keepMouse = keep; } -void QFxItem::activeFocusChanged(bool) +/*! + This function emits the \e activeFocusChanged signal. + \a flag is not used. + */ +void QFxItem::activeFocusChanged(bool flag) { emit activeFocusChanged(); } -void QFxItem::focusChanged(bool) +/*! + This function emits the \e focusChanged signal. + \a flag is not used. + */ +void QFxItem::focusChanged(bool flag) { emit focusChanged(); } -- cgit v0.12 From 51a0ebdea3942e23cd7396b57d7c452442d1371d Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Mon, 4 May 2009 15:33:11 +0200 Subject: Fixed QmlDomValueValueSource::object() to actually return the newly created object. --- src/declarative/qml/qmldom.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/declarative/qml/qmldom.cpp b/src/declarative/qml/qmldom.cpp index e1c4c28..5380740 100644 --- a/src/declarative/qml/qmldom.cpp +++ b/src/declarative/qml/qmldom.cpp @@ -949,7 +949,7 @@ QmlDomObject QmlDomValueValueSource::object() const rv.d->object = d->value->object; rv.d->object->addref(); } - return QmlDomObject(); + return rv; } /*! -- cgit v0.12 From 74c8e4c15fce7dce9d279b6a8086aaf679500fab Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Mon, 4 May 2009 15:42:32 +0200 Subject: Extended the test for QmlDomValueValueSource. --- tests/auto/declarative/qmldom/tst_qmldom.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/tests/auto/declarative/qmldom/tst_qmldom.cpp b/tests/auto/declarative/qmldom/tst_qmldom.cpp index 91fe7a6..36d37f6 100644 --- a/tests/auto/declarative/qmldom/tst_qmldom.cpp +++ b/tests/auto/declarative/qmldom/tst_qmldom.cpp @@ -100,8 +100,22 @@ void tst_qmldom::testValueSource() QmlDomProperty heightProperty = rootItem.properties().at(0); QVERIFY(heightProperty.propertyName() == "height"); QVERIFY(heightProperty.value().isValueSource()); + const QmlDomValueValueSource valueSource = heightProperty.value().toValueSource(); - QVERIFY(valueSource.object().isValid()); + QmlDomObject valueSourceObject = valueSource.object(); + QVERIFY(valueSourceObject.isValid()); + + QVERIFY(valueSourceObject.objectType() == "Follow"); + + const QmlDomValue springValue = valueSourceObject.property("spring").value(); + QVERIFY(!springValue.isInvalid()); + QVERIFY(springValue.isLiteral()); + QVERIFY(springValue.toLiteral().literal() == "1.4"); + + const QmlDomValue sourceValue = valueSourceObject.property("source").value(); + QVERIFY(!sourceValue.isInvalid()); + QVERIFY(sourceValue.isBinding()); + QVERIFY(sourceValue.toBinding().binding() == "Math.min(Math.max(-130, value*2.2 - 130), 133)"); } QTEST_MAIN(tst_qmldom) -- cgit v0.12 From fab8fa152901cb84132f11b52f950c0dbb6d7a23 Mon Sep 17 00:00:00 2001 From: Roberto Raggi Date: Mon, 4 May 2009 15:54:14 +0200 Subject: Store the location for the `default' token. --- src/declarative/qml/parser/javascript.g | 6 ++++-- src/declarative/qml/parser/javascriptast_p.h | 8 +++++++- src/declarative/qml/parser/javascriptparser.cpp | 6 ++++-- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/declarative/qml/parser/javascript.g b/src/declarative/qml/parser/javascript.g index 0da7571..5482392 100644 --- a/src/declarative/qml/parser/javascript.g +++ b/src/declarative/qml/parser/javascript.g @@ -688,7 +688,8 @@ UiObjectMember: T_DEFAULT T_PROPERTY UiPropertyType T_IDENTIFIER ; case $rule_number: { AST::UiPublicMember *node = makeAstNode (driver->nodePool(), sym(3).sval, sym(4).sval); node->isDefaultMember = true; - node->propertyToken = loc(1); + node->defaultToken = loc(1); + node->propertyToken = loc(2); node->typeToken = loc(3); node->identifierToken = loc(4); sym(1).Node = node; @@ -714,7 +715,8 @@ case $rule_number: { AST::UiPublicMember *node = makeAstNode (driver->nodePool(), sym(3).sval, sym(4).sval, sym(6).Expression); node->isDefaultMember = true; - node->propertyToken = loc(1); + node->defaultToken = loc(1); + node->propertyToken = loc(2); node->typeToken = loc(3); node->identifierToken = loc(4); node->colonToken = loc(5); diff --git a/src/declarative/qml/parser/javascriptast_p.h b/src/declarative/qml/parser/javascriptast_p.h index 3a22fff..ad317e8 100644 --- a/src/declarative/qml/parser/javascriptast_p.h +++ b/src/declarative/qml/parser/javascriptast_p.h @@ -2336,7 +2336,12 @@ public: { kind = K; } virtual SourceLocation firstSourceLocation() const - { return propertyToken; } + { + if (defaultToken.isValid()) + return defaultToken; + + return propertyToken; + } virtual SourceLocation lastSourceLocation() const { @@ -2359,6 +2364,7 @@ public: JavaScriptNameIdImpl *name; ExpressionNode *expression; bool isDefaultMember; + SourceLocation defaultToken; SourceLocation propertyToken; SourceLocation typeToken; SourceLocation identifierToken; diff --git a/src/declarative/qml/parser/javascriptparser.cpp b/src/declarative/qml/parser/javascriptparser.cpp index b241297..185a824 100644 --- a/src/declarative/qml/parser/javascriptparser.cpp +++ b/src/declarative/qml/parser/javascriptparser.cpp @@ -298,7 +298,8 @@ case 30: { case 31: { AST::UiPublicMember *node = makeAstNode (driver->nodePool(), sym(3).sval, sym(4).sval); node->isDefaultMember = true; - node->propertyToken = loc(1); + node->defaultToken = loc(1); + node->propertyToken = loc(2); node->typeToken = loc(3); node->identifierToken = loc(4); sym(1).Node = node; @@ -318,7 +319,8 @@ case 33: { AST::UiPublicMember *node = makeAstNode (driver->nodePool(), sym(3).sval, sym(4).sval, sym(6).Expression); node->isDefaultMember = true; - node->propertyToken = loc(1); + node->defaultToken = loc(1); + node->propertyToken = loc(2); node->typeToken = loc(3); node->identifierToken = loc(4); node->colonToken = loc(5); -- cgit v0.12 From 0e75846b831bbeb4794cc4e3d00cd3096726d35e Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Tue, 5 May 2009 10:43:23 +1000 Subject: Join some lines in examples. --- examples/declarative/listview/highlight.qml | 46 +++------- examples/declarative/listview/listview.qml | 63 +++++-------- examples/declarative/listview/recipes.qml | 134 +++++++--------------------- 3 files changed, 66 insertions(+), 177 deletions(-) diff --git a/examples/declarative/listview/highlight.qml b/examples/declarative/listview/highlight.qml index cbadb72..9a672d9 100644 --- a/examples/declarative/listview/highlight.qml +++ b/examples/declarative/listview/highlight.qml @@ -1,7 +1,6 @@ Rect { - width: 400 - height: 300 - color: "white" + width: 400; height: 300; color: "white" + // MyPets model is defined in dummydata/MyPetsModel.qml // The viewer automatically loads files in dummydata/* to assist // development without a real data source. @@ -12,18 +11,11 @@ Rect { id: PetDelegate Item { id: Wrapper - width: 200 - height: 50 + width: 200; height: 50 VerticalLayout { - Text { - text: 'Name: ' + name - } - Text { - text: 'Type: ' + type - } - Text { - text: 'Age: ' + age - } + Text { text: 'Name: ' + name } + Text { text: 'Type: ' + type } + Text { text: 'Age: ' + age } } // Use the ListView.isCurrentItem attached property to // indent the item if it is the current item. @@ -32,17 +24,14 @@ Rect { name: "Current" when: Wrapper.ListView.isCurrentItem SetProperty { - target: Wrapper - property: "x" - value: 10 + target: Wrapper; property: "x"; value: 10 } } ] transitions: [ Transition { NumericAnimation { - properties: "x" - duration: 200 + properties: "x"; duration: 200 } } ] @@ -54,24 +43,15 @@ Rect { Component { id: PetHighlight Rect { - width: 200 - height: 50 - color: "#FFFF88" - y: Follow { - source: List1.current.y - spring: 3 - damping: 0.1 - } + width: 200; height: 50; color: "#FFFF88" + y: Follow { source: List1.current.y; spring: 3; damping: 0.1 } } } ListView { id: List1 - width: 200 - height: parent.height - model: MyPetsModel - delegate: PetDelegate - highlight: PetHighlight - autoHighlight: false + width: 200; height: parent.height + model: MyPetsModel; delegate: PetDelegate + highlight: PetHighlight; autoHighlight: false focus: true } } diff --git a/examples/declarative/listview/listview.qml b/examples/declarative/listview/listview.qml index b71ed4e..a222378 100644 --- a/examples/declarative/listview/listview.qml +++ b/examples/declarative/listview/listview.qml @@ -1,7 +1,6 @@ Rect { - width: 600 - height: 300 - color: "white" + width: 600; height: 300; color: "white" + // MyPets model is defined in dummydata/MyPetsModel.qml // The viewer automatically loads files in dummydata/* to assist // development without a real data source. @@ -12,29 +11,22 @@ Rect { id: PetDelegate Item { id: Wrapper - width: 200 - height: 50 + width: 200; height: 50 VerticalLayout { - Text { - text: 'Name: ' + name - } - Text { - text: 'Type: ' + type - } - Text { - text: 'Age: ' + age - } + Text { text: 'Name: ' + name } + Text { text: 'Type: ' + type } + Text { text: 'Age: ' + age } } } } + // Define a highlight component. Just one of these will be instantiated // by each ListView and placed behind the current item. Component { id: PetHighlight - Rect { - color: "#FFFF88" - } + Rect { color: "#FFFF88" } } + // Show the model in three lists, with different currentItemPositioning. // currentItemPositioning determines how the list behaves when the // current item changes. Note that the second and third ListView @@ -54,35 +46,23 @@ Rect { // the mouse, the current index of List1 will be changed. ListView { id: List1 - width: 200 - height: parent.height - model: MyPetsModel - delegate: PetDelegate - highlight: PetHighlight - currentIndex: List3.currentIndex + width: 200; height: parent.height + model: MyPetsModel; delegate: PetDelegate + highlight: PetHighlight; currentIndex: List3.currentIndex focus: true } ListView { id: List2 - x: 200 - width: 200 - height: parent.height - model: MyPetsModel - delegate: PetDelegate - highlight: PetHighlight - currentItemPositioning: "Snap" - snapPosition: 125 + x: 200; width: 200; height: parent.height + model: MyPetsModel; delegate: PetDelegate; highlight: PetHighlight + currentItemPositioning: "Snap"; snapPosition: 125 currentIndex: List1.currentIndex } ListView { id: List3 - x: 400 - width: 200 - height: parent.height - model: MyPetsModel - delegate: PetDelegate - currentItemPositioning: "SnapAuto" - snapPosition: 125 + x: 400; width: 200; height: parent.height + model: MyPetsModel; delegate: PetDelegate + currentItemPositioning: "SnapAuto"; snapPosition: 125 currentIndex: List1.currentIndex children: [ // Position a static highlight rather than a normal highlight so that @@ -92,11 +72,8 @@ Rect { // Note that we specify the 'children' property. This is because // the default property of a ListView is 'delegate'. Rect { - y: 125 - width: 200 - height: 50 - color: "#FFFF88" - z: -1 + y: 125; width: 200; height: 50 + color: "#FFFF88"; z: -1 } ] } diff --git a/examples/declarative/listview/recipes.qml b/examples/declarative/listview/recipes.qml index db8604e..db9ef61 100644 --- a/examples/declarative/listview/recipes.qml +++ b/examples/declarative/listview/recipes.qml @@ -2,9 +2,7 @@ import "content" // This example illustrates expanding a list item to show a more detailed view Rect { id: page - width: 400 - height: 240 - color: "black" + width: 400; height: 240; color: "black" resources: [ // Delegate for the recipes. This delegate has two modes: // 1. the list mode (default), which just shows the picture and title of the recipe. @@ -26,13 +24,8 @@ Rect { // A simple rounded rectangle for the background Rect { id: background - x: 1 - y: 2 - width: parent.width-2 - height: parent.height-4 - color: "#FEFFEE" - pen.color: "#FFBE4F" - radius: 5 + x: 1; y: 2; width: parent.width-2; height: parent.height-4 + color: "#FEFFEE"; pen.color: "#FFBE4F"; radius: 5 } // This mouse region covers the entire delegate. // When clicked it changes mode to 'Details'. If we are already @@ -47,145 +40,86 @@ Rect { // mode have their opacity set to wrapper.detailsOpacity. HorizontalLayout { id: topLayout - x: 10 - y: 10 + x: 10; y: 10; height: recipePic.height; width: parent.width spacing: 10 - height: recipePic.height - width: parent.width Image { id: recipePic - source: picture - width: 48 - height: 48 + source: picture; width: 48; height: 48 } VerticalLayout { - height: recipePic.height + height: recipePic.height; width: background.width-recipePic.width-20 spacing: 5 - width: background.width-recipePic.width-20 - Text { - id: name - text: title - font.bold: true - font.size: 16 - } + Text { id: name; text: title; font.bold: true; font.size: 16 } Text { + text: "Ingredients"; font.size: 12; font.bold: true opacity: wrapper.detailsOpacity - text: "Ingredients" - font.size: 12 - font.bold: true } Text { + text: ingredients; wrap: true; width: parent.width opacity: wrapper.detailsOpacity - text: ingredients - wrap: true - width: parent.width } } } Item { id: details - x: 10 - width: parent.width-20 - anchors.top: topLayout.bottom - anchors.topMargin: 10 - anchors.bottom: parent.bottom - anchors.bottomMargin: 10 + x: 10; width: parent.width-20 + anchors.top: topLayout.bottom; anchors.topMargin: 10 + anchors.bottom: parent.bottom; anchors.bottomMargin: 10 opacity: wrapper.detailsOpacity Text { id: methodTitle - text: "Method" - font.size: 12 - font.bold: true + text: "Method"; font.size: 12; font.bold: true anchors.top: parent.top } Flickable { id: flick - anchors.top: methodTitle.bottom - anchors.bottom: parent.bottom - width: parent.width - viewportHeight: methodText.height - clip: true - Text { - id: methodText - text: method - wrap: true - width: details.width - } + anchors.top: methodTitle.bottom; anchors.bottom: parent.bottom + width: parent.width; viewportHeight: methodText.height; clip: true + Text { id: methodText; text: method; wrap: true; width: details.width } } Image { - anchors.right: flick.right - anchors.top: flick.top - source: "content/pics/moreUp.png" - opacity: flick.atYBeginning ? 0 : 1 + anchors.right: flick.right; anchors.top: flick.top + source: "content/pics/moreUp.png"; opacity: flick.atYBeginning ? 0 : 1 } Image { - anchors.right: flick.right - anchors.bottom: flick.bottom - source: "content/pics/moreDown.png" - opacity: flick.atYEnd ? 0 : 1 + anchors.right: flick.right; anchors.bottom: flick.bottom + source: "content/pics/moreDown.png"; opacity: flick.atYEnd ? 0 : 1 } } // A button to close the detailed view, i.e. set the state back to default (''). MediaButton { - anchors.right: background.right - anchors.rightMargin: 5 - y: 10 - opacity: wrapper.detailsOpacity - text: "Close" - onClicked: { wrapper.state = '' } + anchors.right: background.right; anchors.rightMargin: 5 + y: 10; opacity: wrapper.detailsOpacity + text: "Close"; onClicked: { wrapper.state = '' } } // Make the default height equal the hight of the picture, plus margin. height: 68 states: [ State { name: "Details" - SetProperty { - target: background - property: "color" - value: "white" - } + SetProperty { target: background; property: "color"; value: "white" } // Make the picture bigger - SetProperties { - target: recipePic - width: 128 - height: 128 - } + SetProperties { target: recipePic; width: 128; height: 128 } // Make details visible - SetProperties { - target: wrapper - detailsOpacity: 1 - x: 0 - } + SetProperties { target: wrapper; detailsOpacity: 1; x: 0 } // Make the detailed view fill the entire list area - SetProperty { - target: wrapper - property: "height" - value: List.height - } + SetProperty { target: wrapper; property: "height"; value: List.height } // Move the list so that this item is at the top. SetProperty { target: wrapper.ListView.view - property: "yPosition" - value: wrapper.y + property: "yPosition"; value: wrapper.y } // Disallow flicking while we're in detailed view - SetProperty { - target: wrapper.ListView.view - property: "locked" - value: 1 - } + SetProperty { target: wrapper.ListView.view; property: "locked"; value: 1 } } ] transitions: [ Transition { // Make the state changes smooth ParallelAnimation { - ColorAnimation { - duration: 500 - } + ColorAnimation { duration: 500 } NumericAnimation { - duration: 300 - properties: "detailsOpacity,x,yPosition,height,width" + duration: 300; properties: "detailsOpacity,x,yPosition,height,width" } } } @@ -196,9 +130,7 @@ Rect { // The actual list ListView { id: List - model: Recipies - anchors.fill: parent - clip: true - delegate: recipeDelegate + model: Recipies; delegate: recipeDelegate + anchors.fill: parent; clip: true } } -- cgit v0.12 From c376633cba5c79ed1d842d9c6b7b68e31c646959 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Tue, 5 May 2009 11:01:56 +1000 Subject: Add not-yet-working Content example. --- doc/src/snippets/declarative/GroupBox.qml | 11 +++++++++++ doc/src/snippets/declarative/content.qml | 6 ++++++ 2 files changed, 17 insertions(+) create mode 100644 doc/src/snippets/declarative/GroupBox.qml create mode 100644 doc/src/snippets/declarative/content.qml diff --git a/doc/src/snippets/declarative/GroupBox.qml b/doc/src/snippets/declarative/GroupBox.qml new file mode 100644 index 0000000..a8ff5be --- /dev/null +++ b/doc/src/snippets/declarative/GroupBox.qml @@ -0,0 +1,11 @@ +ContentWrapper { + id: Container; width: parent.width + Rect { + width: parent.width; color: "white"; pen.width: 2; pen.color: "#adaeb0"; radius: 10 + clip: false; height: contents.height + VerticalLayout { + id: layout; width: parent.width + Content {} + } + } +} diff --git a/doc/src/snippets/declarative/content.qml b/doc/src/snippets/declarative/content.qml new file mode 100644 index 0000000..be04c6e --- /dev/null +++ b/doc/src/snippets/declarative/content.qml @@ -0,0 +1,6 @@ +GroupBox { + content: [ + Text { text: "First Item" } + Text { text: "Second Item" } + ] +} -- cgit v0.12 From c7a0cae7deb6e31c5b2e82c9a63ebe0a167fed09 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Tue, 5 May 2009 11:17:15 +1000 Subject: Improve error handling consistency --- src/declarative/qml/qml.pri | 6 +- src/declarative/qml/qmlcompiler.cpp | 33 +++-- src/declarative/qml/qmlcompiler_p.h | 5 +- src/declarative/qml/qmlcomponent.cpp | 24 ++-- src/declarative/qml/qmlcomponent.h | 5 +- src/declarative/qml/qmlcomponent_p.h | 3 +- src/declarative/qml/qmlcompositetypemanager.cpp | 23 +-- src/declarative/qml/qmlcompositetypemanager_p.h | 4 +- src/declarative/qml/qmldom.cpp | 18 +-- src/declarative/qml/qmldom.h | 2 + src/declarative/qml/qmldom_p.h | 2 +- src/declarative/qml/qmlerror.cpp | 180 ++++++++++++++++++++++++ src/declarative/qml/qmlerror.h | 82 +++++++++++ src/declarative/qml/qmlparser.cpp | 8 +- src/declarative/qml/qmlparser_p.h | 3 + src/declarative/qml/qmlscriptparser.cpp | 104 +++++++------- src/declarative/qml/qmlscriptparser_p.h | 11 +- src/declarative/qml/qmlvme.cpp | 24 ++-- src/declarative/qml/qmlvme_p.h | 5 +- src/declarative/util/qfxview.cpp | 79 ++++++++++- src/declarative/util/qfxview.h | 3 +- tools/qmlviewer/qmlviewer.cpp | 8 ++ 22 files changed, 501 insertions(+), 131 deletions(-) create mode 100644 src/declarative/qml/qmlerror.cpp create mode 100644 src/declarative/qml/qmlerror.h diff --git a/src/declarative/qml/qml.pri b/src/declarative/qml/qml.pri index 9067039..69a1461 100644 --- a/src/declarative/qml/qml.pri +++ b/src/declarative/qml/qml.pri @@ -22,7 +22,8 @@ SOURCES += qml/qmlparser.cpp \ qml/qmlclassfactory.cpp \ qml/qmlparserstatus.cpp \ qml/qmlcompositetypemanager.cpp \ - qml/qmlinfo.cpp + qml/qmlinfo.cpp \ + qml/qmlerror.cpp HEADERS += qml/qmlparser_p.h \ qml/qmlinstruction_p.h \ @@ -58,7 +59,8 @@ HEADERS += qml/qmlparser_p.h \ qml/qmlcontext_p.h \ qml/qmlcompositetypemanager_p.h \ qml/qmllist.h \ - qml/qmldeclarativedata_p.h + qml/qmldeclarativedata_p.h \ + qml/qmlerror.h # for qtscript debugger QT += scripttools diff --git a/src/declarative/qml/qmlcompiler.cpp b/src/declarative/qml/qmlcompiler.cpp index c9bdfec..37d7fa1 100644 --- a/src/declarative/qml/qmlcompiler.cpp +++ b/src/declarative/qml/qmlcompiler.cpp @@ -147,7 +147,7 @@ int QmlCompiledData::indexForInt(int *data, int count) } QmlCompiler::QmlCompiler() -: exceptionLine(-1), output(0) +: exceptionLine(-1), exceptionColumn(-1), output(0) { } @@ -156,14 +156,19 @@ bool QmlCompiler::isError() const return exceptionLine != -1; } -qint64 QmlCompiler::errorLine() const +QList QmlCompiler::errors() const { - return exceptionLine; -} + QList rv; + + if(isError()) { + QmlError error; + error.setDescription(exceptionDescription); + error.setLine(exceptionLine); + error.setColumn(exceptionColumn); + rv << error; + } -QString QmlCompiler::errorDescription() const -{ - return exceptionDescription; + return rv; } bool QmlCompiler::isValidId(const QString &val) @@ -437,9 +442,19 @@ void QmlCompiler::reset(QmlCompiledComponent *cc, bool deleteMemory) cc->bytecode.clear(); } +#define COMPILE_EXCEPTION2(token, desc) \ + { \ + exceptionLine = token->line; \ + exceptionColumn = token->column; \ + QDebug d(&exceptionDescription); \ + d << desc; \ + return false; \ + } + #define COMPILE_EXCEPTION(desc) \ { \ exceptionLine = obj->line; \ + exceptionColumn = obj->column; \ QDebug d(&exceptionDescription); \ d << desc; \ return false; \ @@ -1215,10 +1230,10 @@ bool QmlCompiler::compilePropertyLiteralAssignment(QmlParser::Property *prop, //### 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_EXCEPTION("Cannot assign value" << v->primitive << "to property" << obj->metaObject()->property(prop->index).name()); + COMPILE_EXCEPTION2(v, "Cannot assign value" << v->primitive << "to property" << obj->metaObject()->property(prop->index).name()); doassign = false; } else if (r == ReadOnly) { - COMPILE_EXCEPTION("Cannot assign value" << v->primitive << "to the read-only property" << obj->metaObject()->property(prop->index).name()); + COMPILE_EXCEPTION2(v, "Cannot assign value" << v->primitive << "to the read-only property" << obj->metaObject()->property(prop->index).name()); } else { doassign = true; } diff --git a/src/declarative/qml/qmlcompiler_p.h b/src/declarative/qml/qmlcompiler_p.h index 9a0ce1c..cc1a9e9 100644 --- a/src/declarative/qml/qmlcompiler_p.h +++ b/src/declarative/qml/qmlcompiler_p.h @@ -45,6 +45,7 @@ #include #include #include +#include #include #include class QStringList; @@ -115,8 +116,7 @@ public: bool compile(QmlEngine *, QmlCompositeTypeData *, QmlCompiledComponent *); bool isError() const; - qint64 errorLine() const; - QString errorDescription() const; + QList errors() const; static bool isValidId(const QString &); static bool isBinding(const QString &); @@ -176,6 +176,7 @@ private: QSet ids; qint64 exceptionLine; + qint64 exceptionColumn; QString exceptionDescription; QmlCompiledData *output; }; diff --git a/src/declarative/qml/qmlcomponent.cpp b/src/declarative/qml/qmlcomponent.cpp index c316f03..3b4d7b3 100644 --- a/src/declarative/qml/qmlcomponent.cpp +++ b/src/declarative/qml/qmlcomponent.cpp @@ -137,9 +137,7 @@ void QmlComponentPrivate::fromTypeData(QmlCompositeTypeData *data) if (!c) { Q_ASSERT(data->status == QmlCompositeTypeData::Error); - errorDescription = data->errorDescription; - qWarning().nospace() << "QmlComponent: " - << data->errorDescription.toLatin1().constData(); + errors = data->errors; } else { @@ -194,7 +192,7 @@ QmlComponent::Status QmlComponent::status() const return Loading; else if (d->engine && d->cc) return Ready; - else if (!d->errorDescription.isEmpty()) + else if (!d->errors.isEmpty()) return Error; else return Null; @@ -353,13 +351,13 @@ void QmlComponent::loadUrl(const QUrl &url) emit statusChanged(status()); } -QString QmlComponent::errorDescription() const +QList QmlComponent::errors() const { Q_D(const QmlComponent); if (isError()) - return d->errorDescription; + return d->errors; else - return QString(); + return QList(); } /*! @@ -448,7 +446,7 @@ QObject *QmlComponent::beginCreate(QmlContext *context) } if (!isReady()) { - qWarning("QmlComponent: Cannot create un-ready component"); + qWarning("QmlComponent: Component is not ready"); return 0; } @@ -466,15 +464,9 @@ QObject *QmlComponent::beginCreate(QmlContext *context) QmlVME vme; QObject *rv = vme.run(ctxt, d->cc, d->start, d->count); - if (vme.isError()) { - qWarning().nospace() -#ifdef QML_VERBOSEERRORS_ENABLED - << "QmlComponent: " -#endif - << vme.errorDescription().toLatin1().constData() << " @" - << d->url.toString().toLatin1().constData() << ":" << vme.errorLine(); - } + if (vme.isError()) + d->errors = vme.errors(); ctxt->deactivate(); diff --git a/src/declarative/qml/qmlcomponent.h b/src/declarative/qml/qmlcomponent.h index 0493c1f..90f7467 100644 --- a/src/declarative/qml/qmlcomponent.h +++ b/src/declarative/qml/qmlcomponent.h @@ -46,7 +46,7 @@ #include #include #include - +#include QT_BEGIN_HEADER @@ -77,7 +77,8 @@ public: bool isReady() const; bool isError() const; bool isLoading() const; - QString errorDescription() const; + + QList errors() const; QUrl url() const; diff --git a/src/declarative/qml/qmlcomponent_p.h b/src/declarative/qml/qmlcomponent_p.h index bb5f7bb..0507958 100644 --- a/src/declarative/qml/qmlcomponent_p.h +++ b/src/declarative/qml/qmlcomponent_p.h @@ -47,6 +47,7 @@ #include #include "private/qobject_p.h" #include "private/qmlcompositetypemanager_p.h" +#include #include "qmlcomponent.h" class QmlComponent; class QmlEngine; @@ -68,7 +69,7 @@ public: void fromTypeData(QmlCompositeTypeData *data); - QString errorDescription; + QList errors; QUrl url; int start; diff --git a/src/declarative/qml/qmlcompositetypemanager.cpp b/src/declarative/qml/qmlcompositetypemanager.cpp index 7f2cc58..fbe40bf 100644 --- a/src/declarative/qml/qmlcompositetypemanager.cpp +++ b/src/declarative/qml/qmlcompositetypemanager.cpp @@ -105,10 +105,9 @@ QmlCompositeTypeData::toCompiledComponent(QmlEngine *engine) QmlCompiler compiler; if (!compiler.compile(engine, this, compiledComponent)) { status = Error; - errorDescription = compiler.errorDescription() + - QLatin1String("@") + - url + QLatin1String(":") + - QString::number(compiler.errorLine()); + errors = compiler.errors(); + for(int ii = 0; ii < errors.count(); ++ii) + errors[ii].setUrl(url); compiledComponent->release(); compiledComponent = 0; } @@ -188,7 +187,10 @@ void QmlCompositeTypeManager::replyFinished() reply->url().toString(); unit->status = QmlCompositeTypeData::Error; - unit->errorDescription = errorDescription; + // ### FIXME + QmlError error; + error.setDescription(errorDescription); + unit->errors << error; doComplete(unit); } else { @@ -215,7 +217,10 @@ void QmlCompositeTypeManager::loadSource(QmlCompositeTypeData *unit) // ### - Fill in error errorDescription = QLatin1String("File error for URL ") + url.toString(); unit->status = QmlCompositeTypeData::Error; - unit->errorDescription = errorDescription; + // ### FIXME + QmlError error; + error.setDescription(errorDescription); + unit->errors << error; doComplete(unit); } @@ -234,7 +239,7 @@ void QmlCompositeTypeManager::setData(QmlCompositeTypeData *unit, if (!unit->data.parse(data, url)) { unit->status = QmlCompositeTypeData::Error; - unit->errorDescription = unit->data.errorDescription(); + unit->errors << unit->data.errors(); doComplete(unit); } else { @@ -273,7 +278,7 @@ void QmlCompositeTypeManager::checkComplete(QmlCompositeTypeData *unit) if (u->status == QmlCompositeTypeData::Error) { unit->status = QmlCompositeTypeData::Error; - unit->errorDescription = u->errorDescription; + unit->errors = u->errors; doComplete(unit); return; } else if (u->status == QmlCompositeTypeData::Waiting) { @@ -334,7 +339,7 @@ void QmlCompositeTypeManager::compile(QmlCompositeTypeData *unit) case QmlCompositeTypeData::Invalid: case QmlCompositeTypeData::Error: unit->status = QmlCompositeTypeData::Error; - unit->errorDescription = urlUnit->errorDescription; + unit->errors = urlUnit->errors; doComplete(unit); return; diff --git a/src/declarative/qml/qmlcompositetypemanager_p.h b/src/declarative/qml/qmlcompositetypemanager_p.h index bc86fcf..e4028d5 100644 --- a/src/declarative/qml/qmlcompositetypemanager_p.h +++ b/src/declarative/qml/qmlcompositetypemanager_p.h @@ -45,6 +45,7 @@ #include #include #include +#include QT_BEGIN_NAMESPACE @@ -65,7 +66,8 @@ struct QmlCompositeTypeData : public QmlRefCount Waiting }; Status status; - QString errorDescription; + + QList errors; QString url; QList dependants; diff --git a/src/declarative/qml/qmldom.cpp b/src/declarative/qml/qmldom.cpp index cf0a2fb..239aa7b 100644 --- a/src/declarative/qml/qmldom.cpp +++ b/src/declarative/qml/qmldom.cpp @@ -152,11 +152,11 @@ bool QmlDomDocument::load(QmlEngine *engine, const QByteArray &data) { Q_UNUSED(engine); - d->error = QString(); + d->errors.clear(); QmlScriptParser parser; if (!parser.parse(data)) { - d->error = parser.errorDescription(); + d->errors = parser.errors(); return false; } @@ -166,11 +166,13 @@ bool QmlDomDocument::load(QmlEngine *engine, const QByteArray &data) QmlCompositeTypeData *td = ((QmlEnginePrivate *)QmlEnginePrivate::get(engine))->typeManager.getImmediate(data, QUrl());; if(td->status == QmlCompositeTypeData::Error) { - d->error = td->errorDescription; + d->errors = td->errors; td->release(); return false; } else if(td->status == QmlCompositeTypeData::Waiting) { - d->error = QLatin1String("QmlDomDocument supports local types only"); + QmlError error; + error.setDescription(QLatin1String("QmlDomDocument supports local types only")); + d->errors << error; td->release(); return false; } @@ -178,7 +180,7 @@ bool QmlDomDocument::load(QmlEngine *engine, const QByteArray &data) compiler.compile(engine, td, &component); if (compiler.isError()) { - d->error = compiler.errorDescription(); + d->errors = compiler.errors(); td->release(); return false; } @@ -194,14 +196,14 @@ bool QmlDomDocument::load(QmlEngine *engine, const QByteArray &data) /*! - Returns the last load error. The load error will be reset after a + Returns the last load errors. The load errors will be reset after a successful call to load(). \sa load() */ -QString QmlDomDocument::loadError() const +QList QmlDomDocument::errors() const { - return d->error; + return d->errors; } /*! diff --git a/src/declarative/qml/qmldom.h b/src/declarative/qml/qmldom.h index 47a89d9..74ed27c 100644 --- a/src/declarative/qml/qmldom.h +++ b/src/declarative/qml/qmldom.h @@ -44,6 +44,7 @@ #include #include +#include QT_BEGIN_HEADER @@ -71,6 +72,7 @@ public: int version() const; + QList errors() const; QString loadError() const; bool load(QmlEngine *, const QByteArray &); QByteArray save() const; diff --git a/src/declarative/qml/qmldom_p.h b/src/declarative/qml/qmldom_p.h index 8ea56bf..4c3ca44 100644 --- a/src/declarative/qml/qmldom_p.h +++ b/src/declarative/qml/qmldom_p.h @@ -57,7 +57,7 @@ public: QmlDomDocumentPrivate(const QmlDomDocumentPrivate &); ~QmlDomDocumentPrivate(); - QString error; + QList errors; QmlParser::Object *root; }; diff --git a/src/declarative/qml/qmlerror.cpp b/src/declarative/qml/qmlerror.cpp new file mode 100644 index 0000000..66c834f --- /dev/null +++ b/src/declarative/qml/qmlerror.cpp @@ -0,0 +1,180 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qmlerror.h" +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QmlErrorPrivate +{ +public: + QmlErrorPrivate(); + + QUrl url; + QString description; + int line; + int column; +}; + +QmlErrorPrivate::QmlErrorPrivate() +: line(-1), column(-1) +{ +} + +QmlError::QmlError() +: d(new QmlErrorPrivate) +{ +} + +QmlError::QmlError(const QmlError &other) +: d(new QmlErrorPrivate) +{ + *this = other; +} + +QmlError &QmlError::operator=(const QmlError &other) +{ + d->url = other.d->url; + d->description = other.d->description; + d->line = other.d->line; + d->column = other.d->column; + return *this; +} + +QmlError::~QmlError() +{ + delete d; d = 0; +} + +QUrl QmlError::url() const +{ + return d->url; +} + +void QmlError::setUrl(const QUrl &url) +{ + d->url = url; +} + +QString QmlError::description() const +{ + return d->description; +} + +void QmlError::setDescription(const QString &description) +{ + d->description = description; +} + +int QmlError::line() const +{ + return d->line; +} + +void QmlError::setLine(int line) +{ + d->line = line; +} + +int QmlError::column() const +{ + return d->column; +} + +void QmlError::setColumn(int column) +{ + d->column = column; +} + +QDebug operator<<(QDebug debug, const QmlError &error) +{ + QUrl url = error.url(); + + QString output; + + output = url.toString() + QLatin1String(":") + + QString::number(error.line()); + + if(error.column() != -1) + output += QLatin1String(":") + QString::number(error.column()); + + output += QLatin1String(": ") + error.description(); + + debug << qPrintable(output) << "\n"; + + if (error.line() > 0 && error.column() > 0 && + url.scheme() == QLatin1String("file")) { + QString file = url.toLocalFile(); + QFile f(file); + if (f.open(QIODevice::ReadOnly)) { + QByteArray data = f.readAll(); + QTextStream stream(data, QIODevice::ReadOnly); + const QString code = stream.readAll(); + const QStringList lines = code.split(QLatin1Char('\n')); + + if (lines.count() >= error.line()) { + const QString &line = lines.at(error.line() - 1); + debug << qPrintable(line) << "\n"; + + int column = qMax(0, error.column() - 1); + column = qMin(column, line.length()); + + QByteArray ind; + ind.reserve(column); + for (int i = 0; i < column; ++i) { + const QChar ch = line.at(i); + if (ch.isSpace()) + ind.append(ch.unicode()); + else + ind.append(' '); + } + ind.append('^'); + debug << ind.constData(); + } + } + } + return debug; +} + +QT_END_NAMESPACE diff --git a/src/declarative/qml/qmlerror.h b/src/declarative/qml/qmlerror.h new file mode 100644 index 0000000..57d2f8f --- /dev/null +++ b/src/declarative/qml/qmlerror.h @@ -0,0 +1,82 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QMLERROR_H +#define QMLERROR_H + +#include +#include + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +QT_MODULE(Declarative) + +class QDebug; +class QmlErrorPrivate; +class Q_DECLARATIVE_EXPORT QmlError +{ +public: + QmlError(); + QmlError(const QmlError &); + QmlError &operator=(const QmlError &); + ~QmlError(); + + QUrl url() const; + void setUrl(const QUrl &); + QString description() const; + void setDescription(const QString &); + int line() const; + void setLine(int); + int column() const; + void setColumn(int); +private: + QmlErrorPrivate *d; +}; + +QDebug Q_DECLARATIVE_EXPORT operator<<(QDebug debug, const QmlError &error); + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif // QMLERROR_H diff --git a/src/declarative/qml/qmlparser.cpp b/src/declarative/qml/qmlparser.cpp index ecb6f0b..87c8434 100644 --- a/src/declarative/qml/qmlparser.cpp +++ b/src/declarative/qml/qmlparser.cpp @@ -63,7 +63,7 @@ QT_BEGIN_NAMESPACE using namespace QmlParser; QmlParser::Object::Object() -: type(-1), metatype(0), extObject(0), defaultProperty(0), line(-1), +: type(-1), metatype(0), extObject(0), defaultProperty(0), line(-1), column(-1), dynamicPropertiesProperty(0), dynamicSignalsProperty(0) { } @@ -127,12 +127,12 @@ QmlParser::Object::DynamicSignal::DynamicSignal(const DynamicSignal &o) } QmlParser::Property::Property() -: type(0), index(-1), value(0), isDefault(true), line(-1) +: type(0), index(-1), value(0), isDefault(true), line(-1), column(-1) { } QmlParser::Property::Property(const QByteArray &n) -: type(0), index(-1), value(0), name(n), isDefault(false), line(-1) +: type(0), index(-1), value(0), name(n), isDefault(false), line(-1), column(-1) { } @@ -161,7 +161,7 @@ void QmlParser::Property::addValue(Value *v) } QmlParser::Value::Value() -: type(Unknown), object(0), line(-1) +: type(Unknown), object(0), line(-1), column(-1) { } diff --git a/src/declarative/qml/qmlparser_p.h b/src/declarative/qml/qmlparser_p.h index e29cdbf..17b367d6 100644 --- a/src/declarative/qml/qmlparser_p.h +++ b/src/declarative/qml/qmlparser_p.h @@ -103,6 +103,7 @@ namespace QmlParser QHash properties; qint64 line; + qint64 column; struct DynamicProperty { DynamicProperty(); @@ -167,6 +168,7 @@ namespace QmlParser Object *object; qint64 line; + qint64 column; }; class Property : public QmlRefCount @@ -197,6 +199,7 @@ namespace QmlParser bool isDefault; qint64 line; + qint64 column; }; } diff --git a/src/declarative/qml/qmlscriptparser.cpp b/src/declarative/qml/qmlscriptparser.cpp index 8039b5c..618eb2e 100644 --- a/src/declarative/qml/qmlscriptparser.cpp +++ b/src/declarative/qml/qmlscriptparser.cpp @@ -65,10 +65,12 @@ protected: Object *defineObjectBinding(int line, AST::UiQualifiedId *propertyName, const QString &objectType, + AST::SourceLocation typeLocation, AST::UiObjectInitializer *initializer = 0); Object *defineObjectBinding_helper(int line, AST::UiQualifiedId *propertyName, const QString &objectType, + AST::SourceLocation typeLocation, AST::UiObjectInitializer *initializer = 0); QString getPrimitive(const QByteArray &propertyName, AST::ExpressionNode *expr); void defineProperty(const QString &propertyName, int line, const QString &primitive); @@ -194,11 +196,17 @@ QString ProcessAST::asString(AST::UiQualifiedId *node) const Object *ProcessAST::defineObjectBinding_helper(int line, AST::UiQualifiedId *propertyName, const QString &objectType, + AST::SourceLocation typeLocation, AST::UiObjectInitializer *initializer) { bool isType = !objectType.isEmpty() && objectType.at(0).isUpper() && !objectType.contains(QLatin1Char('.')); + if (!isType) { - qWarning() << "bad name for a class"; // ### FIXME + QmlError error; + error.setDescription("Expected type name"); + error.setLine(typeLocation.startLine); + error.setColumn(typeLocation.startColumn); + _parser->_errors << error; return false; } @@ -235,7 +243,7 @@ Object *ProcessAST::defineObjectBinding_helper(int line, if (!_parser->scriptFile().isEmpty()) { _stateStack.pushObject(obj); - Object *scriptObject= defineObjectBinding(line, 0, QLatin1String("Script")); + Object *scriptObject= defineObjectBinding(line, 0, QLatin1String("Script"), AST::SourceLocation()); _stateStack.pushObject(scriptObject); defineProperty(QLatin1String("src"), line, _parser->scriptFile()); _stateStack.pop(); // scriptObject @@ -264,11 +272,12 @@ Object *ProcessAST::defineObjectBinding_helper(int line, Object *ProcessAST::defineObjectBinding(int line, AST::UiQualifiedId *qualifiedId, const QString &objectType, + AST::SourceLocation typeLocation, AST::UiObjectInitializer *initializer) { if (objectType == QLatin1String("Connection")) { - Object *obj = defineObjectBinding_helper(line, 0, QLatin1String("Connection")); + Object *obj = defineObjectBinding_helper(line, 0, objectType, typeLocation); _stateStack.pushObject(obj); @@ -297,7 +306,7 @@ Object *ProcessAST::defineObjectBinding(int line, return obj; } - return defineObjectBinding_helper(line, qualifiedId, objectType, initializer); + return defineObjectBinding_helper(line, qualifiedId, objectType, typeLocation, initializer); } void ProcessAST::defineProperty(const QString &propertyName, int line, const QString &primitive) @@ -372,7 +381,11 @@ bool ProcessAST::visit(AST::UiPublicMember *node) } if(!typeFound) { - qWarning() << "Unknown property type" << memberType; // ### FIXME + QmlError error; + error.setDescription("Expected property type"); + error.setLine(node->typeToken.startLine); + error.setColumn(node->typeToken.startColumn); + _parser->_errors << error; return false; } @@ -402,6 +415,7 @@ bool ProcessAST::visit(AST::UiObjectDefinition *node) defineObjectBinding(node->identifierToken.startLine, 0, node->name->asString(), + node->identifierToken, node->initializer); return false; @@ -414,6 +428,7 @@ bool ProcessAST::visit(AST::UiObjectBinding *node) defineObjectBinding(node->identifierToken.startLine, node->qualifiedId, node->name->asString(), + node->identifierToken, node->initializer); return false; @@ -476,7 +491,8 @@ bool ProcessAST::visit(AST::UiScriptBinding *node) Value *v = new Value; v->primitive = primitive; - v->line = node->colonToken.startLine; + v->line = node->statement->firstSourceLocation().startLine; + v->column = node->statement->firstSourceLocation().startColumn; prop->addValue(v); while (propertyCount--) @@ -535,7 +551,7 @@ bool ProcessAST::visit(AST::UiSourceElement *node) QmlScriptParser::QmlScriptParser() - : root(0), _errorLine(-1) +: root(0) { } @@ -556,8 +572,11 @@ bool QmlScriptParser::parse(const QByteArray &data, const QUrl &url) return true; } - _error = xmlParser.errorDescription(); - _errorLine = 0; // ### FIXME + QmlError error; + error.setUrl(url); + error.setDescription(xmlParser.errorDescription()); + _errors << error; + return false; } @@ -576,61 +595,34 @@ bool QmlScriptParser::parse(const QByteArray &data, const QUrl &url) lexer.setCode(code, /*line = */ 1); driver.setLexer(&lexer); - if (! parser.parse(&driver)) { - _error = parser.errorMessage(); - _errorLine = parser.errorLineNumber(); - - const QStringList lines = code.split(QLatin1Char('\n')); + if (! parser.parse(&driver) || !_errors.isEmpty()) { + // Extract errors from the parser foreach (const JavaScriptParser::DiagnosticMessage &m, parser.diagnosticMessages()) { if (m.isWarning()) continue; - qWarning().nospace() << qPrintable(fileName) << ":" - << m.line << ":" - << m.column << ": " - << "error: " - << qPrintable(m.message); - - const QString textLine = lines.at(m.line - 1); - - qWarning() << qPrintable(textLine); + QmlError error; + error.setUrl(url); + error.setDescription(m.message); + error.setLine(m.line); + error.setColumn(m.column); + _errors << error; - int column = qMax(0, m.column - 1); - column = qMin(column, textLine.length()); // paranoia check - - QByteArray ind; - ind.reserve(column); - - for (int i = 0; i < column; ++i) { - const QChar ch = textLine.at(i); - if (ch.isSpace()) - ind.append(ch.unicode()); - else - ind.append(' '); - } - ind.append('^'); - qWarning() << ind.constData(); } - - return false; } - ProcessAST process(this); - process(code, parser.ast()); + if (_errors.isEmpty()) { + ProcessAST process(this); + process(code, parser.ast()); - return true; -} - -QString QmlScriptParser::errorDescription() const -{ - return _error; -} + // Set the url for process errors + for(int ii = 0; ii < _errors.count(); ++ii) + _errors[ii].setUrl(url); + } -int QmlScriptParser::errorLine() const -{ - return _errorLine; + return _errors.isEmpty(); } QMap QmlScriptParser::nameSpacePaths() const @@ -648,6 +640,11 @@ Object *QmlScriptParser::tree() const return root; } +QList QmlScriptParser::errors() const +{ + return _errors; +} + void QmlScriptParser::clear() { if (root) { @@ -656,9 +653,8 @@ void QmlScriptParser::clear() } _nameSpacePaths.clear(); _typeNames.clear(); - _error.clear(); + _errors.clear(); _scriptFile.clear(); - _errorLine = 0; } int QmlScriptParser::findOrCreateTypeId(const QString &name) diff --git a/src/declarative/qml/qmlscriptparser_p.h b/src/declarative/qml/qmlscriptparser_p.h index 0d89268..4155bba 100644 --- a/src/declarative/qml/qmlscriptparser_p.h +++ b/src/declarative/qml/qmlscriptparser_p.h @@ -3,6 +3,7 @@ #include #include +#include #include QT_BEGIN_HEADER @@ -23,8 +24,6 @@ public: ~QmlScriptParser(); bool parse(const QByteArray &data, const QUrl &url = QUrl()); - QString errorDescription() const; - int errorLine() const; QMap nameSpacePaths() const; QStringList types() const; @@ -33,6 +32,8 @@ public: void clear(); + QList errors() const; + // ### private: int findOrCreateTypeId(const QString &name); void setTree(QmlParser::Object *tree); @@ -42,12 +43,12 @@ public: void addNamespacePath(const QString &path); -private: +// ### private: + QList _errors; + QMap _nameSpacePaths; QmlParser::Object *root; QStringList _typeNames; - QString _error; - int _errorLine; QString _scriptFile; }; diff --git a/src/declarative/qml/qmlvme.cpp b/src/declarative/qml/qmlvme.cpp index e6235e4..a3bfd62 100644 --- a/src/declarative/qml/qmlvme.cpp +++ b/src/declarative/qml/qmlvme.cpp @@ -176,9 +176,14 @@ QmlVME::QmlVME() #define VME_EXCEPTION(desc) \ { \ - exceptionLine = instr.line; \ - QDebug d(&exceptionDescription); \ - d << desc; \ + QString str; \ + QDebug d(&str); \ + d << desc; \ + QmlError error; \ + error.setDescription(str); \ + error.setLine(instr.line); \ + error.setUrl(comp->url); \ + vmeErrors << error; \ break; \ } @@ -224,6 +229,8 @@ QObject *QmlVME::run(QmlContext *ctxt, QmlCompiledComponent *comp, int start, in QStack pushedProperties; QObject **savedObjects = 0; + vmeErrors.clear(); + if (start == -1) start = 0; if (count == -1) count = comp->bytecode.count(); @@ -1072,17 +1079,12 @@ QObject *QmlVME::run(QmlContext *ctxt, QmlCompiledComponent *comp, int start, in bool QmlVME::isError() const { - return exceptionLine != -1; -} - -qint64 QmlVME::errorLine() const -{ - return exceptionLine; + return !vmeErrors.isEmpty(); } -QString QmlVME::errorDescription() const +QList QmlVME::errors() const { - return exceptionDescription; + return vmeErrors; } void QmlVME::runStoreInstruction(QStack &stack, diff --git a/src/declarative/qml/qmlvme_p.h b/src/declarative/qml/qmlvme_p.h index 2a3be06..86cd040 100644 --- a/src/declarative/qml/qmlvme_p.h +++ b/src/declarative/qml/qmlvme_p.h @@ -44,6 +44,7 @@ #include #include +#include class QObject; QT_BEGIN_NAMESPACE @@ -60,13 +61,13 @@ public: QObject *run(QmlContext *, QmlCompiledComponent *, int start = -1, int end = -1); bool isError() const; - qint64 errorLine() const; - QString errorDescription() const; + QList errors() const; private: void runStoreInstruction(QStack &stack, QmlInstruction &, QmlCompiledData *); + QList vmeErrors; qint64 exceptionLine; QString exceptionDescription; }; diff --git a/src/declarative/util/qfxview.cpp b/src/declarative/util/qfxview.cpp index cac73a0..f71b87e 100644 --- a/src/declarative/util/qfxview.cpp +++ b/src/declarative/util/qfxview.cpp @@ -233,8 +233,6 @@ QmlContext* QFxView::rootContext() */ void QFxView::execute() { - rootContext()->activate(); - if (d->qml.isEmpty()) { d->component = new QmlComponent(&d->engine, d->source, this); } else { @@ -249,6 +247,45 @@ void QFxView::execute() } /*! + \internal +*/ +void QFxView::printErrorLine(const QmlError &error) +{ + QUrl url = error.url(); + if (error.line() > 0 && error.column() > 0 && + url.scheme() == QLatin1String("file")) { + QString file = url.toLocalFile(); + QFile f(file); + if (f.open(QIODevice::ReadOnly)) { + QByteArray data = f.readAll(); + QTextStream stream(data, QIODevice::ReadOnly); + const QString code = stream.readAll(); + const QStringList lines = code.split(QLatin1Char('\n')); + + if (lines.count() >= error.line()) { + const QString &line = lines.at(error.line() - 1); + qWarning() << qPrintable(line); + + int column = qMax(0, error.column() - 1); + column = qMin(column, line.length()); + + QByteArray ind; + ind.reserve(column); + for (int i = 0; i < column; ++i) { + const QChar ch = line.at(i); + if (ch.isSpace()) + ind.append(ch.unicode()); + else + ind.append(' '); + } + ind.append('^'); + qWarning() << ind.constData(); + } + } + } +} + +/*! \internal */ void QFxView::continueExecute() @@ -260,8 +297,26 @@ void QFxView::continueExecute() return; } + if(d->component->isError()) { + QList errors = d->component->errors(); + foreach (const QmlError &error, errors) { + qWarning() << error; + } + + return; + } + QObject *obj = d->component->create(); - rootContext()->deactivate(); + + if(d->component->isError()) { + QList errors = d->component->errors(); + foreach (const QmlError &error, errors) { + qWarning() << error; + } + + return; + } + if (obj) { if (QFxItem *item = qobject_cast(obj)) { item->QSimpleCanvasItem::setParent(QSimpleCanvas::root()); @@ -330,7 +385,25 @@ QFxItem* QFxView::addItem(const QString &qml, QFxItem* parent) return 0; QmlComponent component(&d->engine, qml.toUtf8(), QUrl()); + if(d->component->isError()) { + QList errors = d->component->errors(); + foreach (const QmlError &error, errors) { + qWarning() << error; + } + + return 0; + } + QObject *obj = component.create(); + if(d->component->isError()) { + QList errors = d->component->errors(); + foreach (const QmlError &error, errors) { + qWarning() << error; + } + + return 0; + } + if (obj){ QFxItem *item = static_cast(obj); if (!parent) diff --git a/src/declarative/util/qfxview.h b/src/declarative/util/qfxview.h index d2cacf4..f575f27 100644 --- a/src/declarative/util/qfxview.h +++ b/src/declarative/util/qfxview.h @@ -57,7 +57,7 @@ QT_MODULE(Declarative) class QFxItem; class QmlEngine; class QmlContext; -class Canvas; +class QmlError; class QFxViewPrivate; class Q_DECLARATIVE_EXPORT QFxView : public QSimpleCanvas @@ -84,6 +84,7 @@ public: void dumpRoot(); + static void printErrorLine(const QmlError &); Q_SIGNALS: void sceneResized(QSize size); diff --git a/tools/qmlviewer/qmlviewer.cpp b/tools/qmlviewer/qmlviewer.cpp index 3c52cfe..00cb7f1 100644 --- a/tools/qmlviewer/qmlviewer.cpp +++ b/tools/qmlviewer/qmlviewer.cpp @@ -85,6 +85,14 @@ void QmlViewer::openQml(const QString& fileName) QmlComponent comp(canvas->engine()); comp.setData(data, QUrl()); QObject *dummyData = comp.create(); + + if(comp.isError()) { + QList errors = comp.errors(); + foreach (const QmlError &error, errors) { + qWarning() << error; + } + } + if (dummyData) { qWarning() << "Loaded dummy data:" << dir.filePath(qml); qml.truncate(qml.length()-4); -- cgit v0.12