summaryrefslogtreecommitdiffstats
path: root/regex.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-09-23 06:39:56 -0700
committerKaz Kylheku <kaz@kylheku.com>2016-09-23 06:39:56 -0700
commit83f7efdc4127c9807bdc46708ef5036d5fdafc51 (patch)
treed39d6b99503a98909ecb27db2fe5b6c703bcc24d /regex.h
parent6cb0284cc3fe66c4c20a09a651ba897ed6e2f71e (diff)
downloadtxr-83f7efdc4127c9807bdc46708ef5036d5fdafc51.tar.gz
txr-83f7efdc4127c9807bdc46708ef5036d5fdafc51.tar.bz2
txr-83f7efdc4127c9807bdc46708ef5036d5fdafc51.zip
New regex functions: m^$, m^, m$, and others.
* regex.c (do_match_full, do_match_full_offs, do_match_left, do_match_left_offs, do_match_right, do_match_right_offs): New static functions. (regex_match_full_fun, regex_match_right_fun, regex_match_full, regex_match_left, regex_match_right, regex_range_full, regex_range_left, regex_range_right): New functions. (regex_init): Register f^$, f^, f$, m^$, m^, m$, r^$, r^ and r$ intrinsics. * regex.h (regex_match_full_fun, regex_match_right_fun, regex_match_full, regex_match_left, regex_match_right, regex_range_full, regex_range_left, regex_range_right): Declared. * txr.1: Documented new functions.
Diffstat (limited to 'regex.h')
-rw-r--r--regex.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/regex.h b/regex.h
index 80494860..cad2df13 100644
--- a/regex.h
+++ b/regex.h
@@ -41,6 +41,15 @@ val match_regst(val str, val regex, val pos);
val match_regst_right(val str, val regex, val end);
val regsub(val regex, val repl, val str);
val read_until_match(val regex, val stream, val keep_match);
+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);
+val regex_match_right_fun(val regex, val end);
+val regex_match_left(val regex, val arg1, val arg2);
+val regex_match_right(val regex, val arg1, val arg2);
+val regex_range_full(val regex, val arg1, val arg2);
+val regex_range_left(val regex, val arg1, val arg2);
+val regex_range_right(val regex, val arg1, val arg2);
int wide_display_char_p(wchar_t ch);
void regex_init(void);
void regex_free_all(void);