[m-dev.] misleading error message
Ralph Becket
rafe at cs.mu.OZ.AU
Tue Jul 19 17:22:28 AEST 2005
Peter Schachte, Tuesday, 19 July 2005:
> Hi,
>
> I just got this error message from the compiler:
>
> delaytest.m:045: Error: some but not all arguments have modes:
> first(dvar(int) :: ia, dvar(int) :: ia, dvar(int) : ia, dvar(int) : ia).
>
> OK, it's right, but it took me a while to figure out why. Single and
> double colons do look pretty similar. It would be helpful if the
> compiler gave an error message about the single colon terms in there,
> rather than (or at least before) what it does say.
This is largely due to Mercury currently using a precedence grammar: we
don't really have the idea of reserved keywords, just tokens that have
particular significance in certain contexts. When we move to and
elk/caribou based parser hopefully we will give better error messages
for situations like this.
-- 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