%union problems

2009-05-15 Thread Varga-Háli Dániel
hello all, I just started to get the grasp of bison and how to make it work with flex. I have defined a struct in the grammar file similar to this: typedef struct { char *mem1; char *mem2; } where_cls; The union includes it: %union{ ... where_cls aswhere; } This is pretty straightforwar

Re: %union problems

2009-05-15 Thread Philip Herron
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hey Varga-Háli Dániel wrote: > I just started to get the grasp of bison and how to make it work with > flex. I have defined a struct in the grammar file similar to this: > > typedef struct { > char *mem1; > char *mem2; > } where_cls; > > The union

Re: %union problems

2009-05-15 Thread Joel E. Denny
On Fri, 15 May 2009, [ISO-8859-1] Varga-H?li D?niel wrote: > I have defined a struct in the grammar file similar to this: > > typedef struct { > char *mem1; > char *mem2; > } where_cls; > > The union includes it: > %union{ > ... > where_cls aswhere; > } > After looking at the tab.h file

Re: %union problems

2009-05-15 Thread Yinpeng Li
Dear Daniel, I think this problem is currently inherent of Bison. In the tab.h generated by Bison, there are normally only three things that are incorporated: 1. The enumeration of the tokens 2. The YYSTYPE definition and yylval declaration 3. The YYLTYPE definition and yylloc declaration Notic