[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/tNFA c5004e1 08/23: Updated docstrings for regexp-relat
From: |
Stefan Monnier |
Subject: |
[elpa] externals/tNFA c5004e1 08/23: Updated docstrings for regexp-related functions and others. |
Date: |
Mon, 14 Dec 2020 12:08:29 -0500 (EST) |
branch: externals/tNFA
commit c5004e129d7ca72cb2ba3f069b9c80aa6eb7708d
Author: Toby Cubitt <toby-predictive@dr-qubit.org>
Commit: tsc25 <toby-predictive@dr-qubit.org>
Updated docstrings for regexp-related functions and others.
---
tNFA.el | 39 ++++++++++++++++++++++++++++++++-------
1 file changed, 32 insertions(+), 7 deletions(-)
diff --git a/tNFA.el b/tNFA.el
index d8bae16..585418f 100644
--- a/tNFA.el
+++ b/tNFA.el
@@ -395,15 +395,25 @@
(defun* tNFA-from-regexp (regexp &key (test 'eq))
"Create a tagged NFA that recognizes the regular expression REGEXP.
-
-Back-references and non-greedy postfix operators are *not*
-supported, and the matches are always anchored, so `$' and `^'
-lose their special meanings.
-
The return value is the initial state of the tagged NFA.
+REGEXP can be any sequence type (vector, list, or string); it
+need not be an actual string. Special characters in REGEXP are
+still just that: elements of the sequence that are characters
+which have a special meaning in regexps.
+
The :test keyword argument specifies how to test whether two
-individual elements of STRING are identical. The default is `eq'."
+individual elements of STRING are identical. The default is `eq'.
+
+Only a subset of the full Emacs regular expression syntax is
+supported. There is no support for regexp constructs that are
+only meaningful for strings (character ranges and character
+classes inside character alternatives, and syntax-related
+backslash constructs). Back-references and non-greedy postfix
+operators are not supported, so `?' after a postfix operator
+loses its special meaning. Also, matches are always anchored, so
+`$' and `^' lose their special meanings (use `.*' at the
+beginning and end of the regexp to get an unanchored match)."
;; convert regexp to list, build NFA, and return initial state
(declare (special NFA--state-id))
@@ -940,8 +950,23 @@ POS in a string."
Sets the match data if there was a match; see `match-beginning',
`match-end' and `match-string'.
+REGEXP and STRING can be any sequence type (vector, list, or
+string); they need not be actual strings. Special characters in
+REGEXP are still just that: elements of the sequence that are
+characters which have a special meaning in regexps.
+
The :test keyword argument specifies how to test whether two
-individual elements of STRING are identical. The default is `eq'."
+individual elements of STRING are identical. The default is `eq'.
+
+Only a subset of the full Emacs regular expression syntax is
+supported. There is no support for regexp constructs that are
+only meaningful for strings (character ranges and character
+classes inside character alternatives, and syntax-related
+backslash constructs). Back-references and non-greedy postfix
+operators are not supported, so `?' after a postfix operator
+loses its special meaning. Also, matches are always anchored, so
+`$' and `^' lose their special meanings (use `.*' at the
+beginning and end of the regexp to get an unanchored match)."
(let ((tNFA (tNFA-from-regexp regexp :test test))
(i -1) tags match-data group-stack (grp 0))
- [elpa] externals/tNFA 1af1e58 22/23: Implement trie-fuzzy-match and trie-fuzzy-complete functions., (continued)
- [elpa] externals/tNFA 1af1e58 22/23: Implement trie-fuzzy-match and trie-fuzzy-complete functions., Stefan Monnier, 2020/12/14
- [elpa] externals/tNFA 7b44eeb 02/23: Bug-fix in tNFA--from-regexp: add tag transitions *outside* their group fragment,, Stefan Monnier, 2020/12/14
- [elpa] externals/tNFA 5463a53 07/23: Bug-fix to \{...\} postfix operator processing in tNFA--from-regexp, Stefan Monnier, 2020/12/14
- [elpa] externals/tNFA 4771c2f 12/23: Redefined tNFA--NFA-state-create and tNFA--NFA-state-create-tag using defun, Stefan Monnier, 2020/12/14
- [elpa] externals/tNFA 5f3bdf7 21/23: Enable lexical binding, and fix issues it picks up., Stefan Monnier, 2020/12/14
- [elpa] externals/tNFA 7e38f4c 19/23: Add missing autoload cookies., Stefan Monnier, 2020/12/14
- [elpa] externals/tNFA 454c544 09/23: Added commentary, Stefan Monnier, 2020/12/14
- [elpa] externals/tNFA 9a742f6 01/23: Implementation of tagged non-deterministic finite state automata, for regular expression matching, Stefan Monnier, 2020/12/14
- [elpa] externals/tNFA b035e48 11/23: Removed left-over debugging code and other minor tidying., Stefan Monnier, 2020/12/14
- [elpa] externals/tNFA ff30781 18/23: More minor whitespace and commentary changes., Stefan Monnier, 2020/12/14
- [elpa] externals/tNFA c5004e1 08/23: Updated docstrings for regexp-related functions and others.,
Stefan Monnier <=
- [elpa] externals/tNFA 87c6223 15/23: Updated Package-Version, Package-Requires, and Keywords package headers., Stefan Monnier, 2020/12/14