Mail Archives: djgpp/1999/07/09/20:05:31
Campbell, Rolf [SKY:1U32:EXCH] (cp1v45 AT americasm01 DOT nt DOT com) wrote:
: struct a {int a; int b;};
: struct b {int a; int b;};
:
: int main()
: {
: int a, m(b j), b;
Maybe I'm tired but what is m(b j) above? Is it valid C code? If it is
what does it mean?
Anyway in the code there isn't a type called "b". There's a type
called "struct b", right?
[Klippa, klapp, kluppit rest of program and bison horror story.]
I think the trick is to delay interpreting the lex/yacc output
somewhat. Like building an incomplete syntax tree, which you then fill
in with more information when you have the information that is
necessary (the easiest is to do this when the whole source file has
been parsed so you know there won't be any more information).
Skunk Anansie, Paranoid & Sunburnt,
MartinS
- Raw text -