[m-dev.] cc_multi or det ?
Ralph Becket
rbeck at microsoft.com
Tue Aug 7 01:31:29 AEST 2001
> From: Ralph Becket [mailto:rbeck at microsoft.com]
> Sent: 06 August 2001 16:22
>
> 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.
- Ralph
--------------------------------------------------------------------------
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