Files
mercury/extras
Ralph Becket 2a792e12b3 Added a new module, regex, as a companion to lex.
Estimated hours taken: 60
Branches: main

Added a new module, regex, as a companion to lex.  The new module provides
functionality for converting conventional Unix-style regular expressions
into regexps for use with lex and a number of search and search-and-replace
functions for strings.

The new functionality has been tested fairly thoroughly (and led to several
bugs in lex being identified and fixed.)

NEWS:
	Reported new additions.

extras/lex/README:
	Now just points the reader to README.lex and README.regex.

extras/lex/README.lex:
extras/lex/README.regex:
	Added.  Brief introductions to the two libraries.

extras/lex/lex.automata.m:
extras/lex/lex.buf.m:
extras/lex/lex.convert_NFA_to_DFA.m:
extras/lex/lex.regexp.m:
	Trivial formatting changes.

extras/lex/lex.lexeme.m:
	Removed the parameter on inst compiled_lexeme.

extras/lex/lex.m:
	Various formatting changes.

	Added pred offset_from_start/3 which can be used to identify
	the `current' point in the input stream with respect to lexing.

	Added pred read_char/3 which can be used to read the `next'
	char from the input stream without doing any lexing.

	Added a field init_winner_func to the lexer_instance type.  This
	is used to resolve a bug whereby regular expressions that match
	the empty string were not being spotted at the start of the input
	stream.

	Solved some bugs whereby an exception was incorrectly thrown in
	some circumstance when the end of the input stream was reached.

extras/lex/regex.m:
	Added.  This file defines the functions for converting Unix-style
	regular expression strings into regexps for use with lex and into
	regexes for use with the string search(-and-replace) predicates
	defined in this module.

extras/lex/Mmakefile:
	Improved the installation instructions and included a check target.

extras/lex/tests:
extras/lex/tests/Mmakefile:
extras/lex/tests/test_regex:
extras/lex/tests/test_regex.in:
extras/lex/tests/test_regex.exp:
	Added a test suite.

extras/lex/tests/cmp_regex_gawk:
	This program looks for differences in behaviour between gawk and
	regex.

extras/lex/samples/demo.m:
	Moved to lex_demo.m
extras/lex/samples/lex_demo.m:
	Was demo.m; slightly changed to include a match for unexpected
	characters.

extras/lex/samples/regex_demo.m:
	Added.

extras/lex/samples/Mmakefile:
	Updated.
2002-12-03 04:49:07 +00:00
..

This directory contains various additional libraries, tools,
and so forth that are not part of the Mercury standard library.

cgi		A couple of Mercury library modules for doing HTML forms
		programming using CGI (Common Gateway Interface).

clpr		A Mercury interface to the CLP(R) constraint solver,
		for solving arithmetic constraints on (floating point)
		real numbers.

complex_numbers
		A Mercury library package containing support for
		complex and imaginary numbers.

curs		A Mercury library providing a somewhat more complete
		and more faithful binding to the curses and panel
		libraries (the latter is used to provide elementary
		windowing facilities, rather than doing so in Mercury).

curses		A Mercury library providing a (partial) binding to 
		curses; a package that provides methods for manipulating
		the text screen (creating windows, placing characters, etc).

dynamic_linking
		An interface to the C functions dlopen(), dlsym(), etc.
		that are supported by most modern Unix systems.

exceptions	A library module containing a (tentative)
		exception handling interface for Mercury.

graphics	A couple of packages for doing graphics programming
		and GUIs in Mercury: a Mercury interface to tcl/tk
		and a Mercury binding to OpenGL.

lazy_evaluation
		A library module `lazy' containing support for optional
		lazy evaluation in Mercury, together with some examples
		of its use, including a module `lazy_list' that defines
		a lazy list data type.

lex		A lexer package for Mercury that works over io__states,
		strings, and so forth.  It comes with a rich set of
		standard regular expressions and the user is free to add
		their own.                                                      

moose		A parser generator for Mercury.  Moose works much like
		yacc or bison, it takes a grammar and generates a table
		driven LALR parser for it.  You can add code to the
		grammar to handle synthesized or inherited attributes.
		Currently you need to write your own lexer to interface
		to moose.

odbc		A Mercury interface to ODBC (Open Database Connectivity),
		for interfacing to standard relational database packages.

quickcheck	An autotesting tool similar to Haskell's QuickCheck.

references	A library package containing modules for manipulating
		ML-style references (mutable state).

stream		Generic IO interface using typeclasses.