;ELC   
;;; Compiled by pot@pot.cnuce.cnr.it on Tue Mar 18 15:39:21 2003
;;; from file /home/pot/gnu/emacs-pretest.new/lisp/emacs-lisp/regexp-opt.el
;;; in Emacs version 21.3
;;; with bytecomp version 2.85.4.1
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.
(if (and (boundp 'emacs-version)
	 (< (aref emacs-version (1- (length emacs-version))) ?A)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`regexp-opt.el' was compiled for Emacs 19.29 or later"))

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


#@551 Return a regexp to match a string in STRINGS.
Each string should be unique in STRINGS and should not contain any regexps,
quoted or not.  If optional PAREN is non-nil, ensure that the returned regexp
is enclosed by at least one regexp grouping construct.
The returned regexp is typically more efficient than the equivalent regexp:

 (let ((open (if PAREN "\\(" "")) (close (if PAREN "\\)" "")))
   (concat open (mapconcat 'regexp-quote STRINGS "\\|") close))

If PAREN is `words', then the resulting regexp is additionally surrounded
by \=\< and \>.
(defalias 'regexp-opt #[(strings &optional paren) "\306 \307\216\310\311\\\312\304=;\203 \202 \205 \313\314\315!\316\"\317\"\f\203: \320\321Q\202< .\207" [save-match-data-internal max-lisp-eval-depth completion-ignore-case paren words open match-data ((set-match-data save-match-data-internal)) 1048576 0 nil "\\(" sort copy-sequence string-lessp regexp-opt-group "\\<" "\\>" strings sorted-strings re] 3 (#$ . 634)])
#@120 Return the depth of REGEXP.
This means the number of regexp grouping constructs (parenthesised expressions)
in REGEXP.
(defalias 'regexp-opt-depth #[(regexp) "\304 \305\216\306	\307\"\210\310\311\306\312	\n#\203! T\310\225\313Z\202 ,\207" [save-match-data-internal regexp start count match-data ((set-match-data save-match-data-internal)) string-match "" 0 nil "\\(\\`\\|[^\\]\\)\\\\\\(\\\\\\\\\\)*([^?]" 2] 4 (#$ . 1635)])
#@674 Return a regexp to match a string in 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' regexp matcher.

The basic idea is to find the shortest common prefix or suffix, remove it
and recurse.  If there is no prefix, we divide the list into two so that
(at least) one half will have at least a one-character common prefix.

Also we delay the addition of grouping parenthesis as long as possible
until we're sure we need them, and try to remove one-character sequences
so we can use character sets rather than grouping parenthesis.
(defalias 'regexp-opt-group #[(strings &optional paren lax) ";\203	 \202 \203 \306\202 \307\203 \310\202 \307\203% \307\202& 	\203/ \307\2020 \nG\311U\203= \307\202\240G\312U\203d @G\312U\203Y \f\313@!Q\202\240	\313@!\nQ\202\240@G\311U\203{ \f\314A\315\211#\316R\202\240@G\312U\203A\203\242 @G\312U\204\242 \211A@\210\202\211 )\203\317\211 !\317\"\211#\203\341 #@\211\"G\312U\203\321 \320\"!!B!\202\330 \" B #A\211#\204\271 * \203\370 	\314 \237!\321\322!!\n\260\202\377 \f\322!!Q*\202\240\323\307\324\325\"\"\211$G\311V\2031$G%\324\326\"&	\313$!\314&\315\211#\nR*\202\237\324\327\"'\323\307\324\325'\"\"\211(G\311V\203u(G[%\330\324\331\"\332\")	\314)\315\211#\313(*\333*\325\")\237\260!\nR*\202\236\334\320@!!+\335+\324\325\"\"\211,G\233-	\314,!\321\314-!\n\260+*),\207" [paren open-group close-group lax open-charset close-charset "\\(?:" "" "\\)" 0 1 regexp-quote regexp-opt-group t "?" nil string-to-char "\\|" regexp-opt-charset try-completion mapcar list #[(s) "	\302O\207" [s n nil] 3] #[(s) "\302	\303\")\237\260\207" [s string string-to-sequence list] 3] sort #[(s) "\302	O\207" [s n 0] 3] string-lessp string-to-sequence char-to-string all-completions strings strs rest letters s #1=#:--dolist-temp--97269 prefix n suffixes sgnirts xiffus prefixes string char half1 half2] 7 (#$ . 2074)])
(defalias 'regexp-opt-charset #[(chars) "\306\307!\310\311\312\312\312\312\313\211\203T @\211\314=\203, \315\202K \316=\2039 \317\202K \320=\203E \321\202K \322I\210A\211\204 *\323\324\"\210\n	Y\203\204 \n	\325\\V\203r \326\327	\n$\202\204 \n	Y\203\204 \326\330	#	T\202r \312\230\203\231 \f\312\230\203\231 \331\315R\202\242 \331\f\315\260.\207" [charmap start end charset bracket dash make-char-table case-table -1 -2 "" nil 93 "]" 94 "^" 45 "-" t map-char-table #[(c v) "\2058 	S\nU\203 	\211\207\n\305\\V\203! \306\307\f\n$\2023 \nY\2033 \306\310\f#T\202! 		\211\207" [v c end start charset 2 format "%s%c-%c" "%s%c"] 5] 2 format "%s%c-%c" "%s%c" "[" caret chars char #1=#:--dolist-temp--97270] 6])
(provide 'regexp-opt)
