summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-10-12 06:16:45 -0700
committerKaz Kylheku <kaz@kylheku.com>2016-10-12 06:16:45 -0700
commit527518d6d425bdc6c2d30e65a7bc9ac99272e517 (patch)
tree4072edfdf6fd7f0ff0178c574b65044d6a0af793 /txr.1
parent0e07d523d298ab156bea4fb7570a6cc4b41fb79d (diff)
downloadtxr-527518d6d425bdc6c2d30e65a7bc9ac99272e517.tar.gz
txr-527518d6d425bdc6c2d30e65a7bc9ac99272e517.tar.bz2
txr-527518d6d425bdc6c2d30e65a7bc9ac99272e517.zip
New function regex-from-trie.
* filter.c (regex_from_trie): New static function. (filter_init): Register regex-from-trie intrinsic. * txr.1: Documented regex-from-trie.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.128
1 files changed, 28 insertions, 0 deletions
diff --git a/txr.1 b/txr.1
index 74c832c3..f41c867d 100644
--- a/txr.1
+++ b/txr.1
@@ -44849,6 +44849,34 @@ using
.codn equal ,
and the result of that is returned.
+.coNP Function @ regex-from-trie
+.synb
+.mets (regex-from-trie << trie )
+.syne
+.desc
+The
+.code regex-from-trie
+function returns a representation of
+.meta trie
+as regular expression abstract syntax, suitable for
+processing by the
+.code regex-compile
+function.
+
+The values stored in the trie nodes are not represented in
+the regular expression.
+
+The
+.meta trie
+may be one that has been compressed via
+.codn trie-compress ;
+in fact, a compressed
+.meta trie
+results in more compact syntax.
+
+Note: this function is useful for creating a compact, prefix-compressed
+regular expression which matches a list of strings.
+
.SS* Access To TXR Pattern Language From Lisp
It is useful to be able to invoke the abilities of the \*(TX pattern Language