mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-11 05:13:04 +00:00
Currently yypull_parse takes a yypstate* as argument, and accepts it to be NULL. This does not seem to make a lot of sense: rather it is its callers that should do that. I believe this is historical: yypull_parse was introduced first (c3d503425f), with yyparse being a macro. So yyparse could hardly deal with memory allocation properly. In7172e23e8fthat yyparse was turned into a genuine function. At that point, it should have allocated its own yypstate*, which would have left yypull_parse deal with only one single non-null ypstate* argument. Fortunately, it is nowhere documented that it is valid to pass NULL to yypull_parse. It is now forbidden. * data/skeletons/yacc.c (yypull_parse): Don't allocate a yypstate. Needs a location to issue the error message. (yyparse): Allocate the yypstate.