* Fix bug #34118, unclean NOTLETTER check

git-svn-id: trunk@39608 -
This commit is contained in:
michael 2018-08-12 08:55:37 +00:00
parent 64e4f169de
commit 2d2ba5f0cd

View File

@ -2697,34 +2697,29 @@ function TRegExpr.regrepeat (p : PRegExprChar; AMax : PtrInt) : PtrInt;
end; end;
{$IFNDEF UseSetOfChar} //###0.929 {$IFNDEF UseSetOfChar} //###0.929
ANYLETTER: ANYLETTER:
while (Result < TheMax) and while (Result < TheMax) and IsWordChar(scan^) do //###0.940
IsWordChar(scan^) //###0.940 begin
{ ((scan^ >= 'a') and (scan^ <= 'z') !! I've forgotten (>='0') and (<='9')
or (scan^ >= 'A') and (scan^ <= 'Z') or (scan^ = '_'))} do begin
inc (Result); inc (Result);
inc (scan); inc (scan);
end; end;
NOTLETTER: NOTLETTER:
while (Result < TheMax) and while (Result < TheMax) and not IsWordChar(scan^) do //###0.940
not IsWordChar(scan^) //###0.940 begin
{ not ((scan^ >= 'a') and (scan^ <= 'z') !! I've forgotten (>='0') and (<='9')
or (scan^ >= 'A') and (scan^ <= 'Z')
or (scan^ = '_'))} do begin
inc (Result); inc (Result);
inc (scan); inc (scan);
end; end;
ANYSPACE: ANYSPACE:
while (Result < TheMax) and while (Result < TheMax) and IsSpaceChar(scan) do
IsSpaceChar(scan) do begin begin
inc (Result); inc (Result);
inc (scan); inc (scan);
end; end;
NOTSPACE: NOTSPACE:
while (Result < TheMax) and while (Result < TheMax) and Not IsSpaceChar(scan) do
Not IsSpaceChar(scan) do begin begin
inc (Result); inc (Result);
inc (scan); inc (scan);
end; end;
{$ENDIF} {$ENDIF}
ANYOFTINYSET: begin ANYOFTINYSET: begin
while (Result < TheMax) and //!!!TinySet while (Result < TheMax) and //!!!TinySet