[gnu.utils.bug] missing declaration in bison's y.tab.h

schwarze@isaak.UUCP (Jochen Schwarze) (05/06/89)

The following declaration seems to be missing in bison's y.tab.h file:

    extern YYSTYPE yylval;

A lex file used in combination with the bison parser and including
the y.tab.h file will therefore not compile, if its code refers to
the yylval union to set a scanned lvalue for the parser.

To add the missing line to y.tab.h, apply the following patch to reader.c:

_______ cut here _______

*** reader.c.ORIG	Fri Mar 24 19:00:02 1989
--- reader.c	Fri Mar 24 19:01:38 1989
***************
*** 649,655 ****
  	    {
  	      fprintf(fattrs, " YYSTYPE;\n");
  	      if (fdefines)
! 		fprintf(fdefines, " YYSTYPE;\n");
  	      /* JF don't choke on trailing semi */
  	      c=skip_white_space();
  	      if(c!=';') ungetc(c,finput);
--- 649,655 ----
  	    {
  	      fprintf(fattrs, " YYSTYPE;\n");
  	      if (fdefines)
! 		fprintf(fdefines, " YYSTYPE;\nextern YYSTYPE yylval;\n");
  	      /* JF don't choke on trailing semi */
  	      c=skip_white_space();
  	      if(c!=';') ungetc(c,finput);

_____ cut here _____

-- 
Jochen Schwarze, ISA GmbH, Stuttgart, West Germany

UUCP:   schwarze@isaak.UUCP
BITNET: isaak.uucp!schwarze@unido.bitnet