mcpp index

compat.pcre2

#include

PCRE2 10.44 — 8-bit Perl-compatible regular expressions with Unicode properties, the dependency glib's GRegex is written against

#include <pcre2.h>
mcpp add compat.pcre2@10.44

用法

来自本仓库自己的测试项目 —— CI 真的编译并运行过,不是为了网站写的。

// compat.pcre2 — exercised the way glib's GRegex uses it.
//
// WHAT THIS ASSERTS AND WHY EACH ONE IS HERE
//
// The failures worth catching in a regex engine are not "it did not link".
// They are the ones where the library builds, links, runs, and gives a subtly
// wrong answer because a probe macro said something untrue. Each check below
// names a specific decision in the descriptor:
//
//   compile + match      the sources really were compiled, not just linked
//   \p{Han} / \X         SUPPORT_UNICODE, i.e. that pcre2_ucd.c's tables are in
//   PCRE2_UTF            that UTF-8 mode works, which is all glib ever uses
//   the character tables that pcre2_chartables.c.dist was compiled, and in the
//                        C locale — the file the descriptor does NOT let a
//                        `pcre2_dftables` run produce from the build machine
//   pcre2_config(JIT)    that JIT is OFF and SAYS so, rather than crashing
//   capture groups       pcre2_substring_*, which glib's g_match_info_fetch is

#ifdef __linux__

// ⚠️ REQUIRED BEFORE THE HEADER, and pcre2.h says so with an #error if it is
// missing. The header uses it to choose which of the three code-unit widths to
// …

tests/examples/pcre2/tests/pcre2.cpp · 项目 tests/examples/pcre2

构建

targets
pcre2-8 (lib)
language
c++23
C standard
c11
import std
no
include dirs
mcpp_generated, */src, *

源文件 (28)

  • */src/pcre2_auto_possess.c
  • mcpp_generated/pcre2_chartables.c
  • */src/pcre2_chkdint.c
  • */src/pcre2_compile.c
  • */src/pcre2_config.c
  • */src/pcre2_context.c
  • */src/pcre2_convert.c
  • */src/pcre2_dfa_match.c
  • */src/pcre2_error.c
  • */src/pcre2_extuni.c
  • */src/pcre2_find_bracket.c
  • */src/pcre2_jit_compile.c
  • */src/pcre2_maketables.c
  • */src/pcre2_match.c
  • */src/pcre2_match_data.c
  • */src/pcre2_newline.c
  • */src/pcre2_ord2utf.c
  • */src/pcre2_pattern_info.c
  • */src/pcre2_script_run.c
  • */src/pcre2_serialize.c
  • */src/pcre2_string_utils.c
  • */src/pcre2_study.c
  • */src/pcre2_substitute.c
  • */src/pcre2_substring.c
  • */src/pcre2_tables.c
  • */src/pcre2_ucd.c
  • */src/pcre2_valid_utf.c
  • */src/pcre2_xclass.c

生成的文件

  • mcpp_generated/config.h
  • mcpp_generated/pcre2.h
  • mcpp_generated/pcre2_chartables.c

版本

版本平台 镜像sha256
10.44 最新 Linux GLOBAL CN 86b9cb0aa3bc…