Package Cl-Ppcre - internal and external symbols

Part of:

asdf-system cl-markdown, asdf-system cl-ppcre
See only external symbols
Package Cl-Ppcre uses the packages Common-Lisp. It is also known as Ppcre. It has 493 total symbols and 28 external ones.

Condition

ppcre-errorAll errors signaled by CL-PPCRE are of
this type.
ppcre-invocation-errorSignaled when CL-PPCRE functions are
invoked with wrong arguments.
ppcre-syntax-errorSignaled if CL-PPCRE's parser encounters an error
when trying to parse a regex string or to conve...

Class

alternationALTERNATION objects represent alternations of
regexes. (Like “a|b” ist the alternation of “a” or ...
anchorANCHOR objects represent anchors like “^” or “$”.
back-referenceBACK-REFERENCE objects represent backreferences.
branchBRANCH objects represent Perl's conditional regular
expressions.
char-classCHAR-CLASS objects represent character classes.
everythingEVERYTHING objects represent regexes matching
“everything”, i.e. dots.
filterFILTER objects represent arbitrary functions
defined by the user.
lookaheadLOOKAHEAD objects represent look-ahead assertions.
lookbehindLOOKBEHIND objects represent look-behind assertions.
regexThe REGEX base class. All other classes inherit
from this one.
registerREGISTER objects represent register groups.
repetitionREPETITION objects represent repetitions of regexes.
seqSEQ objects represents sequences of
regexes. (Like “ab” is the sequence of “a” and “b”.)
standaloneA standalone regular expression.
strSTR objects represent string.
voidVOID objects represent empty regular expressions.
word-boundaryWORD-BOUNDARY objects represent word-boundary assertions.

Variable

*allow-quoting*Whether the parser should support Perl's \Q and \E.
*end-pos*Where to stop scanning within *STRING*.
*end-string-pos*Start of the next possible end-string candidate.
*extended-mode-p*Whether the parser will start in extended mode.
*hyperdoc-base-uri*
*last-pos-stores*An array to keep track of the last positions
where we saw repetitive patterns.
Only used for patt...
*real-start-pos*The real start of *STRING*. This is for repeated scans and is only used internally.
*reg-ends*An array which holds the end positions
of the current register candidates.
*reg-starts*An array which holds the start positions
of the current register candidates.
*regex-char-code-limit*The upper exclusive bound on the char-codes of characters which
can occur in character classes. ...
*regs-maybe-start*An array which holds the next start positions
of the current register candidates.
*rep-num*Counts the number of “complicated” repetitions while the matchers
are built.
*repeat-counters*An array to keep track of how often
repetitive patterns have been tested already.
*special-optimize-settings*Special optimize settings used only be a few declaration expressions.
*standard-optimize-settings*The standard optimize settings used by most declaration expressions.
*start-pos*Where to start scanning within *STRING*.
*string*The string which is currently scanned by SCAN.
Will always be coerced to a SIMPLE-STRING.
*syntax-error-string*The string which caused the syntax error.
*use-bmh-matchers*Whether the scanners created by CREATE-SCANNER should use the (fast
but large) Boyer-Moore-Horspo...
*zero-length-num*Counts the number of repetitions the inner regexes of which may
have zero-length while the matche...
reg-seen

Constant

+digit-hash+Hash-table containing the digits from 0 to 9.
+whitespace-char-hash+Hash-table containing all whitespace characters.
+whitespace-char-string+A string of all characters which are considered to be whitespace.
Same as Perl's [\s].
+word-char-hash+Hash-table containing all “word” characters.

Function

*string*-equalLike STRING-EQUAL, i.e. compares the special string *STRING* from
START1 to END1 with STRING2 fro...
*string*=Like STRING=, i.e. compares the special string *STRING* from START1
to END1 with STRING2 from STA...
add-range-to-hashAdds all characters from character FROM to character TO (inclusive)
to the char class hash HASH. ...
all-matchesReturns a list containing the start and end positions of all
matches of REGEX against TARGET-STRI...
all-matches-as-stringsReturns a list containing all substrings of TARGET-STRING which
match REGEX. If REGEX matches an ...
build-replacementAccepts a replacement template and the current values from the
matching process in REGEX-REPLACE ...
clean-commentsClean (?#...) comments within STRING for quoting, i.e. convert
\Q to Q and \E to E. If EXTENDED-M...
collect-char-classReads and consumes characters from regex string until a right
bracket is seen. Assembles them int...
convertConverts the parse tree PARSE-TREE into an equivalent REGEX object
and returns three values: the ...
convert-auxConverts the parse tree PARSE-TREE into a REGEX object and returns it.

Will also
- split and o...
convert-char-class-to-hashCombines all items in LIST into one char class hash and returns it.
Items can be single character...
copy-lexer
create-bmh-matcherReturns a Boyer-Moore-Horspool matcher which searches the (special)
simple-string *STRING* for th...
create-char-searcherReturns a function which searches the (special) simple-string
*STRING* for the first occurence of...
create-greedy-everything-matcherCreates a closure which just matches as far ahead as possible,
i.e. a closure for a dot in single...
create-ranges-from-hashTries to identify up to three intervals (with respect to CHAR<)
which together comprise HASH. Ret...
create-scanner-auxAuxiliary function to create and return a scanner (which is
actually a closure). Used by CREATE-S...
end-of-string-pTests whether we're at the end of the regex string.
failMoves (LEXER-POS LEXER) back to the last position stored in
(LEXER-LAST-POS LEXER) and pops the L...
get-numberRead and consume the number the lexer is currently looking at and
return it. Returns NIL if no nu...
get-quantifierReturns a list of two values (min max) if what the lexer is looking
at can be interpreted as a qu...
get-tokenReturns and consumes the next token from the regex string (or NIL).
greedy-quantParses and consumes a <greedy-quant>.
The productions are: <greedy-quant> -> <group> | <group><qu...
groupParses and consumes a <group>.
The productions are: <group> -> “(”<regex>“)”
...
hyperdoc-lookup
lexer-last-pos
lexer-len
lexer-p
lexer-pos
lexer-reg
lexer-str
looking-at-pTests whether the next character the lexer would see is CHR.
Does not respect extended mode.
make-char-from-codeCreate character from char-code NUMBER. NUMBER can be NIL
which is interpreted as 0. ERROR-POS is...
make-char-hashReturns a hash-table of all characters satisfying test.
make-lexer
make-lexer-internal
map-char-to-special-char-classMaps escaped characters like “\d” to the tokens which represent
their associated character classe...
maybe-accumulateAccumulate STR into the special variable STARTS-WITH if
ACCUMULATE-START-P (also special) is true...
maybe-parse-flagsReads a sequence of modifiers (including #\- to reverse their
meaning) and returns a correspondin...
maybe-split-repetitionSplits a REPETITION object into a constant and a varying part if
applicable, i.e. something like
...
merge-hashReturns the “sum” of two hashes. This is a destructive operation
on HASH1.
merge-inverted-hashReturns the “sum” of HASH1 and the “inverse” of HASH2. This is
a destructive operation on HASH1.
newline-skipperFind the next occurence of a character in *STRING* which is behind
a #Newline.
next-charReturns the next character which is to be examined and updates the
POS slot. Respects extended mo...
next-char-non-extendedReturns the next character which is to be examined and updates the
POS slot. Does not respect ext...
normalize-var-listUtility function for REGISTER-GROUPS-BIND and
DO-REGISTER-GROUPS. Creates the long form (a list o...
nsubseqReturn a subsequence by pointing to location in original sequence.
parse-stringTranslate the regex string STRING into a parse tree.
parse-tree-synonymReturns the parse tree the SYMBOL symbol is a synonym for. Returns
NIL is SYMBOL wasn't yet defin...
print-symbol-infoAuxiliary function used by REGEX-APROPOS. Tries to print some
meaningful information about a symb...
quantParses and consumes a <quant>.
The productions are: <quant> -> <greedy-quant> | <greedy-quant>“?”...
quote-meta-charsQuote, i.e. prefix with #\\, all non-word characters in STRING.
quote-sectionsReplace sections inside of STRING which are enclosed by \Q and
\E with the quoted equivalent of t...
reg-exprParses and consumes a <regex>, a complete regular expression.
The productions are: <regex> -> <se...
regex-aproposSimilar to the standard function APROPOS but returns a list of all
symbols which match the regula...
regex-apropos-listSimilar to the standard function APROPOS-LIST but returns a list of
all symbols which match the r...
regex-replaceTry to match TARGET-STRING between START and END against REGEX and
replace the first match with R...
regex-replace-allTry to match TARGET-STRING between START and END against REGEX and
replace all matches with REPLA...
replace-auxAuxiliary function used by REGEX-REPLACE and
REGEX-REPLACE-ALL. POS-LIST contains a list with the...
reverse-strings
scan-to-stringsLike SCAN but returns substrings of TARGET-STRING instead of
positions, i.e. this function return...
seqParses and consumes a <seq>.
The productions are: <seq> -> <quant> | <quant><seq>.
Will return <p...
set-flagReads a flag token and sets or unsets the corresponding entry in
the special FLAGS list.
splitMatches REGEX against TARGET-STRING as often as possible and
returns a list of the substrings bet...
start-of-subexpr-pTests whether the next token can start a valid sub-expression, i.e.
a stand-alone regex.
string-case-modifierChecks whether all words in STR between FROM and TO are upcased,
downcased or capitalized and ret...
string-list-to-simple-stringConcatenates a list of strings to one simple-string.
try-numberLike GET-NUMBER but won't consume anything if no number is seen.
unescape-charConvert the characters(s) following a backslash into a token
which is returned. This function is ...
unget-tokenMoves the lexer back to the last position stored in the LAST-POS stack.
whitespacepTests whether a character is whitespace,
i.e. whether it would match [\s] in Perl.
word-boundary-pCheck whether START-POS is a word-boundary within *STRING*.
word-char-pTests whether a character is a “word” character.
In the ASCII charset this is equivalent to a-z, ...

Generic-Function

build-replacement-templateConverts a replacement string for REGEX-REPLACE or
REGEX-REPLACE-ALL into a replacement template ...
case-modeUtility function used by the optimizer (see GATHER-STRINGS).
Returns a keyword denoting the case-...
compute-min-restReturns the minimal length of REGEX plus
CURRENT-MIN-REST. This is similar to REGEX-MIN-LENGTH ex...
compute-offsetsReturns the offset the following regex would have
relative to START-POS or NIL if we can't comput...
copy-regexImplements a deep copy of a REGEX object.
create-constant-repetition-constant-length-matcherCreates a closure which tries to match REPETITION. It is assumed
that REPETITION has a constant n...
create-constant-repetition-matcherCreates a closure which tries to match REPETITION. It is assumed
that REPETITION has a constant n...
create-greedy-constant-length-matcherCreates a closure which tries to match REPETITION. It is assumed
that REPETITION is greedy and th...
create-greedy-matcherCreates a closure which tries to match REPETITION. It is assumed
that REPETITION is greedy and th...
create-greedy-no-zero-matcherCreates a closure which tries to match REPETITION. It is assumed
that REPETITION is greedy and th...
create-matcher-auxCreates a closure which takes one parameter,
START-POS, and tests whether REGEX can match *STRING...
create-non-greedy-constant-length-matcherCreates a closure which tries to match REPETITION. It is assumed
that REPETITION is non-greedy an...
create-non-greedy-matcherCreates a closure which tries to match REPETITION. It is assumed
that REPETITION is non-greedy an...
create-non-greedy-no-zero-matcherCreates a closure which tries to match REPETITION. It is assumed
that REPETITION is non-greedy an...
create-scannerAccepts a regular expression - either as a
parse-tree or as a string - and returns a scan closure...
end-stringReturns the constant string (if it exists) REGEX ends with wrapped
into a STR object, otherwise N...
end-string-auxReturns the constant string (if it exists) REGEX
ends with wrapped into a STR object, otherwise N...
everythingpReturns an EVERYTHING object if REGEX is equivalent
to this object, otherwise NIL. So, “(.){1}” w...
flattenMerges adjacent sequences and alternations, i.e. it
transforms #<SEQ #<STR “a”> #<SEQ #<STR “b”> ...
gather-stringsCollects adjacent strings or characters into one
string provided they have the same case mode. Th...
len
regex-lengthReturn the length of REGEX if it is fixed, NIL otherwise.
regex-min-lengthReturns the minimal length of REGEX.
remove-registersReturns a deep copy of a REGEX (see COPY-REGEX) and
optionally removes embedded REGISTER objects ...
scanSearches TARGET-STRING from START to END and tries
to match REGEX. On success returns four value...
skip
start-anchored-pReturns T if REGEX starts with a “real” start
anchor, i.e. one that's not in multi-line mode, NIL...
start-of-end-string-p
str

Macro

bmh-matcher-auxAuxiliary macro used by CREATE-BMH-MATCHER.
case-insensitive-mode-pAccessor macro to extract the first flag out of a three-element flag list.
char-searcher-auxAuxiliary macro used by CREATE-CHAR-SEARCHER.
constant-repetition-constant-length-closureThis is the template for simple constant repetitions (where simple
means that the inner regex to ...
define-parse-tree-synonymDefines the symbol NAME to be a synonym for the parse tree
PARSE-TREE. Both arguments are quoted.
do-matchesIterates over TARGET-STRING and tries to match REGEX as often as
possible evaluating BODY with MA...
do-matches-as-stringsIterates over TARGET-STRING and tries to match REGEX as often as
possible evaluating BODY with MA...
do-register-groupsIterates over TARGET-STRING and tries to match REGEX as often as
possible evaluating BODY with th...
do-scansIterates over TARGET-STRING and tries to match REGEX as often as
possible evaluating BODY with MA...
greedy-constant-length-closureThis is the template for simple greedy repetitions (where simple
means that the minimum number of...
incf-afterUtility macro inspired by C's “place++”, i.e. first return the
value of PLACE and afterwards incr...
insert-advance-fnCreates the actual closure returned by CREATE-SCANNER-AUX by
replacing '(ADVANCE-FN-DEFINITION) w...
insert-char-class-testerUtility macro to replace each occurence of '(CHAR-CLASS-TEST)
within BODY with the correct test (...
maybe-coerce-to-simple-string
multi-line-mode-pAccessor macro to extract the second flag out of a three-element flag list.
non-greedy-constant-length-closureThis is the template for simple non-greedy repetitions (where
simple means that the minimum numbe...
regex-apropos-auxAuxiliary macro used by REGEX-APROPOS and REGEX-APROPOS-LIST. Loops
through PACKAGES and executes...
register-groups-bindExecutes BODY with the variables in VAR-LIST bound to the
corresponding register groups after TAR...
signal-ppcre-invocation-error
signal-ppcre-syntax-error
signal-ppcre-syntax-error*
single-line-mode-pAccessor macro to extract the third flag out of a three-element flag list.
with-rebindingWITH-REBINDING ( { var | (var prefix) }* ) form*

Evaluates a series of forms in the lexical envi...
with-unique-namesSyntax: WITH-UNIQUE-NAMES ( { var | (var x) }* ) declaration* form*

Executes a series of forms w...