diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-09-23 06:54:31 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-09-23 06:54:31 -0700 |
commit | 158f99b41bc0b75b6f571fc4f87f020ef80268ca (patch) | |
tree | 2e7c80d141d3e3161a88a2295f7b7f0458ecb71c | |
parent | b12a4384cee002a9c9d82e34de1838bfe7d80429 (diff) | |
download | txr-158f99b41bc0b75b6f571fc4f87f020ef80268ca.tar.gz txr-158f99b41bc0b75b6f571fc4f87f020ef80268ca.tar.bz2 txr-158f99b41bc0b75b6f571fc4f87f020ef80268ca.zip |
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.
-rw-r--r-- | lib.c | 2 | ||||
-rw-r--r-- | txr.1 | 5 |
2 files changed, 6 insertions, 1 deletions
@@ -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); @@ -14644,6 +14644,8 @@ brackets indicate a plurality of types which are not listed by name: | | | +--- random-state | | + | +--- regex + | | | +--- struct-type | | | +--- <structures> @@ -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. |