diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-10-12 06:16:45 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-10-12 06:16:45 -0700 |
commit | 527518d6d425bdc6c2d30e65a7bc9ac99272e517 (patch) | |
tree | 4072edfdf6fd7f0ff0178c574b65044d6a0af793 /txr.1 | |
parent | 0e07d523d298ab156bea4fb7570a6cc4b41fb79d (diff) | |
download | txr-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.1 | 28 |
1 files changed, 28 insertions, 0 deletions
@@ -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 |