Subject: Re: yacc bug? or me?
To: Rob Quinn <>
From: Patrick Welche <>
List: current-users
Date: 03/05/2001 21:14:20
On Mon, Mar 05, 2001 at 03:33:48PM -0500, Rob Quinn wrote:
>  I haven't done this for a while, but I think you need to copy the string
> pointed to by yytext, and not the pointer itself.
>  For instance, I changed this to yylval=strdup(yytext) and then it worked as
> you expected:

Thank you! I had thought of copying but went for char yylval[20] which can't
work as #define YYSTYPE char[20] won't go far. I hadn't thought of strdup!