Commit Graph

1533 Commits

Author SHA1 Message Date
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
Paul Eggert
92a060fd6a Remove K&R vestiges.
* configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
* src/complain.c (VA_START): Remove.  Assume prototypes.
(vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
(private_strerror, warn_at, warn, complain_at, complain, fatal_at,
fatal): Assume prototypes.
* src/complain.h: Assume prototypes.
* src/system.h (PARAMS): Remove.
Include <limits.h> unconditionally, since it's guaranteeed even
for a freestanding C89 compiler.
(SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
* src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
2002-10-21 05:31:34 +00:00
Paul Eggert
d33cb3ae09 Remove all uses of PARAMS, since we now assume C89 or better. 2002-10-21 05:30:50 +00:00
Paul Eggert
b8452344de (getargs, cli_present, cli_get_value): Prototype. 2002-10-21 05:29:50 +00:00
Paul Eggert
930393cf02 (PARAMS): Remove.
Include <limits.h> unconditionally, since it's guaranteeed even
for a freestanding C89 compiler.
(SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
2002-10-21 05:29:07 +00:00
Paul Eggert
49f801e6fe Assume prototypes. 2002-10-21 05:28:34 +00:00
Paul Eggert
2118414023 (VA_START): Remove. Assume prototypes.
(vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
(private_strerror, warn_at, warn, complain_at, complain, fatal_at,
fatal): Assume prototypes.
2002-10-21 05:28:16 +00:00
Paul Eggert
87004b05f7 (AC_C_CONST, AM_C_PROTOTYPES): Remove. 2002-10-21 05:27:45 +00:00
Akim Demaille
e7cb57c0b8 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
* data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
(yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
(yyresolveStates, yyresolveAction, yyresolveStack)
(yyprocessOneStack): Use them.
(yy_reduce_print): New.
* tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
2002-10-20 16:09:47 +00:00
Akim Demaille
0245f82d31 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
arguments and output `void'.
(b4_c_function): Rename as...
(b4_c_function_def): this.
(b4_c_function_decl, b4_c_ansi_function_def)
(b4_c_ansi_function_decl): New.
Change the interpretation of the arguments: before `int, foo', now
`int foo, foo'.
* data/yacc.c (yyparse): Prototype and define thanks to these.
Adjust b4_c_function_def uses.
* data/glr.c (yyparse): Likewise, but ANSI only.
2002-10-20 12:51:10 +00:00
Akim Demaille
39912f5263 * src/output.c (prepare): Move the definition of `tokens_number',
`nterms_number', `undef_token_number', `user_token_number_max'
to...
(prepare_tokens): Here.
(prepare_tokens): Rename as...
(prepare_symbols): this.
(prepare): Move the definition of `rules_number' to...
(prepare_rules): here.
(prepare): Move the definition of `last', `final_state_number',
`states_number' to...
(prepare_states): here.
* data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
2002-10-20 11:20:15 +00:00
Akim Demaille
20c1e2ad98 * src/tables.h, src/tables.c, src/output.c: Comment changes. 2002-10-20 11:18:14 +00:00
Akim Demaille
21964f4394 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
* data/c.m4: here.
2002-10-20 11:17:20 +00:00