diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2012-04-10 03:11:09 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2012-04-10 03:11:09 -0700 |
commit | d228557c3c400ba7a81ba0b0fd867ec78bb35015 (patch) | |
tree | 0a5aaca7ead1d53d89a30fab76b2263838cd2f98 /eval.c | |
parent | d26540493a85fe2f4e85da81504cc0264df0c11f (diff) | |
download | txr-d228557c3c400ba7a81ba0b0fd867ec78bb35015.tar.gz txr-d228557c3c400ba7a81ba0b0fd867ec78bb35015.tar.bz2 txr-d228557c3c400ba7a81ba0b0fd867ec78bb35015.zip |
* eval.c (eval_init): Expose regex-compile and regexp as intrinsics.
* lib.c (obj_init): Change spelling of nongreedy operator and put
it into the user package so that it is available for use with
regex-compile.
* regex.c (match_regex, search_regex): Bugfix: optional start
position argument argument not defaulting to zero.
* txr.1: Documented regex-compile and regexp.
* txr.vim: Highlighting regex-compile and regexp.
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -2221,10 +2221,13 @@ void eval_init(void) reg_fun(intern(lit("max"), user_package), func_n1v(maxv)); reg_fun(intern(lit("min"), user_package), func_n1v(minv)); + reg_fun(intern(lit("regex-compile"), user_package), func_n1(regex_compile)); + 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)); reg_fun(intern(lit("regsub"), user_package), func_n3(regsub)); + reg_fun(intern(lit("make-hash"), user_package), func_n3(make_hash)); reg_fun(intern(lit("hash"), user_package), func_n0v(hashv)); reg_fun(intern(lit("hash-construct"), user_package), func_n2(hash_construct)); |