bug-bison
[Top][All Lists]
Advanced

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

error-tokens and locations?


From: Ian Badcoe
Subject: error-tokens and locations?
Date: Thu, 13 Nov 2003 13:47:19 +0000

Hi, I've been trying to ask this on the help mailing-list, but after repeated attempts the message just doesn't seem to be getting distributed.

        Anyway, I think this may be a bug, but I'm not 100%.

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 small demonstration if anybody needs to see it.

It's bison 1.875b and the cygwin port, on Windows Me, but I doubt the system details are involved.

        Thanks,
                Ian B

Free transport into the future - while you wait.






reply via email to

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