godot/thirdparty/pcre2/src/pcre2.h

/*************************************************
*       Perl-Compatible Regular Expressions      *
*************************************************/

/* This is the public header file for the PCRE library, second API, to be
#included by applications that call PCRE2 functions.

           Copyright (c) 2016-2024 University of Cambridge

-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

    * Redistributions of source code must retain the above copyright notice,
      this list of conditions and the following disclaimer.

    * Redistributions in binary form must reproduce the above copyright
      notice, this list of conditions and the following disclaimer in the
      documentation and/or other materials provided with the distribution.

    * Neither the name of the University of Cambridge nor the names of its
      contributors may be used to endorse or promote products derived from
      this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
-----------------------------------------------------------------------------
*/

#ifndef PCRE2_H_IDEMPOTENT_GUARD
#define PCRE2_H_IDEMPOTENT_GUARD

/* The current PCRE version information. */

#define PCRE2_MAJOR
#define PCRE2_MINOR
#define PCRE2_PRERELEASE      
#define PCRE2_DATE

/* When an application links to a PCRE DLL in Windows, the symbols that are
imported have to be identified as such. When building PCRE2, the appropriate
export setting is defined in pcre2_internal.h, which includes this file. So we
don't change existing definitions of PCRE2_EXP_DECL. */

#if defined(_WIN32) && !defined(PCRE2_STATIC)
#  ifndef PCRE2_EXP_DECL
#define PCRE2_EXP_DECL
#  endif
#endif

/* By default, we use the standard "extern" declarations. */

#ifndef PCRE2_EXP_DECL
#  ifdef __cplusplus
#define PCRE2_EXP_DECL
#  else
#define PCRE2_EXP_DECL
#  endif
#endif

/* When compiling with the MSVC compiler, it is sometimes necessary to include
a "calling convention" before exported function names. (This is secondhand
information; I know nothing about MSVC myself). For example, something like

  void __cdecl function(....)

might be needed. In order so make this easy, all the exported functions have
PCRE2_CALL_CONVENTION just before their names. It is rarely needed; if not
set, we ensure here that it has no effect. */

#ifndef PCRE2_CALL_CONVENTION
#define PCRE2_CALL_CONVENTION
#endif

/* Have to include limits.h, stdlib.h, and inttypes.h to ensure that size_t and
uint8_t, UCHAR_MAX, etc are defined. Some systems that do have inttypes.h do
not have stdint.h, which is why we use inttypes.h, which according to the C
standard is a superset of stdint.h. If inttypes.h is not available the build
will break and the relevant values must be provided by some other means. */

#include <limits.h>
#include <stdlib.h>
#include <inttypes.h>

/* Allow for C++ users compiling this directly. */

#ifdef __cplusplus
extern "C" {
#endif

/* The following option bits can be passed to pcre2_compile(), pcre2_match(),
or pcre2_dfa_match(). PCRE2_NO_UTF_CHECK affects only the function to which it
is passed. Put these bits at the most significant end of the options word so
others can be added next to them */

#define PCRE2_ANCHORED
#define PCRE2_NO_UTF_CHECK
#define PCRE2_ENDANCHORED

/* The following option bits can be passed only to pcre2_compile(). However,
they may affect compilation, JIT compilation, and/or interpretive execution.
The following tags indicate which:

C   alters what is compiled by pcre2_compile()
J   alters what is compiled by pcre2_jit_compile()
M   is inspected during pcre2_match() execution
D   is inspected during pcre2_dfa_match() execution
*/

#define PCRE2_ALLOW_EMPTY_CLASS
#define PCRE2_ALT_BSUX
#define PCRE2_AUTO_CALLOUT
#define PCRE2_CASELESS
#define PCRE2_DOLLAR_ENDONLY
#define PCRE2_DOTALL
#define PCRE2_DUPNAMES
#define PCRE2_EXTENDED
#define PCRE2_FIRSTLINE
#define PCRE2_MATCH_UNSET_BACKREF
#define PCRE2_MULTILINE
#define PCRE2_NEVER_UCP
#define PCRE2_NEVER_UTF
#define PCRE2_NO_AUTO_CAPTURE
#define PCRE2_NO_AUTO_POSSESS
#define PCRE2_NO_DOTSTAR_ANCHOR
#define PCRE2_NO_START_OPTIMIZE
#define PCRE2_UCP
#define PCRE2_UNGREEDY
#define PCRE2_UTF
#define PCRE2_NEVER_BACKSLASH_C
#define PCRE2_ALT_CIRCUMFLEX
#define PCRE2_ALT_VERBNAMES
#define PCRE2_USE_OFFSET_LIMIT
#define PCRE2_EXTENDED_MORE
#define PCRE2_LITERAL
#define PCRE2_MATCH_INVALID_UTF

/* An additional compile options word is available in the compile context. */

#define PCRE2_EXTRA_ALLOW_SURROGATE_ESCAPES
#define PCRE2_EXTRA_BAD_ESCAPE_IS_LITERAL
#define PCRE2_EXTRA_MATCH_WORD
#define PCRE2_EXTRA_MATCH_LINE
#define PCRE2_EXTRA_ESCAPED_CR_IS_LF
#define PCRE2_EXTRA_ALT_BSUX
#define PCRE2_EXTRA_ALLOW_LOOKAROUND_BSK
#define PCRE2_EXTRA_CASELESS_RESTRICT
#define PCRE2_EXTRA_ASCII_BSD
#define PCRE2_EXTRA_ASCII_BSS
#define PCRE2_EXTRA_ASCII_BSW
#define PCRE2_EXTRA_ASCII_POSIX
#define PCRE2_EXTRA_ASCII_DIGIT

/* These are for pcre2_jit_compile(). */

#define PCRE2_JIT_COMPLETE
#define PCRE2_JIT_PARTIAL_SOFT
#define PCRE2_JIT_PARTIAL_HARD
#define PCRE2_JIT_INVALID_UTF

/* These are for pcre2_match(), pcre2_dfa_match(), pcre2_jit_match(), and
pcre2_substitute(). Some are allowed only for one of the functions, and in
these cases it is noted below. Note that PCRE2_ANCHORED, PCRE2_ENDANCHORED and
PCRE2_NO_UTF_CHECK can also be passed to these functions (though
pcre2_jit_match() ignores the latter since it bypasses all sanity checks). */

#define PCRE2_NOTBOL
#define PCRE2_NOTEOL
#define PCRE2_NOTEMPTY
#define PCRE2_NOTEMPTY_ATSTART
#define PCRE2_PARTIAL_SOFT
#define PCRE2_PARTIAL_HARD
#define PCRE2_DFA_RESTART
#define PCRE2_DFA_SHORTEST
#define PCRE2_SUBSTITUTE_GLOBAL
#define PCRE2_SUBSTITUTE_EXTENDED
#define PCRE2_SUBSTITUTE_UNSET_EMPTY
#define PCRE2_SUBSTITUTE_UNKNOWN_UNSET
#define PCRE2_SUBSTITUTE_OVERFLOW_LENGTH
#define PCRE2_NO_JIT
#define PCRE2_COPY_MATCHED_SUBJECT
#define PCRE2_SUBSTITUTE_LITERAL
#define PCRE2_SUBSTITUTE_MATCHED
#define PCRE2_SUBSTITUTE_REPLACEMENT_ONLY
#define PCRE2_DISABLE_RECURSELOOP_CHECK

/* Options for pcre2_pattern_convert(). */

#define PCRE2_CONVERT_UTF
#define PCRE2_CONVERT_NO_UTF_CHECK
#define PCRE2_CONVERT_POSIX_BASIC
#define PCRE2_CONVERT_POSIX_EXTENDED
#define PCRE2_CONVERT_GLOB
#define PCRE2_CONVERT_GLOB_NO_WILD_SEPARATOR
#define PCRE2_CONVERT_GLOB_NO_STARSTAR

/* Newline and \R settings, for use in compile contexts. The newline values
must be kept in step with values set in config.h and both sets must all be
greater than zero. */

#define PCRE2_NEWLINE_CR
#define PCRE2_NEWLINE_LF
#define PCRE2_NEWLINE_CRLF
#define PCRE2_NEWLINE_ANY
#define PCRE2_NEWLINE_ANYCRLF
#define PCRE2_NEWLINE_NUL

#define PCRE2_BSR_UNICODE
#define PCRE2_BSR_ANYCRLF

/* Error codes for pcre2_compile(). Some of these are also used by
pcre2_pattern_convert(). */

#define PCRE2_ERROR_END_BACKSLASH
#define PCRE2_ERROR_END_BACKSLASH_C
#define PCRE2_ERROR_UNKNOWN_ESCAPE
#define PCRE2_ERROR_QUANTIFIER_OUT_OF_ORDER
#define PCRE2_ERROR_QUANTIFIER_TOO_BIG
#define PCRE2_ERROR_MISSING_SQUARE_BRACKET
#define PCRE2_ERROR_ESCAPE_INVALID_IN_CLASS
#define PCRE2_ERROR_CLASS_RANGE_ORDER
#define PCRE2_ERROR_QUANTIFIER_INVALID
#define PCRE2_ERROR_INTERNAL_UNEXPECTED_REPEAT
#define PCRE2_ERROR_INVALID_AFTER_PARENS_QUERY
#define PCRE2_ERROR_POSIX_CLASS_NOT_IN_CLASS
#define PCRE2_ERROR_POSIX_NO_SUPPORT_COLLATING
#define PCRE2_ERROR_MISSING_CLOSING_PARENTHESIS
#define PCRE2_ERROR_BAD_SUBPATTERN_REFERENCE
#define PCRE2_ERROR_NULL_PATTERN
#define PCRE2_ERROR_BAD_OPTIONS
#define PCRE2_ERROR_MISSING_COMMENT_CLOSING
#define PCRE2_ERROR_PARENTHESES_NEST_TOO_DEEP
#define PCRE2_ERROR_PATTERN_TOO_LARGE
#define PCRE2_ERROR_HEAP_FAILED
#define PCRE2_ERROR_UNMATCHED_CLOSING_PARENTHESIS
#define PCRE2_ERROR_INTERNAL_CODE_OVERFLOW
#define PCRE2_ERROR_MISSING_CONDITION_CLOSING
#define PCRE2_ERROR_LOOKBEHIND_NOT_FIXED_LENGTH
#define PCRE2_ERROR_ZERO_RELATIVE_REFERENCE
#define PCRE2_ERROR_TOO_MANY_CONDITION_BRANCHES
#define PCRE2_ERROR_CONDITION_ASSERTION_EXPECTED
#define PCRE2_ERROR_BAD_RELATIVE_REFERENCE
#define PCRE2_ERROR_UNKNOWN_POSIX_CLASS
#define PCRE2_ERROR_INTERNAL_STUDY_ERROR
#define PCRE2_ERROR_UNICODE_NOT_SUPPORTED
#define PCRE2_ERROR_PARENTHESES_STACK_CHECK
#define PCRE2_ERROR_CODE_POINT_TOO_BIG
#define PCRE2_ERROR_LOOKBEHIND_TOO_COMPLICATED
#define PCRE2_ERROR_LOOKBEHIND_INVALID_BACKSLASH_C
#define PCRE2_ERROR_UNSUPPORTED_ESCAPE_SEQUENCE
#define PCRE2_ERROR_CALLOUT_NUMBER_TOO_BIG
#define PCRE2_ERROR_MISSING_CALLOUT_CLOSING
#define PCRE2_ERROR_ESCAPE_INVALID_IN_VERB
#define PCRE2_ERROR_UNRECOGNIZED_AFTER_QUERY_P
#define PCRE2_ERROR_MISSING_NAME_TERMINATOR
#define PCRE2_ERROR_DUPLICATE_SUBPATTERN_NAME
#define PCRE2_ERROR_INVALID_SUBPATTERN_NAME
#define PCRE2_ERROR_UNICODE_PROPERTIES_UNAVAILABLE
#define PCRE2_ERROR_MALFORMED_UNICODE_PROPERTY
#define PCRE2_ERROR_UNKNOWN_UNICODE_PROPERTY
#define PCRE2_ERROR_SUBPATTERN_NAME_TOO_LONG
#define PCRE2_ERROR_TOO_MANY_NAMED_SUBPATTERNS
#define PCRE2_ERROR_CLASS_INVALID_RANGE
#define PCRE2_ERROR_OCTAL_BYTE_TOO_BIG
#define PCRE2_ERROR_INTERNAL_OVERRAN_WORKSPACE
#define PCRE2_ERROR_INTERNAL_MISSING_SUBPATTERN
#define PCRE2_ERROR_DEFINE_TOO_MANY_BRANCHES
#define PCRE2_ERROR_BACKSLASH_O_MISSING_BRACE
#define PCRE2_ERROR_INTERNAL_UNKNOWN_NEWLINE
#define PCRE2_ERROR_BACKSLASH_G_SYNTAX
#define PCRE2_ERROR_PARENS_QUERY_R_MISSING_CLOSING
/* Error 159 is obsolete and should now never occur */
#define PCRE2_ERROR_VERB_ARGUMENT_NOT_ALLOWED
#define PCRE2_ERROR_VERB_UNKNOWN
#define PCRE2_ERROR_SUBPATTERN_NUMBER_TOO_BIG
#define PCRE2_ERROR_SUBPATTERN_NAME_EXPECTED
#define PCRE2_ERROR_INTERNAL_PARSED_OVERFLOW
#define PCRE2_ERROR_INVALID_OCTAL
#define PCRE2_ERROR_SUBPATTERN_NAMES_MISMATCH
#define PCRE2_ERROR_MARK_MISSING_ARGUMENT
#define PCRE2_ERROR_INVALID_HEXADECIMAL
#define PCRE2_ERROR_BACKSLASH_C_SYNTAX
#define PCRE2_ERROR_BACKSLASH_K_SYNTAX
#define PCRE2_ERROR_INTERNAL_BAD_CODE_LOOKBEHINDS
#define PCRE2_ERROR_BACKSLASH_N_IN_CLASS
#define PCRE2_ERROR_CALLOUT_STRING_TOO_LONG
#define PCRE2_ERROR_UNICODE_DISALLOWED_CODE_POINT
#define PCRE2_ERROR_UTF_IS_DISABLED
#define PCRE2_ERROR_UCP_IS_DISABLED
#define PCRE2_ERROR_VERB_NAME_TOO_LONG
#define PCRE2_ERROR_BACKSLASH_U_CODE_POINT_TOO_BIG
#define PCRE2_ERROR_MISSING_OCTAL_OR_HEX_DIGITS
#define PCRE2_ERROR_VERSION_CONDITION_SYNTAX
#define PCRE2_ERROR_INTERNAL_BAD_CODE_AUTO_POSSESS
#define PCRE2_ERROR_CALLOUT_NO_STRING_DELIMITER
#define PCRE2_ERROR_CALLOUT_BAD_STRING_DELIMITER
#define PCRE2_ERROR_BACKSLASH_C_CALLER_DISABLED
#define PCRE2_ERROR_QUERY_BARJX_NEST_TOO_DEEP
#define PCRE2_ERROR_BACKSLASH_C_LIBRARY_DISABLED
#define PCRE2_ERROR_PATTERN_TOO_COMPLICATED
#define PCRE2_ERROR_LOOKBEHIND_TOO_LONG
#define PCRE2_ERROR_PATTERN_STRING_TOO_LONG
#define PCRE2_ERROR_INTERNAL_BAD_CODE
#define PCRE2_ERROR_INTERNAL_BAD_CODE_IN_SKIP
#define PCRE2_ERROR_NO_SURROGATES_IN_UTF16
#define PCRE2_ERROR_BAD_LITERAL_OPTIONS
#define PCRE2_ERROR_SUPPORTED_ONLY_IN_UNICODE
#define PCRE2_ERROR_INVALID_HYPHEN_IN_OPTIONS
#define PCRE2_ERROR_ALPHA_ASSERTION_UNKNOWN
#define PCRE2_ERROR_SCRIPT_RUN_NOT_AVAILABLE
#define PCRE2_ERROR_TOO_MANY_CAPTURES
#define PCRE2_ERROR_CONDITION_ATOMIC_ASSERTION_EXPECTED
#define PCRE2_ERROR_BACKSLASH_K_IN_LOOKAROUND


/* "Expected" matching error codes: no match and partial match. */

#define PCRE2_ERROR_NOMATCH
#define PCRE2_ERROR_PARTIAL

/* Error codes for UTF-8 validity checks */

#define PCRE2_ERROR_UTF8_ERR1
#define PCRE2_ERROR_UTF8_ERR2
#define PCRE2_ERROR_UTF8_ERR3
#define PCRE2_ERROR_UTF8_ERR4
#define PCRE2_ERROR_UTF8_ERR5
#define PCRE2_ERROR_UTF8_ERR6
#define PCRE2_ERROR_UTF8_ERR7
#define PCRE2_ERROR_UTF8_ERR8
#define PCRE2_ERROR_UTF8_ERR9
#define PCRE2_ERROR_UTF8_ERR10
#define PCRE2_ERROR_UTF8_ERR11
#define PCRE2_ERROR_UTF8_ERR12
#define PCRE2_ERROR_UTF8_ERR13
#define PCRE2_ERROR_UTF8_ERR14
#define PCRE2_ERROR_UTF8_ERR15
#define PCRE2_ERROR_UTF8_ERR16
#define PCRE2_ERROR_UTF8_ERR17
#define PCRE2_ERROR_UTF8_ERR18
#define PCRE2_ERROR_UTF8_ERR19
#define PCRE2_ERROR_UTF8_ERR20
#define PCRE2_ERROR_UTF8_ERR21

/* Error codes for UTF-16 validity checks */

#define PCRE2_ERROR_UTF16_ERR1
#define PCRE2_ERROR_UTF16_ERR2
#define PCRE2_ERROR_UTF16_ERR3

/* Error codes for UTF-32 validity checks */

#define PCRE2_ERROR_UTF32_ERR1
#define PCRE2_ERROR_UTF32_ERR2

/* Miscellaneous error codes for pcre2[_dfa]_match(), substring extraction
functions, context functions, and serializing functions. They are in numerical
order. Originally they were in alphabetical order too, but now that PCRE2 is
released, the numbers must not be changed. */

#define PCRE2_ERROR_BADDATA
#define PCRE2_ERROR_MIXEDTABLES
#define PCRE2_ERROR_BADMAGIC
#define PCRE2_ERROR_BADMODE
#define PCRE2_ERROR_BADOFFSET
#define PCRE2_ERROR_BADOPTION
#define PCRE2_ERROR_BADREPLACEMENT
#define PCRE2_ERROR_BADUTFOFFSET
#define PCRE2_ERROR_CALLOUT
#define PCRE2_ERROR_DFA_BADRESTART
#define PCRE2_ERROR_DFA_RECURSE
#define PCRE2_ERROR_DFA_UCOND
#define PCRE2_ERROR_DFA_UFUNC
#define PCRE2_ERROR_DFA_UITEM
#define PCRE2_ERROR_DFA_WSSIZE
#define PCRE2_ERROR_INTERNAL
#define PCRE2_ERROR_JIT_BADOPTION
#define PCRE2_ERROR_JIT_STACKLIMIT
#define PCRE2_ERROR_MATCHLIMIT
#define PCRE2_ERROR_NOMEMORY
#define PCRE2_ERROR_NOSUBSTRING
#define PCRE2_ERROR_NOUNIQUESUBSTRING
#define PCRE2_ERROR_NULL
#define PCRE2_ERROR_RECURSELOOP
#define PCRE2_ERROR_DEPTHLIMIT
#define PCRE2_ERROR_RECURSIONLIMIT
#define PCRE2_ERROR_UNAVAILABLE
#define PCRE2_ERROR_UNSET
#define PCRE2_ERROR_BADOFFSETLIMIT
#define PCRE2_ERROR_BADREPESCAPE
#define PCRE2_ERROR_REPMISSINGBRACE
#define PCRE2_ERROR_BADSUBSTITUTION
#define PCRE2_ERROR_BADSUBSPATTERN
#define PCRE2_ERROR_TOOMANYREPLACE
#define PCRE2_ERROR_BADSERIALIZEDDATA
#define PCRE2_ERROR_HEAPLIMIT
#define PCRE2_ERROR_CONVERT_SYNTAX
#define PCRE2_ERROR_INTERNAL_DUPMATCH
#define PCRE2_ERROR_DFA_UINVALID_UTF
#define PCRE2_ERROR_INVALIDOFFSET


/* Request types for pcre2_pattern_info() */

#define PCRE2_INFO_ALLOPTIONS
#define PCRE2_INFO_ARGOPTIONS
#define PCRE2_INFO_BACKREFMAX
#define PCRE2_INFO_BSR
#define PCRE2_INFO_CAPTURECOUNT
#define PCRE2_INFO_FIRSTCODEUNIT
#define PCRE2_INFO_FIRSTCODETYPE
#define PCRE2_INFO_FIRSTBITMAP
#define PCRE2_INFO_HASCRORLF
#define PCRE2_INFO_JCHANGED
#define PCRE2_INFO_JITSIZE
#define PCRE2_INFO_LASTCODEUNIT
#define PCRE2_INFO_LASTCODETYPE
#define PCRE2_INFO_MATCHEMPTY
#define PCRE2_INFO_MATCHLIMIT
#define PCRE2_INFO_MAXLOOKBEHIND
#define PCRE2_INFO_MINLENGTH
#define PCRE2_INFO_NAMECOUNT
#define PCRE2_INFO_NAMEENTRYSIZE
#define PCRE2_INFO_NAMETABLE
#define PCRE2_INFO_NEWLINE
#define PCRE2_INFO_DEPTHLIMIT
#define PCRE2_INFO_RECURSIONLIMIT
#define PCRE2_INFO_SIZE
#define PCRE2_INFO_HASBACKSLASHC
#define PCRE2_INFO_FRAMESIZE
#define PCRE2_INFO_HEAPLIMIT
#define PCRE2_INFO_EXTRAOPTIONS

/* Request types for pcre2_config(). */

#define PCRE2_CONFIG_BSR
#define PCRE2_CONFIG_JIT
#define PCRE2_CONFIG_JITTARGET
#define PCRE2_CONFIG_LINKSIZE
#define PCRE2_CONFIG_MATCHLIMIT
#define PCRE2_CONFIG_NEWLINE
#define PCRE2_CONFIG_PARENSLIMIT
#define PCRE2_CONFIG_DEPTHLIMIT
#define PCRE2_CONFIG_RECURSIONLIMIT
#define PCRE2_CONFIG_STACKRECURSE
#define PCRE2_CONFIG_UNICODE
#define PCRE2_CONFIG_UNICODE_VERSION
#define PCRE2_CONFIG_VERSION
#define PCRE2_CONFIG_HEAPLIMIT
#define PCRE2_CONFIG_NEVER_BACKSLASH_C
#define PCRE2_CONFIG_COMPILED_WIDTHS
#define PCRE2_CONFIG_TABLES_LENGTH


/* Types for code units in patterns and subject strings. */

PCRE2_UCHAR8;
PCRE2_UCHAR16;
PCRE2_UCHAR32;

PCRE2_SPTR8;
PCRE2_SPTR16;
PCRE2_SPTR32;

/* The PCRE2_SIZE type is used for all string lengths and offsets in PCRE2,
including pattern offsets for errors and subject offsets after a match. We
define special values to indicate zero-terminated strings and unset offsets in
the offset vector (ovector). */

#define PCRE2_SIZE
#define PCRE2_SIZE_MAX
#define PCRE2_ZERO_TERMINATED
#define PCRE2_UNSET

/* Generic types for opaque structures and JIT callback functions. These
declarations are defined in a macro that is expanded for each width later. */

#define PCRE2_TYPES_LIST


/* The structures for passing out data via callout functions. We use structures
so that new fields can be added on the end in future versions, without changing
the API of the function, thereby allowing old clients to work without
modification. Define the generic versions in a macro; the width-specific
versions are generated from this macro below. */

/* Flags for the callout_flags field. These are cleared after a callout. */

#define PCRE2_CALLOUT_STARTMATCH
#define PCRE2_CALLOUT_BACKTRACK

#define PCRE2_STRUCTURE_LIST


/* List the generic forms of all other functions in macros, which will be
expanded for each width below. Start with functions that give general
information. */

#define PCRE2_GENERAL_INFO_FUNCTIONS


/* Functions for manipulating contexts. */

#define PCRE2_GENERAL_CONTEXT_FUNCTIONS

#define PCRE2_COMPILE_CONTEXT_FUNCTIONS

#define PCRE2_MATCH_CONTEXT_FUNCTIONS

#define PCRE2_CONVERT_CONTEXT_FUNCTIONS


/* Functions concerned with compiling a pattern to PCRE internal code. */

#define PCRE2_COMPILE_FUNCTIONS


/* Functions that give information about a compiled pattern. */

#define PCRE2_PATTERN_INFO_FUNCTIONS


/* Functions for running a match and inspecting the result. */

#define PCRE2_MATCH_FUNCTIONS


/* Convenience functions for handling matched substrings. */

#define PCRE2_SUBSTRING_FUNCTIONS

/* Functions for serializing / deserializing compiled patterns. */

#define PCRE2_SERIALIZE_FUNCTIONS


/* Convenience function for match + substitute. */

#define PCRE2_SUBSTITUTE_FUNCTION


/* Functions for converting pattern source strings. */

#define PCRE2_CONVERT_FUNCTIONS


/* Functions for JIT processing */

#define PCRE2_JIT_FUNCTIONS


/* Other miscellaneous functions. */

#define PCRE2_OTHER_FUNCTIONS

/* Define macros that generate width-specific names from generic versions. The
three-level macro scheme is necessary to get the macros expanded when we want
them to be. First we get the width from PCRE2_LOCAL_WIDTH, which is used for
generating three versions of everything below. After that, PCRE2_SUFFIX will be
re-defined to use PCRE2_CODE_UNIT_WIDTH, for use when macros such as
pcre2_compile are called by application code. */

#define PCRE2_JOIN(a,b)
#define PCRE2_GLUE(a,b)
#define PCRE2_SUFFIX(a)


/* Data types */

#define PCRE2_UCHAR
#define PCRE2_SPTR

#define pcre2_code
#define pcre2_jit_callback
#define pcre2_jit_stack

#define pcre2_real_code
#define pcre2_real_general_context
#define pcre2_real_compile_context
#define pcre2_real_convert_context
#define pcre2_real_match_context
#define pcre2_real_jit_stack
#define pcre2_real_match_data


/* Data blocks */

#define pcre2_callout_block
#define pcre2_callout_enumerate_block
#define pcre2_substitute_callout_block
#define pcre2_general_context
#define pcre2_compile_context
#define pcre2_convert_context
#define pcre2_match_context
#define pcre2_match_data


/* Functions: the complete list in alphabetical order */

#define pcre2_callout_enumerate
#define pcre2_code_copy
#define pcre2_code_copy_with_tables
#define pcre2_code_free
#define pcre2_compile
#define pcre2_compile_context_copy
#define pcre2_compile_context_create
#define pcre2_compile_context_free
#define pcre2_config
#define pcre2_convert_context_copy
#define pcre2_convert_context_create
#define pcre2_convert_context_free
#define pcre2_converted_pattern_free
#define pcre2_dfa_match
#define pcre2_general_context_copy
#define pcre2_general_context_create
#define pcre2_general_context_free
#define pcre2_get_error_message
#define pcre2_get_mark
#define pcre2_get_match_data_heapframes_size
#define pcre2_get_match_data_size
#define pcre2_get_ovector_pointer
#define pcre2_get_ovector_count
#define pcre2_get_startchar
#define pcre2_jit_compile
#define pcre2_jit_match
#define pcre2_jit_free_unused_memory
#define pcre2_jit_stack_assign
#define pcre2_jit_stack_create
#define pcre2_jit_stack_free
#define pcre2_maketables
#define pcre2_maketables_free
#define pcre2_match
#define pcre2_match_context_copy
#define pcre2_match_context_create
#define pcre2_match_context_free
#define pcre2_match_data_create
#define pcre2_match_data_create_from_pattern
#define pcre2_match_data_free
#define pcre2_pattern_convert
#define pcre2_pattern_info
#define pcre2_serialize_decode
#define pcre2_serialize_encode
#define pcre2_serialize_free
#define pcre2_serialize_get_number_of_codes
#define pcre2_set_bsr
#define pcre2_set_callout
#define pcre2_set_character_tables
#define pcre2_set_compile_extra_options
#define pcre2_set_compile_recursion_guard
#define pcre2_set_depth_limit
#define pcre2_set_glob_escape
#define pcre2_set_glob_separator
#define pcre2_set_heap_limit
#define pcre2_set_match_limit
#define pcre2_set_max_varlookbehind
#define pcre2_set_max_pattern_length
#define pcre2_set_newline
#define pcre2_set_parens_nest_limit
#define pcre2_set_offset_limit
#define pcre2_set_substitute_callout
#define pcre2_substitute
#define pcre2_substring_copy_byname
#define pcre2_substring_copy_bynumber
#define pcre2_substring_free
#define pcre2_substring_get_byname
#define pcre2_substring_get_bynumber
#define pcre2_substring_length_byname
#define pcre2_substring_length_bynumber
#define pcre2_substring_list_get
#define pcre2_substring_list_free
#define pcre2_substring_nametable_scan
#define pcre2_substring_number_from_name

/* Keep this old function name for backwards compatibility */
#define pcre2_set_recursion_limit

/* Keep this obsolete function for backwards compatibility: it is now a noop. */
#define pcre2_set_recursion_memory_management

/* Now generate all three sets of width-specific structures and function
prototypes. */

#define PCRE2_TYPES_STRUCTURES_AND_FUNCTIONS

#define PCRE2_LOCAL_WIDTH
PCRE2_TYPES_STRUCTURES_AND_FUNCTIONS
#undef PCRE2_LOCAL_WIDTH

#define PCRE2_LOCAL_WIDTH
PCRE2_TYPES_STRUCTURES_AND_FUNCTIONS
#undef PCRE2_LOCAL_WIDTH

#define PCRE2_LOCAL_WIDTH
PCRE2_TYPES_STRUCTURES_AND_FUNCTIONS
#undef PCRE2_LOCAL_WIDTH

/* Undefine the list macros; they are no longer needed. */

#undef PCRE2_TYPES_LIST
#undef PCRE2_STRUCTURE_LIST
#undef PCRE2_GENERAL_INFO_FUNCTIONS
#undef PCRE2_GENERAL_CONTEXT_FUNCTIONS
#undef PCRE2_COMPILE_CONTEXT_FUNCTIONS
#undef PCRE2_CONVERT_CONTEXT_FUNCTIONS
#undef PCRE2_MATCH_CONTEXT_FUNCTIONS
#undef PCRE2_COMPILE_FUNCTIONS
#undef PCRE2_PATTERN_INFO_FUNCTIONS
#undef PCRE2_MATCH_FUNCTIONS
#undef PCRE2_SUBSTRING_FUNCTIONS
#undef PCRE2_SERIALIZE_FUNCTIONS
#undef PCRE2_SUBSTITUTE_FUNCTION
#undef PCRE2_JIT_FUNCTIONS
#undef PCRE2_OTHER_FUNCTIONS
#undef PCRE2_TYPES_STRUCTURES_AND_FUNCTIONS

/* PCRE2_CODE_UNIT_WIDTH must be defined. If it is 8, 16, or 32, redefine
PCRE2_SUFFIX to use it. If it is 0, undefine the other macros and make
PCRE2_SUFFIX a no-op. Otherwise, generate an error. */

#undef PCRE2_SUFFIX
#ifndef PCRE2_CODE_UNIT_WIDTH
#error PCRE2_CODE_UNIT_WIDTH must be defined before including pcre2.h.
#error Use 8, 16, or 32; or 0 for a multi-width application.
#else  /* PCRE2_CODE_UNIT_WIDTH is defined */
#if PCRE2_CODE_UNIT_WIDTH == 8 || \
    PCRE2_CODE_UNIT_WIDTH == 16 || \
    PCRE2_CODE_UNIT_WIDTH == 32
#define PCRE2_SUFFIX(a)
#elif PCRE2_CODE_UNIT_WIDTH == 0
#undef PCRE2_JOIN
#undef PCRE2_GLUE
#define PCRE2_SUFFIX
#else
#error PCRE2_CODE_UNIT_WIDTH must be 0, 8, 16, or 32.
#endif
#endif  /* PCRE2_CODE_UNIT_WIDTH is defined */

#ifdef __cplusplus
}  /* extern "C" */
#endif

#endif  /* PCRE2_H_IDEMPOTENT_GUARD */

/* End of pcre2.h */