tpy-lang 0.3.0.dev0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (333) hide show
  1. tpy_lang-0.3.0.dev0.dist-info/METADATA +151 -0
  2. tpy_lang-0.3.0.dev0.dist-info/RECORD +333 -0
  3. tpy_lang-0.3.0.dev0.dist-info/WHEEL +4 -0
  4. tpy_lang-0.3.0.dev0.dist-info/entry_points.txt +3 -0
  5. tpyc/__init__.py +104 -0
  6. tpyc/__main__.py +6 -0
  7. tpyc/_buildinfo.py +1 -0
  8. tpyc/_data/docs/LANGUAGE_FEATURES.md +6278 -0
  9. tpyc/_data/docs/STDLIB_ROADMAP.md +1258 -0
  10. tpyc/_data/docs/TPY_FOR_AGENTS.md +556 -0
  11. tpyc/_data/lib/tpy/_bindings/__init__.py +6 -0
  12. tpyc/_data/lib/tpy/_bindings/pcre2.py +173 -0
  13. tpyc/_data/lib/tpy/_bindings/posix_socket.py +161 -0
  14. tpyc/_data/lib/tpy/_functools_macros.py +80 -0
  15. tpyc/_data/lib/tpy/_macro_helpers.py +161 -0
  16. tpyc/_data/lib/tpy/argparse.py +2062 -0
  17. tpyc/_data/lib/tpy/asyncio/__init__.py +744 -0
  18. tpyc/_data/lib/tpy/asyncio/_executor.py +515 -0
  19. tpyc/_data/lib/tpy/base64.py +410 -0
  20. tpyc/_data/lib/tpy/bisect.py +39 -0
  21. tpyc/_data/lib/tpy/builtins.py +38 -0
  22. tpyc/_data/lib/tpy/dataclasses.py +354 -0
  23. tpyc/_data/lib/tpy/enum.py +23 -0
  24. tpyc/_data/lib/tpy/functools.py +33 -0
  25. tpyc/_data/lib/tpy/hashlib.py +206 -0
  26. tpyc/_data/lib/tpy/heapq.py +118 -0
  27. tpyc/_data/lib/tpy/io.py +395 -0
  28. tpyc/_data/lib/tpy/json.py +221 -0
  29. tpyc/_data/lib/tpy/math.py +406 -0
  30. tpyc/_data/lib/tpy/random.py +597 -0
  31. tpyc/_data/lib/tpy/re.py +467 -0
  32. tpyc/_data/lib/tpy/socket.py +379 -0
  33. tpyc/_data/lib/tpy/struct.py +178 -0
  34. tpyc/_data/lib/tpy/sys.py +40 -0
  35. tpyc/_data/lib/tpy/time.py +39 -0
  36. tpyc/_data/lib/tpy/tpy/__init__.py +78 -0
  37. tpyc/_data/lib/tpy/tpy/_bootstrap/__init__.py +10 -0
  38. tpyc/_data/lib/tpy/tpy/_bootstrap/_decorators.py +37 -0
  39. tpyc/_data/lib/tpy/tpy/_bootstrap/_extern.py +64 -0
  40. tpyc/_data/lib/tpy/tpy/_builtins/__init__.py +11 -0
  41. tpyc/_data/lib/tpy/tpy/_builtins/_bytes.py +378 -0
  42. tpyc/_data/lib/tpy/tpy/_builtins/_dict.py +151 -0
  43. tpyc/_data/lib/tpy/tpy/_builtins/_exceptions.py +125 -0
  44. tpyc/_data/lib/tpy/tpy/_builtins/_funcs.py +681 -0
  45. tpyc/_data/lib/tpy/tpy/_builtins/_io.py +97 -0
  46. tpyc/_data/lib/tpy/tpy/_builtins/_list.py +127 -0
  47. tpyc/_data/lib/tpy/tpy/_builtins/_range.py +52 -0
  48. tpyc/_data/lib/tpy/tpy/_builtins/_set.py +139 -0
  49. tpyc/_data/lib/tpy/tpy/_builtins/_super.py +11 -0
  50. tpyc/_data/lib/tpy/tpy/_builtins/_types.py +661 -0
  51. tpyc/_data/lib/tpy/tpy/_core/__init__.py +23 -0
  52. tpyc/_data/lib/tpy/tpy/_core/_bytes_view.py +129 -0
  53. tpyc/_data/lib/tpy/tpy/_core/_containers.py +137 -0
  54. tpyc/_data/lib/tpy/tpy/_core/_functions.py +40 -0
  55. tpyc/_data/lib/tpy/tpy/_core/_types.py +2061 -0
  56. tpyc/_data/lib/tpy/tpy/_typing/__init__.py +77 -0
  57. tpyc/_data/lib/tpy/tpy/_version.py +29 -0
  58. tpyc/_data/lib/tpy/tpy/bits.py +28 -0
  59. tpyc/_data/lib/tpy/tpy/coro/__init__.py +127 -0
  60. tpyc/_data/lib/tpy/tpy/extern.py +8 -0
  61. tpyc/_data/lib/tpy/tpy/mem.py +49 -0
  62. tpyc/_data/lib/tpy/tpy/unsafe.py +195 -0
  63. tpyc/_data/lib/tpy/tpy/version.py +21 -0
  64. tpyc/_data/lib/tpy/typing.py +13 -0
  65. tpyc/_data/runtime/cpp/include/tpy/any.hpp +461 -0
  66. tpyc/_data/runtime/cpp/include/tpy/as_ostream.hpp +117 -0
  67. tpyc/_data/runtime/cpp/include/tpy/async.hpp +76 -0
  68. tpyc/_data/runtime/cpp/include/tpy/bigint.hpp +1343 -0
  69. tpyc/_data/runtime/cpp/include/tpy/builtins.hpp +400 -0
  70. tpyc/_data/runtime/cpp/include/tpy/bytes_ops.hpp +469 -0
  71. tpyc/_data/runtime/cpp/include/tpy/container_ops.hpp +487 -0
  72. tpyc/_data/runtime/cpp/include/tpy/copy_iter.hpp +82 -0
  73. tpyc/_data/runtime/cpp/include/tpy/core.hpp +558 -0
  74. tpyc/_data/runtime/cpp/include/tpy/dict_ops.hpp +289 -0
  75. tpyc/_data/runtime/cpp/include/tpy/dunder.hpp +750 -0
  76. tpyc/_data/runtime/cpp/include/tpy/dynamic.hpp +44 -0
  77. tpyc/_data/runtime/cpp/include/tpy/enum.hpp +40 -0
  78. tpyc/_data/runtime/cpp/include/tpy/file.hpp +245 -0
  79. tpyc/_data/runtime/cpp/include/tpy/fixed_int.hpp +317 -0
  80. tpyc/_data/runtime/cpp/include/tpy/format.hpp +954 -0
  81. tpyc/_data/runtime/cpp/include/tpy/frame_slot.hpp +120 -0
  82. tpyc/_data/runtime/cpp/include/tpy/generator.hpp +47 -0
  83. tpyc/_data/runtime/cpp/include/tpy/iterable_ops.hpp +122 -0
  84. tpyc/_data/runtime/cpp/include/tpy/itertools.hpp +749 -0
  85. tpyc/_data/runtime/cpp/include/tpy/next_iter.hpp +82 -0
  86. tpyc/_data/runtime/cpp/include/tpy/ordered_map.hpp +518 -0
  87. tpyc/_data/runtime/cpp/include/tpy/ordered_set.hpp +337 -0
  88. tpyc/_data/runtime/cpp/include/tpy/own_iter.hpp +54 -0
  89. tpyc/_data/runtime/cpp/include/tpy/pascal_graph_sdl.hpp +192 -0
  90. tpyc/_data/runtime/cpp/include/tpy/printing.hpp +302 -0
  91. tpyc/_data/runtime/cpp/include/tpy/protocols.hpp +61 -0
  92. tpyc/_data/runtime/cpp/include/tpy/range.hpp +115 -0
  93. tpyc/_data/runtime/cpp/include/tpy/ranges.hpp +212 -0
  94. tpyc/_data/runtime/cpp/include/tpy/set_ops.hpp +265 -0
  95. tpyc/_data/runtime/cpp/include/tpy/slice.hpp +47 -0
  96. tpyc/_data/runtime/cpp/include/tpy/span_iter.hpp +42 -0
  97. tpyc/_data/runtime/cpp/include/tpy/stdlib/math.hpp +41 -0
  98. tpyc/_data/runtime/cpp/include/tpy/stdlib/pcre2_h.hpp +96 -0
  99. tpyc/_data/runtime/cpp/include/tpy/stdlib/random.hpp +25 -0
  100. tpyc/_data/runtime/cpp/include/tpy/stdlib/socket_h.hpp +145 -0
  101. tpyc/_data/runtime/cpp/include/tpy/stdlib/time.hpp +62 -0
  102. tpyc/_data/runtime/cpp/include/tpy/system.hpp +121 -0
  103. tpyc/_data/runtime/cpp/include/tpy/throwable.hpp +55 -0
  104. tpyc/_data/runtime/cpp/include/tpy/tpy.hpp +156 -0
  105. tpyc/_data/runtime/cpp/include/tpy/type_name.hpp +77 -0
  106. tpyc/_data/runtime/cpp/include/tpy/type_traits.hpp +240 -0
  107. tpyc/_data/runtime/cpp/include/tpy/uninit_array_storage.hpp +250 -0
  108. tpyc/_data/runtime/cpp/include/tpy/uninit_heap_storage.hpp +277 -0
  109. tpyc/_data/runtime/cpp/include/tpy/varargs.hpp +174 -0
  110. tpyc/_data/runtime/cpp/include/tpy/variant_ref.hpp +118 -0
  111. tpyc/_data/runtime/cpp/src/stdlib/socket_impl.cpp +104 -0
  112. tpyc/_data/runtime/cpp/third_party/README.md +58 -0
  113. tpyc/_data/runtime/cpp/third_party/pcre2/AUTHORS +36 -0
  114. tpyc/_data/runtime/cpp/third_party/pcre2/CMakeLists.txt +1233 -0
  115. tpyc/_data/runtime/cpp/third_party/pcre2/COPYING +5 -0
  116. tpyc/_data/runtime/cpp/third_party/pcre2/ChangeLog +3097 -0
  117. tpyc/_data/runtime/cpp/third_party/pcre2/HACKING +853 -0
  118. tpyc/_data/runtime/cpp/third_party/pcre2/INSTALL +368 -0
  119. tpyc/_data/runtime/cpp/third_party/pcre2/LICENCE +94 -0
  120. tpyc/_data/runtime/cpp/third_party/pcre2/NEWS +492 -0
  121. tpyc/_data/runtime/cpp/third_party/pcre2/NON-AUTOTOOLS-BUILD +430 -0
  122. tpyc/_data/runtime/cpp/third_party/pcre2/README +956 -0
  123. tpyc/_data/runtime/cpp/third_party/pcre2/cmake/COPYING-CMAKE-SCRIPTS +22 -0
  124. tpyc/_data/runtime/cpp/third_party/pcre2/cmake/FindEditline.cmake +16 -0
  125. tpyc/_data/runtime/cpp/third_party/pcre2/cmake/FindPackageHandleStandardArgs.cmake +58 -0
  126. tpyc/_data/runtime/cpp/third_party/pcre2/cmake/FindReadline.cmake +29 -0
  127. tpyc/_data/runtime/cpp/third_party/pcre2/cmake/pcre2-config-version.cmake.in +15 -0
  128. tpyc/_data/runtime/cpp/third_party/pcre2/cmake/pcre2-config.cmake.in +148 -0
  129. tpyc/_data/runtime/cpp/third_party/pcre2/config-cmake.h.in +56 -0
  130. tpyc/_data/runtime/cpp/third_party/pcre2/libpcre2-16.pc.in +13 -0
  131. tpyc/_data/runtime/cpp/third_party/pcre2/libpcre2-32.pc.in +13 -0
  132. tpyc/_data/runtime/cpp/third_party/pcre2/libpcre2-8.pc.in +13 -0
  133. tpyc/_data/runtime/cpp/third_party/pcre2/libpcre2-posix.pc.in +13 -0
  134. tpyc/_data/runtime/cpp/third_party/pcre2/pcre2-config.in +121 -0
  135. tpyc/_data/runtime/cpp/third_party/pcre2/src/config.h +483 -0
  136. tpyc/_data/runtime/cpp/third_party/pcre2/src/config.h.generic +483 -0
  137. tpyc/_data/runtime/cpp/third_party/pcre2/src/config.h.in +460 -0
  138. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2.h +1010 -0
  139. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2.h.generic +1010 -0
  140. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2.h.in +1010 -0
  141. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2_auto_possess.c +1371 -0
  142. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2_chartables.c +196 -0
  143. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2_chartables.c.dist +196 -0
  144. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2_chkdint.c +96 -0
  145. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2_compile.c +11001 -0
  146. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2_config.c +252 -0
  147. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2_context.c +510 -0
  148. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2_convert.c +1189 -0
  149. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2_dfa_match.c +4119 -0
  150. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2_dftables.c +297 -0
  151. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2_error.c +345 -0
  152. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2_extuni.c +162 -0
  153. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2_find_bracket.c +219 -0
  154. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2_fuzzsupport.c +792 -0
  155. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2_internal.h +2084 -0
  156. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2_intmodedep.h +940 -0
  157. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2_jit_compile.c +14972 -0
  158. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2_jit_match.c +200 -0
  159. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2_jit_misc.c +234 -0
  160. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2_jit_neon_inc.h +354 -0
  161. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2_jit_simd_inc.h +2355 -0
  162. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2_jit_test.c +2528 -0
  163. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2_maketables.c +165 -0
  164. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2_match.c +7777 -0
  165. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2_match_data.c +185 -0
  166. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2_newline.c +243 -0
  167. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2_ord2utf.c +120 -0
  168. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2_pattern_info.c +432 -0
  169. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2_printint.c +886 -0
  170. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2_script_run.c +344 -0
  171. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2_serialize.c +286 -0
  172. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2_string_utils.c +237 -0
  173. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2_study.c +1915 -0
  174. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2_substitute.c +1009 -0
  175. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2_substring.c +550 -0
  176. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2_tables.c +234 -0
  177. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2_ucd.c +5460 -0
  178. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2_ucp.h +396 -0
  179. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2_ucptables.c +1533 -0
  180. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2_valid_utf.c +398 -0
  181. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2_xclass.c +308 -0
  182. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2demo.c +497 -0
  183. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2grep.c +4606 -0
  184. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2posix.c +425 -0
  185. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2posix.h +187 -0
  186. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2posix_test.c +209 -0
  187. tpyc/_data/runtime/cpp/third_party/pcre2/src/pcre2test.c +9708 -0
  188. tpyc/_data/runtime/cpp/third_party/pcre2/src/sljit/allocator_src/sljitExecAllocatorApple.c +137 -0
  189. tpyc/_data/runtime/cpp/third_party/pcre2/src/sljit/allocator_src/sljitExecAllocatorCore.c +327 -0
  190. tpyc/_data/runtime/cpp/third_party/pcre2/src/sljit/allocator_src/sljitExecAllocatorFreeBSD.c +89 -0
  191. tpyc/_data/runtime/cpp/third_party/pcre2/src/sljit/allocator_src/sljitExecAllocatorPosix.c +62 -0
  192. tpyc/_data/runtime/cpp/third_party/pcre2/src/sljit/allocator_src/sljitExecAllocatorWindows.c +40 -0
  193. tpyc/_data/runtime/cpp/third_party/pcre2/src/sljit/allocator_src/sljitProtExecAllocatorNetBSD.c +72 -0
  194. tpyc/_data/runtime/cpp/third_party/pcre2/src/sljit/allocator_src/sljitProtExecAllocatorPosix.c +172 -0
  195. tpyc/_data/runtime/cpp/third_party/pcre2/src/sljit/allocator_src/sljitWXExecAllocatorPosix.c +141 -0
  196. tpyc/_data/runtime/cpp/third_party/pcre2/src/sljit/allocator_src/sljitWXExecAllocatorWindows.c +102 -0
  197. tpyc/_data/runtime/cpp/third_party/pcre2/src/sljit/sljitConfig.h +142 -0
  198. tpyc/_data/runtime/cpp/third_party/pcre2/src/sljit/sljitConfigCPU.h +188 -0
  199. tpyc/_data/runtime/cpp/third_party/pcre2/src/sljit/sljitConfigInternal.h +907 -0
  200. tpyc/_data/runtime/cpp/third_party/pcre2/src/sljit/sljitLir.c +3561 -0
  201. tpyc/_data/runtime/cpp/third_party/pcre2/src/sljit/sljitLir.h +2466 -0
  202. tpyc/_data/runtime/cpp/third_party/pcre2/src/sljit/sljitNativeARM_32.c +4636 -0
  203. tpyc/_data/runtime/cpp/third_party/pcre2/src/sljit/sljitNativeARM_64.c +3491 -0
  204. tpyc/_data/runtime/cpp/third_party/pcre2/src/sljit/sljitNativeARM_T2_32.c +4302 -0
  205. tpyc/_data/runtime/cpp/third_party/pcre2/src/sljit/sljitNativeLOONGARCH_64.c +3765 -0
  206. tpyc/_data/runtime/cpp/third_party/pcre2/src/sljit/sljitNativeMIPS_32.c +472 -0
  207. tpyc/_data/runtime/cpp/third_party/pcre2/src/sljit/sljitNativeMIPS_64.c +387 -0
  208. tpyc/_data/runtime/cpp/third_party/pcre2/src/sljit/sljitNativeMIPS_common.c +4259 -0
  209. tpyc/_data/runtime/cpp/third_party/pcre2/src/sljit/sljitNativePPC_32.c +485 -0
  210. tpyc/_data/runtime/cpp/third_party/pcre2/src/sljit/sljitNativePPC_64.c +719 -0
  211. tpyc/_data/runtime/cpp/third_party/pcre2/src/sljit/sljitNativePPC_common.c +3161 -0
  212. tpyc/_data/runtime/cpp/third_party/pcre2/src/sljit/sljitNativeRISCV_32.c +142 -0
  213. tpyc/_data/runtime/cpp/third_party/pcre2/src/sljit/sljitNativeRISCV_64.c +222 -0
  214. tpyc/_data/runtime/cpp/third_party/pcre2/src/sljit/sljitNativeRISCV_common.c +3121 -0
  215. tpyc/_data/runtime/cpp/third_party/pcre2/src/sljit/sljitNativeS390X.c +4526 -0
  216. tpyc/_data/runtime/cpp/third_party/pcre2/src/sljit/sljitNativeX86_32.c +1685 -0
  217. tpyc/_data/runtime/cpp/third_party/pcre2/src/sljit/sljitNativeX86_64.c +1398 -0
  218. tpyc/_data/runtime/cpp/third_party/pcre2/src/sljit/sljitNativeX86_common.c +5001 -0
  219. tpyc/_data/runtime/cpp/third_party/pcre2/src/sljit/sljitSerialize.c +516 -0
  220. tpyc/_data/runtime/cpp/third_party/pcre2/src/sljit/sljitUtils.c +344 -0
  221. tpyc/_data/runtime/cpp/third_party/pcre2.sources.txt +54 -0
  222. tpyc/_data/runtime/cpp/third_party/pcre2.vendor.json +7 -0
  223. tpyc/build/__init__.py +7 -0
  224. tpyc/build/pcre2.py +122 -0
  225. tpyc/build/third_party.py +413 -0
  226. tpyc/cli.py +822 -0
  227. tpyc/codegen_cpp/__init__.py +18 -0
  228. tpyc/codegen_cpp/builtins.py +484 -0
  229. tpyc/codegen_cpp/context.py +2064 -0
  230. tpyc/codegen_cpp/expressions.py +5940 -0
  231. tpyc/codegen_cpp/functions.py +1913 -0
  232. tpyc/codegen_cpp/gen_async.py +3258 -0
  233. tpyc/codegen_cpp/gen_generators.py +657 -0
  234. tpyc/codegen_cpp/generator.py +2258 -0
  235. tpyc/codegen_cpp/match.py +1997 -0
  236. tpyc/codegen_cpp/param_const.py +172 -0
  237. tpyc/codegen_cpp/protocols.py +907 -0
  238. tpyc/codegen_cpp/records.py +1654 -0
  239. tpyc/codegen_cpp/resumable_cfg.py +1651 -0
  240. tpyc/codegen_cpp/statements.py +4963 -0
  241. tpyc/codegen_cpp/string_dispatch.py +76 -0
  242. tpyc/codegen_cpp/test_context.py +46 -0
  243. tpyc/codegen_cpp/test_param_const.py +113 -0
  244. tpyc/codegen_cpp/test_resumable_cfg.py +182 -0
  245. tpyc/codegen_cpp/type_resolution.py +53 -0
  246. tpyc/codegen_cpp/types.py +436 -0
  247. tpyc/codegen_cpp/variant_access.py +135 -0
  248. tpyc/coercions.py +749 -0
  249. tpyc/compilation_context.py +57 -0
  250. tpyc/compiler.py +3945 -0
  251. tpyc/cycle_detection.py +358 -0
  252. tpyc/diagnostics.py +135 -0
  253. tpyc/dump_types.py +353 -0
  254. tpyc/frontend_diagnostics.py +47 -0
  255. tpyc/frontend_ir/__init__.py +140 -0
  256. tpyc/frontend_ir/lower.py +1098 -0
  257. tpyc/frontend_ir/nodes.py +718 -0
  258. tpyc/frontend_ir/resolver_adapter.py +151 -0
  259. tpyc/frontend_plugin.py +209 -0
  260. tpyc/install_docs.py +81 -0
  261. tpyc/liveness.py +756 -0
  262. tpyc/macro_api.py +1724 -0
  263. tpyc/macro_loader.py +497 -0
  264. tpyc/module_names.py +64 -0
  265. tpyc/modules/__init__.py +31 -0
  266. tpyc/modules/defs.py +89 -0
  267. tpyc/modules/registry.py +36 -0
  268. tpyc/modules/resolver.py +192 -0
  269. tpyc/modules/type_resolution.py +629 -0
  270. tpyc/namespace.py +172 -0
  271. tpyc/parse/__init__.py +84 -0
  272. tpyc/parse/imports.py +490 -0
  273. tpyc/parse/nodes.py +1732 -0
  274. tpyc/parse/parser.py +4043 -0
  275. tpyc/parse/resolve_refs.py +466 -0
  276. tpyc/parse/type_resolver.py +1060 -0
  277. tpyc/prescan.py +254 -0
  278. tpyc/qnames.py +149 -0
  279. tpyc/repl.py +529 -0
  280. tpyc/repl_backends.py +848 -0
  281. tpyc/sema/__init__.py +21 -0
  282. tpyc/sema/analyzer.py +3625 -0
  283. tpyc/sema/bound_check.py +72 -0
  284. tpyc/sema/builder_trace.py +684 -0
  285. tpyc/sema/calls.py +5406 -0
  286. tpyc/sema/compatibility.py +2107 -0
  287. tpyc/sema/context.py +1243 -0
  288. tpyc/sema/expressions.py +3737 -0
  289. tpyc/sema/flow_facts.py +199 -0
  290. tpyc/sema/init_tracker.py +150 -0
  291. tpyc/sema/list_literals.py +69 -0
  292. tpyc/sema/literal_utils.py +27 -0
  293. tpyc/sema/local_deduction.py +1088 -0
  294. tpyc/sema/macros.py +179 -0
  295. tpyc/sema/match.py +1177 -0
  296. tpyc/sema/method_expansion.py +347 -0
  297. tpyc/sema/methods.py +2197 -0
  298. tpyc/sema/mutation_propagation.py +268 -0
  299. tpyc/sema/narrowing.py +857 -0
  300. tpyc/sema/numeric_lattice.py +160 -0
  301. tpyc/sema/operators.py +402 -0
  302. tpyc/sema/overloads.py +841 -0
  303. tpyc/sema/protocols.py +1209 -0
  304. tpyc/sema/reach_analysis.py +202 -0
  305. tpyc/sema/registration.py +3156 -0
  306. tpyc/sema/scope_tracker.py +193 -0
  307. tpyc/sema/statements.py +4426 -0
  308. tpyc/sema/type_ops.py +1879 -0
  309. tpyc/sema/value_range.py +181 -0
  310. tpyc/symbol_binding.py +259 -0
  311. tpyc/test_c3_mro.py +208 -0
  312. tpyc/test_cli_argv.py +52 -0
  313. tpyc/test_compiler.py +559 -0
  314. tpyc/test_contains_type_param.py +101 -0
  315. tpyc/test_cycle_detection.py +221 -0
  316. tpyc/test_dump_types.py +225 -0
  317. tpyc/test_install_docs.py +65 -0
  318. tpyc/test_local_cpp_form.py +135 -0
  319. tpyc/test_macro_loader.py +76 -0
  320. tpyc/test_method_expansion.py +254 -0
  321. tpyc/test_nominal_identity.py +182 -0
  322. tpyc/test_overloads.py +410 -0
  323. tpyc/test_parse.py +303 -0
  324. tpyc/test_parse_type_ref.py +506 -0
  325. tpyc/test_parse_version_info.py +58 -0
  326. tpyc/test_reach_analysis.py +72 -0
  327. tpyc/test_ref_type.py +216 -0
  328. tpyc/test_send_sync_substitution.py +276 -0
  329. tpyc/test_tuple_mutation_propagation.py +206 -0
  330. tpyc/test_type_def_registry.py +1729 -0
  331. tpyc/test_union_types.py +195 -0
  332. tpyc/type_def_registry.py +975 -0
  333. tpyc/typesys.py +5104 -0
@@ -0,0 +1,1010 @@
1
+ /*************************************************
2
+ * Perl-Compatible Regular Expressions *
3
+ *************************************************/
4
+
5
+ /* This is the public header file for the PCRE library, second API, to be
6
+ #included by applications that call PCRE2 functions.
7
+
8
+ Copyright (c) 2016-2024 University of Cambridge
9
+
10
+ -----------------------------------------------------------------------------
11
+ Redistribution and use in source and binary forms, with or without
12
+ modification, are permitted provided that the following conditions are met:
13
+
14
+ * Redistributions of source code must retain the above copyright notice,
15
+ this list of conditions and the following disclaimer.
16
+
17
+ * Redistributions in binary form must reproduce the above copyright
18
+ notice, this list of conditions and the following disclaimer in the
19
+ documentation and/or other materials provided with the distribution.
20
+
21
+ * Neither the name of the University of Cambridge nor the names of its
22
+ contributors may be used to endorse or promote products derived from
23
+ this software without specific prior written permission.
24
+
25
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
26
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
29
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35
+ POSSIBILITY OF SUCH DAMAGE.
36
+ -----------------------------------------------------------------------------
37
+ */
38
+
39
+ #ifndef PCRE2_H_IDEMPOTENT_GUARD
40
+ #define PCRE2_H_IDEMPOTENT_GUARD
41
+
42
+ /* The current PCRE version information. */
43
+
44
+ #define PCRE2_MAJOR @PCRE2_MAJOR@
45
+ #define PCRE2_MINOR @PCRE2_MINOR@
46
+ #define PCRE2_PRERELEASE @PCRE2_PRERELEASE@
47
+ #define PCRE2_DATE @PCRE2_DATE@
48
+
49
+ /* When an application links to a PCRE DLL in Windows, the symbols that are
50
+ imported have to be identified as such. When building PCRE2, the appropriate
51
+ export setting is defined in pcre2_internal.h, which includes this file. So we
52
+ don't change existing definitions of PCRE2_EXP_DECL. */
53
+
54
+ #if defined(_WIN32) && !defined(PCRE2_STATIC)
55
+ # ifndef PCRE2_EXP_DECL
56
+ # define PCRE2_EXP_DECL extern __declspec(dllimport)
57
+ # endif
58
+ #endif
59
+
60
+ /* By default, we use the standard "extern" declarations. */
61
+
62
+ #ifndef PCRE2_EXP_DECL
63
+ # ifdef __cplusplus
64
+ # define PCRE2_EXP_DECL extern "C"
65
+ # else
66
+ # define PCRE2_EXP_DECL extern
67
+ # endif
68
+ #endif
69
+
70
+ /* When compiling with the MSVC compiler, it is sometimes necessary to include
71
+ a "calling convention" before exported function names. (This is secondhand
72
+ information; I know nothing about MSVC myself). For example, something like
73
+
74
+ void __cdecl function(....)
75
+
76
+ might be needed. In order so make this easy, all the exported functions have
77
+ PCRE2_CALL_CONVENTION just before their names. It is rarely needed; if not
78
+ set, we ensure here that it has no effect. */
79
+
80
+ #ifndef PCRE2_CALL_CONVENTION
81
+ #define PCRE2_CALL_CONVENTION
82
+ #endif
83
+
84
+ /* Have to include limits.h, stdlib.h, and inttypes.h to ensure that size_t and
85
+ uint8_t, UCHAR_MAX, etc are defined. Some systems that do have inttypes.h do
86
+ not have stdint.h, which is why we use inttypes.h, which according to the C
87
+ standard is a superset of stdint.h. If inttypes.h is not available the build
88
+ will break and the relevant values must be provided by some other means. */
89
+
90
+ #include <limits.h>
91
+ #include <stdlib.h>
92
+ #include <inttypes.h>
93
+
94
+ /* Allow for C++ users compiling this directly. */
95
+
96
+ #ifdef __cplusplus
97
+ extern "C" {
98
+ #endif
99
+
100
+ /* The following option bits can be passed to pcre2_compile(), pcre2_match(),
101
+ or pcre2_dfa_match(). PCRE2_NO_UTF_CHECK affects only the function to which it
102
+ is passed. Put these bits at the most significant end of the options word so
103
+ others can be added next to them */
104
+
105
+ #define PCRE2_ANCHORED 0x80000000u
106
+ #define PCRE2_NO_UTF_CHECK 0x40000000u
107
+ #define PCRE2_ENDANCHORED 0x20000000u
108
+
109
+ /* The following option bits can be passed only to pcre2_compile(). However,
110
+ they may affect compilation, JIT compilation, and/or interpretive execution.
111
+ The following tags indicate which:
112
+
113
+ C alters what is compiled by pcre2_compile()
114
+ J alters what is compiled by pcre2_jit_compile()
115
+ M is inspected during pcre2_match() execution
116
+ D is inspected during pcre2_dfa_match() execution
117
+ */
118
+
119
+ #define PCRE2_ALLOW_EMPTY_CLASS 0x00000001u /* C */
120
+ #define PCRE2_ALT_BSUX 0x00000002u /* C */
121
+ #define PCRE2_AUTO_CALLOUT 0x00000004u /* C */
122
+ #define PCRE2_CASELESS 0x00000008u /* C */
123
+ #define PCRE2_DOLLAR_ENDONLY 0x00000010u /* J M D */
124
+ #define PCRE2_DOTALL 0x00000020u /* C */
125
+ #define PCRE2_DUPNAMES 0x00000040u /* C */
126
+ #define PCRE2_EXTENDED 0x00000080u /* C */
127
+ #define PCRE2_FIRSTLINE 0x00000100u /* J M D */
128
+ #define PCRE2_MATCH_UNSET_BACKREF 0x00000200u /* C J M */
129
+ #define PCRE2_MULTILINE 0x00000400u /* C */
130
+ #define PCRE2_NEVER_UCP 0x00000800u /* C */
131
+ #define PCRE2_NEVER_UTF 0x00001000u /* C */
132
+ #define PCRE2_NO_AUTO_CAPTURE 0x00002000u /* C */
133
+ #define PCRE2_NO_AUTO_POSSESS 0x00004000u /* C */
134
+ #define PCRE2_NO_DOTSTAR_ANCHOR 0x00008000u /* C */
135
+ #define PCRE2_NO_START_OPTIMIZE 0x00010000u /* J M D */
136
+ #define PCRE2_UCP 0x00020000u /* C J M D */
137
+ #define PCRE2_UNGREEDY 0x00040000u /* C */
138
+ #define PCRE2_UTF 0x00080000u /* C J M D */
139
+ #define PCRE2_NEVER_BACKSLASH_C 0x00100000u /* C */
140
+ #define PCRE2_ALT_CIRCUMFLEX 0x00200000u /* J M D */
141
+ #define PCRE2_ALT_VERBNAMES 0x00400000u /* C */
142
+ #define PCRE2_USE_OFFSET_LIMIT 0x00800000u /* J M D */
143
+ #define PCRE2_EXTENDED_MORE 0x01000000u /* C */
144
+ #define PCRE2_LITERAL 0x02000000u /* C */
145
+ #define PCRE2_MATCH_INVALID_UTF 0x04000000u /* J M D */
146
+
147
+ /* An additional compile options word is available in the compile context. */
148
+
149
+ #define PCRE2_EXTRA_ALLOW_SURROGATE_ESCAPES 0x00000001u /* C */
150
+ #define PCRE2_EXTRA_BAD_ESCAPE_IS_LITERAL 0x00000002u /* C */
151
+ #define PCRE2_EXTRA_MATCH_WORD 0x00000004u /* C */
152
+ #define PCRE2_EXTRA_MATCH_LINE 0x00000008u /* C */
153
+ #define PCRE2_EXTRA_ESCAPED_CR_IS_LF 0x00000010u /* C */
154
+ #define PCRE2_EXTRA_ALT_BSUX 0x00000020u /* C */
155
+ #define PCRE2_EXTRA_ALLOW_LOOKAROUND_BSK 0x00000040u /* C */
156
+ #define PCRE2_EXTRA_CASELESS_RESTRICT 0x00000080u /* C */
157
+ #define PCRE2_EXTRA_ASCII_BSD 0x00000100u /* C */
158
+ #define PCRE2_EXTRA_ASCII_BSS 0x00000200u /* C */
159
+ #define PCRE2_EXTRA_ASCII_BSW 0x00000400u /* C */
160
+ #define PCRE2_EXTRA_ASCII_POSIX 0x00000800u /* C */
161
+ #define PCRE2_EXTRA_ASCII_DIGIT 0x00001000u /* C */
162
+
163
+ /* These are for pcre2_jit_compile(). */
164
+
165
+ #define PCRE2_JIT_COMPLETE 0x00000001u /* For full matching */
166
+ #define PCRE2_JIT_PARTIAL_SOFT 0x00000002u
167
+ #define PCRE2_JIT_PARTIAL_HARD 0x00000004u
168
+ #define PCRE2_JIT_INVALID_UTF 0x00000100u
169
+
170
+ /* These are for pcre2_match(), pcre2_dfa_match(), pcre2_jit_match(), and
171
+ pcre2_substitute(). Some are allowed only for one of the functions, and in
172
+ these cases it is noted below. Note that PCRE2_ANCHORED, PCRE2_ENDANCHORED and
173
+ PCRE2_NO_UTF_CHECK can also be passed to these functions (though
174
+ pcre2_jit_match() ignores the latter since it bypasses all sanity checks). */
175
+
176
+ #define PCRE2_NOTBOL 0x00000001u
177
+ #define PCRE2_NOTEOL 0x00000002u
178
+ #define PCRE2_NOTEMPTY 0x00000004u /* ) These two must be kept */
179
+ #define PCRE2_NOTEMPTY_ATSTART 0x00000008u /* ) adjacent to each other. */
180
+ #define PCRE2_PARTIAL_SOFT 0x00000010u
181
+ #define PCRE2_PARTIAL_HARD 0x00000020u
182
+ #define PCRE2_DFA_RESTART 0x00000040u /* pcre2_dfa_match() only */
183
+ #define PCRE2_DFA_SHORTEST 0x00000080u /* pcre2_dfa_match() only */
184
+ #define PCRE2_SUBSTITUTE_GLOBAL 0x00000100u /* pcre2_substitute() only */
185
+ #define PCRE2_SUBSTITUTE_EXTENDED 0x00000200u /* pcre2_substitute() only */
186
+ #define PCRE2_SUBSTITUTE_UNSET_EMPTY 0x00000400u /* pcre2_substitute() only */
187
+ #define PCRE2_SUBSTITUTE_UNKNOWN_UNSET 0x00000800u /* pcre2_substitute() only */
188
+ #define PCRE2_SUBSTITUTE_OVERFLOW_LENGTH 0x00001000u /* pcre2_substitute() only */
189
+ #define PCRE2_NO_JIT 0x00002000u /* not for pcre2_dfa_match() */
190
+ #define PCRE2_COPY_MATCHED_SUBJECT 0x00004000u
191
+ #define PCRE2_SUBSTITUTE_LITERAL 0x00008000u /* pcre2_substitute() only */
192
+ #define PCRE2_SUBSTITUTE_MATCHED 0x00010000u /* pcre2_substitute() only */
193
+ #define PCRE2_SUBSTITUTE_REPLACEMENT_ONLY 0x00020000u /* pcre2_substitute() only */
194
+ #define PCRE2_DISABLE_RECURSELOOP_CHECK 0x00040000u /* not for pcre2_dfa_match() or pcre2_jit_match() */
195
+
196
+ /* Options for pcre2_pattern_convert(). */
197
+
198
+ #define PCRE2_CONVERT_UTF 0x00000001u
199
+ #define PCRE2_CONVERT_NO_UTF_CHECK 0x00000002u
200
+ #define PCRE2_CONVERT_POSIX_BASIC 0x00000004u
201
+ #define PCRE2_CONVERT_POSIX_EXTENDED 0x00000008u
202
+ #define PCRE2_CONVERT_GLOB 0x00000010u
203
+ #define PCRE2_CONVERT_GLOB_NO_WILD_SEPARATOR 0x00000030u
204
+ #define PCRE2_CONVERT_GLOB_NO_STARSTAR 0x00000050u
205
+
206
+ /* Newline and \R settings, for use in compile contexts. The newline values
207
+ must be kept in step with values set in config.h and both sets must all be
208
+ greater than zero. */
209
+
210
+ #define PCRE2_NEWLINE_CR 1
211
+ #define PCRE2_NEWLINE_LF 2
212
+ #define PCRE2_NEWLINE_CRLF 3
213
+ #define PCRE2_NEWLINE_ANY 4
214
+ #define PCRE2_NEWLINE_ANYCRLF 5
215
+ #define PCRE2_NEWLINE_NUL 6
216
+
217
+ #define PCRE2_BSR_UNICODE 1
218
+ #define PCRE2_BSR_ANYCRLF 2
219
+
220
+ /* Error codes for pcre2_compile(). Some of these are also used by
221
+ pcre2_pattern_convert(). */
222
+
223
+ #define PCRE2_ERROR_END_BACKSLASH 101
224
+ #define PCRE2_ERROR_END_BACKSLASH_C 102
225
+ #define PCRE2_ERROR_UNKNOWN_ESCAPE 103
226
+ #define PCRE2_ERROR_QUANTIFIER_OUT_OF_ORDER 104
227
+ #define PCRE2_ERROR_QUANTIFIER_TOO_BIG 105
228
+ #define PCRE2_ERROR_MISSING_SQUARE_BRACKET 106
229
+ #define PCRE2_ERROR_ESCAPE_INVALID_IN_CLASS 107
230
+ #define PCRE2_ERROR_CLASS_RANGE_ORDER 108
231
+ #define PCRE2_ERROR_QUANTIFIER_INVALID 109
232
+ #define PCRE2_ERROR_INTERNAL_UNEXPECTED_REPEAT 110
233
+ #define PCRE2_ERROR_INVALID_AFTER_PARENS_QUERY 111
234
+ #define PCRE2_ERROR_POSIX_CLASS_NOT_IN_CLASS 112
235
+ #define PCRE2_ERROR_POSIX_NO_SUPPORT_COLLATING 113
236
+ #define PCRE2_ERROR_MISSING_CLOSING_PARENTHESIS 114
237
+ #define PCRE2_ERROR_BAD_SUBPATTERN_REFERENCE 115
238
+ #define PCRE2_ERROR_NULL_PATTERN 116
239
+ #define PCRE2_ERROR_BAD_OPTIONS 117
240
+ #define PCRE2_ERROR_MISSING_COMMENT_CLOSING 118
241
+ #define PCRE2_ERROR_PARENTHESES_NEST_TOO_DEEP 119
242
+ #define PCRE2_ERROR_PATTERN_TOO_LARGE 120
243
+ #define PCRE2_ERROR_HEAP_FAILED 121
244
+ #define PCRE2_ERROR_UNMATCHED_CLOSING_PARENTHESIS 122
245
+ #define PCRE2_ERROR_INTERNAL_CODE_OVERFLOW 123
246
+ #define PCRE2_ERROR_MISSING_CONDITION_CLOSING 124
247
+ #define PCRE2_ERROR_LOOKBEHIND_NOT_FIXED_LENGTH 125
248
+ #define PCRE2_ERROR_ZERO_RELATIVE_REFERENCE 126
249
+ #define PCRE2_ERROR_TOO_MANY_CONDITION_BRANCHES 127
250
+ #define PCRE2_ERROR_CONDITION_ASSERTION_EXPECTED 128
251
+ #define PCRE2_ERROR_BAD_RELATIVE_REFERENCE 129
252
+ #define PCRE2_ERROR_UNKNOWN_POSIX_CLASS 130
253
+ #define PCRE2_ERROR_INTERNAL_STUDY_ERROR 131
254
+ #define PCRE2_ERROR_UNICODE_NOT_SUPPORTED 132
255
+ #define PCRE2_ERROR_PARENTHESES_STACK_CHECK 133
256
+ #define PCRE2_ERROR_CODE_POINT_TOO_BIG 134
257
+ #define PCRE2_ERROR_LOOKBEHIND_TOO_COMPLICATED 135
258
+ #define PCRE2_ERROR_LOOKBEHIND_INVALID_BACKSLASH_C 136
259
+ #define PCRE2_ERROR_UNSUPPORTED_ESCAPE_SEQUENCE 137
260
+ #define PCRE2_ERROR_CALLOUT_NUMBER_TOO_BIG 138
261
+ #define PCRE2_ERROR_MISSING_CALLOUT_CLOSING 139
262
+ #define PCRE2_ERROR_ESCAPE_INVALID_IN_VERB 140
263
+ #define PCRE2_ERROR_UNRECOGNIZED_AFTER_QUERY_P 141
264
+ #define PCRE2_ERROR_MISSING_NAME_TERMINATOR 142
265
+ #define PCRE2_ERROR_DUPLICATE_SUBPATTERN_NAME 143
266
+ #define PCRE2_ERROR_INVALID_SUBPATTERN_NAME 144
267
+ #define PCRE2_ERROR_UNICODE_PROPERTIES_UNAVAILABLE 145
268
+ #define PCRE2_ERROR_MALFORMED_UNICODE_PROPERTY 146
269
+ #define PCRE2_ERROR_UNKNOWN_UNICODE_PROPERTY 147
270
+ #define PCRE2_ERROR_SUBPATTERN_NAME_TOO_LONG 148
271
+ #define PCRE2_ERROR_TOO_MANY_NAMED_SUBPATTERNS 149
272
+ #define PCRE2_ERROR_CLASS_INVALID_RANGE 150
273
+ #define PCRE2_ERROR_OCTAL_BYTE_TOO_BIG 151
274
+ #define PCRE2_ERROR_INTERNAL_OVERRAN_WORKSPACE 152
275
+ #define PCRE2_ERROR_INTERNAL_MISSING_SUBPATTERN 153
276
+ #define PCRE2_ERROR_DEFINE_TOO_MANY_BRANCHES 154
277
+ #define PCRE2_ERROR_BACKSLASH_O_MISSING_BRACE 155
278
+ #define PCRE2_ERROR_INTERNAL_UNKNOWN_NEWLINE 156
279
+ #define PCRE2_ERROR_BACKSLASH_G_SYNTAX 157
280
+ #define PCRE2_ERROR_PARENS_QUERY_R_MISSING_CLOSING 158
281
+ /* Error 159 is obsolete and should now never occur */
282
+ #define PCRE2_ERROR_VERB_ARGUMENT_NOT_ALLOWED 159
283
+ #define PCRE2_ERROR_VERB_UNKNOWN 160
284
+ #define PCRE2_ERROR_SUBPATTERN_NUMBER_TOO_BIG 161
285
+ #define PCRE2_ERROR_SUBPATTERN_NAME_EXPECTED 162
286
+ #define PCRE2_ERROR_INTERNAL_PARSED_OVERFLOW 163
287
+ #define PCRE2_ERROR_INVALID_OCTAL 164
288
+ #define PCRE2_ERROR_SUBPATTERN_NAMES_MISMATCH 165
289
+ #define PCRE2_ERROR_MARK_MISSING_ARGUMENT 166
290
+ #define PCRE2_ERROR_INVALID_HEXADECIMAL 167
291
+ #define PCRE2_ERROR_BACKSLASH_C_SYNTAX 168
292
+ #define PCRE2_ERROR_BACKSLASH_K_SYNTAX 169
293
+ #define PCRE2_ERROR_INTERNAL_BAD_CODE_LOOKBEHINDS 170
294
+ #define PCRE2_ERROR_BACKSLASH_N_IN_CLASS 171
295
+ #define PCRE2_ERROR_CALLOUT_STRING_TOO_LONG 172
296
+ #define PCRE2_ERROR_UNICODE_DISALLOWED_CODE_POINT 173
297
+ #define PCRE2_ERROR_UTF_IS_DISABLED 174
298
+ #define PCRE2_ERROR_UCP_IS_DISABLED 175
299
+ #define PCRE2_ERROR_VERB_NAME_TOO_LONG 176
300
+ #define PCRE2_ERROR_BACKSLASH_U_CODE_POINT_TOO_BIG 177
301
+ #define PCRE2_ERROR_MISSING_OCTAL_OR_HEX_DIGITS 178
302
+ #define PCRE2_ERROR_VERSION_CONDITION_SYNTAX 179
303
+ #define PCRE2_ERROR_INTERNAL_BAD_CODE_AUTO_POSSESS 180
304
+ #define PCRE2_ERROR_CALLOUT_NO_STRING_DELIMITER 181
305
+ #define PCRE2_ERROR_CALLOUT_BAD_STRING_DELIMITER 182
306
+ #define PCRE2_ERROR_BACKSLASH_C_CALLER_DISABLED 183
307
+ #define PCRE2_ERROR_QUERY_BARJX_NEST_TOO_DEEP 184
308
+ #define PCRE2_ERROR_BACKSLASH_C_LIBRARY_DISABLED 185
309
+ #define PCRE2_ERROR_PATTERN_TOO_COMPLICATED 186
310
+ #define PCRE2_ERROR_LOOKBEHIND_TOO_LONG 187
311
+ #define PCRE2_ERROR_PATTERN_STRING_TOO_LONG 188
312
+ #define PCRE2_ERROR_INTERNAL_BAD_CODE 189
313
+ #define PCRE2_ERROR_INTERNAL_BAD_CODE_IN_SKIP 190
314
+ #define PCRE2_ERROR_NO_SURROGATES_IN_UTF16 191
315
+ #define PCRE2_ERROR_BAD_LITERAL_OPTIONS 192
316
+ #define PCRE2_ERROR_SUPPORTED_ONLY_IN_UNICODE 193
317
+ #define PCRE2_ERROR_INVALID_HYPHEN_IN_OPTIONS 194
318
+ #define PCRE2_ERROR_ALPHA_ASSERTION_UNKNOWN 195
319
+ #define PCRE2_ERROR_SCRIPT_RUN_NOT_AVAILABLE 196
320
+ #define PCRE2_ERROR_TOO_MANY_CAPTURES 197
321
+ #define PCRE2_ERROR_CONDITION_ATOMIC_ASSERTION_EXPECTED 198
322
+ #define PCRE2_ERROR_BACKSLASH_K_IN_LOOKAROUND 199
323
+
324
+
325
+ /* "Expected" matching error codes: no match and partial match. */
326
+
327
+ #define PCRE2_ERROR_NOMATCH (-1)
328
+ #define PCRE2_ERROR_PARTIAL (-2)
329
+
330
+ /* Error codes for UTF-8 validity checks */
331
+
332
+ #define PCRE2_ERROR_UTF8_ERR1 (-3)
333
+ #define PCRE2_ERROR_UTF8_ERR2 (-4)
334
+ #define PCRE2_ERROR_UTF8_ERR3 (-5)
335
+ #define PCRE2_ERROR_UTF8_ERR4 (-6)
336
+ #define PCRE2_ERROR_UTF8_ERR5 (-7)
337
+ #define PCRE2_ERROR_UTF8_ERR6 (-8)
338
+ #define PCRE2_ERROR_UTF8_ERR7 (-9)
339
+ #define PCRE2_ERROR_UTF8_ERR8 (-10)
340
+ #define PCRE2_ERROR_UTF8_ERR9 (-11)
341
+ #define PCRE2_ERROR_UTF8_ERR10 (-12)
342
+ #define PCRE2_ERROR_UTF8_ERR11 (-13)
343
+ #define PCRE2_ERROR_UTF8_ERR12 (-14)
344
+ #define PCRE2_ERROR_UTF8_ERR13 (-15)
345
+ #define PCRE2_ERROR_UTF8_ERR14 (-16)
346
+ #define PCRE2_ERROR_UTF8_ERR15 (-17)
347
+ #define PCRE2_ERROR_UTF8_ERR16 (-18)
348
+ #define PCRE2_ERROR_UTF8_ERR17 (-19)
349
+ #define PCRE2_ERROR_UTF8_ERR18 (-20)
350
+ #define PCRE2_ERROR_UTF8_ERR19 (-21)
351
+ #define PCRE2_ERROR_UTF8_ERR20 (-22)
352
+ #define PCRE2_ERROR_UTF8_ERR21 (-23)
353
+
354
+ /* Error codes for UTF-16 validity checks */
355
+
356
+ #define PCRE2_ERROR_UTF16_ERR1 (-24)
357
+ #define PCRE2_ERROR_UTF16_ERR2 (-25)
358
+ #define PCRE2_ERROR_UTF16_ERR3 (-26)
359
+
360
+ /* Error codes for UTF-32 validity checks */
361
+
362
+ #define PCRE2_ERROR_UTF32_ERR1 (-27)
363
+ #define PCRE2_ERROR_UTF32_ERR2 (-28)
364
+
365
+ /* Miscellaneous error codes for pcre2[_dfa]_match(), substring extraction
366
+ functions, context functions, and serializing functions. They are in numerical
367
+ order. Originally they were in alphabetical order too, but now that PCRE2 is
368
+ released, the numbers must not be changed. */
369
+
370
+ #define PCRE2_ERROR_BADDATA (-29)
371
+ #define PCRE2_ERROR_MIXEDTABLES (-30) /* Name was changed */
372
+ #define PCRE2_ERROR_BADMAGIC (-31)
373
+ #define PCRE2_ERROR_BADMODE (-32)
374
+ #define PCRE2_ERROR_BADOFFSET (-33)
375
+ #define PCRE2_ERROR_BADOPTION (-34)
376
+ #define PCRE2_ERROR_BADREPLACEMENT (-35)
377
+ #define PCRE2_ERROR_BADUTFOFFSET (-36)
378
+ #define PCRE2_ERROR_CALLOUT (-37) /* Never used by PCRE2 itself */
379
+ #define PCRE2_ERROR_DFA_BADRESTART (-38)
380
+ #define PCRE2_ERROR_DFA_RECURSE (-39)
381
+ #define PCRE2_ERROR_DFA_UCOND (-40)
382
+ #define PCRE2_ERROR_DFA_UFUNC (-41)
383
+ #define PCRE2_ERROR_DFA_UITEM (-42)
384
+ #define PCRE2_ERROR_DFA_WSSIZE (-43)
385
+ #define PCRE2_ERROR_INTERNAL (-44)
386
+ #define PCRE2_ERROR_JIT_BADOPTION (-45)
387
+ #define PCRE2_ERROR_JIT_STACKLIMIT (-46)
388
+ #define PCRE2_ERROR_MATCHLIMIT (-47)
389
+ #define PCRE2_ERROR_NOMEMORY (-48)
390
+ #define PCRE2_ERROR_NOSUBSTRING (-49)
391
+ #define PCRE2_ERROR_NOUNIQUESUBSTRING (-50)
392
+ #define PCRE2_ERROR_NULL (-51)
393
+ #define PCRE2_ERROR_RECURSELOOP (-52)
394
+ #define PCRE2_ERROR_DEPTHLIMIT (-53)
395
+ #define PCRE2_ERROR_RECURSIONLIMIT (-53) /* Obsolete synonym */
396
+ #define PCRE2_ERROR_UNAVAILABLE (-54)
397
+ #define PCRE2_ERROR_UNSET (-55)
398
+ #define PCRE2_ERROR_BADOFFSETLIMIT (-56)
399
+ #define PCRE2_ERROR_BADREPESCAPE (-57)
400
+ #define PCRE2_ERROR_REPMISSINGBRACE (-58)
401
+ #define PCRE2_ERROR_BADSUBSTITUTION (-59)
402
+ #define PCRE2_ERROR_BADSUBSPATTERN (-60)
403
+ #define PCRE2_ERROR_TOOMANYREPLACE (-61)
404
+ #define PCRE2_ERROR_BADSERIALIZEDDATA (-62)
405
+ #define PCRE2_ERROR_HEAPLIMIT (-63)
406
+ #define PCRE2_ERROR_CONVERT_SYNTAX (-64)
407
+ #define PCRE2_ERROR_INTERNAL_DUPMATCH (-65)
408
+ #define PCRE2_ERROR_DFA_UINVALID_UTF (-66)
409
+ #define PCRE2_ERROR_INVALIDOFFSET (-67)
410
+
411
+
412
+ /* Request types for pcre2_pattern_info() */
413
+
414
+ #define PCRE2_INFO_ALLOPTIONS 0
415
+ #define PCRE2_INFO_ARGOPTIONS 1
416
+ #define PCRE2_INFO_BACKREFMAX 2
417
+ #define PCRE2_INFO_BSR 3
418
+ #define PCRE2_INFO_CAPTURECOUNT 4
419
+ #define PCRE2_INFO_FIRSTCODEUNIT 5
420
+ #define PCRE2_INFO_FIRSTCODETYPE 6
421
+ #define PCRE2_INFO_FIRSTBITMAP 7
422
+ #define PCRE2_INFO_HASCRORLF 8
423
+ #define PCRE2_INFO_JCHANGED 9
424
+ #define PCRE2_INFO_JITSIZE 10
425
+ #define PCRE2_INFO_LASTCODEUNIT 11
426
+ #define PCRE2_INFO_LASTCODETYPE 12
427
+ #define PCRE2_INFO_MATCHEMPTY 13
428
+ #define PCRE2_INFO_MATCHLIMIT 14
429
+ #define PCRE2_INFO_MAXLOOKBEHIND 15
430
+ #define PCRE2_INFO_MINLENGTH 16
431
+ #define PCRE2_INFO_NAMECOUNT 17
432
+ #define PCRE2_INFO_NAMEENTRYSIZE 18
433
+ #define PCRE2_INFO_NAMETABLE 19
434
+ #define PCRE2_INFO_NEWLINE 20
435
+ #define PCRE2_INFO_DEPTHLIMIT 21
436
+ #define PCRE2_INFO_RECURSIONLIMIT 21 /* Obsolete synonym */
437
+ #define PCRE2_INFO_SIZE 22
438
+ #define PCRE2_INFO_HASBACKSLASHC 23
439
+ #define PCRE2_INFO_FRAMESIZE 24
440
+ #define PCRE2_INFO_HEAPLIMIT 25
441
+ #define PCRE2_INFO_EXTRAOPTIONS 26
442
+
443
+ /* Request types for pcre2_config(). */
444
+
445
+ #define PCRE2_CONFIG_BSR 0
446
+ #define PCRE2_CONFIG_JIT 1
447
+ #define PCRE2_CONFIG_JITTARGET 2
448
+ #define PCRE2_CONFIG_LINKSIZE 3
449
+ #define PCRE2_CONFIG_MATCHLIMIT 4
450
+ #define PCRE2_CONFIG_NEWLINE 5
451
+ #define PCRE2_CONFIG_PARENSLIMIT 6
452
+ #define PCRE2_CONFIG_DEPTHLIMIT 7
453
+ #define PCRE2_CONFIG_RECURSIONLIMIT 7 /* Obsolete synonym */
454
+ #define PCRE2_CONFIG_STACKRECURSE 8 /* Obsolete */
455
+ #define PCRE2_CONFIG_UNICODE 9
456
+ #define PCRE2_CONFIG_UNICODE_VERSION 10
457
+ #define PCRE2_CONFIG_VERSION 11
458
+ #define PCRE2_CONFIG_HEAPLIMIT 12
459
+ #define PCRE2_CONFIG_NEVER_BACKSLASH_C 13
460
+ #define PCRE2_CONFIG_COMPILED_WIDTHS 14
461
+ #define PCRE2_CONFIG_TABLES_LENGTH 15
462
+
463
+
464
+ /* Types for code units in patterns and subject strings. */
465
+
466
+ typedef uint8_t PCRE2_UCHAR8;
467
+ typedef uint16_t PCRE2_UCHAR16;
468
+ typedef uint32_t PCRE2_UCHAR32;
469
+
470
+ typedef const PCRE2_UCHAR8 *PCRE2_SPTR8;
471
+ typedef const PCRE2_UCHAR16 *PCRE2_SPTR16;
472
+ typedef const PCRE2_UCHAR32 *PCRE2_SPTR32;
473
+
474
+ /* The PCRE2_SIZE type is used for all string lengths and offsets in PCRE2,
475
+ including pattern offsets for errors and subject offsets after a match. We
476
+ define special values to indicate zero-terminated strings and unset offsets in
477
+ the offset vector (ovector). */
478
+
479
+ #define PCRE2_SIZE size_t
480
+ #define PCRE2_SIZE_MAX SIZE_MAX
481
+ #define PCRE2_ZERO_TERMINATED (~(PCRE2_SIZE)0)
482
+ #define PCRE2_UNSET (~(PCRE2_SIZE)0)
483
+
484
+ /* Generic types for opaque structures and JIT callback functions. These
485
+ declarations are defined in a macro that is expanded for each width later. */
486
+
487
+ #define PCRE2_TYPES_LIST \
488
+ struct pcre2_real_general_context; \
489
+ typedef struct pcre2_real_general_context pcre2_general_context; \
490
+ \
491
+ struct pcre2_real_compile_context; \
492
+ typedef struct pcre2_real_compile_context pcre2_compile_context; \
493
+ \
494
+ struct pcre2_real_match_context; \
495
+ typedef struct pcre2_real_match_context pcre2_match_context; \
496
+ \
497
+ struct pcre2_real_convert_context; \
498
+ typedef struct pcre2_real_convert_context pcre2_convert_context; \
499
+ \
500
+ struct pcre2_real_code; \
501
+ typedef struct pcre2_real_code pcre2_code; \
502
+ \
503
+ struct pcre2_real_match_data; \
504
+ typedef struct pcre2_real_match_data pcre2_match_data; \
505
+ \
506
+ struct pcre2_real_jit_stack; \
507
+ typedef struct pcre2_real_jit_stack pcre2_jit_stack; \
508
+ \
509
+ typedef pcre2_jit_stack *(*pcre2_jit_callback)(void *);
510
+
511
+
512
+ /* The structures for passing out data via callout functions. We use structures
513
+ so that new fields can be added on the end in future versions, without changing
514
+ the API of the function, thereby allowing old clients to work without
515
+ modification. Define the generic versions in a macro; the width-specific
516
+ versions are generated from this macro below. */
517
+
518
+ /* Flags for the callout_flags field. These are cleared after a callout. */
519
+
520
+ #define PCRE2_CALLOUT_STARTMATCH 0x00000001u /* Set for each bumpalong */
521
+ #define PCRE2_CALLOUT_BACKTRACK 0x00000002u /* Set after a backtrack */
522
+
523
+ #define PCRE2_STRUCTURE_LIST \
524
+ typedef struct pcre2_callout_block { \
525
+ uint32_t version; /* Identifies version of block */ \
526
+ /* ------------------------ Version 0 ------------------------------- */ \
527
+ uint32_t callout_number; /* Number compiled into pattern */ \
528
+ uint32_t capture_top; /* Max current capture */ \
529
+ uint32_t capture_last; /* Most recently closed capture */ \
530
+ PCRE2_SIZE *offset_vector; /* The offset vector */ \
531
+ PCRE2_SPTR mark; /* Pointer to current mark or NULL */ \
532
+ PCRE2_SPTR subject; /* The subject being matched */ \
533
+ PCRE2_SIZE subject_length; /* The length of the subject */ \
534
+ PCRE2_SIZE start_match; /* Offset to start of this match attempt */ \
535
+ PCRE2_SIZE current_position; /* Where we currently are in the subject */ \
536
+ PCRE2_SIZE pattern_position; /* Offset to next item in the pattern */ \
537
+ PCRE2_SIZE next_item_length; /* Length of next item in the pattern */ \
538
+ /* ------------------- Added for Version 1 -------------------------- */ \
539
+ PCRE2_SIZE callout_string_offset; /* Offset to string within pattern */ \
540
+ PCRE2_SIZE callout_string_length; /* Length of string compiled into pattern */ \
541
+ PCRE2_SPTR callout_string; /* String compiled into pattern */ \
542
+ /* ------------------- Added for Version 2 -------------------------- */ \
543
+ uint32_t callout_flags; /* See above for list */ \
544
+ /* ------------------------------------------------------------------ */ \
545
+ } pcre2_callout_block; \
546
+ \
547
+ typedef struct pcre2_callout_enumerate_block { \
548
+ uint32_t version; /* Identifies version of block */ \
549
+ /* ------------------------ Version 0 ------------------------------- */ \
550
+ PCRE2_SIZE pattern_position; /* Offset to next item in the pattern */ \
551
+ PCRE2_SIZE next_item_length; /* Length of next item in the pattern */ \
552
+ uint32_t callout_number; /* Number compiled into pattern */ \
553
+ PCRE2_SIZE callout_string_offset; /* Offset to string within pattern */ \
554
+ PCRE2_SIZE callout_string_length; /* Length of string compiled into pattern */ \
555
+ PCRE2_SPTR callout_string; /* String compiled into pattern */ \
556
+ /* ------------------------------------------------------------------ */ \
557
+ } pcre2_callout_enumerate_block; \
558
+ \
559
+ typedef struct pcre2_substitute_callout_block { \
560
+ uint32_t version; /* Identifies version of block */ \
561
+ /* ------------------------ Version 0 ------------------------------- */ \
562
+ PCRE2_SPTR input; /* Pointer to input subject string */ \
563
+ PCRE2_SPTR output; /* Pointer to output buffer */ \
564
+ PCRE2_SIZE output_offsets[2]; /* Changed portion of the output */ \
565
+ PCRE2_SIZE *ovector; /* Pointer to current ovector */ \
566
+ uint32_t oveccount; /* Count of pairs set in ovector */ \
567
+ uint32_t subscount; /* Substitution number */ \
568
+ /* ------------------------------------------------------------------ */ \
569
+ } pcre2_substitute_callout_block;
570
+
571
+
572
+ /* List the generic forms of all other functions in macros, which will be
573
+ expanded for each width below. Start with functions that give general
574
+ information. */
575
+
576
+ #define PCRE2_GENERAL_INFO_FUNCTIONS \
577
+ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION pcre2_config(uint32_t, void *);
578
+
579
+
580
+ /* Functions for manipulating contexts. */
581
+
582
+ #define PCRE2_GENERAL_CONTEXT_FUNCTIONS \
583
+ PCRE2_EXP_DECL pcre2_general_context *PCRE2_CALL_CONVENTION \
584
+ pcre2_general_context_copy(pcre2_general_context *); \
585
+ PCRE2_EXP_DECL pcre2_general_context *PCRE2_CALL_CONVENTION \
586
+ pcre2_general_context_create(void *(*)(size_t, void *), \
587
+ void (*)(void *, void *), void *); \
588
+ PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \
589
+ pcre2_general_context_free(pcre2_general_context *);
590
+
591
+ #define PCRE2_COMPILE_CONTEXT_FUNCTIONS \
592
+ PCRE2_EXP_DECL pcre2_compile_context *PCRE2_CALL_CONVENTION \
593
+ pcre2_compile_context_copy(pcre2_compile_context *); \
594
+ PCRE2_EXP_DECL pcre2_compile_context *PCRE2_CALL_CONVENTION \
595
+ pcre2_compile_context_create(pcre2_general_context *);\
596
+ PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \
597
+ pcre2_compile_context_free(pcre2_compile_context *); \
598
+ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
599
+ pcre2_set_bsr(pcre2_compile_context *, uint32_t); \
600
+ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
601
+ pcre2_set_character_tables(pcre2_compile_context *, const uint8_t *); \
602
+ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
603
+ pcre2_set_compile_extra_options(pcre2_compile_context *, uint32_t); \
604
+ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
605
+ pcre2_set_max_pattern_length(pcre2_compile_context *, PCRE2_SIZE); \
606
+ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
607
+ pcre2_set_max_pattern_compiled_length(pcre2_compile_context *, PCRE2_SIZE); \
608
+ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
609
+ pcre2_set_max_varlookbehind(pcre2_compile_context *, uint32_t); \
610
+ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
611
+ pcre2_set_newline(pcre2_compile_context *, uint32_t); \
612
+ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
613
+ pcre2_set_parens_nest_limit(pcre2_compile_context *, uint32_t); \
614
+ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
615
+ pcre2_set_compile_recursion_guard(pcre2_compile_context *, \
616
+ int (*)(uint32_t, void *), void *);
617
+
618
+ #define PCRE2_MATCH_CONTEXT_FUNCTIONS \
619
+ PCRE2_EXP_DECL pcre2_match_context *PCRE2_CALL_CONVENTION \
620
+ pcre2_match_context_copy(pcre2_match_context *); \
621
+ PCRE2_EXP_DECL pcre2_match_context *PCRE2_CALL_CONVENTION \
622
+ pcre2_match_context_create(pcre2_general_context *); \
623
+ PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \
624
+ pcre2_match_context_free(pcre2_match_context *); \
625
+ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
626
+ pcre2_set_callout(pcre2_match_context *, \
627
+ int (*)(pcre2_callout_block *, void *), void *); \
628
+ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
629
+ pcre2_set_substitute_callout(pcre2_match_context *, \
630
+ int (*)(pcre2_substitute_callout_block *, void *), void *); \
631
+ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
632
+ pcre2_set_depth_limit(pcre2_match_context *, uint32_t); \
633
+ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
634
+ pcre2_set_heap_limit(pcre2_match_context *, uint32_t); \
635
+ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
636
+ pcre2_set_match_limit(pcre2_match_context *, uint32_t); \
637
+ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
638
+ pcre2_set_offset_limit(pcre2_match_context *, PCRE2_SIZE); \
639
+ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
640
+ pcre2_set_recursion_limit(pcre2_match_context *, uint32_t); \
641
+ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
642
+ pcre2_set_recursion_memory_management(pcre2_match_context *, \
643
+ void *(*)(size_t, void *), void (*)(void *, void *), void *);
644
+
645
+ #define PCRE2_CONVERT_CONTEXT_FUNCTIONS \
646
+ PCRE2_EXP_DECL pcre2_convert_context *PCRE2_CALL_CONVENTION \
647
+ pcre2_convert_context_copy(pcre2_convert_context *); \
648
+ PCRE2_EXP_DECL pcre2_convert_context *PCRE2_CALL_CONVENTION \
649
+ pcre2_convert_context_create(pcre2_general_context *); \
650
+ PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \
651
+ pcre2_convert_context_free(pcre2_convert_context *); \
652
+ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
653
+ pcre2_set_glob_escape(pcre2_convert_context *, uint32_t); \
654
+ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
655
+ pcre2_set_glob_separator(pcre2_convert_context *, uint32_t);
656
+
657
+
658
+ /* Functions concerned with compiling a pattern to PCRE internal code. */
659
+
660
+ #define PCRE2_COMPILE_FUNCTIONS \
661
+ PCRE2_EXP_DECL pcre2_code *PCRE2_CALL_CONVENTION \
662
+ pcre2_compile(PCRE2_SPTR, PCRE2_SIZE, uint32_t, int *, PCRE2_SIZE *, \
663
+ pcre2_compile_context *); \
664
+ PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \
665
+ pcre2_code_free(pcre2_code *); \
666
+ PCRE2_EXP_DECL pcre2_code *PCRE2_CALL_CONVENTION \
667
+ pcre2_code_copy(const pcre2_code *); \
668
+ PCRE2_EXP_DECL pcre2_code *PCRE2_CALL_CONVENTION \
669
+ pcre2_code_copy_with_tables(const pcre2_code *);
670
+
671
+
672
+ /* Functions that give information about a compiled pattern. */
673
+
674
+ #define PCRE2_PATTERN_INFO_FUNCTIONS \
675
+ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
676
+ pcre2_pattern_info(const pcre2_code *, uint32_t, void *); \
677
+ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
678
+ pcre2_callout_enumerate(const pcre2_code *, \
679
+ int (*)(pcre2_callout_enumerate_block *, void *), void *);
680
+
681
+
682
+ /* Functions for running a match and inspecting the result. */
683
+
684
+ #define PCRE2_MATCH_FUNCTIONS \
685
+ PCRE2_EXP_DECL pcre2_match_data *PCRE2_CALL_CONVENTION \
686
+ pcre2_match_data_create(uint32_t, pcre2_general_context *); \
687
+ PCRE2_EXP_DECL pcre2_match_data *PCRE2_CALL_CONVENTION \
688
+ pcre2_match_data_create_from_pattern(const pcre2_code *, \
689
+ pcre2_general_context *); \
690
+ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
691
+ pcre2_dfa_match(const pcre2_code *, PCRE2_SPTR, PCRE2_SIZE, PCRE2_SIZE, \
692
+ uint32_t, pcre2_match_data *, pcre2_match_context *, int *, PCRE2_SIZE); \
693
+ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
694
+ pcre2_match(const pcre2_code *, PCRE2_SPTR, PCRE2_SIZE, PCRE2_SIZE, \
695
+ uint32_t, pcre2_match_data *, pcre2_match_context *); \
696
+ PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \
697
+ pcre2_match_data_free(pcre2_match_data *); \
698
+ PCRE2_EXP_DECL PCRE2_SPTR PCRE2_CALL_CONVENTION \
699
+ pcre2_get_mark(pcre2_match_data *); \
700
+ PCRE2_EXP_DECL PCRE2_SIZE PCRE2_CALL_CONVENTION \
701
+ pcre2_get_match_data_size(pcre2_match_data *); \
702
+ PCRE2_EXP_DECL PCRE2_SIZE PCRE2_CALL_CONVENTION \
703
+ pcre2_get_match_data_heapframes_size(pcre2_match_data *); \
704
+ PCRE2_EXP_DECL uint32_t PCRE2_CALL_CONVENTION \
705
+ pcre2_get_ovector_count(pcre2_match_data *); \
706
+ PCRE2_EXP_DECL PCRE2_SIZE *PCRE2_CALL_CONVENTION \
707
+ pcre2_get_ovector_pointer(pcre2_match_data *); \
708
+ PCRE2_EXP_DECL PCRE2_SIZE PCRE2_CALL_CONVENTION \
709
+ pcre2_get_startchar(pcre2_match_data *);
710
+
711
+
712
+ /* Convenience functions for handling matched substrings. */
713
+
714
+ #define PCRE2_SUBSTRING_FUNCTIONS \
715
+ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
716
+ pcre2_substring_copy_byname(pcre2_match_data *, PCRE2_SPTR, PCRE2_UCHAR *, \
717
+ PCRE2_SIZE *); \
718
+ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
719
+ pcre2_substring_copy_bynumber(pcre2_match_data *, uint32_t, PCRE2_UCHAR *, \
720
+ PCRE2_SIZE *); \
721
+ PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \
722
+ pcre2_substring_free(PCRE2_UCHAR *); \
723
+ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
724
+ pcre2_substring_get_byname(pcre2_match_data *, PCRE2_SPTR, PCRE2_UCHAR **, \
725
+ PCRE2_SIZE *); \
726
+ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
727
+ pcre2_substring_get_bynumber(pcre2_match_data *, uint32_t, PCRE2_UCHAR **, \
728
+ PCRE2_SIZE *); \
729
+ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
730
+ pcre2_substring_length_byname(pcre2_match_data *, PCRE2_SPTR, PCRE2_SIZE *); \
731
+ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
732
+ pcre2_substring_length_bynumber(pcre2_match_data *, uint32_t, PCRE2_SIZE *); \
733
+ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
734
+ pcre2_substring_nametable_scan(const pcre2_code *, PCRE2_SPTR, PCRE2_SPTR *, \
735
+ PCRE2_SPTR *); \
736
+ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
737
+ pcre2_substring_number_from_name(const pcre2_code *, PCRE2_SPTR); \
738
+ PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \
739
+ pcre2_substring_list_free(PCRE2_UCHAR **); \
740
+ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
741
+ pcre2_substring_list_get(pcre2_match_data *, PCRE2_UCHAR ***, PCRE2_SIZE **);
742
+
743
+ /* Functions for serializing / deserializing compiled patterns. */
744
+
745
+ #define PCRE2_SERIALIZE_FUNCTIONS \
746
+ PCRE2_EXP_DECL int32_t PCRE2_CALL_CONVENTION \
747
+ pcre2_serialize_encode(const pcre2_code **, int32_t, uint8_t **, \
748
+ PCRE2_SIZE *, pcre2_general_context *); \
749
+ PCRE2_EXP_DECL int32_t PCRE2_CALL_CONVENTION \
750
+ pcre2_serialize_decode(pcre2_code **, int32_t, const uint8_t *, \
751
+ pcre2_general_context *); \
752
+ PCRE2_EXP_DECL int32_t PCRE2_CALL_CONVENTION \
753
+ pcre2_serialize_get_number_of_codes(const uint8_t *); \
754
+ PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \
755
+ pcre2_serialize_free(uint8_t *);
756
+
757
+
758
+ /* Convenience function for match + substitute. */
759
+
760
+ #define PCRE2_SUBSTITUTE_FUNCTION \
761
+ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
762
+ pcre2_substitute(const pcre2_code *, PCRE2_SPTR, PCRE2_SIZE, PCRE2_SIZE, \
763
+ uint32_t, pcre2_match_data *, pcre2_match_context *, PCRE2_SPTR, \
764
+ PCRE2_SIZE, PCRE2_UCHAR *, PCRE2_SIZE *);
765
+
766
+
767
+ /* Functions for converting pattern source strings. */
768
+
769
+ #define PCRE2_CONVERT_FUNCTIONS \
770
+ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
771
+ pcre2_pattern_convert(PCRE2_SPTR, PCRE2_SIZE, uint32_t, PCRE2_UCHAR **, \
772
+ PCRE2_SIZE *, pcre2_convert_context *); \
773
+ PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \
774
+ pcre2_converted_pattern_free(PCRE2_UCHAR *);
775
+
776
+
777
+ /* Functions for JIT processing */
778
+
779
+ #define PCRE2_JIT_FUNCTIONS \
780
+ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
781
+ pcre2_jit_compile(pcre2_code *, uint32_t); \
782
+ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
783
+ pcre2_jit_match(const pcre2_code *, PCRE2_SPTR, PCRE2_SIZE, PCRE2_SIZE, \
784
+ uint32_t, pcre2_match_data *, pcre2_match_context *); \
785
+ PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \
786
+ pcre2_jit_free_unused_memory(pcre2_general_context *); \
787
+ PCRE2_EXP_DECL pcre2_jit_stack *PCRE2_CALL_CONVENTION \
788
+ pcre2_jit_stack_create(size_t, size_t, pcre2_general_context *); \
789
+ PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \
790
+ pcre2_jit_stack_assign(pcre2_match_context *, pcre2_jit_callback, void *); \
791
+ PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \
792
+ pcre2_jit_stack_free(pcre2_jit_stack *);
793
+
794
+
795
+ /* Other miscellaneous functions. */
796
+
797
+ #define PCRE2_OTHER_FUNCTIONS \
798
+ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
799
+ pcre2_get_error_message(int, PCRE2_UCHAR *, PCRE2_SIZE); \
800
+ PCRE2_EXP_DECL const uint8_t *PCRE2_CALL_CONVENTION \
801
+ pcre2_maketables(pcre2_general_context *); \
802
+ PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \
803
+ pcre2_maketables_free(pcre2_general_context *, const uint8_t *);
804
+
805
+ /* Define macros that generate width-specific names from generic versions. The
806
+ three-level macro scheme is necessary to get the macros expanded when we want
807
+ them to be. First we get the width from PCRE2_LOCAL_WIDTH, which is used for
808
+ generating three versions of everything below. After that, PCRE2_SUFFIX will be
809
+ re-defined to use PCRE2_CODE_UNIT_WIDTH, for use when macros such as
810
+ pcre2_compile are called by application code. */
811
+
812
+ #define PCRE2_JOIN(a,b) a ## b
813
+ #define PCRE2_GLUE(a,b) PCRE2_JOIN(a,b)
814
+ #define PCRE2_SUFFIX(a) PCRE2_GLUE(a,PCRE2_LOCAL_WIDTH)
815
+
816
+
817
+ /* Data types */
818
+
819
+ #define PCRE2_UCHAR PCRE2_SUFFIX(PCRE2_UCHAR)
820
+ #define PCRE2_SPTR PCRE2_SUFFIX(PCRE2_SPTR)
821
+
822
+ #define pcre2_code PCRE2_SUFFIX(pcre2_code_)
823
+ #define pcre2_jit_callback PCRE2_SUFFIX(pcre2_jit_callback_)
824
+ #define pcre2_jit_stack PCRE2_SUFFIX(pcre2_jit_stack_)
825
+
826
+ #define pcre2_real_code PCRE2_SUFFIX(pcre2_real_code_)
827
+ #define pcre2_real_general_context PCRE2_SUFFIX(pcre2_real_general_context_)
828
+ #define pcre2_real_compile_context PCRE2_SUFFIX(pcre2_real_compile_context_)
829
+ #define pcre2_real_convert_context PCRE2_SUFFIX(pcre2_real_convert_context_)
830
+ #define pcre2_real_match_context PCRE2_SUFFIX(pcre2_real_match_context_)
831
+ #define pcre2_real_jit_stack PCRE2_SUFFIX(pcre2_real_jit_stack_)
832
+ #define pcre2_real_match_data PCRE2_SUFFIX(pcre2_real_match_data_)
833
+
834
+
835
+ /* Data blocks */
836
+
837
+ #define pcre2_callout_block PCRE2_SUFFIX(pcre2_callout_block_)
838
+ #define pcre2_callout_enumerate_block PCRE2_SUFFIX(pcre2_callout_enumerate_block_)
839
+ #define pcre2_substitute_callout_block PCRE2_SUFFIX(pcre2_substitute_callout_block_)
840
+ #define pcre2_general_context PCRE2_SUFFIX(pcre2_general_context_)
841
+ #define pcre2_compile_context PCRE2_SUFFIX(pcre2_compile_context_)
842
+ #define pcre2_convert_context PCRE2_SUFFIX(pcre2_convert_context_)
843
+ #define pcre2_match_context PCRE2_SUFFIX(pcre2_match_context_)
844
+ #define pcre2_match_data PCRE2_SUFFIX(pcre2_match_data_)
845
+
846
+
847
+ /* Functions: the complete list in alphabetical order */
848
+
849
+ #define pcre2_callout_enumerate PCRE2_SUFFIX(pcre2_callout_enumerate_)
850
+ #define pcre2_code_copy PCRE2_SUFFIX(pcre2_code_copy_)
851
+ #define pcre2_code_copy_with_tables PCRE2_SUFFIX(pcre2_code_copy_with_tables_)
852
+ #define pcre2_code_free PCRE2_SUFFIX(pcre2_code_free_)
853
+ #define pcre2_compile PCRE2_SUFFIX(pcre2_compile_)
854
+ #define pcre2_compile_context_copy PCRE2_SUFFIX(pcre2_compile_context_copy_)
855
+ #define pcre2_compile_context_create PCRE2_SUFFIX(pcre2_compile_context_create_)
856
+ #define pcre2_compile_context_free PCRE2_SUFFIX(pcre2_compile_context_free_)
857
+ #define pcre2_config PCRE2_SUFFIX(pcre2_config_)
858
+ #define pcre2_convert_context_copy PCRE2_SUFFIX(pcre2_convert_context_copy_)
859
+ #define pcre2_convert_context_create PCRE2_SUFFIX(pcre2_convert_context_create_)
860
+ #define pcre2_convert_context_free PCRE2_SUFFIX(pcre2_convert_context_free_)
861
+ #define pcre2_converted_pattern_free PCRE2_SUFFIX(pcre2_converted_pattern_free_)
862
+ #define pcre2_dfa_match PCRE2_SUFFIX(pcre2_dfa_match_)
863
+ #define pcre2_general_context_copy PCRE2_SUFFIX(pcre2_general_context_copy_)
864
+ #define pcre2_general_context_create PCRE2_SUFFIX(pcre2_general_context_create_)
865
+ #define pcre2_general_context_free PCRE2_SUFFIX(pcre2_general_context_free_)
866
+ #define pcre2_get_error_message PCRE2_SUFFIX(pcre2_get_error_message_)
867
+ #define pcre2_get_mark PCRE2_SUFFIX(pcre2_get_mark_)
868
+ #define pcre2_get_match_data_heapframes_size PCRE2_SUFFIX(pcre2_get_match_data_heapframes_size_)
869
+ #define pcre2_get_match_data_size PCRE2_SUFFIX(pcre2_get_match_data_size_)
870
+ #define pcre2_get_ovector_pointer PCRE2_SUFFIX(pcre2_get_ovector_pointer_)
871
+ #define pcre2_get_ovector_count PCRE2_SUFFIX(pcre2_get_ovector_count_)
872
+ #define pcre2_get_startchar PCRE2_SUFFIX(pcre2_get_startchar_)
873
+ #define pcre2_jit_compile PCRE2_SUFFIX(pcre2_jit_compile_)
874
+ #define pcre2_jit_match PCRE2_SUFFIX(pcre2_jit_match_)
875
+ #define pcre2_jit_free_unused_memory PCRE2_SUFFIX(pcre2_jit_free_unused_memory_)
876
+ #define pcre2_jit_stack_assign PCRE2_SUFFIX(pcre2_jit_stack_assign_)
877
+ #define pcre2_jit_stack_create PCRE2_SUFFIX(pcre2_jit_stack_create_)
878
+ #define pcre2_jit_stack_free PCRE2_SUFFIX(pcre2_jit_stack_free_)
879
+ #define pcre2_maketables PCRE2_SUFFIX(pcre2_maketables_)
880
+ #define pcre2_maketables_free PCRE2_SUFFIX(pcre2_maketables_free_)
881
+ #define pcre2_match PCRE2_SUFFIX(pcre2_match_)
882
+ #define pcre2_match_context_copy PCRE2_SUFFIX(pcre2_match_context_copy_)
883
+ #define pcre2_match_context_create PCRE2_SUFFIX(pcre2_match_context_create_)
884
+ #define pcre2_match_context_free PCRE2_SUFFIX(pcre2_match_context_free_)
885
+ #define pcre2_match_data_create PCRE2_SUFFIX(pcre2_match_data_create_)
886
+ #define pcre2_match_data_create_from_pattern PCRE2_SUFFIX(pcre2_match_data_create_from_pattern_)
887
+ #define pcre2_match_data_free PCRE2_SUFFIX(pcre2_match_data_free_)
888
+ #define pcre2_pattern_convert PCRE2_SUFFIX(pcre2_pattern_convert_)
889
+ #define pcre2_pattern_info PCRE2_SUFFIX(pcre2_pattern_info_)
890
+ #define pcre2_serialize_decode PCRE2_SUFFIX(pcre2_serialize_decode_)
891
+ #define pcre2_serialize_encode PCRE2_SUFFIX(pcre2_serialize_encode_)
892
+ #define pcre2_serialize_free PCRE2_SUFFIX(pcre2_serialize_free_)
893
+ #define pcre2_serialize_get_number_of_codes PCRE2_SUFFIX(pcre2_serialize_get_number_of_codes_)
894
+ #define pcre2_set_bsr PCRE2_SUFFIX(pcre2_set_bsr_)
895
+ #define pcre2_set_callout PCRE2_SUFFIX(pcre2_set_callout_)
896
+ #define pcre2_set_character_tables PCRE2_SUFFIX(pcre2_set_character_tables_)
897
+ #define pcre2_set_compile_extra_options PCRE2_SUFFIX(pcre2_set_compile_extra_options_)
898
+ #define pcre2_set_compile_recursion_guard PCRE2_SUFFIX(pcre2_set_compile_recursion_guard_)
899
+ #define pcre2_set_depth_limit PCRE2_SUFFIX(pcre2_set_depth_limit_)
900
+ #define pcre2_set_glob_escape PCRE2_SUFFIX(pcre2_set_glob_escape_)
901
+ #define pcre2_set_glob_separator PCRE2_SUFFIX(pcre2_set_glob_separator_)
902
+ #define pcre2_set_heap_limit PCRE2_SUFFIX(pcre2_set_heap_limit_)
903
+ #define pcre2_set_match_limit PCRE2_SUFFIX(pcre2_set_match_limit_)
904
+ #define pcre2_set_max_varlookbehind PCRE2_SUFFIX(pcre2_set_max_varlookbehind_)
905
+ #define pcre2_set_max_pattern_length PCRE2_SUFFIX(pcre2_set_max_pattern_length_)
906
+ #define pcre2_set_max_pattern_compiled_length PCRE2_SUFFIX(pcre2_set_max_pattern_compiled_length_)
907
+ #define pcre2_set_newline PCRE2_SUFFIX(pcre2_set_newline_)
908
+ #define pcre2_set_parens_nest_limit PCRE2_SUFFIX(pcre2_set_parens_nest_limit_)
909
+ #define pcre2_set_offset_limit PCRE2_SUFFIX(pcre2_set_offset_limit_)
910
+ #define pcre2_set_substitute_callout PCRE2_SUFFIX(pcre2_set_substitute_callout_)
911
+ #define pcre2_substitute PCRE2_SUFFIX(pcre2_substitute_)
912
+ #define pcre2_substring_copy_byname PCRE2_SUFFIX(pcre2_substring_copy_byname_)
913
+ #define pcre2_substring_copy_bynumber PCRE2_SUFFIX(pcre2_substring_copy_bynumber_)
914
+ #define pcre2_substring_free PCRE2_SUFFIX(pcre2_substring_free_)
915
+ #define pcre2_substring_get_byname PCRE2_SUFFIX(pcre2_substring_get_byname_)
916
+ #define pcre2_substring_get_bynumber PCRE2_SUFFIX(pcre2_substring_get_bynumber_)
917
+ #define pcre2_substring_length_byname PCRE2_SUFFIX(pcre2_substring_length_byname_)
918
+ #define pcre2_substring_length_bynumber PCRE2_SUFFIX(pcre2_substring_length_bynumber_)
919
+ #define pcre2_substring_list_get PCRE2_SUFFIX(pcre2_substring_list_get_)
920
+ #define pcre2_substring_list_free PCRE2_SUFFIX(pcre2_substring_list_free_)
921
+ #define pcre2_substring_nametable_scan PCRE2_SUFFIX(pcre2_substring_nametable_scan_)
922
+ #define pcre2_substring_number_from_name PCRE2_SUFFIX(pcre2_substring_number_from_name_)
923
+
924
+ /* Keep this old function name for backwards compatibility */
925
+ #define pcre2_set_recursion_limit PCRE2_SUFFIX(pcre2_set_recursion_limit_)
926
+
927
+ /* Keep this obsolete function for backwards compatibility: it is now a noop. */
928
+ #define pcre2_set_recursion_memory_management PCRE2_SUFFIX(pcre2_set_recursion_memory_management_)
929
+
930
+ /* Now generate all three sets of width-specific structures and function
931
+ prototypes. */
932
+
933
+ #define PCRE2_TYPES_STRUCTURES_AND_FUNCTIONS \
934
+ PCRE2_TYPES_LIST \
935
+ PCRE2_STRUCTURE_LIST \
936
+ PCRE2_GENERAL_INFO_FUNCTIONS \
937
+ PCRE2_GENERAL_CONTEXT_FUNCTIONS \
938
+ PCRE2_COMPILE_CONTEXT_FUNCTIONS \
939
+ PCRE2_CONVERT_CONTEXT_FUNCTIONS \
940
+ PCRE2_CONVERT_FUNCTIONS \
941
+ PCRE2_MATCH_CONTEXT_FUNCTIONS \
942
+ PCRE2_COMPILE_FUNCTIONS \
943
+ PCRE2_PATTERN_INFO_FUNCTIONS \
944
+ PCRE2_MATCH_FUNCTIONS \
945
+ PCRE2_SUBSTRING_FUNCTIONS \
946
+ PCRE2_SERIALIZE_FUNCTIONS \
947
+ PCRE2_SUBSTITUTE_FUNCTION \
948
+ PCRE2_JIT_FUNCTIONS \
949
+ PCRE2_OTHER_FUNCTIONS
950
+
951
+ #define PCRE2_LOCAL_WIDTH 8
952
+ PCRE2_TYPES_STRUCTURES_AND_FUNCTIONS
953
+ #undef PCRE2_LOCAL_WIDTH
954
+
955
+ #define PCRE2_LOCAL_WIDTH 16
956
+ PCRE2_TYPES_STRUCTURES_AND_FUNCTIONS
957
+ #undef PCRE2_LOCAL_WIDTH
958
+
959
+ #define PCRE2_LOCAL_WIDTH 32
960
+ PCRE2_TYPES_STRUCTURES_AND_FUNCTIONS
961
+ #undef PCRE2_LOCAL_WIDTH
962
+
963
+ /* Undefine the list macros; they are no longer needed. */
964
+
965
+ #undef PCRE2_TYPES_LIST
966
+ #undef PCRE2_STRUCTURE_LIST
967
+ #undef PCRE2_GENERAL_INFO_FUNCTIONS
968
+ #undef PCRE2_GENERAL_CONTEXT_FUNCTIONS
969
+ #undef PCRE2_COMPILE_CONTEXT_FUNCTIONS
970
+ #undef PCRE2_CONVERT_CONTEXT_FUNCTIONS
971
+ #undef PCRE2_MATCH_CONTEXT_FUNCTIONS
972
+ #undef PCRE2_COMPILE_FUNCTIONS
973
+ #undef PCRE2_PATTERN_INFO_FUNCTIONS
974
+ #undef PCRE2_MATCH_FUNCTIONS
975
+ #undef PCRE2_SUBSTRING_FUNCTIONS
976
+ #undef PCRE2_SERIALIZE_FUNCTIONS
977
+ #undef PCRE2_SUBSTITUTE_FUNCTION
978
+ #undef PCRE2_JIT_FUNCTIONS
979
+ #undef PCRE2_OTHER_FUNCTIONS
980
+ #undef PCRE2_TYPES_STRUCTURES_AND_FUNCTIONS
981
+
982
+ /* PCRE2_CODE_UNIT_WIDTH must be defined. If it is 8, 16, or 32, redefine
983
+ PCRE2_SUFFIX to use it. If it is 0, undefine the other macros and make
984
+ PCRE2_SUFFIX a no-op. Otherwise, generate an error. */
985
+
986
+ #undef PCRE2_SUFFIX
987
+ #ifndef PCRE2_CODE_UNIT_WIDTH
988
+ #error PCRE2_CODE_UNIT_WIDTH must be defined before including pcre2.h.
989
+ #error Use 8, 16, or 32; or 0 for a multi-width application.
990
+ #else /* PCRE2_CODE_UNIT_WIDTH is defined */
991
+ #if PCRE2_CODE_UNIT_WIDTH == 8 || \
992
+ PCRE2_CODE_UNIT_WIDTH == 16 || \
993
+ PCRE2_CODE_UNIT_WIDTH == 32
994
+ #define PCRE2_SUFFIX(a) PCRE2_GLUE(a, PCRE2_CODE_UNIT_WIDTH)
995
+ #elif PCRE2_CODE_UNIT_WIDTH == 0
996
+ #undef PCRE2_JOIN
997
+ #undef PCRE2_GLUE
998
+ #define PCRE2_SUFFIX(a) a
999
+ #else
1000
+ #error PCRE2_CODE_UNIT_WIDTH must be 0, 8, 16, or 32.
1001
+ #endif
1002
+ #endif /* PCRE2_CODE_UNIT_WIDTH is defined */
1003
+
1004
+ #ifdef __cplusplus
1005
+ } /* extern "C" */
1006
+ #endif
1007
+
1008
+ #endif /* PCRE2_H_IDEMPOTENT_GUARD */
1009
+
1010
+ /* End of pcre2.h */