Re: Suboptimal error message

new topic     » goto parent     » topic index » view thread      » older message » newer message

Pete Lomax wrote:

> On Wed, 18 May 2005 23:27:01 +0200, Juergen Luethje wrote:
>
>> Robert Craig wrote:
>>>> Syntax error - expected to see possibly this ..., not a variable
>>
>> Uuhhh, I didn't know that. <scratching my head like Stan Laurel> blink
>> Wouldn't it be better not to allow things like that? Or would that
>> require heavy changes of the interpreter?
>
> FYI, the 2.4 error was
> Syntax error - expected to see possibly '=', not a variable

Ah, I see.

> Of course all the code involved here is now public domain (eu.ex
> and/or parser.e and/or and emit.e), albeit packaged specially.

I really appreciate the Public Domain release of Eu in Eu. But the code
is rather complex and not easy to understand for me.
I probably should take a looong rainy Sunday afternoon to look at the
code again. Unfortunately, currently the weather is fine here. blink

> An interesting thing to attempt would be to backtrack at the error
> point (add zero overhead in the non-error case, please), possibly
> looking through the most recently added var names for something rather
> suspicious (probably including user-defined types). I'm sure Rob would
> thank you if you came up with something clever in that area.
>
> You might even get close to perfection here: point at the comma and
> say "that comma should probably not be there"? (But I doubt it blink

If it would be not allowed to use "object", "sequence", "atom" and
"integer" as variable names (please see me other recent post in this
thread) then I think this would be rather easy:
Just when one of these four tokens is preceeded by a comma, Eu should
throw exactly this error message. smile
Because based on experience (AFAIK and IMHO, of course) this actually
is the most probable cause.

Regards,
   Juergen

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu