help-bison
[Top][All Lists]
Advanced

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

Re: %type'd non-terminal produces a `has no declared type' error


From: Alexander Sorockin
Subject: Re: %type'd non-terminal produces a `has no declared type' error
Date: Thu, 22 Jan 2009 13:28:35 +0300
User-agent: Opera Mail/9.63 (Win32)

Akim,

Excuse me for reposting this - I just realized that I didn't sent this message to the mailing list.


And it's normal: since you are looking deep in the stack, Bison cannot figure out (in the general case) what the kind of symbol is there. So it can't guess the field of the union it needs to use to decode the semantic value.


A situation where you declare a type and still get a "has no declared
type" error didn't seem normal to me, that's why I had to dig into the
source code and post here.


You're asking for completely new developments here. There is nothing in the internals to have this work (yet it would be nice if it could).


I understand. But maybe this should be documented somewhere, or maybe
bison should issue some special message in this case? Otherwise this might
confuse some inexperienced users (like myself). I would provide a patch
for a special message, but that would be a trivial one and I don't think I
would save you a lot of work.

Best,
Sandy






reply via email to

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