[m-rev.] New regex module in extras/lex
Fergus Henderson
fjh at cs.mu.OZ.AU
Fri Nov 22 18:10:01 AEDT 2002
On 22-Nov-2002, Ralph Becket <rafe at cs.mu.OZ.AU> wrote:
> 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 module should be documented in the README file
(and removed from the "FEATURES TO ADD" list there).
The copyright notice and the "lex version 1.0 (very alpha)" comment
in the README file should be updated.
There should be a comment or two at the start of the regex.m file giving
a brief overview.
Also, the copyright notices in extras/lex/* should be changed from
% THIS FILE IS HEREBY CONTRIBUTED TO THE MERCURY PROJECT TO
% BE RELEASED UNDER WHATEVER LICENCE IS DEEMED APPROPRIATE
% BY THE ADMINISTRATORS OF THE MERCURY PROJECT.
to an actual license. I recommend licensing these files under the LGPL.
> extras/lex/lex.lexeme.m:
> Removed the parameter on inst compiled_lexeme.
Why?
> extras/lex/lex.m:
>
> 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.
These bug fixes (and the license fix) should be committed to the release
branch. As for the other changes, well, since this package is in the
extras distribution, I guess it is a low risk change. So I would not
object to them being included in the release branch if they are ready
in time. But they are certainly not release-critical, so I will not
be holding up the release branch for them.
> extras/lex/test_regex.m:
> A little test harness for regex.m
The Mmakefile should have a "check" target which runs the test
and compares it with the expected output.
It would be nicer to put that in a "tests" subdir, IMHO.
I have not reviewed the new regex.m file and the changes to lex.lex.m
and lex.lexeme.m in detail.
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list