PureXML/Sources/Regex
Mihaela Mihaljevic 50c6fb9b1c fix(regex): reject a pattern facet whose regex ends mid-token (#145)
A `pattern` facet's value must be a valid XSD regular expression. Two
truncation cases were compiled with a non-rejecting error and the schema was
wrongly accepted:

- a trailing `\` with no character to escape (`a\`), and
- a `[` character class the expression ends before closing with `]`
  (`a[`, `[a[:xyz:`).

Both are unambiguously invalid, never an engine limitation on an otherwise
valid pattern, so they now raise the dedicated `RegexError.incompleteEscape`
and `RegexError.unterminatedClass` and `rejectsPattern` treats them as
schema-validity errors. A completed escape (`\[`, `\\`), a closed class, and a
class containing an escaped `]` or a subtraction stay valid.

Caught thirteen invalid schemas: XSTS invalid-schemas-accepted 230 -> 217, no
other bucket moved.
2026-06-17 13:53:41 +02:00
..
RegexAutomaton.swift fix(schema): advance XSTS valid-instances-rejected to 4 (#146) 2026-06-16 22:22:05 +02:00
RegexCategory.swift fix(schema): advance XSTS valid-instances-rejected to 4 (#146) 2026-06-16 22:22:05 +02:00
RegexParser.swift fix(regex): reject a pattern facet whose regex ends mid-token (#145) 2026-06-17 13:53:41 +02:00
RegexSyntax.swift fix(regex): reject a pattern facet whose regex ends mid-token (#145) 2026-06-17 13:53:41 +02:00
Unicode32Assigned.swift fix(schema): advance XSTS valid-instances-rejected to 4 (#146) 2026-06-16 22:22:05 +02:00
XSDCategory.swift fix(schema): advance XSTS valid-instances-rejected to 4 (#146) 2026-06-16 22:22:05 +02:00