help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: request for member in something not a structure or union (yaccparse


From: Tim Van Holder
Subject: RE: request for member in something not a structure or union (yaccparse error)
Date: Wed, 16 Jul 2003 15:37:06 +0200

> I have defined a structure in an header file as :
> 
>       typedef struct port{
> 
>        char* portName;
>        MODE  portMode;
>        TYPE  portType;
>        struct port* next;
> 
>       } PORT;
> 
> And this header file is included in the yacc parser. I am 
> trying to define
> the %union as follows :
> 
> %union {
>  char* keyValue;
>  PORT* portStmnt;
> }

Bison generates a header with tokens as well as this type.
No other headers are included in this file, and this can be
annoying, especially since the generated parser source
includes it before any other headers.
Your only option is to use

%union {
 char* keyValue;
 struct PORT* portStmnt;
}

instead.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]