help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: error-tokens and locations?


From: Ian Badcoe
Subject: Re: error-tokens and locations?
Date: Tue, 11 Nov 2003 11:22:57 +0000

Hi,
Apparently this still didn't go through, so once-again apologies for multiple copies.

        I should have also mentioned it was bison 1.875b and the cygwin port.

        Ian B

At 20:11 04/11/2003 +0000, Ian Badcoe wrote:
Hi, sorry if you see multiple copies but the first disappeared without trace,

I think this may be a bug, but I'm not 100%, so I thought I'd ask here first.

I have a grammar with some error productions, and in the actions I try to pass the location of the error token into a support routine so that I can give nice error messages.

Mostly this works, but for one or two of the productions I get silly locations.

Investigating a bit further, I redefined YYLLOC_DEFAULT so that it could print me some diagnostics and it's sometimes getting called with num == 0. I'm fairly sure the default definition cannot handle that either.

So, my question is should I be able to use the locations of error tokens? I haven't seen anything which suggests not, in fact I'd think it the most common use for them.

If it should work, then it may be a bug. I can post a smallish demonstration here if anybody needs it, or I could go straight over to the bugs list.

        Thanks,
                Ian B
Free transport into the future, while you wait.



_______________________________________________
address@hidden http://mail.gnu.org/mailman/listinfo/help-bison

Free transport into the future - while you wait.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]