;; (and line-start ?\n)))
;;
;; "\\$[I]d: [^ ]+ \\([^ ]+\\) "
-;; (rx (and "$Id: "
-;; (1+ (not (in " ")))
+;; (rx (and "$Id: "
+;; (1+ (not (in " ")))
;; " "
;; (submatch (1+ (not (in " "))))
;; " "))
;; etc.
;;; History:
-;;
+;;
;;; Code:
(while (and (not (null op)) (symbolp op))
(setq op (cdr (assq op rx-constituents))))
op)
-
+
(defun rx-check (form)
"Check FORM according to its car's parsing info."
(defun rx-kleene (form)
"Parse and produce code from FORM.
FORM is `(OP FORM1)', where OP is one of the `zero-or-one',
-`zero-or-more' etc. operators.
+`zero-or-more' etc. operators.
If OP is one of `*', `+', `?', produce a greedy regexp.
If OP is one of `*?', `+?', `??', produce a non-greedy regexp.
If OP is anything else, produce a greedy regexp if `rx-greedy-flag'
(cdr (assq form rx-categories)))
(error "Unknown category `%s'" form))
t)
-
+
(defun rx-category (form)
"Parse and produce code from FORM, which is `(category SYMBOL ...)'."
info)
((null info)
(error "Unknown Rx form `%s'" form))
- (t
+ (t
(funcall (nth 0 info) form)))))
((consp form)
(let ((info (rx-info (car form))))
matches any character in SET. SET may be a character or string.
Ranges of characters can be specified as `A-Z' in strings.
-'(in SET)'
+'(in SET)'
like `any'.
`(not (any SET))'
`(one-or-more SEXP)'
matches one or more occurrences of A.
-
+
`(1+ SEXP)'
like `one-or-more'.
`(zero-or-one SEXP)'
matches zero or one occurrences of A.
-
+
`(optional SEXP)'
like `zero-or-one'.