[m-dev.] cc_multi or det ?

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Aug 7 01:11:10 AEST 2001


On 06-Aug-2001, Holger Krug <hkrug at rationalizer.com> wrote:
> I would ask Fergus to answer this mail.
> 
> Ralph and I incorporated exception handling code to lex.  A user
> defined function may throw an exception of type `lex__excn', which our
> code catches. The code then builds an error token out of the
> exception. Our user manual asks the user to throw exceptions in an
> unequivocal way. If the user follows our recommendation we can use
> `promise_only_solution', if not, the semantics would be undefined.
> 
> Shall we use it or shall we declare `main' `cc_multi' ? 

For such a situation, I'd recommend declaring the entry point `cc_multi'.
The user can always add `promise_only_solution' themselves if need be.

Alternatively, you could provide two different entry points,
a cc_multi one named `lex__main' (or whatever you want to call your entry point),
and a det one named `lex__promise_only_solution_main' that just
wraps promise_only_solution around `lex__main'.

-- 
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-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list