chs - Character set module

Module Description

The chs module implements a character set. It supports the POSIX classes used in regular expressions.

Module Words

Character Set Structure

chs% ( -- n )
Get the required space for a chs variable

Set creation, initialisation and destruction

chs-init ( chs -- )
Initialise the set

chs-create ( "<spaces>name" -- ; -- chs )
Create a named character set in the dictionary

chs-new ( -- chs )
Create a new character set on the heap

chs-free ( chs -- )
Free the set from the heap

Sets words

chs^move ( chs2 chs1 -- )
Move chs2 in chs1

Set words

chs-set ( chs -- )
Set all characters in the set

chs-reset ( chs -- )
Reset all characters in the set

chs-invert ( chs -- )
Invert all characters in the set

Char words

chs-set-char ( char chs -- )
Set the character in the set

chs-reset-char ( char chs -- )
Reset the character in the set

Character range words

chs-set-chars ( char1 char2 chs -- )
Set the character range [char1..char2] in the set

chs-reset-chars ( char1 char2 chs -- )
Reset the character range [char1..char2] in the set

String words

chs-set-string ( c-addr u chs -- )
Set the characters in the string in the set

chs-reset-string ( c-addr u chs -- )
Reset the characters in the string in the set

POSIX classes

chs-set-upper ( chs -- )
Set the upper class in the set

chs-reset-upper ( chs -- )
Reset the upper class in the set

chs-set-lower ( chs -- )
Set the lower class in the set

chs-reset-lower ( chs -- )
Reset the lower class in the set

chs-set-alpha ( chs -- )
Set the alpha class in the set

chs-reset-alpha ( chs -- )
Reset the alpha class in the set

chs-set-digit ( chs -- )
Set the digit class in the set

chs-reset-digit ( chs -- )
Reset the digit class in the set

chs-set-alnum ( chs -- )
Set the alnum class in the set

chs-reset-alnum ( chs -- )
Reset the alnum class in the set

chs-set-xdigit ( chs -- )
Set the xdigit class in the set

chs-reset-xdigit ( chs -- )
Reset the xdigit class in the set

chs-set-punct ( chs -- )
Set the punct class in the set

chs-reset-punct ( chs -- )
Reset the punct class in the set

chs-set-blank ( chs -- )
Set the blank class in the set

chs-reset-blank ( chs -- )
Reset the blank class in the set

chs-set-space ( chs -- )
Set the space class in the set

chs-reset-space ( chs -- )
Reset the space class in the set

chs-set-cntrl ( chs -- )
Set the cntrl class in the set

chs-reset-cntrl ( chs -- )
Reset the cntrl class in the set

chs-set-graph ( chs -- )
Set the graph class in the set

chs-reset-graph ( chs -- )
Reset the graph class in the set

chs-set-print ( chs -- )
Set the print class in the set

chs-reset-print ( chs -- )
Reset the print class in the set

chs-set-word ( chs -- )
Set the word class in the set

chs-reset-word ( chs -- )
Reset the word class in the set

Char check word

chs-char? ( char chs -- flag )
Check if the character is in the set

Special words

chs-execute ( i*x xt chs -- j*x )
Execute xt for every character in the set

Inspection

chs-dump ( chs -- )
Dump the chs state


generated 10-Apr-2008 by ofcfrth-0.5.0