--- bison.simple Tue Jun 18 09:46:23 2002 +++ bison.simple.eof Tue Jun 18 09:53:19 2002 @@ -1123,7 +1123,16 @@ /* Return failure if at end of input. */ if (yychar == YYEOF) - YYABORT; + { + YYPOPSTACK; + while (yyssp > yyss) + { + yydestructor (*yyssp, *yyvsp); + YYPOPSTACK; + } + YYABORT; + } + YYDPRINTF ((stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1])); yydestructor (yychar1, yylval);