help-bison
[Top][All Lists]
Advanced

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

Re: How to replace YACC global variables !


From: Hans Aberg
Subject: Re: How to replace YACC global variables !
Date: Sun, 7 Mar 2004 19:42:11 +0100

At 11:33 +0530 2004/03/04, Mondal, Debashis E (GE Energy) wrote:
>I have a yacc ( test.y ) file along with some c files to generate a
>executable. Now other c files uses yacc generated global variables ( yyv,
>yys, yyerrflag, yytmp, yystate, yyps, yypv etc ). The problem comes when I
>compile yacc file by bison ( bison -d test.y ) and try to generate
>executable by compiling other c files along with the bison generated c
>file, the c compiler says that undefined symbol : yyv, yys, yyerrflag,
>yytmp, yystate, yyps, yyv etc. How do I resolve this problem? Can anyone
>help me?

It depends on how your program reads the .c parser file: In one style, the
lexer is inserted into the parser file.

The style you have chosen suggests that you instead want the names in a
special header file. You should make sure that your compiler sees that
header file, either by some compiler command, or by making sure other
C-source files #includes it.

  Hans Aberg






reply via email to

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