2011-07-01 Juan C. Montemayor <jmont@apple.com>

        Reviewed by Oliver Hunt.

        Lexer error messages are currently appalling
        https://bugs.webkit.org/show_bug.cgi?id=63340

        Updated expected test results.

        * fast/js/basic-strict-mode-expected.txt:
        * fast/js/kde/parse-expected.txt:
        * fast/js/kde/string-1-n-expected.txt:
        * fast/js/kde/string-2-n-expected.txt:
        * fast/js/numeric-escapes-in-string-literals-expected.txt:
        * fast/js/removing-Cf-characters-expected.txt:
        * fast/regex/non-pattern-characters-expected.txt:
        * http/tests/websocket/tests/bad-sub-protocol-control-chars-expected.txt:
        * loader/reload-subresource-when-type-changes-expected.txt:
        * sputnik/Conformance/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A2.1_T1-expected.txt:
        * sputnik/Conformance/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A2.1_T2-expected.txt:
        * sputnik/Conformance/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A2.2_T1-expected.txt:
        * sputnik/Conformance/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A2.2_T2-expected.txt:
        * sputnik/Conformance/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A2.3-expected.txt:
        * sputnik/Conformance/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A2.4-expected.txt:
        * sputnik/Conformance/07_Lexical_Conventions/7.4_Comments/S7.4_A2_T2-expected.txt:
        * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.3_Numeric_Literals/S7.8.3_A6.1_T1-expected.txt:
        * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.3_Numeric_Literals/S7.8.3_A6.1_T2-expected.txt:
        * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.3_Numeric_Literals/S7.8.3_A6.2_T1-expected.txt:
        * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.3_Numeric_Literals/S7.8.3_A6.2_T2-expected.txt:
        * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A1.1_T1-expected.txt:
        * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A1.1_T2-expected.txt:
        * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A1.2_T1-expected.txt:
        * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A1.2_T2-expected.txt:
        * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A3.1_T1-expected.txt:
        * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A3.1_T2-expected.txt:
        * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A3.2_T1-expected.txt:
        * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A3.2_T2-expected.txt:
        * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A7.1_T4-expected.txt:
        * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A7.2_T1-expected.txt:
        * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A7.2_T2-expected.txt:
        * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A7.2_T3-expected.txt:
        * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A7.2_T4-expected.txt:
        * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A7.2_T5-expected.txt:
        * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A7.2_T6-expected.txt:
        * sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A1.2_T1-expected.txt:
        * sputnik/Conformance/08_Types/8.4_The_String_Type/S8.4_A13_T1-expected.txt:
        * sputnik/Conformance/08_Types/8.4_The_String_Type/S8.4_A13_T2-expected.txt:
        * sputnik/Conformance/08_Types/8.4_The_String_Type/S8.4_A14_T1-expected.txt:
        * sputnik/Conformance/08_Types/8.4_The_String_Type/S8.4_A14_T2-expected.txt:
2011-07-01  Juan C. Montemayor  <jmont@apple.com>

        Reviewed by Oliver Hunt.

        Lexer error messages are currently appalling
        https://bugs.webkit.org/show_bug.cgi?id=63340

        Added error messages for the Lexer. These messages will be displayed
        instead of the lexer error messages from the parser that are currently
        shown.

        * parser/Lexer.cpp:
        (JSC::Lexer::getInvalidCharMessage):
        (JSC::Lexer::setCode):
        (JSC::Lexer::parseString):
        (JSC::Lexer::lex):
        (JSC::Lexer::clear):
        * parser/Lexer.h:
        (JSC::Lexer::getErrorMessage):
        (JSC::Lexer::setOffset):
        * parser/Parser.cpp:
        (JSC::Parser::parse):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@90265 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 6694a30a
2011-07-01 Juan C. Montemayor <jmont@apple.com>
Reviewed by Oliver Hunt.
Lexer error messages are currently appalling
https://bugs.webkit.org/show_bug.cgi?id=63340
Updated expected test results.
* fast/js/basic-strict-mode-expected.txt:
* fast/js/kde/parse-expected.txt:
* fast/js/kde/string-1-n-expected.txt:
* fast/js/kde/string-2-n-expected.txt:
* fast/js/numeric-escapes-in-string-literals-expected.txt:
* fast/js/removing-Cf-characters-expected.txt:
* fast/regex/non-pattern-characters-expected.txt:
* http/tests/websocket/tests/bad-sub-protocol-control-chars-expected.txt:
* loader/reload-subresource-when-type-changes-expected.txt:
* sputnik/Conformance/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A2.1_T1-expected.txt:
* sputnik/Conformance/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A2.1_T2-expected.txt:
* sputnik/Conformance/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A2.2_T1-expected.txt:
* sputnik/Conformance/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A2.2_T2-expected.txt:
* sputnik/Conformance/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A2.3-expected.txt:
* sputnik/Conformance/07_Lexical_Conventions/7.3_Line_Terminators/S7.3_A2.4-expected.txt:
* sputnik/Conformance/07_Lexical_Conventions/7.4_Comments/S7.4_A2_T2-expected.txt:
* sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.3_Numeric_Literals/S7.8.3_A6.1_T1-expected.txt:
* sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.3_Numeric_Literals/S7.8.3_A6.1_T2-expected.txt:
* sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.3_Numeric_Literals/S7.8.3_A6.2_T1-expected.txt:
* sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.3_Numeric_Literals/S7.8.3_A6.2_T2-expected.txt:
* sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A1.1_T1-expected.txt:
* sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A1.1_T2-expected.txt:
* sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A1.2_T1-expected.txt:
* sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A1.2_T2-expected.txt:
* sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A3.1_T1-expected.txt:
* sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A3.1_T2-expected.txt:
* sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A3.2_T1-expected.txt:
* sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A3.2_T2-expected.txt:
* sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A7.1_T4-expected.txt:
* sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A7.2_T1-expected.txt:
* sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A7.2_T2-expected.txt:
* sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A7.2_T3-expected.txt:
* sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A7.2_T4-expected.txt:
* sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A7.2_T5-expected.txt:
* sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.4_String_Literals/S7.8.4_A7.2_T6-expected.txt:
* sputnik/Conformance/07_Lexical_Conventions/7.8_Literals/7.8.5_Regular_Expression_Literals/S7.8.5_A1.2_T1-expected.txt:
* sputnik/Conformance/08_Types/8.4_The_String_Type/S8.4_A13_T1-expected.txt:
* sputnik/Conformance/08_Types/8.4_The_String_Type/S8.4_A13_T2-expected.txt:
* sputnik/Conformance/08_Types/8.4_The_String_Type/S8.4_A14_T1-expected.txt:
* sputnik/Conformance/08_Types/8.4_The_String_Type/S8.4_A14_T2-expected.txt:
2011-07-01 Adam Roben <aroben@apple.com> 2011-07-01 Adam Roben <aroben@apple.com>
Add Leopard expected failure result for media/media-blocked-by-beforeload.html Add Leopard expected failure result for media/media-blocked-by-beforeload.html
......
...@@ -86,12 +86,12 @@ PASS 'use strict'; for(;;)break missingLabel threw exception SyntaxError: Label ...@@ -86,12 +86,12 @@ PASS 'use strict'; for(;;)break missingLabel threw exception SyntaxError: Label
PASS (function(){'use strict'; for(;;)break missingLabel}) threw exception SyntaxError: Label 'missingLabel' is not defined. PASS (function(){'use strict'; for(;;)break missingLabel}) threw exception SyntaxError: Label 'missingLabel' is not defined.
PASS 'use strict'; for(;;)continue missingLabel threw exception SyntaxError: Label 'missingLabel' is not defined. PASS 'use strict'; for(;;)continue missingLabel threw exception SyntaxError: Label 'missingLabel' is not defined.
PASS (function(){'use strict'; for(;;)continue missingLabel}) threw exception SyntaxError: Label 'missingLabel' is not defined. PASS (function(){'use strict'; for(;;)continue missingLabel}) threw exception SyntaxError: Label 'missingLabel' is not defined.
PASS 'use strict'; 007; threw exception SyntaxError: Unrecognized token '007'. PASS 'use strict'; 007; threw exception SyntaxError: Octal escapes are forbidden in strict mode.
PASS (function(){'use strict'; 007;}) threw exception SyntaxError: Unrecognized token '007'. PASS (function(){'use strict'; 007;}) threw exception SyntaxError: Octal escapes are forbidden in strict mode.
PASS 'use strict'; '\007'; threw exception SyntaxError: Unrecognized token ''\0'. PASS 'use strict'; '\007'; threw exception SyntaxError: The only valid numeric escape in strict mode is '\0'.
PASS (function(){'use strict'; '\007';}) threw exception SyntaxError: Unrecognized token ''\0'. PASS (function(){'use strict'; '\007';}) threw exception SyntaxError: The only valid numeric escape in strict mode is '\0'.
PASS '\007'; 'use strict'; threw exception SyntaxError: Unrecognized token ''\0'. PASS '\007'; 'use strict'; threw exception SyntaxError: The only valid numeric escape in strict mode is '\0'.
PASS (function(){'\007'; 'use strict';}) threw exception SyntaxError: Unrecognized token ''\0'. PASS (function(){'\007'; 'use strict';}) threw exception SyntaxError: The only valid numeric escape in strict mode is '\0'.
PASS 'use strict'; delete aDeletableProperty; threw exception SyntaxError: Cannot delete unqualified property 'aDeletableProperty' in strict mode. PASS 'use strict'; delete aDeletableProperty; threw exception SyntaxError: Cannot delete unqualified property 'aDeletableProperty' in strict mode.
PASS (function(){'use strict'; delete aDeletableProperty;}) threw exception SyntaxError: Cannot delete unqualified property 'aDeletableProperty' in strict mode. PASS (function(){'use strict'; delete aDeletableProperty;}) threw exception SyntaxError: Cannot delete unqualified property 'aDeletableProperty' in strict mode.
PASS 'use strict'; (function (){ delete someDeclaredGlobal;}) threw exception SyntaxError: Cannot delete unqualified property 'someDeclaredGlobal' in strict mode. PASS 'use strict'; (function (){ delete someDeclaredGlobal;}) threw exception SyntaxError: Cannot delete unqualified property 'someDeclaredGlobal' in strict mode.
...@@ -175,14 +175,14 @@ PASS (function f(arg){'use strict'; var descriptor = Object.getOwnPropertyDescri ...@@ -175,14 +175,14 @@ PASS (function f(arg){'use strict'; var descriptor = Object.getOwnPropertyDescri
PASS (function f(arg){'use strict'; var descriptor = Object.getOwnPropertyDescriptor(f, 'caller'); return descriptor.get === descriptor.set; })() is true PASS (function f(arg){'use strict'; var descriptor = Object.getOwnPropertyDescriptor(f, 'caller'); return descriptor.get === descriptor.set; })() is true
PASS (function f(arg){'use strict'; var descriptor = Object.getOwnPropertyDescriptor(f, 'arguments'); return descriptor.get === descriptor.set; })() is true PASS (function f(arg){'use strict'; var descriptor = Object.getOwnPropertyDescriptor(f, 'arguments'); return descriptor.get === descriptor.set; })() is true
PASS 'use strict'; (function f() { for(var i in this); })(); true; is true PASS 'use strict'; (function f() { for(var i in this); })(); true; is true
PASS 'use strict'̻ threw exception SyntaxError: Unrecognized token ''. PASS 'use strict'̻ threw exception SyntaxError: Invalid character '\u0827'.
PASS (function(){'use strict'̻}) threw exception SyntaxError: Unrecognized token ''. PASS (function(){'use strict'̻}) threw exception SyntaxError: Invalid character '\u0827'.
PASS 'use strict'5.f threw exception SyntaxError: Unrecognized token '5.'. PASS 'use strict'5.f threw exception SyntaxError: At least one digit must occur after a decimal point.
PASS (function(){'use strict'5.f}) threw exception SyntaxError: Unrecognized token '5.'. PASS (function(){'use strict'5.f}) threw exception SyntaxError: At least one digit must occur after a decimal point.
PASS 'use strict';̻ threw exception SyntaxError: Unrecognized token ''. PASS 'use strict';̻ threw exception SyntaxError: Invalid character '\u0827'.
PASS (function(){'use strict';̻}) threw exception SyntaxError: Unrecognized token ''. PASS (function(){'use strict';̻}) threw exception SyntaxError: Invalid character '\u0827'.
PASS 'use strict';5.f threw exception SyntaxError: Unrecognized token '5.'. PASS 'use strict';5.f threw exception SyntaxError: At least one digit must occur after a decimal point.
PASS (function(){'use strict';5.f}) threw exception SyntaxError: Unrecognized token '5.'. PASS (function(){'use strict';5.f}) threw exception SyntaxError: At least one digit must occur after a decimal point.
PASS 'use strict';1-(eval=1); threw exception SyntaxError: 'eval' cannot be modified in strict mode. PASS 'use strict';1-(eval=1); threw exception SyntaxError: 'eval' cannot be modified in strict mode.
PASS (function(){'use strict';1-(eval=1);}) threw exception SyntaxError: 'eval' cannot be modified in strict mode. PASS (function(){'use strict';1-(eval=1);}) threw exception SyntaxError: 'eval' cannot be modified in strict mode.
PASS 'use strict';arguments=1; threw exception SyntaxError: 'arguments' cannot be modified in strict mode. PASS 'use strict';arguments=1; threw exception SyntaxError: 'arguments' cannot be modified in strict mode.
......
...@@ -16,7 +16,7 @@ PASS function test() { return 0 } lab: 1 is 1 ...@@ -16,7 +16,7 @@ PASS function test() { return 0 } lab: 1 is 1
PASS function test() { while(0) break lab } lab: 1 threw exception SyntaxError: Label 'lab' is not defined. PASS function test() { while(0) break lab } lab: 1 threw exception SyntaxError: Label 'lab' is not defined.
PASS function test() { while(0) continue lab } lab: 1 threw exception SyntaxError: Label 'lab' is not defined. PASS function test() { while(0) continue lab } lab: 1 threw exception SyntaxError: Label 'lab' is not defined.
PASS var éĀʯΈᢨ = 101; éĀʯΈᢨ; is 101 PASS var éĀʯΈᢨ = 101; éĀʯΈᢨ; is 101
PASS var f÷; threw exception SyntaxError: Unrecognized token ''. PASS var f÷; threw exception SyntaxError: Invalid character '\u0247'.
PASS var \u0061 = 102; a is 102 PASS var \u0061 = 102; a is 102
PASS var f\u0030 = 103; f0 is 103 PASS var f\u0030 = 103; f0 is 103
PASS var \u00E9\u0100\u02AF\u0388\u18A8 = 104; \u00E9\u0100\u02AF\u0388\u18A8; is 104 PASS var \u00E9\u0100\u02AF\u0388\u18A8 = 104; \u00E9\u0100\u02AF\u0388\u18A8; is 104
......
CONSOLE MESSAGE: line 1: SyntaxError: Unrecognized token '"unterminated string' CONSOLE MESSAGE: line 1: SyntaxError: Unexpected EOF
KDE JS Test KDE JS Test
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
......
CONSOLE MESSAGE: line 1: SyntaxError: Unrecognized token '"broken' CONSOLE MESSAGE: line 1: SyntaxError: Unexpected EOF
KDE JS Test KDE JS Test
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
......
...@@ -6,39 +6,39 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE ...@@ -6,39 +6,39 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
PASS eval(stringLiteral) is nonStrictResult PASS eval(stringLiteral) is nonStrictResult
PASS eval(stringLiteral) is strictResult PASS eval(stringLiteral) is strictResult
PASS eval(stringLiteral) is nonStrictResult PASS eval(stringLiteral) is nonStrictResult
PASS eval(stringLiteral) threw exception SyntaxError: Unrecognized token '"\1'. PASS eval(stringLiteral) threw exception SyntaxError: The only valid numeric escape in strict mode is '\0'.
PASS eval(stringLiteral) is nonStrictResult PASS eval(stringLiteral) is nonStrictResult
PASS eval(stringLiteral) threw exception SyntaxError: Unrecognized token '"\7'. PASS eval(stringLiteral) threw exception SyntaxError: The only valid numeric escape in strict mode is '\0'.
PASS eval(stringLiteral) is nonStrictResult PASS eval(stringLiteral) is nonStrictResult
PASS eval(stringLiteral) threw exception SyntaxError: Unrecognized token '"\8'. PASS eval(stringLiteral) threw exception SyntaxError: The only valid numeric escape in strict mode is '\0'.
PASS eval(stringLiteral) is nonStrictResult PASS eval(stringLiteral) is nonStrictResult
PASS eval(stringLiteral) threw exception SyntaxError: Unrecognized token '"\9'. PASS eval(stringLiteral) threw exception SyntaxError: The only valid numeric escape in strict mode is '\0'.
PASS eval(stringLiteral) is nonStrictResult PASS eval(stringLiteral) is nonStrictResult
PASS eval(stringLiteral) threw exception SyntaxError: Unrecognized token '"\0'. PASS eval(stringLiteral) threw exception SyntaxError: The only valid numeric escape in strict mode is '\0'.
PASS eval(stringLiteral) is nonStrictResult PASS eval(stringLiteral) is nonStrictResult
PASS eval(stringLiteral) threw exception SyntaxError: Unrecognized token '"\0'. PASS eval(stringLiteral) threw exception SyntaxError: The only valid numeric escape in strict mode is '\0'.
PASS eval(stringLiteral) is nonStrictResult PASS eval(stringLiteral) is nonStrictResult
PASS eval(stringLiteral) threw exception SyntaxError: Unrecognized token '"\0'. PASS eval(stringLiteral) threw exception SyntaxError: The only valid numeric escape in strict mode is '\0'.
PASS eval(stringLiteral) is nonStrictResult PASS eval(stringLiteral) is nonStrictResult
PASS eval(stringLiteral) threw exception SyntaxError: Unrecognized token '"\0'. PASS eval(stringLiteral) threw exception SyntaxError: The only valid numeric escape in strict mode is '\0'.
PASS eval(stringLiteral) is nonStrictResult PASS eval(stringLiteral) is nonStrictResult
PASS eval(stringLiteral) threw exception SyntaxError: Unrecognized token '"\0'. PASS eval(stringLiteral) threw exception SyntaxError: The only valid numeric escape in strict mode is '\0'.
PASS eval(stringLiteral) is nonStrictResult PASS eval(stringLiteral) is nonStrictResult
PASS eval(stringLiteral) threw exception SyntaxError: Unrecognized token '"\0'. PASS eval(stringLiteral) threw exception SyntaxError: The only valid numeric escape in strict mode is '\0'.
PASS eval(stringLiteral) is nonStrictResult PASS eval(stringLiteral) is nonStrictResult
PASS eval(stringLiteral) threw exception SyntaxError: Unrecognized token '"\1'. PASS eval(stringLiteral) threw exception SyntaxError: The only valid numeric escape in strict mode is '\0'.
PASS eval(stringLiteral) is nonStrictResult PASS eval(stringLiteral) is nonStrictResult
PASS eval(stringLiteral) threw exception SyntaxError: Unrecognized token '"\1'. PASS eval(stringLiteral) threw exception SyntaxError: The only valid numeric escape in strict mode is '\0'.
PASS eval(stringLiteral) is nonStrictResult PASS eval(stringLiteral) is nonStrictResult
PASS eval(stringLiteral) threw exception SyntaxError: Unrecognized token '"\1'. PASS eval(stringLiteral) threw exception SyntaxError: The only valid numeric escape in strict mode is '\0'.
PASS eval(stringLiteral) is nonStrictResult PASS eval(stringLiteral) is nonStrictResult
PASS eval(stringLiteral) threw exception SyntaxError: Unrecognized token '"\1'. PASS eval(stringLiteral) threw exception SyntaxError: The only valid numeric escape in strict mode is '\0'.
PASS eval(stringLiteral) is nonStrictResult PASS eval(stringLiteral) is nonStrictResult
PASS eval(stringLiteral) threw exception SyntaxError: Unrecognized token '"\1'. PASS eval(stringLiteral) threw exception SyntaxError: The only valid numeric escape in strict mode is '\0'.
PASS eval(stringLiteral) is nonStrictResult PASS eval(stringLiteral) is nonStrictResult
PASS eval(stringLiteral) threw exception SyntaxError: Unrecognized token '"\1'. PASS eval(stringLiteral) threw exception SyntaxError: The only valid numeric escape in strict mode is '\0'.
PASS eval(stringLiteral) is nonStrictResult PASS eval(stringLiteral) is nonStrictResult
PASS eval(stringLiteral) threw exception SyntaxError: Unrecognized token '"\9'. PASS eval(stringLiteral) threw exception SyntaxError: The only valid numeric escape in strict mode is '\0'.
PASS successfullyParsed is true PASS successfullyParsed is true
TEST COMPLETE TEST COMPLETE
......
...@@ -9,7 +9,7 @@ PASS 1 is 1 ...@@ -9,7 +9,7 @@ PASS 1 is 1
PASS eval('""').length is 1 PASS eval('""').length is 1
PASS eval('""').charCodeAt(0) is 0xFEFF PASS eval('""').charCodeAt(0) is 0xFEFF
PASS ++1 /* BOM between the +'s */ is 1 PASS ++1 /* BOM between the +'s */ is 1
PASS var ZWJ_I‍nside; threw exception SyntaxError: Unrecognized token ''. PASS var ZWJ_I‍nside; threw exception SyntaxError: Invalid character '\u8205'.
PASS successfullyParsed is true PASS successfullyParsed is true
TEST COMPLETE TEST COMPLETE
......
...@@ -51,7 +51,7 @@ PASS regexp.test('aaba') is true ...@@ -51,7 +51,7 @@ PASS regexp.test('aaba') is true
PASS regexp.lastIndex is 2 PASS regexp.lastIndex is 2
Testing regexp: [invalid * variations] Testing regexp: [invalid * variations]
PASS /*/ threw exception SyntaxError: Unrecognized token '/*/'. PASS /*/ threw exception SyntaxError: Multiline comment was not closed properly.
PASS /^*/ threw exception SyntaxError: Invalid regular expression: nothing to repeat. PASS /^*/ threw exception SyntaxError: Invalid regular expression: nothing to repeat.
Testing regexp: /a+/gm Testing regexp: /a+/gm
......
...@@ -8,9 +8,9 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE ...@@ -8,9 +8,9 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
PASS new WebSocket("ws://127.0.0.1:8880/simple", "\0") threw exception Error: SYNTAX_ERR: DOM Exception 12. PASS new WebSocket("ws://127.0.0.1:8880/simple", "\0") threw exception Error: SYNTAX_ERR: DOM Exception 12.
PASS new WebSocket("ws://127.0.0.1:8880/simple", " ") threw exception Error: SYNTAX_ERR: DOM Exception 12. PASS new WebSocket("ws://127.0.0.1:8880/simple", " ") threw exception Error: SYNTAX_ERR: DOM Exception 12.
PASS new WebSocket("ws://127.0.0.1:8880/simple", " PASS new WebSocket("ws://127.0.0.1:8880/simple", "
") threw exception SyntaxError: Unrecognized token '"'. ") threw exception SyntaxError: Unexpected EOF.
PASS new WebSocket("ws://127.0.0.1:8880/simple", " PASS new WebSocket("ws://127.0.0.1:8880/simple", "
") threw exception SyntaxError: Unrecognized token '"'. ") threw exception SyntaxError: Unexpected EOF.
PASS new WebSocket("ws://127.0.0.1:8880/simple", "") threw exception Error: SYNTAX_ERR: DOM Exception 12. PASS new WebSocket("ws://127.0.0.1:8880/simple", "") threw exception Error: SYNTAX_ERR: DOM Exception 12.
PASS successfullyParsed is true PASS successfullyParsed is true
......
CONSOLE MESSAGE: line 1: SyntaxError: Unrecognized token '' CONSOLE MESSAGE: line 1: SyntaxError: Invalid character '\u8240'
PASS 1 of 3 PASS 1 of 3
PASS 2 of 3 PASS 2 of 3
PASS 3 of 3 PASS 3 of 3
......
S7.3_A2.1_T1 S7.3_A2.1_T1
PASS SyntaxError: Unrecognized token ''' PASS SyntaxError: Unexpected EOF
TEST COMPLETE TEST COMPLETE
CONSOLE MESSAGE: line 77: SyntaxError: Unrecognized token '"' CONSOLE MESSAGE: line 77: SyntaxError: Unexpected EOF
S7.3_A2.1_T2 S7.3_A2.1_T2
PASS Expected parsing failure PASS Expected parsing failure
......
S7.3_A2.2_T1 S7.3_A2.2_T1
PASS SyntaxError: Unrecognized token ''' PASS SyntaxError: Unexpected EOF
TEST COMPLETE TEST COMPLETE
CONSOLE MESSAGE: line 77: SyntaxError: Unrecognized token '"' CONSOLE MESSAGE: line 77: SyntaxError: Unexpected EOF
S7.3_A2.2_T2 S7.3_A2.2_T2
PASS Expected parsing failure PASS Expected parsing failure
......
S7.3_A2.3 S7.3_A2.3
PASS SyntaxError: Unrecognized token ''' PASS SyntaxError: Unexpected EOF
TEST COMPLETE TEST COMPLETE
S7.3_A2.4 S7.3_A2.4
PASS SyntaxError: Unrecognized token ''' PASS SyntaxError: Unexpected EOF
TEST COMPLETE TEST COMPLETE
CONSOLE MESSAGE: line 83: SyntaxError: Unrecognized token '/*CHECK#1/ CONSOLE MESSAGE: line 83: SyntaxError: Multiline comment was not closed properly
} catch (ex) {
sputnikException = ex;
}
var successfullyParsed = true;
'
S7.4_A2_T2 S7.4_A2_T2
PASS Expected parsing failure PASS Expected parsing failure
......
CONSOLE MESSAGE: line 77: SyntaxError: Unrecognized token '0' CONSOLE MESSAGE: line 77: SyntaxError: At least one digit must occur after a decimal point
S7.8.3_A6.1_T1 S7.8.3_A6.1_T1
PASS Expected parsing failure PASS Expected parsing failure
......
CONSOLE MESSAGE: line 77: SyntaxError: Unrecognized token '0' CONSOLE MESSAGE: line 77: SyntaxError: At least one digit must occur after a decimal point
S7.8.3_A6.1_T2 S7.8.3_A6.1_T2
PASS Expected parsing failure PASS Expected parsing failure
......
CONSOLE MESSAGE: line 77: SyntaxError: Unrecognized token '0' CONSOLE MESSAGE: line 77: SyntaxError: At least one digit must occur after a decimal point
S7.8.3_A6.2_T1 S7.8.3_A6.2_T1
PASS Expected parsing failure PASS Expected parsing failure
......
CONSOLE MESSAGE: line 77: SyntaxError: Unrecognized token '0' CONSOLE MESSAGE: line 77: SyntaxError: At least one digit must occur after a decimal point
S7.8.3_A6.2_T2 S7.8.3_A6.2_T2
PASS Expected parsing failure PASS Expected parsing failure
......
CONSOLE MESSAGE: line 77: SyntaxError: Unrecognized token '"' CONSOLE MESSAGE: line 77: SyntaxError: Unexpected EOF
S7.8.4_A1.1_T1 S7.8.4_A1.1_T1
PASS Expected parsing failure PASS Expected parsing failure
......
CONSOLE MESSAGE: line 77: SyntaxError: Unrecognized token '"' CONSOLE MESSAGE: line 77: SyntaxError: Unexpected EOF
S7.8.4_A1.1_T2 S7.8.4_A1.1_T2
PASS Expected parsing failure PASS Expected parsing failure
......
CONSOLE MESSAGE: line 77: SyntaxError: Unrecognized token ''' CONSOLE MESSAGE: line 77: SyntaxError: Unexpected EOF
S7.8.4_A1.2_T1 S7.8.4_A1.2_T1
PASS Expected parsing failure PASS Expected parsing failure
......
CONSOLE MESSAGE: line 77: SyntaxError: Unrecognized token ''' CONSOLE MESSAGE: line 77: SyntaxError: Unexpected EOF
S7.8.4_A1.2_T2 S7.8.4_A1.2_T2
PASS Expected parsing failure PASS Expected parsing failure
......
CONSOLE MESSAGE: line 77: SyntaxError: Unrecognized token '"\"' CONSOLE MESSAGE: line 77: SyntaxError: Unexpected EOF
S7.8.4_A3.1_T1 S7.8.4_A3.1_T1
PASS Expected parsing failure PASS Expected parsing failure
......
CONSOLE MESSAGE: line 77: SyntaxError: Unrecognized token ''\'' CONSOLE MESSAGE: line 77: SyntaxError: Unexpected EOF
S7.8.4_A3.1_T2 S7.8.4_A3.1_T2
PASS Expected parsing failure PASS Expected parsing failure
......
CONSOLE MESSAGE: line 77: SyntaxError: Unrecognized token '"\\\"' CONSOLE MESSAGE: line 77: SyntaxError: Unexpected EOF
S7.8.4_A3.2_T1 S7.8.4_A3.2_T1
PASS Expected parsing failure PASS Expected parsing failure
......
CONSOLE MESSAGE: line 77: SyntaxError: Unrecognized token ''\\\'' CONSOLE MESSAGE: line 77: SyntaxError: Unexpected EOF
S7.8.4_A3.2_T2 S7.8.4_A3.2_T2
PASS Expected parsing failure PASS Expected parsing failure
......
CONSOLE MESSAGE: line 77: SyntaxError: Unrecognized token '"\u' CONSOLE MESSAGE: line 77: SyntaxError: \u can only be followed by a Unicode character sequence
S7.8.4_A7.1_T4 S7.8.4_A7.1_T4
PASS Expected parsing failure PASS Expected parsing failure
......
CONSOLE MESSAGE: line 77: SyntaxError: Unrecognized token '"\u' CONSOLE MESSAGE: line 77: SyntaxError: \u can only be followed by a Unicode character sequence
S7.8.4_A7.2_T1 S7.8.4_A7.2_T1
PASS Expected parsing failure PASS Expected parsing failure
......
CONSOLE MESSAGE: line 77: SyntaxError: Unrecognized token '"\u' CONSOLE MESSAGE: line 77: SyntaxError: \u can only be followed by a Unicode character sequence
S7.8.4_A7.2_T2 S7.8.4_A7.2_T2
PASS Expected parsing failure PASS Expected parsing failure
......
CONSOLE MESSAGE: line 77: SyntaxError: Unrecognized token '"\u' CONSOLE MESSAGE: line 77: SyntaxError: \u can only be followed by a Unicode character sequence
S7.8.4_A7.2_T3 S7.8.4_A7.2_T3
PASS Expected parsing failure PASS Expected parsing failure
......
CONSOLE MESSAGE: line 77: SyntaxError: Unrecognized token '"\u' CONSOLE MESSAGE: line 77: SyntaxError: \u can only be followed by a Unicode character sequence
S7.8.4_A7.2_T4 S7.8.4_A7.2_T4
PASS Expected parsing failure PASS Expected parsing failure
......
CONSOLE MESSAGE: line 77: SyntaxError: Unrecognized token '"\u' CONSOLE MESSAGE: line 77: SyntaxError: \u can only be followed by a Unicode character sequence
S7.8.4_A7.2_T5 S7.8.4_A7.2_T5
PASS Expected parsing failure PASS Expected parsing failure
......
CONSOLE MESSAGE: line 77: SyntaxError: Unrecognized token '"\u' CONSOLE MESSAGE: line 77: SyntaxError: \u can only be followed by a Unicode character sequence
S7.8.4_A7.2_T6 S7.8.4_A7.2_T6
PASS Expected parsing failure PASS Expected parsing failure
......
CONSOLE MESSAGE: line 84: SyntaxError: Unrecognized token '/*/ CONSOLE MESSAGE: line 84: SyntaxError: Multiline comment was not closed properly
} catch (ex) {
sputnikException = ex;
}
var successfullyParsed = true;
'
S7.8.5_A1.2_T1 S7.8.5_A1.2_T1
PASS Expected parsing failure PASS Expected parsing failure
......
CONSOLE MESSAGE: line 76: SyntaxError: Unrecognized token '';' CONSOLE MESSAGE: line 76: SyntaxError: Unexpected EOF
S8.4_A13_T1 S8.4_A13_T1
PASS Expected parsing failure PASS Expected parsing failure
......
CONSOLE MESSAGE: line 76: SyntaxError: Unrecognized token '';' CONSOLE MESSAGE: line 76: SyntaxError: Unexpected EOF
S8.4_A13_T2 S8.4_A13_T2
PASS Expected parsing failure PASS Expected parsing failure
......
CONSOLE MESSAGE: line 76: SyntaxError: Unrecognized token '";' CONSOLE MESSAGE: line 76: SyntaxError: Unexpected EOF
S8.4_A14_T1 S8.4_A14_T1
PASS Expected parsing failure PASS Expected parsing failure
......
CONSOLE MESSAGE: line 76: SyntaxError: Unrecognized token '";' CONSOLE MESSAGE: line 76: SyntaxError: Unexpected EOF
S8.4_A14_T2 S8.4_A14_T2
PASS Expected parsing failure PASS Expected parsing failure
......
2011-07-01 Juan C. Montemayor <jmont@apple.com>
Reviewed by Oliver Hunt.
Lexer error messages are currently appalling
https://bugs.webkit.org/show_bug.cgi?id=63340
Added error messages for the Lexer. These messages will be displayed
instead of the lexer error messages from the parser that are currently
shown.
* parser/Lexer.cpp:
(JSC::Lexer::getInvalidCharMessage):
(JSC::Lexer::setCode):
(JSC::Lexer::parseString):
(JSC::Lexer::lex):
(JSC::Lexer::clear):
* parser/Lexer.h:
(JSC::Lexer::getErrorMessage):
(JSC::Lexer::setOffset):
* parser/Parser.cpp:
(JSC::Parser::parse):
2011-07-01 Jungshik Shin <jshin@chromium.org> 2011-07-01 Jungshik Shin <jshin@chromium.org>
Reviewed by Alexey Proskuryakov.