Mail Archives: djgpp/1999/07/12/14:05:44
Campbell, Rolf [SKY:1U32:EXCH] (cp1v45 AT americasm01 DOT nt DOT com) wrote:
: The code was (C++):
:
: struct {int c,d;} b;
: b={1,2};
:
: Here, 'b' is a variable-name, and should be known as a variable-name in the parsing stage
: immediately after the ";". But, because of Bison's (or yacc's) look-ahead token, the 2nd
: 'b' has already been tokenized as an ID, which is not allowed as an rValue in an
: expression, thus producing a parse error.
Hmm. It seems we are talking past each other. Please read teh next
lines carefully.
No. There, "b" is an ID. This ID can be at least two different
things. 1, a variable name. 2, a type name. At this point you don't
know which one of those it is.
That's what I've deduced from the problem description. I don't know if
this is generally true.
[Klippa, klapp, kluppit bison expert question, as I'm not one of them.]
Right,
MartinS
- Raw text -