Commit Graph

1545 Commits

Author SHA1 Message Date
Paul Eggert
9e4c5cb833 (quotearg_buffer_restyled): Fix off-by-two bug in trigraph handling. 2002-11-03 07:03:53 +00:00
Paul Eggert
01cfa69791 (prepare_symbols): When printing token names, escape "[" as "@<:@" and
likewise for "]".
2002-11-03 06:41:59 +00:00
Paul Eggert
3fbf949b82 (errno): Remove declaration, as we are now assuming C89 or better, and
C89 guarantees errno.
2002-11-03 06:16:55 +00:00
Paul Eggert
762b212bdf * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
Check for close failures.
* src/files.h (xfclose): Return void, not int, since it always
returned zero.
* src/files.c (xfclose): Likewise.  Report I/O error if ferror
indicates one.
* src/output.c (output_skeleton): Use xfclose rather than fclose
and ferror.  xfclose now checks ferror.

* data/glr.c (YYLEFTMOST_STATE): Remove.
(yyreportTree): Use a stack-based leftmost state.  This avoids
our continuing battles with bogus warnings about initializers.
2002-10-30 09:45:46 +00:00
Akim Demaille
56100c60da * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
#if.
2002-10-30 08:31:24 +00:00
Paul Eggert
30ba05f239 (output_skeleton): Use xfclose rather than fclose and ferror. xfclose
now checks ferror.
2002-10-30 06:20:02 +00:00
Paul Eggert
e63ee1f16c (xfclose): Return void, not int, since it always returned zero.
Report I/O error if ferror indicates one.
2002-10-30 06:19:00 +00:00
Paul Eggert
760d7aa8fa (xfclose): Return void, not int, since it always returned zero. 2002-10-30 06:18:19 +00:00
Paul Eggert
11a712626c (bitset_stats_read, bitset_stats_write): Check for close failures. 2002-10-30 06:17:52 +00:00
Paul Eggert
782a05f9de (YYLEFTMOST_STATE): Remove.
(yyreportTree): Use a stack-based leftmost state.  This avoids
our continuing battles with bogus warnings about initializers.
2002-10-30 05:38:30 +00:00
Paul Hilfinger
09903f303a Add test glr-regr1.at to check for incorrect collapsing of states during
table compression in GLR parser.
2002-10-30 02:03:14 +00:00
Paul Eggert
413fcf3a20 (AC_INIT): Bump version to 1.75b. 2002-10-25 06:56:26 +00:00
Paul Eggert
5c16c6b13a Version 1.75a. 2002-10-25 06:05:50 +00:00
Paul Eggert
1f1b791bf0 Fix misspelling of "Valgrind". 2002-10-25 05:37:58 +00:00
Paul Eggert
bf1ebda27b * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
* tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
we use malloc.  Don't assume 'A' through 'Z' are contiguous.
Don't assume strdup exists; POSIX says its an XSI extension.
Check for buffer overflow on input.
2002-10-25 05:14:04 +00:00
Paul Eggert
2946869a28 (_AT_DATA_CALC_Y): Remove unused strcat declaration. 2002-10-25 05:13:44 +00:00
Paul Eggert
c469accea7 (_AT_TEST_GLR_CALC): Include stdlib.h, since
we use malloc.  Don't assume 'A' through 'Z' are contiguous.
Don't assume strdup exists; POSIX says its an XSI extension.
Check for buffer overflow on input.
2002-10-25 05:13:24 +00:00
Akim Demaille
b526ee6116 * src/output.c (output_skeleton): Don't disable M4sugar comments
too soon: it results in comments being expanded.
* data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
first output.
2002-10-24 11:40:27 +00:00
Akim Demaille
f1886bb280 * data/yacc.c (m4_int_type): New.
* data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
char' as only yacc.c wants K&R portability.
* data/glr.c (yysigned_char): Remove.
* data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
Reported by Quoc Peyrot.
2002-10-24 10:01:52 +00:00
Akim Demaille
48461d4b28 Regen. 2002-10-24 09:58:55 +00:00
Paul Eggert
c55762568f * src/main.c (main): With --trace=time, report times even if a
non-fatal error occurs.  Formerly, the times were reported in some
such cases but not in others.
* src/reader.c (reader): Just return if a complaint has been issued,
instead of exiting, so that 'main' can report times.
2002-10-23 18:42:04 +00:00
Paul Eggert
f6d0c2394c (main): With --trace=time, report times even if a non-fatal error
occurs.  Formerly, the times were reported in some such cases but not
in others.
2002-10-23 18:41:43 +00:00
Paul Eggert
f956c304c5 (reader): Just return if a complaint has been issued,
instead of exiting, so that 'main' can report times.
2002-10-23 18:41:04 +00:00
Akim Demaille
27b0ffea3e * src/system.h: Include sys/types.
Reported by Bert Deknuydt.
2002-10-23 16:30:50 +00:00
Paul Eggert
223a78837b AM_PROG_LEX -> AC_PROG_LEX.
Go back to returning (not exiting) from main.
Work around empty struct in glr.c.
Typo fixes for doc.
2002-10-23 08:09:43 +00:00
Paul Eggert
41cce2f604 (AC_PROG_LEX): Use instead of AM_PROG_LEX.
Suggested by Art Haas.
2002-10-23 08:07:13 +00:00
Paul Eggert
e0c74f0d34 (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit decl; not needed any more. 2002-10-23 07:35:48 +00:00
Paul Eggert
e95aed631d (main): Use return to exit, undoing yesterday's change.
The last OS that we could find where this wouldn't work is
SunOS 3.5, and that's too old to worry about now.
2002-10-23 07:00:19 +00:00
Paul Eggert
ffa4c58acb (struct yyltype): Define members even when not
doing locations.  This is more consistent with yacc.c, and it
works around the following bug reports:
http://mail.gnu.org/pipermail/bug-bison/2002-October/001748.html
http://mail.gnu.org/pipermail/bug-bison/2002-October/001764.html
http://mail.gnu.org/pipermail/bug-bison/2002-October/001769.html
2002-10-23 06:30:49 +00:00
Paul Eggert
c827f760f6 Minor spelling and typographical fixes. Use @acronym consistently.
Standardize on "Yacc" instead of "YACC", "Algol" instead of "ALGOL".
Give a bit more history about BNF.
2002-10-23 05:26:32 +00:00
Paul Eggert
6db10d14be Be consistent about 'bool'.
* src/complain.c (warning_issued): Renamed from warn_message_count; now bool.
(complaint_issued): Renamed from complain_message_count; likewise.

* src/main.c (main): Use exit to exit with failure.

* src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
rather than 1 and 0.
* src/main.c (main): Likewise.
* src/getargs.c (getargs): Likewise.
* src/reader.c (reader): Likewise.

* src/getarg.c (getargs): Remove duplicate code for
"Try `bison --help'".

* src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
What was that "2" for?

* src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
* src/getargs.c (usage): Likewise.

* src/getargs.c (getargs): When there are too few operands, report
the last one.  When there are too many, report the first extra
one.  This is how diffutils does it.
2002-10-23 03:59:56 +00:00
Akim Demaille
8b76775adb * data/README: New. 2002-10-22 11:32:38 +00:00
Akim Demaille
f0e48240c9 Update. 2002-10-22 11:19:45 +00:00
Akim Demaille
78bcec17c8 Regen. 2002-10-22 07:47:55 +00:00
Paul Eggert
ec88357a8c (fatal, fatal_at): Add __attribute__((__noreturn__)).
(warning_issued): Renamed from warn_message_count.  Now bool.
(complaint_issued): Renamed from complain_message_count.  Now bool.
2002-10-22 05:12:08 +00:00
Paul Eggert
5ca3209b44 (main): Use exit to exit with failure.
Use EXIT_FAILURE and EXIT_SUCCESS rather than 1 and 0.
2002-10-22 05:07:12 +00:00
Paul Eggert
0df27e8b2d (getargs): Use EXIT_FAILURE and EXIT_SUCCESS rather than 1 and 0.
Remove duplicate code for "Try `bison --help'".
(usage):  Add __attribute__((__noreturn__)).
2002-10-22 05:06:21 +00:00
Paul Eggert
901ec1537a (xfopen, xfclose): Use EXIT_FAILURE rathern than 2.
What was that "2" for?
2002-10-22 05:01:46 +00:00
Paul Eggert
0ae6073a18 (warning_issued): Renamed from warn_message_count,
so that we needn't worry about integer overflow (!).
Now of type bool.  All uses changed.
(complaint_issued): Renamed from complain_message_count; likewise.
(fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS rather than 1 and 0.
2002-10-22 04:53:49 +00:00
Paul Eggert
8307162d58 Use C99-style bool instead of our own style. 2002-10-22 04:46:28 +00:00
Paul Eggert
738c69de37 Use C99-style bool instead of our own style.
(comment change only)
2002-10-22 04:45:51 +00:00
Paul Eggert
b4afb6bbe5 Use C99-style bool instead of our own style.
(reader): Use EXIT_FAILURE and EXIT_SUCCESS rather than 1 and 0.
2002-10-22 04:43:50 +00:00
Paul Eggert
637c4b283c se C99-style bool instead of our own style. 2002-10-22 04:41:25 +00:00
Paul Eggert
78b8881659 (bool, false, true): Use a definition consistent with ../lib/hash.c. 2002-10-22 04:40:09 +00:00
Paul Eggert
a3714bcedf (hash_compare_symbol_t): (a ? FALSE : TRUE) -> (! a) 2002-10-22 04:39:44 +00:00
Paul Eggert
5dd5fd4a56 (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a) 2002-10-22 04:39:05 +00:00
Paul Eggert
fece5986bf (EXTRA_DIST): Add stdbool.m4. 2002-10-22 04:38:11 +00:00
Paul Eggert
8d60a570d5 (AC_HEADER_STDBOOL): Add. 2002-10-22 04:37:50 +00:00
Paul Eggert
a7e92301ef New file, from coreutils 4.5.3. 2002-10-22 04:36:31 +00:00
Paul Eggert
a4b6efd473 (getargs): When there are too few operands, report the last one. When
there are too many, report the first extra one.  This is how diffutils
does it.
2002-10-21 18:15:13 +00:00