From 158f99b41bc0b75b6f571fc4f87f020ef80268ca Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 23 Sep 2016 06:54:31 -0700 Subject: Switch regex type from sys:regex to regex. The sys:regex internal symbol was historically used when derivative-based regexes had a S-exp representation headed by that symbol. It had to be a private symbol. Now the regex symbol is only used as the COBJ class type for regexes; it makes no sense for it to be in the sys package. We want user code to be able to refer to this type using a public symbol. * lib.c (obj_init): Intern the regex symbol stored in regex_s in user_package. * txr.1: Include regex in the type graph in the Object Type section, and in the type list under the typeof function. --- lib.c | 2 +- txr.1 | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib.c b/lib.c index 245f49c5..47b028cf 100644 --- a/lib.c +++ b/lib.c @@ -8698,7 +8698,7 @@ static void obj_init(void) rcons_s = intern(lit("rcons"), user_package); var_s = intern(lit("var"), system_package); expr_s = intern(lit("expr"), system_package); - regex_s = intern(lit("regex"), system_package); + regex_s = intern(lit("regex"), user_package); nongreedy_s = intern(lit("ng0+"), user_package); quote_s = intern(lit("quote"), user_package); qquote_s = intern(lit("qquote"), user_package); diff --git a/txr.1 b/txr.1 index 3a6bf27a..58506358 100644 --- a/txr.1 +++ b/txr.1 @@ -14644,6 +14644,8 @@ brackets indicate a plurality of types which are not listed by name: | | | +--- random-state | | + | +--- regex + | | | +--- struct-type | | | +--- @@ -14800,6 +14802,9 @@ Hash table. .coIP stream I/O stream of any kind. +.coIP regex +Regular expression object. + .coIP struct-type A structure type: the type of any one of the values which represents a structure type. -- cgit v1.2.3