[m-dev.] Proposal: parsing module for the library.

Ralph Becket rafe at csse.unimelb.edu.au
Thu Jan 15 14:15:46 AEDT 2009


Julien Fischer, Thursday, 15 January 2009:
> 
> On Thu, 15 Jan 2009, Ralph Becket wrote:
> 
> >Julien Fischer, Thursday, 15 January 2009:
> >>
> >>On Tue, 13 Jan 2009, Ralph Becket wrote:
> >>
> >>>Here's a diff addressing most of the review comments:
> >>>
> >>>--- parsing.m	2009-01-13 16:52:32.206161260 +1100
> >>>+++ parsing_utils.m	2009-01-13 16:59:03.720192432 +1100
> >>>@@ -1,14 +1,14 @@
> >>>%-----------------------------------------------------------------------------%
> >>>-% parsing.m
> >>>+% parsing_utils.m
> >>>% Ralph Becket <rafe at csse.unimelb.edu.au>
> >>>% Tue Jan 13 11:32:49 EST 2009
> >>>% vim: ft=mercury ts=4 sw=4 et wm=0 tw=0
> >>>%
> >>>-% Support for DCG style parsers.
> >>>+% Utilities for recursive descent parsers.
> >>>%
> >>>%-----------------------------------------------------------------------------%
> >>
> >>You should use the the same style of header comment used in the rest of
> >>the stdlib.
> >>
> >>It looks fine to me otherwise , although you will need to add samples and
> >>tests, update library/library.m and the NEWS file etc as well.
> >
> >Another question: the parser(T) type and parser inst are useful for
> >higher order parser signatures, but I think using
> >
> >:- pred p(src::in, ...)
> >	: parser(T) `with_inst` parser
> >
> >on other predicate signatures is less clear than simply writing
> >
> >:- pred p(src::in, ..., T::out, ps::in, ps::out) is semidet.
> >
> >Any opinion on that one?
> 
> We keep using the former in G12 for some reason and personally I hate it.
> I can never remember how many arguments there are, or what order they
> occur in.

I agree.  I'll go with the second option.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at csse.unimelb.edu.au
Administrative Queries: owner-mercury-developers at csse.unimelb.edu.au
Subscriptions:          mercury-developers-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the developers mailing list