浏览代码

* Update to last version of TRegExpr engine. Fix issue #40433

Michaël Van Canneyt 1 年之前
父节点
当前提交
761de25eb4
共有 3 个文件被更改,包括 429 次插入202 次删除
  1. 50 0
      packages/regexpr/patch/current.diff
  2. 6 0
      packages/regexpr/patch/current.txt
  3. 373 202
      packages/regexpr/src/regexpr.pas

+ 50 - 0
packages/regexpr/patch/current.diff

@@ -0,0 +1,50 @@
+0a1
+> {$IFNDEF FPC_DOTTEDUNITS}
+1a3
+> {$ENDIF FPC_DOTTEDUNITS}
+67c69
+< {$I regexpr_compilers.inc}
+---
+> 
+72d73
+< {$IFDEF FPC}
+75c76
+< {$ENDIF}
+---
+> {$DEFINE COMPAT}
+77c78
+< {$DEFINE UnicodeRE} // Use WideChar for characters and UnicodeString/WideString for strings
+---
+> { off $DEFINE UnicodeRE} // Use WideChar for characters and UnicodeString/WideString for strings
+79,89c80,83
+< { off $DEFINE UseWordChars} // Use WordChars property, otherwise fixed list 'a'..'z','A'..'Z','0'..'9','_' 
+< { off $DEFINE UseSpaceChars} // Use SpaceChars property, otherwise fixed list
+< { off $DEFINE UseLineSep} // Use LineSeparators property, otherwise fixed line-break chars
+< {$IFDEF UNICODE}
+<   {$IFNDEF UnicodeRE}
+<   {$MESSAGE ERROR 'You cannot undefine UnicodeRE for Unicode Delphi versions'}
+<   {$ENDIF}
+< {$ENDIF}
+< {$IFDEF FPC}
+<   {$DEFINE FastUnicodeData} // Use arrays for UpperCase/LowerCase/IsWordChar, they take 320K more memory
+< {$ENDIF}
+---
+> {$DEFINE UseWordChars} // Use WordChars property, otherwise fixed list 'a'..'z','A'..'Z','0'..'9','_'
+> {$DEFINE UseSpaceChars} // Use SpaceChars property, otherwise fixed list
+> {$DEFINE UseLineSep} // Use LineSeparators property, otherwise fixed line-break chars
+> { off $DEFINE FastUnicodeData} // Use arrays for UpperCase/LowerCase/IsWordChar, they take 320K more memory
+116a111,122
+> {$IFDEF FPC_DOTTEDUNITS}
+> uses
+>   System.SysUtils, // Exception
+>   {$IFDEF D2009}
+>     {$IFDEF D_XE2}
+>     System.System.Character,
+>     {$ELSE}
+>     System.Character,
+>     {$ENDIF}
+>   {$ENDIF}
+>   System.Classes; // TStrings in Split method
+> {$ELSE FPC_DOTTEDUNITS}
+126a133
+> {$ENDIF FPC_DOTTEDUNITS}

+ 6 - 0
packages/regexpr/patch/current.txt

@@ -0,0 +1,6 @@
+
+Original TRegexpr repo is at https://github.com/andgineer/TRegExpr.git
+
+Diff between our code and original was last taken on rev. 4ff33af23055c03757761ea6df351f7a57eac8c4
+
+Please update the revision when you update the regexpr unit.

文件差异内容过多而无法显示
+ 373 - 202
packages/regexpr/src/regexpr.pas


部分文件因为文件数量过多而无法显示