mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
Restore \Q..\E support in character classes
This commit is contained in:
parent
2a2576e907
commit
fd19168025
@ -893,11 +893,7 @@ unichar readUtf8CodePoint4c(const u8 *ts) {
|
|||||||
throw LocatedParseError("Invalid POSIX named class");
|
throw LocatedParseError("Invalid POSIX named class");
|
||||||
};
|
};
|
||||||
'\\Q' => {
|
'\\Q' => {
|
||||||
// fcall readQuotedClass;
|
fcall readQuotedClass;
|
||||||
ostringstream str;
|
|
||||||
str << "\\Q..\\E sequences in character classes not supported at index "
|
|
||||||
<< ts - ptr << ".";
|
|
||||||
throw ParseError(str.str());
|
|
||||||
};
|
};
|
||||||
'\\E' => { /*noop*/};
|
'\\E' => { /*noop*/};
|
||||||
# Backspace (this is only valid for \b in char classes)
|
# Backspace (this is only valid for \b in char classes)
|
||||||
@ -1131,10 +1127,7 @@ unichar readUtf8CodePoint4c(const u8 *ts) {
|
|||||||
inCharClassEarly = false;
|
inCharClassEarly = false;
|
||||||
};
|
};
|
||||||
# if we hit a quote before anything "real", handle it
|
# if we hit a quote before anything "real", handle it
|
||||||
#'\\Q' => { fcall readQuotedClass; };
|
'\\Q' => { fcall readQuotedClass; };
|
||||||
'\\Q' => {
|
|
||||||
throw LocatedParseError("\\Q..\\E sequences in character classes not supported");
|
|
||||||
};
|
|
||||||
'\\E' => { /*noop*/};
|
'\\E' => { /*noop*/};
|
||||||
|
|
||||||
# time for the real work to happen
|
# time for the real work to happen
|
||||||
@ -1170,6 +1163,7 @@ unichar readUtf8CodePoint4c(const u8 *ts) {
|
|||||||
# Literal character
|
# Literal character
|
||||||
any => {
|
any => {
|
||||||
currentCls->add(*ts);
|
currentCls->add(*ts);
|
||||||
|
inCharClassEarly = false;
|
||||||
};
|
};
|
||||||
*|;
|
*|;
|
||||||
|
|
||||||
|
@ -85,7 +85,6 @@
|
|||||||
84:/[=\]=]/ #Unsupported POSIX collating element at index 0.
|
84:/[=\]=]/ #Unsupported POSIX collating element at index 0.
|
||||||
85:/A(?!)+Z/ #Invalid repeat at index 5.
|
85:/A(?!)+Z/ #Invalid repeat at index 5.
|
||||||
86:/\X/ #\X unsupported at index 0.
|
86:/\X/ #\X unsupported at index 0.
|
||||||
87:/[a\Qz\E]/ #\Q..\E sequences in character classes not supported at index 2.
|
|
||||||
88:/[A-\d]/ #Invalid range in character class at index 3.
|
88:/[A-\d]/ #Invalid range in character class at index 3.
|
||||||
89:/[A-[:digit:]]/ #Invalid range in character class at index 3.
|
89:/[A-[:digit:]]/ #Invalid range in character class at index 3.
|
||||||
90:/B[--[:digit:]--]+/ #Invalid range in character class at index 4.
|
90:/B[--[:digit:]--]+/ #Invalid range in character class at index 4.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user