[m-dev.] cc_multi or det ?
Fergus Henderson
fjh at cs.mu.OZ.AU
Tue Aug 7 01:54:46 AEST 2001
On 06-Aug-2001, Ralph Becket <rbeck at microsoft.com> wrote:
> > The interface is that the user supplies a list of
> > (regexp - token_constructor) pairs, where each token_constructor is
> > a *function* from strings to tokens. The lexer internals catch any
> > lex__excn(string) exceptions raised by a token_constructor in order
> > to construct an error result (e.g. a token_constructor for ints may
> > want to report overflow errors this way).
>
> Thinking more about this, since the motivation for this is to allow
> the lexer component of a parsing appliction to report input errors,
> perhaps the best thing to do would be to assume the parser can
> recognise such things as int_too_large tokens and deal with them at
> that level (as opposed to checking for strings returned in error
> terms) rather than much about with catching exceptions etc. in
> lex itself.
>
> Now I think about this, that seems a preferable way to go.
I agree.
--
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