🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Mark-Jason Dominus Sun, 12 Apr 1992 21:02
Bison -p prefix fails to generate correct foo.tab.h file
#136
Author: Mark-Jason Dominus
Date: Sun, 12 Apr 1992 21:02
42 lines
1334 bytes
Bison's -p option fails to work correctly with its -d option.

It changes all occurrences of the given external names, except the
declaration 
	extern YYSTYPE yylval;
in *.tab.h.

For example, if I run bison with
	bison -p foo -d s.y
on this input file:

--- BEGIN INPUT FILE s.y

%token BITE_ME

%%

input: BITE_ME { /* Or don't. */ ; }
--- END INPUT FILE s.y

I get this s.tab.h file:

---- BEGIN OUTPUT FILE s.tab.h
#ifndef YYSTYPE
#define YYSTYPE int
#endif
#define	BITE_ME	258


extern YYSTYPE yylval;
---- END OUTPUT FILE s.tab.h

This is broken because it should be declaring 
	extern YYSTYPE foolval;
instead of
	extern YYSTYPE yylval;
.

I am running bison 1.16 on a Sun 690MP (Sparc) with SunOS 4.1.2.

  The night is pleasing to us because, like memory, it erases idle details.
Mark-Jason Dominus 	  			    mjd@central.cis.upenn.edu 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads