Strings.module



-- Copyright (C) International Computer Science Institute, 1994.  COPYRIGHT  --
-- NOTICE: This code is provided "AS IS" WITHOUT ANY WARRANTY and is subject --
-- to the terms of the SATHER LIBRARY GENERAL PUBLIC LICENSE contained in    --
-- the file "Doc/License" of the Sather distribution.  The license is also   --
-- available from ICSI, 1947 Center St., Suite 600, Berkeley CA 94704, USA.  --
--------> Please email comments to "sather-bugs@icsi.berkeley.edu". <----------

(*

STRING CLASSES

The central workhorse of string manipulation is STR.  Sather
provides a literal syntax for STR:

    "abc"

All STR objects are immutable, so they have a convenient value
semantics.  They are stored as a contiguous character array with
a size field.

Sometimes it is much more efficient to operate on strings in
place.  FSTR is a non-immutable string type, extended by amortised
doubling.  It can do most of the things that STR can, but has the
uglier property that you need writebacks:

    fstr := fstr + "abc";

Here, the 'fstr' returned may be the same as the 'fstr' on the right
side; in fact is usually will be.  Novices are encouraged to use
STR if speed is not an issue.

STR_CURSOR provides a way of parsing strings into pieces in the
same way that scanf() allows in C.

GLOB is an attempt at a csh-like globbing facility.  In the future
there will be other classes for generalized searching.

REGEXP contains an interface to the POSIX regular expression interface.
Is a replacement for GLOB, but might not work on all platforms, as it
relies on the proper C implementation of the POSIX standard.

*)

-- This is a list of library files that can automatically
-- be loaded by a reference in users' SATHER_COMMANDS env variable

	fstr.sa -has fstr.sa FSTR 
	glob.sa -has glob.sa GLOB
	str.sa -has str.sa STR C_STR
	str_cursor.sa -has str_cursor.sa STR_CURSOR 
	str_cursor_test.sa -has str_cursor_test.sa TEST_STR_CURSOR	
	fstr_test.sa -has fstr_test.sa TEST_FSTR	

	test_format.sa -has test_format.sa TEST_FMT
	format.sa -has format.sa $FMT FMT FMT_ERROR_FLAGS FMT_ERROR
	base_format.sa -has base_format.sa $FLT BASE_FORMAT FMT_NUMBERS

	regexp.sa -has regexp.sa REGEXP TEST_REGEXP C_REGEXP

-- regexp.c needs some of the Sather header files, so make the system
-- directory abailable.

	-external C_REGEXP -C_flag -I$(SATHER_HOME)/System/Common
	-external C_REGEXP "$(SATHER_HOME)/Library/Strings/regexp.c "
	-end