From b55fa7a69f286149092cd25902871019c6795b9d Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 6 Dec 2013 08:47:36 -0800 Subject: * eval.c (eval_init): Update registration of regex-compile to reflect that it has two arguments now. * parser.y (grammar): Update calls to regex_compile to pass two arguments. Since we don't expect regex_compile to parse, we specify the error stream as nil. (spec): The "secret syntax" for a regex is simplified not to include the slashes. This provides better diagnostics for unterminated syntax and requires less string processing to generate. Also, the form returned doesn't have the regex symbol consed onto it, which parse_regex just throws away. * regex.c (regex_compile): Now takes a stream argument. * regex.h (regex_compile): Declaration updated. * txr.1: Updated --- eval.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'eval.c') diff --git a/eval.c b/eval.c index ea3020d2..1a3c378f 100644 --- a/eval.c +++ b/eval.c @@ -2307,7 +2307,7 @@ void eval_init(void) reg_fun(intern(lit("logtrunc"), user_package), func_n2(logtrunc)); reg_fun(intern(lit("ash"), user_package), func_n2(ash)); - reg_fun(intern(lit("regex-compile"), user_package), func_n1(regex_compile)); + reg_fun(intern(lit("regex-compile"), user_package), func_n2o(regex_compile, 1)); reg_fun(intern(lit("regexp"), user_package), func_n1(regexp)); reg_fun(intern(lit("search-regex"), user_package), func_n4o(search_regex, 2)); reg_fun(intern(lit("match-regex"), user_package), func_n3o(match_regex, 2)); -- cgit v1.2.3