Commit Graph

30 Commits

Author SHA1 Message Date
Akim Demaille
d6b12c2d8b * src/output.c (output_short_table, output_short_or_char_table):
Change the prototype to use `int' for array ranges: some
invocations do pass an int, not a short.
Reported by Wayne Green.
2001-12-27 18:28:23 +00:00
Akim Demaille
55b4181996 Reductions in web2c.y are improperly reported.
Reported by Mike Castle.
* src/conflicts.c (print_reductions): Fix.
* tests/regression.at (Web2c): New.
2001-12-22 14:41:15 +00:00
Akim Demaille
6929a4a0e8 Adjust. 2001-12-18 09:58:07 +00:00
Akim Demaille
d4593e87be Some host fail on `assert (!"foo")', which expands to
((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
Reported by Nelson Beebee.
* src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
`#define it_succeeded 0' and `assert (it_succeeded)'.
2001-12-18 09:33:23 +00:00
Akim Demaille
52e9776027 * src/reader.c (copy_action): When --yacc, don't append a `;'
to the user action: let it fail if lacking.
Suggested by Aharon Robbins and Tom Tromey.
2001-12-15 11:07:56 +00:00
Akim Demaille
e6970f2ed0 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
its argument.
Reported by Peter Hámorský.
2001-12-05 10:58:44 +00:00
Akim Demaille
0aa2ac9063 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
* src/reduce.c (reduce_grammar_tables): Do not free useless tags,
as all tags are free'ed afterwards.
From Enrico Scholz.
2001-11-28 11:42:56 +00:00
Marc Autret
c18cf8cb26 Revert doc patch. 2001-11-26 19:19:21 +00:00
Marc Autret
aead559e00 * doc/bison.texinfo (Mystery Conflicts): Hint '-v' use.
From Golubev I. N.
2001-11-25 12:57:33 +00:00
Akim Demaille
efcff8cd5c * tests/calc.at, tests/output.at, tests/regression.at,
* tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
now the tests are run in private dirs, therefore AC_CLEANUP and
family can be simplified to 0-ary.
* tests/atlocal.in: Now that we run `elsewhere' than in tests/,
use abs. path to find config.h.
2001-11-14 15:16:40 +00:00
Akim Demaille
5f1ff7cd74 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
the result instead of using...
(src_total, rrc_total, src_count, rrc_count): Remove.
(any_conflicts): Remove.
(print_conflicts): Split into...
(conflicts_print, conflicts_output): New.
* src/conflicts.h: Adjust.
* src/main.c (main): Invoke both conflicts_output and conflicts_print.
* src/print.c (print_grammar): Issue `n' between to rule outputs.
* tests/regression.at (Conflicts): New.
Reported by Tom Lane.
2001-11-12 09:15:25 +00:00
Akim Demaille
97e9ee3ad5 * src/bison.simple (YYSTACK_REALLOC): New.
(yyparse) [!yyoverflow]: Use it and free the old stack.
Reported by FIXME: Who.
2001-11-12 09:14:35 +00:00
Akim Demaille
7ae1c5929e * src/reader.c (parse_thong_decl): Formatting changes.
(token_translations_init): New, extracted from...
(packsymbols): Here.
Adjust.
2001-11-02 14:02:31 +00:00
Akim Demaille
705131d1de * tests/regression.at (Invalid input: 2): New.
* src/lex.c (unlexed_token_buffer): New.
(lex, unlex): Adjust: when unlexing, be sure to save token_buffer
too.
Reported by Wwp.
2001-11-01 18:03:46 +00:00
Akim Demaille
31a743b2bb * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
Use `#if YYSTACK_USE_ALLOCA', not `#ifdef'.
Reported by Airy Andre.
2001-10-10 14:52:20 +00:00
Akim Demaille
d9302e4b73 * tests/regression.at (Invalid CPP headers): New.
From Alexander Belopolsky.
* src/files.c (compute_header_macro): Map non alnum chars to `_'.
2001-10-02 16:17:41 +00:00
Akim Demaille
445cb4e989 * src/output.c (output_parser): Assert `skeleton'.
* src/files.c (skeleton_find): Look harder for skeletons on DOSish
systems.
From Shura.
2001-10-02 14:48:53 +00:00
Akim Demaille
da7ab9b7b0 * src/complain.c: No longer try to be standalone: use system.h.
Don't assume __STDC__ is defined to 1. Just test if it is defined.
* src/complain.h: Likewise.
* src/reduce.c (useless_nonterminals, inaccessable_symbols):
Remove the unused variable `n'.
From Albert Chin-A-Young.
2001-09-20 17:08:42 +00:00
Marc Autret
7972022dac * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
do that.
Reported by Keith Browne.
2001-09-18 11:37:11 +00:00
Marc Autret
a6f622cd50 * doc/bison.1 (mandoc): Adjust.
From Juan Manuel Guerrero.
2001-08-28 13:58:27 +00:00
Marc Autret
08a161353c Update. 2001-08-08 23:16:44 +00:00
Marc Autret
fdc6758b79 doc/bison.texinfo: Change @samp{$<@dots{}>} to @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule. 2001-08-08 21:55:36 +00:00
Akim Demaille
8303fc422a * tests/atconfig.in (CPPFLAGS): Add.
* tests/calc.at (AT_CHECK): Use CPPFLAGS.
2001-08-04 14:00:09 +00:00
Akim Demaille
53b74c0c4c * lib/strspn.c: New. 2001-08-03 08:09:03 +00:00
Akim Demaille
847bf1f538 * doc/autoconf.texi: Document @$.
(Locations): New section.
2001-08-01 17:49:14 +00:00
Akim Demaille
ef7ddeddaa * src/output.c (output_parser): Compute the `#line' lines when
there are.
* src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
Suggested by Hans Aberg.
2000-12-19 13:40:42 +00:00
Akim Demaille
2a91a95e9e * src/reader.c (copy_definition, parse_union_decl, copy_action)
(copy_guard): Quote the file names.
Reported by Laurent Mascherpa.
2000-12-12 17:12:43 +00:00
Akim Demaille
ff4a34be27 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
* m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
New files, from Fileutils 4.0.27.
* src/main.c (printable_version): Remove.
* src/lex.c, src/reader.c: Use `quote'.


* lib/error.c, lib/error.h: New files, needed by xmalloc.c.
2000-10-16 17:28:41 +00:00
Akim Demaille
8e03724b11 When a literal string is used to define two different tokens,
`bison -v' segfaults.
Reported by Piotr Gackiewicz, and fixed by Neil Booth.
* tests/regression.m4: New file.
Include the core of the sample provided by Piotr Gackiewicz.
* src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
properly.
2000-10-04 11:52:53 +00:00
Akim Demaille
a9e64249c8 * src/reader.c (parse_expect_decl): Keep `count' within the size
of `buffer'.
From Neil Booth.
2000-10-04 11:31:14 +00:00