X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/aeb57fb68d65623029357887015c2044342e2722..d0f2b7f8566c186f34392efeedbab08c2ae72129:/doc/bison.texinfo?ds=sidebyside diff --git a/doc/bison.texinfo b/doc/bison.texinfo index f39f79ec..7fb05155 100644 --- a/doc/bison.texinfo +++ b/doc/bison.texinfo @@ -2336,6 +2336,7 @@ Here are the C and Bison declarations for the multi-function calculator. @group %@{ #include /* For printf, etc. */ + #include /* For pow, used in the grammar. */ #include "calc.h" /* Contains definition of `symrec'. */ int yylex (void); void yyerror (char const *); @@ -2484,7 +2485,6 @@ struct init @end group @group -#include /* Math functions, cos(), sin(), etc. */ struct init const arith_fncts[] = @{ @{ "atan", atan @}, @@ -9969,7 +9969,7 @@ calcxx_driver::scan_begin () else if (!(yyin = fopen (file.c_str (), "r"))) @{ error (std::string ("cannot open ") + file + ": " + strerror(errno)); - exit (1); + exit (EXIT_FAILURE); @} @} @@ -10703,11 +10703,17 @@ yyparse (char const *file) { yyin = fopen (file, "r"); if (!yyin) - exit (2); + { + perror ("fopen"); + exit (EXIT_FAILURE); + } /* One token only. */ yylex (); if (fclose (yyin) != 0) - exit (3); + { + perror ("fclose"); + exit (EXIT_FAILURE); + } return 0; }