Article View: gnu.utils.bug
Article #1594missing declaration in bison's y.tab.h
From: Jochen Schwarze
Date: Fri, 05 May 1989 17:45
Date: Fri, 05 May 1989 17:45
40 lines
1558 bytes
1558 bytes
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
Technical Details
Message-ID:
<555@isaak.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!lll-winken!uunet!mcvax!unido!isaak!schwarzeShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!lll-winken!uunet!mcvax!unido!isaak!schwarze From: schwarze@isaak.UUCP (Jochen Schwarze) Newsgroups: gnu.utils.bug Subject: missing declaration in bison's y.tab.h Keywords: bison yylval Message-ID: <555@isaak.UUCP> Date: 5 May 89 17:45:43 GMT Organization: ISA GmbH, Stuttgart, West-Germany Lines: 40