PCRE 7.7 for delphi

PCRE 7.7 for delphi (Renato Mancuso's dpcre modification).

http://delphipg.oranc.co.kr/node/181

 

ChangeLog for PCRE
------------------

Version 7.7 07-May-08
---------------------

1.  Applied Craig's patch to sort out a long long problem: "If we can't convert
    a string to a long long, pretend we don't even have a long long." This is
    done by checking for the strtoq, strtoll, and _strtoi64 functions.

2.  Applied Craig's patch to pcrecpp.cc to restore ABI compatibility with
    pre-7.6 versions, which defined a global no_arg variable instead of putting
    it in the RE class. (See also #8 below.)

3.  Remove a line of dead code, identified by coverity and reported by Nuno
    Lopes.

4.  Fixed two related pcregrep bugs involving -r with --include or --exclude:

    (1) The include/exclude patterns were being applied to the whole pathnames
        of files, instead of just to the final components.

    (2) If there was more than one level of directory, the subdirectories were
        skipped unless they satisfied the include/exclude conditions. This is
        inconsistent with GNU grep (and could even be seen as contrary to the
        pcregrep specification - which I improved to make it absolutely clear).
        The action now is always to scan all levels of directory, and just
        apply the include/exclude patterns to regular files.

5.  Added the --include_dir and --exclude_dir patterns to pcregrep, and used
    --exclude_dir in the tests to avoid scanning .svn directories.

6.  Applied Craig's patch to the QuoteMeta function so that it escapes the
    NUL character as backslash + 0 rather than backslash + NUL, because PCRE
    doesn't support NULs in patterns.

7.  Added some missing "const"s to declarations of static tables in
    pcre_compile.c and pcre_dfa_exec.c.

8.  Applied Craig's patch to pcrecpp.cc to fix a problem in OS X that was
    caused by fix #2  above. (Subsequently also a second patch to fix the
    first patch. And a third patch - this was a messy problem.)

9.  Applied Craig's patch to remove the use of push_back().

10. Applied Alan Lehotsky's patch to add REG_STARTEND support to the POSIX
    matching function regexec().

11. Added support for the Oniguruma syntax /g<name>, /g<n>, /g'name', /g'n',
    which, however, unlike Perl's /g{...}, are subroutine calls, not back
    references. PCRE supports relative numbers with this syntax (I don't think
    Oniguruma does).

12. Previously, a group with a zero repeat such as (...){0} was completely
    omitted from the compiled regex. However, this means that if the group
    was called as a subroutine from elsewhere in the pattern, things went wrong
    (an internal error was given). Such groups are now left in the compiled
    pattern, with a new opcode that causes them to be skipped at execution
    time.

13. Added the PCRE_JAVASCRIPT_COMPAT option. This makes the following changes
    to the way PCRE behaves:

    (a) A lone ] character is dis-allowed (Perl treats it as data).

    (b) A back reference to an unmatched subpattern matches an empty string
        (Perl fails the current match path).

    (c) A data ] in a character class must be notated as /] because if the
        first data character in a class is ], it defines an empty class. (In
        Perl it is not possible to have an empty class.) The empty class []
        never matches; it forces failure and is equivalent to (*FAIL) or (?!).
        The negative empty class [^] matches any one character, independently
        of the DOTALL setting.

14. A pattern such as /(?2)[]a()b](abc)/ which had a forward reference to a
    non-existent subpattern following a character class starting with ']' and
    containing () gave an internal compiling error instead of "reference to
    non-existent subpattern". Fortunately, when the pattern did exist, the
    compiled code was correct. (When scanning forwards to check for the
    existencd of the subpattern, it was treating the data ']' as terminating
    the class, so got the count wrong. When actually compiling, the reference
    was subsequently set up correctly.)

15. The "always fail" assertion (?!) is optimzed to (*FAIL) by pcre_compile;
    it was being rejected as not supported by pcre_dfa_exec(), even though
    other assertions are supported. I have made pcre_dfa_exec() support
    (*FAIL).

16. The implementation of 13c above involved the invention of a new opcode,
    OP_ALLANY, which is like OP_ANY but doesn't check the /s flag. Since /s
    cannot be changed at match time, I realized I could make a small
    improvement to matching performance by compiling OP_ALLANY instead of
    OP_ANY for "." when DOTALL was set, and then removing the runtime tests
    on the OP_ANY path.

17. Compiling pcretest on Windows with readline support failed without the
    following two fixes: (1) Make the unistd.h include conditional on
    HAVE_UNISTD_H; (2) #define isatty and fileno as _isatty and _fileno.

18. Changed CMakeLists.txt and cmake/FindReadline.cmake to arrange for the
    ncurses library to be included for pcretest when ReadLine support is
    requested, but also to allow for it to be overridden. This patch came from
    Daniel Bergstr鰉.

19. There was a typo in the file ucpinternal.h where f0_rangeflag was defined
    as 0x00f00000 instead of 0x00800000. Luckily, this would not have caused
    any errors with the current Unicode tables. Thanks to Peter Kankowski for
    spotting this.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值