skeleton.c.diff 837 B

123456789101112131415161718192021222324
  1. diff -Naur yacc-1.9.1-orig/skeleton.c yacc-1.9.1/skeleton.c
  2. --- yacc-1.9.1-orig/skeleton.c 2008-07-17 20:01:30.000000000 +0300
  3. +++ yacc-1.9.1/skeleton.c 2008-07-17 20:02:55.000000000 +0300
  4. @@ -18,6 +18,7 @@
  5. "/*static char yysccsid[] = \"from: @(#)yaccpar 1.9 (Berkeley) 02/21/93\";*/",
  6. "static char yyrcsid[] = \"$Id: skeleton.c,v 1.2 1997/06/23 02:51:17 tdukes Exp $\";",
  7. "#endif",
  8. + "#include <string.h>",
  9. "#define YYBYACC 1",
  10. "#define YYMAJOR 1",
  11. "#define YYMINOR 9",
  12. @@ -226,7 +227,10 @@
  13. " YYPREFIX, yystate, yyn, yyrule[yyn]);",
  14. "#endif",
  15. " yym = yylen[yyn];",
  16. - " yyval = yyvsp[1-yym];",
  17. + " if (yym)",
  18. + " yyval = yyvsp[1-yym];",
  19. + " else",
  20. + " memset(&yyval, 0, sizeof yyval);",
  21. " switch (yyn)",
  22. " {",
  23. 0