Source Edit

Types

  1. CalloutBlock = object
  2. version*: cint ## Identifies version of block
  3. callout_number*: cint ## Number compiled into pattern
  4. offset_vector*: ptr cint ## The offset vector
  5. subject*: cstring ## The subject being matched
  6. subject_length*: cint ## The length of the subject
  7. start_match*: cint ## Offset to start of this match attempt
  8. current_position*: cint ## Where we currently are in the subject
  9. capture_top*: cint ## Max current capture
  10. capture_last*: cint ## Most recently closed capture
  11. callout_data*: pointer ## Data passed in with the call
  12. pattern_position*: cint ## Offset to next item in the pattern
  13. next_item_length*: cint ## Length of next item in the pattern
  14. mark*: pointer ## Pointer to current mark or NULL

Source Edit

  1. ExtraData = object
  2. flags*: clong ## Bits for which fields are set
  3. study_data*: pointer ## Opaque data from pcre_study()
  4. match_limit*: clong ## Maximum number of calls to match()
  5. callout_data*: pointer ## Data passed back in callouts
  6. tables*: pointer ## Pointer to character tables
  7. match_limit_recursion*: clong ## Max recursive calls to match()
  8. mark*: pointer ## For passing back a mark pointer
  9. executable_jit*: pointer ## Contains a pointer to a compiled jit code

Source Edit

  1. JitCallback = proc (a: pointer): ptr JitStack {.cdecl.}

Source Edit

  1. JitStack = object

Source Edit

  1. JitStack16 = object

Source Edit

  1. JitStack32 = object

Source Edit

  1. Pcre = object

Source Edit

  1. Pcre16 = object

Source Edit

  1. Pcre32 = object

Source Edit

  1. PJitStack {....deprecated.} = ptr JitStack

Deprecated

Source Edit

  1. PPcre {....deprecated.} = ptr Pcre

Deprecated

Source Edit

Consts

  1. ANCHORED = 0x00000010

Source Edit

  1. AUTO_CALLOUT = 0x00004000

Source Edit

  1. BSR_ANYCRLF = 0x00800000

Source Edit

  1. BSR_UNICODE = 0x01000000

Source Edit

  1. CASELESS = 0x00000001

Source Edit

  1. CONFIG_BSR = 8

Source Edit

  1. CONFIG_JIT = 9

Source Edit

  1. CONFIG_JITTARGET = 11

Source Edit

  1. CONFIG_LINK_SIZE = 2

Source Edit

  1. CONFIG_MATCH_LIMIT = 4

Source Edit

  1. CONFIG_MATCH_LIMIT_RECURSION = 7

Source Edit

  1. CONFIG_NEWLINE = 1

Source Edit

  1. CONFIG_PARENS_LIMIT = 13

Source Edit

  1. CONFIG_POSIX_MALLOC_THRESHOLD = 3

Source Edit

  1. CONFIG_STACKRECURSE = 5

Source Edit

  1. CONFIG_UNICODE_PROPERTIES = 6

Source Edit

  1. CONFIG_UTF8 = 0

Source Edit

  1. CONFIG_UTF16 = 10

Source Edit

  1. CONFIG_UTF32 = 12

Source Edit

  1. DFA_RESTART = 0x00020000

Source Edit

  1. DFA_SHORTEST = 0x00010000

Source Edit

  1. DOLLAR_ENDONLY = 0x00000020

Source Edit

  1. DOTALL = 0x00000004

Source Edit

  1. DUPNAMES = 0x00080000

Source Edit

  1. ERROR_BADCOUNT = -15

Source Edit

  1. ERROR_BADENDIANNESS = -29

Source Edit

  1. ERROR_BADLENGTH = -32

Source Edit

  1. ERROR_BADMAGIC = -4

Source Edit

  1. ERROR_BADMODE = -28

Source Edit

  1. ERROR_BADNEWLINE = -23

Source Edit

  1. ERROR_BADOFFSET = -24

Source Edit

  1. ERROR_BADOPTION = -3

Source Edit

  1. ERROR_BADPARTIAL = -13

Source Edit

  1. ERROR_BADUTF8 = -10

Same for 8/16/32 Source Edit

  1. ERROR_BADUTF8_OFFSET = -11

Same for 8/16 Source Edit

  1. ERROR_BADUTF16 = -10

Same for 8/16/32 Source Edit

  1. ERROR_BADUTF16_OFFSET = -11

Same for 8/16 Source Edit

  1. ERROR_BADUTF32 = -10

Same for 8/16/32 Source Edit

  1. ERROR_CALLOUT = -9

Never used by PCRE itself Source Edit

  1. ERROR_DFA_BADRESTART = -30

Source Edit

  1. ERROR_DFA_RECURSE = -20

Source Edit

  1. ERROR_DFA_UCOND = -17

Source Edit

  1. ERROR_DFA_UITEM = -16

Source Edit

  1. ERROR_DFA_UMLIMIT = -18

Source Edit

  1. ERROR_DFA_WSSIZE = -19

Source Edit

  1. ERROR_INTERNAL = -14

Source Edit

  1. ERROR_JIT_BADOPTION = -31

Source Edit

  1. ERROR_JIT_STACKLIMIT = -27

Source Edit

  1. ERROR_MATCHLIMIT = -8

Source Edit

  1. ERROR_NOMATCH = -1

Source Edit

  1. ERROR_NOMEMORY = -6

Source Edit

  1. ERROR_NOSUBSTRING = -7

Source Edit

  1. ERROR_NULL = -2

Source Edit

  1. ERROR_NULLWSLIMIT = -22

No longer actually used Source Edit

  1. ERROR_PARTIAL = -12

Source Edit

  1. ERROR_RECURSELOOP = -26

Source Edit

  1. ERROR_RECURSIONLIMIT = -21

Source Edit

  1. ERROR_SHORTUTF8 = -25

Source Edit

  1. ERROR_SHORTUTF16 = -25

Same for 8/16 Source Edit

  1. ERROR_UNKNOWN_NODE = -5

For backward compatibility Source Edit

  1. ERROR_UNKNOWN_OPCODE = -5

Source Edit

  1. ERROR_UNSET = -33

Source Edit

  1. EXTENDED = 0x00000008

Source Edit

  1. EXTRA = 0x00000040

Source Edit

  1. EXTRA_CALLOUT_DATA = 0x00000004

Source Edit

  1. EXTRA_EXECUTABLE_JIT = 0x00000040

Source Edit

  1. EXTRA_MARK = 0x00000020

Source Edit

  1. EXTRA_MATCH_LIMIT = 0x00000002

Source Edit

  1. EXTRA_MATCH_LIMIT_RECURSION = 0x00000010

Source Edit

  1. EXTRA_STUDY_DATA = 0x00000001

Source Edit

  1. EXTRA_TABLES = 0x00000008

Source Edit

  1. FIRSTLINE = 0x00040000

Source Edit

  1. INFO_BACKREFMAX = 3

Source Edit

  1. INFO_CAPTURECOUNT = 2

Source Edit

  1. INFO_DEFAULT_TABLES = 11

Source Edit

  1. INFO_FIRSTBYTE = 4

Source Edit

  1. INFO_FIRSTCHAR = 4

For backwards compatibility Source Edit

  1. INFO_FIRSTCHARACTER = 19

Source Edit

  1. INFO_FIRSTCHARACTERFLAGS = 20

Source Edit

  1. INFO_FIRSTTABLE = 5

Source Edit

  1. INFO_HASCRORLF = 14

Source Edit

  1. INFO_JCHANGED = 13

Source Edit

  1. INFO_JIT = 16

Source Edit

  1. INFO_JITSIZE = 17

Source Edit

  1. INFO_LASTLITERAL = 6

Source Edit

  1. INFO_MATCH_EMPTY = 25

Source Edit

  1. INFO_MATCHLIMIT = 23

Source Edit

  1. INFO_MAXLOOKBEHIND = 18

Source Edit

  1. INFO_MINLENGTH = 15

Source Edit

  1. INFO_NAMECOUNT = 8

Source Edit

  1. INFO_NAMEENTRYSIZE = 7

Source Edit

  1. INFO_NAMETABLE = 9

Source Edit

  1. INFO_OKPARTIAL = 12

Source Edit

  1. INFO_OPTIONS = 0

Source Edit

  1. INFO_RECURSIONLIMIT = 24

Source Edit

  1. INFO_REQUIREDCHAR = 21

Source Edit

  1. INFO_REQUIREDCHARFLAGS = 22

Source Edit

  1. INFO_SIZE = 1

Source Edit

  1. INFO_STUDYSIZE = 10

Source Edit

  1. JAVASCRIPT_COMPAT = 0x02000000

Source Edit

  1. MULTILINE = 0x00000002

Source Edit

  1. NEVER_UTF = 0x00010000

Source Edit

  1. NEWLINE_ANY = 0x00400000

Source Edit

  1. NEWLINE_ANYCRLF = 0x00500000

Source Edit

  1. NEWLINE_CR = 0x00100000

Source Edit

  1. NEWLINE_CRLF = 0x00300000

Source Edit

  1. NEWLINE_LF = 0x00200000

Source Edit

  1. NO_AUTO_CAPTURE = 0x00001000

Source Edit

  1. NO_AUTO_POSSESS = 0x00020000

Source Edit

  1. NO_START_OPTIMISE = 0x04000000

Source Edit

  1. NO_START_OPTIMIZE = 0x04000000

Source Edit

  1. NO_UTF8_CHECK = 0x00002000

Source Edit

  1. NO_UTF16_CHECK = 0x00002000

Source Edit

  1. NO_UTF32_CHECK = 0x00002000

Source Edit

  1. NOTBOL = 0x00000080

Source Edit

  1. NOTEMPTY = 0x00000400

Source Edit

  1. NOTEMPTY_ATSTART = 0x10000000

Source Edit

  1. NOTEOL = 0x00000100

Source Edit

  1. PARTIAL = 0x00008000

Source Edit

  1. PARTIAL_HARD = 0x08000000

Source Edit

  1. PARTIAL_SOFT = 0x00008000

Source Edit

  1. PCRE_DATE = "2014-09-26"

Source Edit

  1. PCRE_MAJOR = 8

Source Edit

  1. PCRE_MINOR = 36

Source Edit

  1. PCRE_PRERELEASE = true

Source Edit

  1. STUDY_EXTRA_NEEDED = 0x00000008

Source Edit

  1. STUDY_JIT_COMPILE = 0x00000001

Source Edit

  1. STUDY_JIT_PARTIAL_HARD_COMPILE = 0x00000004

Source Edit

  1. STUDY_JIT_PARTIAL_SOFT_COMPILE = 0x00000002

Source Edit

  1. UCP = 0x20000000

Source Edit

  1. UNGREEDY = 0x00000200

Source Edit

  1. UTF8 = 0x00000800

Source Edit

  1. UTF8_ERR0 = 0

Source Edit

  1. UTF8_ERR1 = 1

Source Edit

  1. UTF8_ERR2 = 2

Source Edit

  1. UTF8_ERR3 = 3

Source Edit

  1. UTF8_ERR4 = 4

Source Edit

  1. UTF8_ERR5 = 5

Source Edit

  1. UTF8_ERR6 = 6

Source Edit

  1. UTF8_ERR7 = 7

Source Edit

  1. UTF8_ERR8 = 8

Source Edit

  1. UTF8_ERR9 = 9

Source Edit

  1. UTF8_ERR10 = 10

Source Edit

  1. UTF8_ERR11 = 11

Source Edit

  1. UTF8_ERR12 = 12

Source Edit

  1. UTF8_ERR13 = 13

Source Edit

  1. UTF8_ERR14 = 14

Source Edit

  1. UTF8_ERR15 = 15

Source Edit

  1. UTF8_ERR16 = 16

Source Edit

  1. UTF8_ERR17 = 17

Source Edit

  1. UTF8_ERR18 = 18

Source Edit

  1. UTF8_ERR19 = 19

Source Edit

  1. UTF8_ERR20 = 20

Source Edit

  1. UTF8_ERR21 = 21

Source Edit

  1. UTF8_ERR22 = 22

Source Edit

  1. UTF16 = 0x00000800

Source Edit

  1. UTF16_ERR0 = 0

Source Edit

  1. UTF16_ERR1 = 1

Source Edit

  1. UTF16_ERR2 = 2

Source Edit

  1. UTF16_ERR3 = 3

Source Edit

  1. UTF16_ERR4 = 4

Source Edit

  1. UTF32 = 0x00000800

Source Edit

  1. UTF32_ERR0 = 0

Source Edit

  1. UTF32_ERR1 = 1

Source Edit

  1. UTF32_ERR2 = 2

Source Edit

  1. UTF32_ERR3 = 3

Source Edit

Procs

  1. proc assign_jit_stack(extra: ptr ExtraData; callback: JitCallback; data: pointer) {.
  2. cdecl, importc: "pcre_$1", ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc compile(pattern: cstring; options: cint; errptr: ptr cstring;
  2. erroffset: ptr cint; tableptr: pointer): ptr Pcre {.cdecl,
  3. importc: "pcre_$1", ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc compile2(pattern: cstring; options: cint; errorcodeptr: ptr cint;
  2. errptr: ptr cstring; erroffset: ptr cint; tableptr: pointer): ptr Pcre {.
  3. cdecl, importc: "pcre_$1", ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc config(what: cint; where: pointer): cint {.cdecl, importc: "pcre_$1",
  2. ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc copy_named_substring(code: ptr Pcre; subject: cstring; ovector: ptr cint;
  2. stringcount: cint; stringname: cstring;
  3. buffer: cstring; buffersize: cint): cint {.cdecl,
  4. importc: "pcre_$1", ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc copy_substring(subject: cstring; ovector: ptr cint; stringcount: cint;
  2. stringnumber: cint; buffer: cstring; buffersize: cint): cint {.
  3. cdecl, importc: "pcre_$1", ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc dfa_exec(code: ptr Pcre; extra: ptr ExtraData; subject: cstring;
  2. length: cint; startoffset: cint; options: cint; ovector: ptr cint;
  3. ovecsize: cint; workspace: ptr cint; wscount: cint): cint {.cdecl,
  4. importc: "pcre_$1", ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc exec(code: ptr Pcre; extra: ptr ExtraData; subject: cstring; length: cint;
  2. startoffset: cint; options: cint; ovector: ptr cint; ovecsize: cint): cint {.
  3. cdecl, importc: "pcre_$1", ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc free_study(extra: ptr ExtraData) {.cdecl, importc: "pcre_$1", ...raises: [],
  2. tags: [], forbids: [].}

Source Edit

  1. proc free_substring(stringptr: cstring) {.cdecl, importc: "pcre_$1", ...raises: [],
  2. tags: [], forbids: [].}

Source Edit

  1. proc free_substring_list(stringptr: cstringArray) {.cdecl, importc: "pcre_$1",
  2. ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc fullinfo(code: ptr Pcre; extra: ptr ExtraData; what: cint; where: pointer): cint {.
  2. cdecl, importc: "pcre_$1", ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc get_named_substring(code: ptr Pcre; subject: cstring; ovector: ptr cint;
  2. stringcount: cint; stringname: cstring;
  3. stringptr: cstringArray): cint {.cdecl,
  4. importc: "pcre_$1", ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc get_stringnumber(code: ptr Pcre; name: cstring): cint {.cdecl,
  2. importc: "pcre_$1", ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc get_stringtable_entries(code: ptr Pcre; name: cstring; first: cstringArray;
  2. last: cstringArray): cint {.cdecl,
  3. importc: "pcre_$1", ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc get_substring(subject: cstring; ovector: ptr cint; stringcount: cint;
  2. stringnumber: cint; stringptr: cstringArray): cint {.cdecl,
  3. importc: "pcre_$1", ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc get_substring_list(subject: cstring; ovector: ptr cint; stringcount: cint;
  2. listptr: ptr cstringArray): cint {.cdecl,
  3. importc: "pcre_$1", ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc jit_exec(code: ptr Pcre; extra: ptr ExtraData; subject: cstring;
  2. length: cint; startoffset: cint; options: cint; ovector: ptr cint;
  3. ovecsize: cint; jstack: ptr JitStack): cint {.cdecl,
  4. importc: "pcre_$1", ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc jit_free_unused_memory() {.cdecl, importc: "pcre_$1", ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc jit_stack_alloc(startsize: cint; maxsize: cint): ptr JitStack {.cdecl,
  2. importc: "pcre_$1", ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc jit_stack_free(stack: ptr JitStack) {.cdecl, importc: "pcre_$1",
  2. ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc maketables(): pointer {.cdecl, importc: "pcre_$1", ...raises: [], tags: [],
  2. forbids: [].}

Source Edit

  1. proc pattern_to_host_byte_order(code: ptr Pcre; extra: ptr ExtraData;
  2. tables: pointer): cint {.cdecl,
  3. importc: "pcre_$1", ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc refcount(code: ptr Pcre; adjust: cint): cint {.cdecl, importc: "pcre_$1",
  2. ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc study(code: ptr Pcre; options: cint; errptr: ptr cstring): ptr ExtraData {.
  2. cdecl, importc: "pcre_$1", ...raises: [], tags: [], forbids: [].}

Source Edit

  1. proc study(code: ptr Pcre; options: cint; errptr: var cstring): ptr ExtraData {.
  2. ...deprecated, cdecl, importc: "pcre_$1", ...raises: [], tags: [], forbids: [].}

Deprecated

Source Edit

  1. proc version(): cstring {.cdecl, importc: "pcre_$1", ...raises: [], tags: [],
  2. forbids: [].}

Source Edit