Mercurial > emacs
diff lisp/emacs-lisp/rx.el @ 49598:0d8b17d428b5
Trailing whitepace deleted.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Tue, 04 Feb 2003 13:24:35 +0000 |
parents | 05f00479612c |
children | 695cf19ef79e d7ddb3e565de |
line wrap: on
line diff
--- a/lisp/emacs-lisp/rx.el Tue Feb 04 12:29:42 2003 +0000 +++ b/lisp/emacs-lisp/rx.el Tue Feb 04 13:24:35 2003 +0000 @@ -78,8 +78,8 @@ ;; (and line-start ?\n))) ;; ;; "\\$[I]d: [^ ]+ \\([^ ]+\\) " -;; (rx (and "$Id: " -;; (1+ (not (in " "))) +;; (rx (and "$Id: " +;; (1+ (not (in " "))) ;; " " ;; (submatch (1+ (not (in " ")))) ;; " ")) @@ -90,7 +90,7 @@ ;; etc. ;;; History: -;; +;; ;;; Code: @@ -244,7 +244,7 @@ (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." @@ -396,7 +396,7 @@ (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' @@ -463,7 +463,7 @@ (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 ...)'." @@ -511,7 +511,7 @@ info) ((null info) (error "Unknown Rx form `%s'" form)) - (t + (t (funcall (nth 0 info) form))))) ((consp form) (let ((info (rx-info (car form)))) @@ -549,7 +549,7 @@ 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))' @@ -751,7 +751,7 @@ `(one-or-more SEXP)' matches one or more occurrences of A. - + `(1+ SEXP)' like `one-or-more'. @@ -763,7 +763,7 @@ `(zero-or-one SEXP)' matches zero or one occurrences of A. - + `(optional SEXP)' like `zero-or-one'.