summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2013-12-06 08:47:36 -0800
committerKaz Kylheku <kaz@kylheku.com>2013-12-06 08:47:36 -0800
commitb55fa7a69f286149092cd25902871019c6795b9d (patch)
tree7022e5b7b5221194c2c06aa86a74a693e079ad3e /eval.c
parentb26f98511a911537fef73a1925df6d91a7829b6e (diff)
downloadtxr-b55fa7a69f286149092cd25902871019c6795b9d.tar.gz
txr-b55fa7a69f286149092cd25902871019c6795b9d.tar.bz2
txr-b55fa7a69f286149092cd25902871019c6795b9d.zip
* 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
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c2
1 files changed, 1 insertions, 1 deletions
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));