From 83f7efdc4127c9807bdc46708ef5036d5fdafc51 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 23 Sep 2016 06:39:56 -0700 Subject: 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. --- regex.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'regex.h') 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); -- cgit v1.2.3