Date: Wed, 16 Apr 1997 18:21:29 +0000 ( ) From: "Gurunandan R. Bhat" To: Andrew Crabtree Cc: djgpp AT delorie DOT com Subject: Re: advice on bison required In-Reply-To: <199704161628.AA039028119@typhoon.rose.hp.com> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Wed, 16 Apr 1997, Andrew Crabtree wrote: > Why aren't you using the %union declaration. i had only one token in my newbie grammar. but on trying out your solution it seems that declaring a %union is the right thing *even with a single token*. i have read the excellent docs that come with the djgpp distribution of bison/flex and i seemed to have missed this (important?) 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. thank you for your suggestion, gurunandan > %union{ > double dval; > } > %token name > typedef union { > double dval; > } YYSTYPE;