summaryrefslogtreecommitdiffstats
path: root/regex.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-02-16 09:46:14 -0800
committerKaz Kylheku <kaz@kylheku.com>2019-02-16 09:46:14 -0800
commitf16aaf441c112f0e6382b77ebdcd585d8c531580 (patch)
treece3041d1395f7260bd698230098beffc778ca952 /regex.h
parent338f97b5a32a038a7cb21b8045a72412dbe4bfd6 (diff)
downloadtxr-f16aaf441c112f0e6382b77ebdcd585d8c531580.tar.gz
txr-f16aaf441c112f0e6382b77ebdcd585d8c531580.tar.bz2
txr-f16aaf441c112f0e6382b77ebdcd585d8c531580.zip
scan-until-match, count-until-match: new functions.
* regex.c (scan_until_common): New static function, made from read_until_match. (read_until_match): Now just wrapper for scan_until_common. (scan_until_match, count_until_match): New functions. (regex_init): Registered new intrinsics scan-until-match and count-until-match. * regex.h (read_until_match, scan_until_match): Declared. * txr.1: Documented.
Diffstat (limited to 'regex.h')
-rw-r--r--regex.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/regex.h b/regex.h
index 63a7e181..73c92093 100644
--- a/regex.h
+++ b/regex.h
@@ -45,6 +45,8 @@ val match_regst_right(val str, val regex, val end);
val regex_prefix_match(val reg, val str, val pos);
val regsub(val regex, val repl, val str);
val read_until_match(val regex, val stream, val keep_match);
+val scan_until_match(val regex, val stream_in);
+val count_until_match(val regex, val stream_in);
val regex_match_full(val regex, val arg1, val arg2);
val regex_match_full_fun(val regex, val pos);
val regex_match_left_fun(val regex, val pos);