Subject: Re: Question regarding the yylval in libc library.
To: Shankar Agarwal <email@example.com>
From: Assar Westerlund <firstname.lastname@example.org>
Date: 08/01/2001 14:10:35
Shankar Agarwal <email@example.com> writes:
> Hi All,
> I have one small problem. We are using -p option with both yacc and lex
> for compiling nslexer.l and nsparser.y code in lib/libc/net directory
> and the code that is generated does not seem to be compatible for yylval
> in nslexer.c. The list of redefines does not include yylval in nslexer.c
> but it is redefined in nsparser.c so i am getting compilation error. Is
> there any way to resolve this problem. How is this problem taken care in
> the netbsd builds.
You're trying to build nslexer.l and nsparser.y stand-alone into your
Running `make -n nslexer.c nsparser.c' in /usr/src/lib/libc tells me:
yacc -p_nsyy -d -o nsparser.c /usr/src/lib/libc/net/nsparser.y
lex -P_nsyy -t /usr/src/lib/libc/net/nslexer.l | sed -e '/YY_BUF_SIZE/s/16384/1024/' >nslexer.c
And as you can see from the generated C (and object) files, both
nslexer.c and nsparser.c refer to _nsyylval.
Exactly how do you build these files?