Le 19 fA(c)vr. 2019 A 07:01, Peng Yu <pengyu...@gmail.com> a A(c)crit :
I don't want to call "rs_init(&yylval->str)" in any action. You don't have to do that in every action, just the ones returning strings. I don't get the point. Because I misread, sorry. I read "in every action". Is there a problem to not call "rs_init(&yylval->str)" in any action (this include the actions that return strings)? Well, I don't see how you would store several strings (say echo "foo" "bar", that's probably three strings) with just one allocation. But then again, I don't know enough about your situation, and your parser. That's what this link is about. https://www.gnu.org/software/bison/manual/bison.html#Strings-are-Destro yed _______________________________________________ help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison