Subject: Re: yacc bug? or me?
To: Rob Quinn <firstname.lastname@example.org>
From: Patrick Welche <email@example.com>
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 which can't
work as #define YYSTYPE char won't go far. I hadn't thought of strdup!