Common Lisp Package: CFFI-REGEX

README:

FUNCTION

Public

REGEX-MATCH (REGEX TARGET-STRING &OPTIONAL (START 0))

regex-match regex target-string &optional (start 0) => incomplete

REGEX-SEARCH-ALL (REGEX TARGET-STRING &KEY (START 0) (END (LENGTH TARGET-STRING)))

regex-search-all regex target-string &key (start 0) (end (length target-string)) => list Multi-version of REGEX-SEARCH that evaluates to a list of all (STARTPOS REGISTERS) matches of REGEX in TARGET-STRING.

Private

GET-REGISTER (REGISTERS INDEX)

get-register registers index => (start end) Return START and END of register match # INDEX in libc regex REGISTERS (re_registers).

Undocumented

%REGEX-MATCH (BUFFER STRING LENGTH START REGISTERS)

%REGEX-MATCH-2 (BUFFER STRING1 LENGTH1 STRING2 LENGTH2 START RANGE REGISTERS STOP)

%REGEX-SEARCH-2 (BUFFER STRING1 LENGTH1 STRING2 LENGTH2 START RANGE REGISTERS STOP)

%REGEX-SET-REGISTERS (BUFFER REGISTERS NUM-REGS STARTS ENDS)

COMPILE-FASTMAP (BUFFER)

COMPILE-PATTERN (PATTERN LENGTH BUFFER)

SET-SYNTAX (SYNTAX)

MACRO

Private

WITH-PATTERN-BUFFER ((VAR PATTERN &OPTIONAL (SYNTAX (LIST +SYNTAX-EMACS+))) &BODY BODY)

with-pattern-buffer var pattern &optional (syntax (list +syntax-emacs+))) &body body => context Create lexical context binding VAR to a compiled libc regex PATTERN-BUFFER (re_pattern_buffer) with dynamic allocation and SYNTAX. In case of REGEX compilation failure a REGEX-COMPILATION-FAILURE condition containing the original error message is signaled.

GENERIC-FUNCTION

Private

Undocumented

REGEX-COMPILATION-FAILURE-MESSAGE (CONDITION)

CLASS

Private

Undocumented

PATTERN-BUFFER-TCLASS

REGISTERS-TCLASS

CONDITION

Public

Undocumented

REGEX-COMPILATION-FAILURE

REGEX-INTERNAL-ERROR

CONSTANT

Private

Undocumented

+BACKSLASH-ESCAPE-IN-LISTS+

+BK-PLUS-QM+

+CARET-ANCHORS-HERE+

+CHAR-CLASSES+

+CONTEXT-INDEP-ANCHORS+

+CONTEXT-INDEP-OPS+

+CONTEXT-INVALID-DUP+

+CONTEXT-INVALID-OPS+

+DEBUG+

+DOT-NEWLINE+

+DOT-NOT-NULL+

+DUP-MAX+

+EXTENDED+

+HAT-LISTS-NOT-NEWLINE+

+INTERVALS+

+INVALID-INTERVAL-ORD+

+LIMITED-OPS+

+NEWLINE+

+NEWLINE-ALT+

+NO-BK-BRACES+

+NO-BK-PARENS+

+NO-BK-REFS+

+NO-BK-VBAR+

+NO-EMPTY-RANGES+

+NO-GNU-OPS+

+NO-POSIX-BACKTRACKING+

+NO-SUB+

+NOSUB+

+NOTBOL+

+NOTEOL+

+RE-ICASE+

+REG-ICASE+

+REGS-FIXED+

+REGS-REALLOCATE+

+REGS-UNALLOCATED+

+STARTEND+

+SYNTAX-AWK+

+SYNTAX-ED+

+SYNTAX-EGREP+

+SYNTAX-EMACS+

+SYNTAX-GNU-AWK+

+SYNTAX-GREP+

+SYNTAX-POSIX-AWK+

+SYNTAX-POSIX-BASIC+

+SYNTAX-POSIX-COMMON+

+SYNTAX-POSIX-EGREP+

+SYNTAX-POSIX-EXTENDED+

+SYNTAX-POSIX-MINIMAL-BASIC+

+SYNTAX-POSIX-MINIMAL-EXTENDED+

+SYNTAX-SED+

+UNMATCHED-RIGHT-PAREN-ORD+

SIZE-OF-ACTIVE-REG

SIZE-OF-PATTERN-BUFFER

SIZE-OF-REG-SYNTAX

SIZE-OF-REGOFF

SIZE-OF-S-REG

SIZE-OF-SIZE-T