From: Andrew Crabtree Message-Id: <199704170249.AA052015350@typhoon.rose.hp.com> Subject: Re: advice on bison required To: grbhat AT unigoa DOT ernet DOT in (Gurunandan R. Bhat) Date: Wed, 16 Apr 1997 19:49:09 PDT Cc: djgpp AT delorie DOT com In-Reply-To: ; from "Gurunandan R. Bhat" at Apr 16, 97 6:21 pm Precedence: bulk > point, if it was there. of course, your suggestion now begs the question: > do i need to explicitly declare: > > %token name > .. > .. > %type expression > > in the case that my union has a single type member, or is > understood by default? i will check it out soon I think that for union declarations in C ( independent of Yacc ) any time you reference a variable of a union type without specifying a particular union member it defaults to the first defined member type so for union foo_u { double dval; long int lval; }; union foo_u bar; bar = 5.6; and bar.dval = 5.6; are treated the same way. So, I think it will work for you without explicit declarations, but I would say its could practice to explicitly declare them if your default type isn't int. Andrew