HOME


sh-3ll 1.0
DIR:/proc/self/root/usr/share/emacs/26.1/lisp/emacs-lisp/
Upload File :
Current File : //proc/self/root/usr/share/emacs/26.1/lisp/emacs-lisp/regexp-opt.elc
;ELC
;;; Compiled
;;; in Emacs version 26.1
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.

;;; This file does not contain utf-8 non-ASCII characters,
;;; and so can be loaded in Emacs versions earlier than 23.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


#@1427 Return a regexp to match a string in the list STRINGS.
Each string should be unique in STRINGS and should not contain
any regexps, quoted or not.  Optional PAREN specifies how the
returned regexp is surrounded by grouping constructs.

The optional argument PAREN can be any of the following:

a string
    the resulting regexp is preceded by PAREN and followed by
    \), e.g.  use "\\(?1:" to produce an explicitly numbered
    group.

`words'
    the resulting regexp is surrounded by \=\<\( and \)\>.

`symbols'
    the resulting regexp is surrounded by \_<\( and \)\_>.

non-nil
    the resulting regexp is surrounded by \( and \).

nil
    the resulting regexp is surrounded by \(?: and \), if it is
    necessary to ensure that a postfix operator appended to it will
    apply to the whole expression.

The resulting regexp is equivalent to but usually more efficient
than that of a simplified version:

 (defun simplified-regexp-opt (strings &optional paren)
   (let ((parens
          (cond ((stringp paren)       (cons paren "\\)"))
                ((eq paren 'words)    '("\\\=<\\(" . "\\)\\>"))
                ((eq paren 'symbols) '("\\_<\\(" . "\\)\\_>"))
                ((null paren)          '("\\(?:" . "\\)"))
                (t                       '("\\(" . "\\)")))))
     (concat (car paren)
             (mapconcat 'regexp-quote strings "\\|")
             (cdr paren))))

(fn STRINGS &optional PAREN)
(defalias 'regexp-opt #[513 "\304 \305\306\307\310\311!\312\"\313$\216\314\211\315\211;\203\202$\205$\316\317\320\321!\322\"!\323\2064\324?#\325\267\202K\326\327Q\202L\330\331Q\202L\211,\266\203)\207" [max-lisp-eval-depth max-specpdl-size completion-ignore-case completion-regexp-list match-data make-byte-code 0 "\301\300\302\"\207" vconcat vector [set-match-data evaporate] 3 10000 nil "\\(" delete-dups sort copy-sequence string-lessp regexp-opt-group t #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (words 61 symbols 68)) "\\<" "\\>" "\\_<" "\\_>"] 10 (#$ . 410)])
#@141 Return the depth of REGEXP.
This means the number of non-shy regexp grouping constructs
(parenthesized expressions) in REGEXP.

(fn REGEXP)
(defalias 'regexp-opt-depth #[257 "\300 \301\302\303\304\305!\306\"\307$\216\310\311\"\210\302\312\211\310\313#\203;\302\225\262\314\224\204\315\302\224#\203\262T\262\202\266\203)\207" [match-data make-byte-code 0 "\301\300\302\"\207" vconcat vector [set-match-data evaporate] 3 string-match "" nil "\\\\(\\(\\?[0-9]*:\\)?" 1 subregexp-context-p] 9 (#$ . 2475)])
#@299 Return a regexp to match a string in the sorted list STRINGS.
If PAREN non-nil, output regexp parentheses around returned regexp.
If LAX non-nil, don't output parentheses if it doesn't require them.
Merges keywords to avoid backtracking in Emacs's regexp matcher.

(fn STRINGS &optional PAREN LAX)
(defalias 'regexp-opt-group #[769 ";\203	\202\203\300\202\301\203\302\202\301\203#\301\202$\203,\301\202-G\303U\2039\301\202sG\304U\203`@G\304U\203U\305@!Q\202s\305@!Q\202s@G\303U\203w\306A\307\211#\310R\202s@G\304U\203\344A\211\203\227\211@G\304U\204\227\211A\266\202\202\203\211\262\203\344\311\211\211\203\304\211@\211G\304U\203\270\312!B\262\202\275\211B\262A\266\202\202\241\210\211\203\331\306\237!\313\314!\260\202\337\314!Q\266\202\202s\315\301\"\211G\303V\203\211G\316\317\320\321\322\323!\324\"\325\326%\n\"\305!\306\307\211#R\266\202\202q\316\327	\"\315\301\"\211G\303V\203O\211G[\330\316\317\320\331\322\323!\332\"\325\326%
\"\333\"\306\307\211#\305\237!\nR\266\202\202o\334\n@\303\304#\335\f\"\211G\f\233	\306!\313\306!\f\260\266\203\266\202\262\207" ["\\(?:" "" "\\)" 0 1 regexp-quote regexp-opt-group t "?" nil string-to-char "\\|" regexp-opt-charset try-completion mapcar make-byte-code 257 "\211\300\301O\207" vconcat vector [nil] 4 "\n\n(fn S)" reverse sort "\211\301\300O\207" [0] string-lessp substring-no-properties all-completions] 19 (#$ . 3005)])
#@98 Return a regexp to match a character in CHARS.
CHARS should be a list of characters.

(fn CHARS)
(defalias 'regexp-opt-charset #[257 "\300\301!\302C\303C\304C\304\211\211\211\2039\211@\211\305\267\202,\306\262\2022\307\262\2022\310\262\2022\311I\210A\266\202\202\210\312\313\314\315\316\317#\320\"\321\322%\"\210\242\242Y\203\224\242\242\323\\V\203v\324\325\242	\242	\242$\240\210\202\224\242\242Y\203\224\324\326\242	\242#\240\210\211\242T\240\210\202v\242\304\230\203\263\304\230\203\263\304\230\203\253\327\202\274\330\306R\202\274\330\242\306\260\207" [make-char-table regexp-opt-charset -1 -2 "" #s(hash-table size 3 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (93 26 94 32 45 38)) "]" "^" "-" t map-char-table make-byte-code 514 "\211\205\234:\203U@S\301\242U\203\301A\240\207\301\242\300\242\303\\V\2030\302\304\305\302\242\300\242\301\242$\240\210\202K\301\242\300\242Y\203K\302\304\306\302\242\300\242#\240\210\300\211\242T\240\210\2020\300@\240\210\301A\240\207S\301\242U\203a\301\240\207\301\242\300\242\303\\V\203z\302\304\305\302\242\300\242\301\242$\240\210\202\225\301\242\300\242Y\203\225\302\304\306\302\242\300\242#\240\210\300\211\242T\240\210\202z\300\240\210\301\240\207" vconcat vector [2 format "%s%c-%c" "%s%c"] 8 "\n\n(fn C V)" 2 format "%s%c-%c" "%s%c" "\\^" "["] 17 (#$ . 4502)])
(provide 'regexp-opt)