MMCT TEAM
Server IP : 111.118.215.189  /  Your IP : 3.147.48.161
Web Server : Apache
System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : a1673wkz ( 2475)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /usr/share/emacs/24.3/lisp/emacs-lisp/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //usr/share/emacs/24.3/lisp/emacs-lisp/pcase.elc
;ELC
;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:09:04 2024
;;; from file /builddir/build/BUILD/emacs-24.3/lisp/emacs-lisp/pcase.el
;;; in Emacs version 24.3.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.

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


(require 'macroexp)
(defconst pcase--memoize (make-hash-table :weakness 'key :test 'eq))
(defconst pcase--dontcare-upats '(t _ pcase--dontcare))
(byte-code "\300\301\302\303#\210\300\304\302\305#\207" [put pcase-UPAT edebug-form-spec (&or symbolp ("or" &rest pcase-UPAT) ("and" &rest pcase-UPAT) ("`" pcase-QPAT) ("guard" form) ("let" pcase-UPAT form) ("pred" &or lambda-expr (functionp &rest form) sexp) sexp) pcase-QPAT (&or ("," pcase-UPAT) (pcase-QPAT . pcase-QPAT) sexp)] 4)
#@1645 Perform ML-style pattern matching on EXP.
CASES is a list of elements of the form (UPATTERN CODE...).

UPatterns can take the following forms:
  _		matches anything.
  SELFQUOTING	matches itself.  This includes keywords, numbers, and strings.
  SYMBOL	matches anything and binds it to SYMBOL.
  (or UPAT...)	matches if any of the patterns matches.
  (and UPAT...)	matches if all the patterns match.
  `QPAT		matches if the QPattern QPAT matches.
  (pred PRED)	matches if PRED applied to the object returns non-nil.
  (guard BOOLEXP)	matches if BOOLEXP evaluates to non-nil.
  (let UPAT EXP)	matches if EXP matches UPAT.
If a SYMBOL is used twice in the same pattern (i.e. the pattern is
"non-linear"), then the second occurrence is turned into an `eq'uality test.

QPatterns can take the following forms:
  (QPAT1 . QPAT2)	matches if QPAT1 matches the car and QPAT2 the cdr.
  ,UPAT			matches if the UPattern UPAT matches.
  STRING		matches if the object is `equal' to STRING.
  ATOM			matches if the object is `eq' to ATOM.
QPatterns for vectors are not implemented yet.

PRED can take the form
  FUNCTION	     in which case it gets called with one argument.
  (FUN ARG1 .. ARGN) in which case it gets called with an N+1'th argument
                        which is the value being matched.
A PRED of the form FUNCTION is equivalent to one of the form (FUNCTION).
PRED patterns can refer to variables bound earlier in the pattern.
E.g. you can match pairs where the cdr is larger than the car with a pattern
like `(,a . ,(pred (< a))) or, with more checks:
`(,(and a (pred numberp)) . ,(and (pred numberp) (pred (< a))))

(fn EXP &rest CASES)
(defalias 'pcase '(macro . #[385 "\302@\"@\232\203 \211A@)\232\203 \211\211AA)\202:\211\203(\303\304!\210\305\"\306@BB#\210\211\262\207" [pcase--memoize x gethash message "pcase-memoize: equal first branch, yet different" pcase--expand puthash] 10 (#$ . 1041)]))
(byte-code "\300\301\302\303#\210\300\301\304\305#\207" [put pcase lisp-indent-function 1 edebug-form-spec (form &rest (pcase-UPAT body))] 4)
(defalias 'pcase--let* #[514 "\204\301!\207\302\211@@)!\203\303@C\304A\"\"\207\211A\262@\305\211A@)@\304\"D\306B\"\207" [x macroexp-progn pcase--trivial-upat-p macroexp-let* pcase--let* pcase--expand ((pcase--dontcare nil))] 10 "\n\n(fn BINDINGS BODY)"])
#@188 Like `let*' but where you can use `pcase' patterns for bindings.
BODY should be an expression, and BINDINGS should be a list of bindings
of the form (UPAT EXP).

(fn BINDINGS &rest BODY)
(defalias 'pcase-let* '(macro . #[385 "\301\"\211@\232\203\211A\202\302\"\303B#\210\211\262\207" [pcase--memoize gethash pcase--let* puthash] 8 (#$ . 3392)]))
(byte-code "\300\301\302\303#\210\300\301\304\305#\207" [put pcase-let* lisp-indent-function 1 edebug-form-spec ((&rest (pcase-UPAT &optional form)) body)] 4)
#@195 Like `let' but where you can use `pcase' patterns for bindings.
BODY should be a list of expressions, and BINDINGS should be a list of bindings
of the form (UPAT EXP).

(fn BINDINGS &rest BODY)
(defalias 'pcase-let '(macro . #[385 "A\204\301BB\207\302\302\262\211\203Z\211@\211@>\203*\303\304!ABB\262\202S\305@!\2039\211B\262\202S\303\306\307G\"!\211ABB\262@DB\262\210A\266\202\202\210\310\237\301BBE\207" [pcase--dontcare-upats pcase-let* nil make-symbol "_" pcase--trivial-upat-p format "x%d" let] 9 (#$ . 3918)]))
(byte-code "\300\301\302\303#\210\300\301\304\305#\207" [put pcase-let lisp-indent-function 1 edebug-form-spec pcase-let*] 4)
(defalias 'pcase-dolist '(macro . #[385 "\300@!\203
\301BB\207\302\303!\301AB\304@DCBBE\207" [pcase--trivial-upat-p dolist make-symbol "x" pcase-let*] 8 "\n\n(fn SPEC &rest BODY)"]))
(byte-code "\300\301\302\303#\210\300\301\304\305#\207" [put pcase-dolist lisp-indent-function 1 edebug-form-spec ((pcase-UPAT form) body)] 4)
(defalias 'pcase--trivial-upat-p #[257 "\2119\205	\211>?\207" [pcase--dontcare-upats] 3 "\n\n(fn UPAT)"])
(defalias 'pcase--expand #[514 "\300!\203\211\202\301\302!\303C\303C\304\305\306\307\310\"\311\"\312\313%\303C\314\315\304\316\317\307\310		#\320\"\321\322%	\"!\211\203]\211@\211@>\204V\211@\323=\204V\324\325@\"\210A\266\202\202<\210\326@\"\266\205=\203o\211\202v\326DC\"\207" [macroexp-copyable-p make-symbol "val" nil make-byte-code 514 "\211C\301@\236\211\204 \303@\"\301@E\301@B\240\210\211\262\202\205\211@A\211@A\211@\2119\204c\304\305\306\300@G\"!\300\307\310\311\"	BBD\300@B\240\210\312\240\210\310\313\"B\241\210\211AA)\240\210\262\314@!\240\210\310\315\316\317\320\321\f!\322\"\323\324%\"\312BB\262\266\205\262\207" vconcat vector [x pcase-codegen make-symbol format "pcase-%d" lambda mapcar car funcall cdr copy-sequence make-byte-code 257 "\211@\300@\236\300\301\300@\"\240\210\211A\207" vconcat vector [delq] 6 "\n\n(fn PA)"] 17 "\n\n(fn CODE VARS)" pcase--u mapcar 257 "\303\300@BB\304\305\306\307\310\301\302#\311\"\312\313%D\207" [match make-byte-code 257 "\302\301@>\204\301\302\301@B\240\210\303\302A!\203\304\202\300\302A\"\207" vconcat vector [pcase--small-branch-p pcase-codegen] 4 "\n\n(fn VARS)"] 10 "\n\n(fn CASE)" pcase--dontcare message "Redundant pcase pattern: %S" macroexp-let*] 18 "\n\n(fn EXP CASES)"])
(defalias 'pcase-codegen #[514 "\300\301\302\"BB\207" [let mapcar #[257 "\211@AD\207" [] 3 "\n\n(fn B)"]] 6 "\n\n(fn CODE VARS)"])
(defalias 'pcase--small-branch-p #[257 "\211G\300U\205*\211@:?\206*\301@\211\203&\211@\211:\203\302\262A\266\202\202\210\211\262\207" [1 t nil] 5 "\n\n(fn CODE)"])
(defalias 'pcase--if #[771 "\211\300=\203\207\300=\203\301 \210\207\302#\207" [:pcase--dontcare debug macroexp-if] 7 "\n\n(fn TEST THEN ELSE)"])
(defalias 'pcase--upat #[257 "\211\242\301=\203\211\211A@)\207\302D\207" [x \, \`] 3 "\n\n(fn QPATTERN)"])
#@320 Expand matcher for rules BRANCHES.
Each BRANCH has the form (MATCH CODE . VARS) where
CODE is the code generator for that branch.
VARS is the set of vars already bound by earlier matches.
MATCH is the pattern that needs to be matched, of the form:
  (match VAR . UPAT)
  (and MATCH ...)
  (or MATCH ...)

(fn BRANCHES)
(defalias 'pcase--u #[257 "\300\301\"\211\262\205\211@\211@A\211@A\302C	A$\266\205\207" [delq nil pcase--u1] 11 (#$ . 6934)])
(defalias 'pcase--and #[514 "\211\203\n\300BB\207\207" [and] 5 "\n\n(fn MATCH MATCHES)"])
(defconst pcase-mutually-exclusive-predicates '((symbolp . integerp) (symbolp . numberp) (symbolp . consp) (symbolp . arrayp) (symbolp . stringp) (symbolp . byte-code-function-p) (integerp . consp) (integerp . arrayp) (integerp . stringp) (integerp . byte-code-function-p) (numberp . consp) (numberp . arrayp) (numberp . stringp) (numberp . byte-code-function-p) (consp . arrayp) (consp . stringp) (consp . byte-code-function-p) (arrayp . stringp) (arrayp . byte-code-function-p) (stringp . byte-code-function-p)))
(defalias 'pcase--split-match #[771 "\211@\301=\203W\211A@)=\204\211B\207\211\211AA)\211\242\302>\203?\303@\304\305\306\307\310\311
!\312\"\313\314%A\"B#\202V\211AA)!\211@\206MA\206SB\262\207\211@\315>\203\360\316\211@\317=\203k\320\202l\321@\317=\203w\321\202x\320A\211\203\253\211@\303		#\211@=\204\225\211@B\262\211A=\204\243\211AB\262\210A\266\202\202z\210\211>\203\266\211\202\315\204\276\202\315A\204\310@\202\315@\237B>\203\327\202\356\204\337\202\356A\204\351@\202\356@\237BB\207\322\323\"\207" [x match (or and) pcase--split-match mapcar make-byte-code 257 "\301\300BB\207" vconcat vector [match] 4 "\n\n(fn ALT)" (or and) nil or :pcase--fail :pcase--succeed error "Uknown MATCH %s"] 16 "\n\n(fn SYM SPLITTER MATCH)"])
(defalias 'pcase--split-rest #[771 "\300\211\211\203=\211@\211@A\301		#\211@\302=\204$\211@BB\262\211A\302=\2044\211ABB\262\266A\266\202\202\210\237\237B\207" [nil pcase--split-match :pcase--fail] 13 "\n\n(fn SYM SPLITTER REST)"])
(defalias 'pcase--split-consp #[771 "\211\242\302=\203,\211\211A@):\203,\211\211A@)\303\304\305@!BB\304\305A!BBE\306B\207\211\242\302=\2037\306\307B\207\211\242\310=\205[\311\211A@)B	\235\204X\211\211A@)\311B	\235\205[\306\307B\207" [x pcase-mutually-exclusive-predicates \` and match pcase--upat :pcase--fail nil pred consp] 11 "\n\n(fn SYMA SYMD PAT)"])
(defalias 'pcase--split-equal #[514 "\211\242\301=\203\211\211A@)\232\203\302\303B\207\211\242\301=\203!\303\304B\207\211\242\305=\205K\211\211A@)9\205K\211\211A@)\306N\205K\211\211A@)!\205K\302\304B\207" [x \` :pcase--succeed :pcase--fail nil pred side-effect-free] 4 "\n\n(fn ELEM PAT)"])
(defalias 'pcase--split-member #[514 "\211\242\301=\203\211\211A@)\235\203\302\207\211\242\301=\203\303\302B\207\211\242\304=\205b\211\211A@)9\205b\211\211A@)\305N\205b\211\211A@)\306\211\203Y\211@!\204R\302\262A\266\202\202C\210\262\205b\307\302B\207" [x \` nil :pcase--fail pred side-effect-free t :pcase--succeed] 8 "\n\n(fn ELEMS PAT)"])
(defalias 'pcase--split-pred #[514 "\302C\232\203\303\304B\202\265@\305=\203F\242\305=\203F\211A@)\211A@)B	\235\204@\211A@)\211A@)B	\235\203F\304\302B\202\265@\305=\205\265\242\306=\205\265\211A@)9\205\265\211A@)9\204|\211A@);\204|\211A@)\247\205\265\211A@)\307N\205\265\310\311\312\313\314\315\316			#\317\"\320\321%D\322\311\323\310EDC\217\205\265\211@@\203\262\302\304B\202\265\304\302B\207" [x pcase-mutually-exclusive-predicates nil :pcase--succeed :pcase--fail pred \` side-effect-free #1=#:err funcall make-byte-code 0 "\302\300\211A@)\301\211A@)!C\240\207" vconcat vector [x] 4 "\n\n(fn)" error #[257 "\300\207" [nil] 2 "\n\n(fn IGNORED)"]] 14 "\n\n(fn UPAT PAT)"])
#@65 Check which of the symbols VARS appear in SEXP.

(fn VARS SEXP)
(defalias 'pcase--fgrep #[514 "\300:\203+\301\211A\262@\"\211\203'\211@\211>\204 \211B\262A\266\202\202\210\202>\203<>\204<B\262\211\207" [nil pcase--fgrep] 7 (#$ . 10828)])
(defalias 'pcase--self-quoting-p #[257 "\300!\206
\211\247\206
\211;\207" [keywordp] 3 "\n\n(fn UPAT)"])
(defalias 'pcase--mark-used #[257 "\2119\205\n\300\301\302#\207" [put pcase-used t] 5 "\n\n(fn SYM)"])
(put 'pcase--mark-used 'byte-optimizer 'byte-compile-inline-expand)
#@192 Return code that runs CODE (with VARS) if MATCHES match.
Otherwise, it defers to REST which is a list of branches of the form
(ELSE-MATCH ELSE-CODE . ELSE-VARS).

(fn MATCHES CODE VARS REST)
(defalias 'pcase--u1 #[1028 "C\211@\204
!\202\353\211@@\301=\203\302!\202\353\211@@\303=\203.\304@A$\202\353\211@\211@@)\305=\203N\304\306@\211@A)@A\"$\202\353\211@\211@@)\307=\203o\211@\211@A)\211\211@@)\310=\205s\211@\211A@)\311\211\203\331\211\203\330\211@\211@\310=\203\314\211A@)=\203\314\211\211AA)\211\242\312=\205\272\211\211A@)\250\206\272\211\211A@)9\206\272\211\211A@);\262\203\314\211\211AA)B\262\202\321\211B\262A\266\202\202z\210\204\350\313\314!\210\302!\202jG\315V\203,\304\310\307\237BBB@AB		\204\n	\202(\316A\203\307\237B\202@\n@A\"\f\fBB\nB$\202j\304\211A\262@@AB		\204J\313\314!\210	\202i\316A\203X\307	B\202[@\n@A\"\f\fBB\nB$\266\204\202\353\211@\211@@)\310=\203\343\211@\211@A\240\210@\211@A\211@CA\211\317>\203\241\304@\n\n\n$\202\336\211\320=\203\253\321\202\336\211\242\322>\203{\211@\323=\203\307@\2119\205\305\324\325\326#\266\327@\330\331\332\333\334!\335\"\336\337%	#\211@A\340@\323=\203\375\211A@)9\203\375\211A@)@D\202g\211A@)\341\342\343\"\"\342\330\331\344\333\334!\345\"\336\346%\"@\347=\203'\202Y@>\203A\350\351!\211\n@DB\262	\240\266\352!\203R\353\354D\n@E\202Y\306\n@C\"\204a\211\202e\355E\266\204\304@$\302!#\266\203\202\336\356!\203\241@\2119\205\215\324\325\326#\266\357@@\f\f\f&\202\336\2119\203\351@\2119\205\262\324\325\326#\266\211\236\204\316\304@\n@BB\n$\202\336\304\310@\323\360
\236ADF@B\n\n\n$\202\336\211\242\361=\203^\3628\211	\236\211\203\211A\202&\341\342\343\f\"\"\342\330\331\344\333\334!\345\"\336\363%\"\211\203#\364\"\202$\266\202\266\202\365!\2032\211\2025\350\366!\304\310A@BB	@B\f\f\f$=\203R\211\202Y\364DC\"\266\203\202\336\211\242\312=\203\212@\2119\205q\324\325\326#\266\357@\211A@)@\f\f\f&\202\336\211\242\307=\203o\211AG\315V\326\203\340A\211\203\337\211@\356!\204\330\211\242\312=\203\325\211\211A@)9\204\330\211\211A@)\250\204\330\311\211\262\204\330\211\211A@);\204\330\311\262A\266\202\202\235\210\2035\342\367A\"\327@\330\331\332\333\334!\370\"\336\337%\f#\211@A@\2119\205
\324\325\326#\266\340\203\371\202\372	@\373DE\304@$\302!#\266\204\202j\304\310@\211A@)BB	@B\f\f\306\342\330\331\374\333\334$\375\"\376\377%	\211AA)\"\"$\266\202\202\336\211\242\305=\203\233\304\306\342\330\331\201@\333\334	!\201A\"\336\377%A\"@\"\n\n\n$\202\336\211\242\201B=\203\330\304\310@\211A@)BBC\330\331\201C\333\334
!\201D\"\201E\201F%\n\305\n@B

BBC$\202\336\313\201G\"\266\205\202\353\313\201H@@\"\207" [x :pcase--fail pcase--u :pcase--succeed pcase--u1 and append or match nil \` error "Please avoid it" 1 pcase--and (t _) pcase--dontcare :pcase--dontcare (guard pred) pred put pcase-used t pcase--split-rest make-byte-code 257 "\301\300\"\207" vconcat vector [pcase--split-pred] 4 "\n\n(fn PAT)" pcase--if pcase--fgrep mapcar car "\211\300\236AD\207" [] "\n\n(fn VAR)" guard make-symbol "x" functionp funcall function let* pcase--self-quoting-p pcase--q1 eq let 2 "\n\n(fn V)" macroexp-let* macroexp-copyable-p "sym" #[257 "\211:\203\f\211\211A@)\207\207" [x] 2 "\n\n(fn X)"] [pcase--split-member] memq member quote "\304\305\303@BB\300@BB\301\302BB\207" [and match] 5 "\n\n(fn UPAT)" "\301\300@BB\207" [match] not "\301\300!\207" [pcase--u] 3 "\n\n(fn VARS)" "Unknown upattern `%s'" "Incorrect MATCH %s"] 28 (#$ . 11378)])
#@216 Return code that runs CODE if SYM matches QPAT and if MATCHES match.
Otherwise, it defers to REST which is a list of branches of the form
(OTHER_MATCH OTHER-CODE . OTHER-VARS).

(fn SYM QPAT MATCHES CODE VARS REST)
(defalias 'pcase--q1 #[1542 "\242\300=\203\301\302!\207\303!\203\301\304!\207\305!\203\301\306!\207:\203\216\307\310!\307\311!\312\313\314\315\316\317\"\320\"\321\322%#\211@A\323\324\325
@!BB\324\325A!BBBB		$\326\327
D\330\331	\332N\205w	\333DDC	\332N\205\206	\334DDC\"\"\335!#\207\250\204\2359\204\235;\203\346\312\313\314\336\316\317!\337\"\340\322%#\211@A\326;\203\303\341\n\nE\202\327\204\317\342\nD\202\327\343\n\344DE\323			$\335!#\207\301\345\"\207" [\, error "Can't use `,UPATTERN" floatp "Floating point patterns not supported" vectorp "Vector QPatterns not implemented yet" make-symbol "xcar" "xcdr" pcase--split-rest make-byte-code 257 "\302\300\301#\207" vconcat vector [pcase--split-consp] 5 "\n\n(fn PAT)" pcase--u1 match pcase--upat pcase--if consp macroexp-let* append pcase-used car cdr pcase--u "\301\300\"\207" [pcase--split-equal] 4 equal null eq quote "Unknown QPattern %s"] 20 (#$ . 15140)])
(provide 'pcase)

MMCT - 2023