Subject: bin/2997: some yacc parser variables are unaffected by -p flag
To: None <gnats-bugs@gnats.netbsd.org>
From: Mike Long <mike.long@analog.com>
List: netbsd-bugs
Date: 12/06/1996 03:01:37
>Number: 2997
>Category: bin
>Synopsis: some yacc parser variables are unaffected by -p flag
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Dec 6 00:20:00 1996
>Last-Modified:
>Originator: Mike Long <mike.long@analog.com>
>Organization:
We don't need no steenking organization
>Release: 961205
>Environment:
System: NetBSD azathoth 1.2B NetBSD 1.2B (AZATHOTH) #27: Thu Dec 5 02:57:14 EST 1996 root@azathoth:/usr/src/sys/arch/i386/compile/AZATHOTH i386
>Description:
yacc(1) defines the -p flag as follows: "The -p option changes
the prefix prepended to yacc-generated symbols to the string denoted
by symbol_prefix." I've noticed that this is not true for two
variables: yysslim and yystacksize.
>How-To-Repeat:
cd src/lib/libpcap; make clean && make grammar.c YFLAGS=-ppcap_yy
>Fix:
Apply this patch:
*** /usr/src/usr.bin/yacc/output.c~ Tue Mar 19 07:34:32 1996
--- /usr/src/usr.bin/yacc/output.c Fri Dec 6 02:50:44 1996
***************
*** 114,117 ****
--- 114,119 ----
fprintf(code_file, "#define yyss %sss\n", symbol_prefix);
++outline;
+ fprintf(code_file, "#define yysslim %ssslim\n", symbol_prefix);
+ ++outline;
fprintf(code_file, "#define yyssp %sssp\n", symbol_prefix);
++outline;
***************
*** 119,122 ****
--- 121,126 ----
++outline;
fprintf(code_file, "#define yyvsp %svsp\n", symbol_prefix);
+ ++outline;
+ fprintf(code_file, "#define yystacksize %sstacksize\n", symbol_prefix);
++outline;
fprintf(code_file, "#define yylhs %slhs\n", symbol_prefix);
>Audit-Trail:
>Unformatted: