-
barraclough@apple.com authored
https://bugs.webkit.org/show_bug.cgi?id=50483 https://bugs.webkit.org/show_bug.cgi?id=50538 https://bugs.webkit.org/show_bug.cgi?id=50654 https://bugs.webkit.org/show_bug.cgi?id=50646 Reviewed by Sam Weinig. We recently tightened up our spec conformance in generating syntax error in these cases, however testing in the wild has shown this to be problematic. This reverts the previous change in allowing class escapes (e.g. \d) in ranges in character classes ([]), but does retain some closer conformance to the spec in only allowing ranges that would be permitted per the grammar rules in the spec (e.g. in /[\d-a-z]/ "a-z" cannot be considered as a range). JavaScriptCore: * yarr/RegexParser.h: (JSC::Yarr::Parser::CharacterClassParserDelegate::atomPatternCharacter): (JSC::Yarr::Parser::CharacterClassParserDelegate::atomBuiltInCharacterClass): (JSC::Yarr::Parser::parse): LayoutTests: * fast/js/regexp-ranges-and-escaped-hyphens-expected.txt: * fast/js/script-tests/regexp-ranges-and-escaped-hyphens.js: * fast/regex/invalid-range-in-class-expected.txt: * fast/regex/pcre-test-1-expected.txt: * fast/regex/script-tests/invalid-range-in-class.js: * fast/regex/script-tests/pcre-test-1.js: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73594 268f45cc-cd09-0410-ab3c-d52691b4dbfc
210f453b