ladybird/Tests/LibRegex
Timothy Flynn 6a485f612f LibRegex: Implement legacy octal escape parsing closer to the spec
The grammar for the ECMA-262 CharacterEscape is:

  CharacterEscape[U, N] ::
    ControlEscape
    c ControlLetter
    0 [lookahead ∉ DecimalDigit]
    HexEscapeSequence
    RegExpUnicodeEscapeSequence[?U]
    [~U]LegacyOctalEscapeSequence
    IdentityEscape[?U, ?N]

It's important to parse the standalone "\0 [lookahead ∉ DecimalDigit]"
before parsing LegacyOctalEscapeSequence. Otherwise, all standalone "\0"
patterns are parsed as octal, which are disallowed in Unicode mode.

Further, LegacyOctalEscapeSequence should also be parsed while parsing
character classes.
2021-08-15 11:43:45 +01:00
..
Benchmark.cpp Tests: Move LibRegex tests to Tests/LibRegex 2021-05-06 17:54:28 +02:00
CMakeLists.txt Tests: Move LibRegex tests to Tests/LibRegex 2021-05-06 17:54:28 +02:00
Regex.cpp LibRegex: Implement legacy octal escape parsing closer to the spec 2021-08-15 11:43:45 +01:00
RegexLibC.cpp LibRegex: Correctly parse BRE bracket expressions 2021-07-10 22:58:24 +04:30