Re: how to free yylval

2008-01-07 Thread cwhite
the solution is just %destructor { free($$); } IDENTIFIER STRING_CONSTANT and free(yylval.string_type); Thanks! -- View this message in context: http://www.nabble.com/how-to-free-yylval-tp14659563p14683202.html Sent from the Gnu - Bison - Help mailing list archive at Nabble.com. ___ help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison

Re: how to free yylval

2008-01-07 Thread Hans Aberg
On 7 Jan 2008, at 07:20, cwhite wrote: I use yylval.string_type = strdup(yytext); in my flex file but it seems that this is wasteful and it may cause memory leaks. I thought that yytext gets replaced everytime the lexer is called so how is this wasteful? How do I free yylval so that those

how to free yylval

2008-01-06 Thread cwhite
is an alternative to strdup, I'd like to know what that is. Thanks. -- View this message in context: http://www.nabble.com/how-to-free-yylval-tp14659563p14659563.html Sent from the Gnu - Bison - Help mailing list archive at Nabble.com. ___ help-bis