Commit Graph

92 Commits

Author SHA1 Message Date
Akim Demaille
dd3c3f3006 * tests/bison.in: Adjust to CVS Autoconf.
* tests/calc.at (exp): We no longer need to special case GCC as
the warning flags are passed by configure.
* tests/atlocal.in: Adjust.
* configure.in: Bump to 1.30j.
2002-01-03 11:10:50 +00:00
Akim Demaille
f1d93aa21c Regen. 2002-01-03 11:09:47 +00:00
Akim Demaille
1214dfb03b Some actions of web2c.y are improperly triggered.
Reported by Mike Castle.
* src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
* tests/regression.at (Web2c): Rename as...
(Web2c Report): this.
(Web2c Actions): New.
2001-12-22 14:44:25 +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
f7e7f57941 The computation of nullable is broken: it doesn't handle empty
RHS's properly.
* tests/torture.at (GNU AWK Grammar): New.
* tests/sets.at (Nullable): New.
* src/nullable.c (set_nullable): Instead of blindly looping over
`ritems', loop over the rules, and then over their rhs's.
Work around Autotest bugs.
* src/warshall.c (bitmatrix_print): Don't use `+--+' as table
frame, because Autotest understand lines starting with a `+' as
traces from the shell.  Then, they are not processed properly.
Admittedly an Autotest bug, but we don't have time to wait for
Autotest to catch up.
* tests/regression.at (Broken Closure): Adjust to the new table
frames.
Move to...
* tests/sets.at: here.
2001-12-13 10:59:37 +00:00
Akim Demaille
ed45e93ed8 Bison dumps core on bash.y.
Reported by Pascal Bart.
* src/warshall.c (bitmatrix_print): New.
(TC): Use it.
When performing a transitive closure R(i, j) && R(j, k) => R(i,	k),
j must be the outer loop.
* tests/regression.at (Broken Closure): New.
2001-12-10 08:43:38 +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
a69f6fa569 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
(CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
Gettext doesn't compile cleanly, and dies with -Werror.
* src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
Include WARNING_CFLAGS here.
* lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
before being defined.
2001-11-30 14:23:47 +00:00
Akim Demaille
d39a6b7ca9 Instead of mapping the LHS of unused rules to -1, keep the LHS
valid, but flag the rules as invalid.
* src/gram.h (rule_t): `useful' is a new member.
* src/print.c (print_grammar): Adjust.
* src/derives.c (set_derives): Likewise.
* src/reader.c (packgram, reduce_output): Likewise.
* src/reduce.c (reduce_grammar_tables): Likewise.
* tests/reduce.at (Underivable Rules, Useless Rules): New.
2001-11-30 10:46:08 +00:00
Akim Demaille
d287d66a69 * src/reduce.c (reduce_output): Formatting changes.
* src/print.c (print_results, print_grammar): Likewise.
* tests/regression.at (Rule Line Numbers)
(Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
2001-11-30 10:45:45 +00:00
Akim Demaille
ea451a17d7 * src/reduce.c (nonterminals_reduce): Instead of throwing away
useless nonterminals, move them at the end of the symbol arrays.
(reduce_output): Adjust.
* tests/reduce.at (Useless Nonterminals): Adjust.
2001-11-30 10:45:28 +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
Akim Demaille
dee96b5a07 * tests/torture.at (Exploding the Stack Size with Malloc):
s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
2001-11-27 18:57:02 +00:00
Akim Demaille
af4483a0ab Typo. 2001-11-26 15:25:10 +00:00
Akim Demaille
674fd9acbc * src/reader.c (readgram): Make sure rules for mid-rule actions
have a lineno equal to that of their host rule.
Reported by Hans Aberg.
* tests/regression.at (Rule Line Numbers): New.
2001-11-26 15:24:06 +00:00
Akim Demaille
33285af04d * src/reader.c (read_declarations): Don't abort on tok_illegal,
issue an error message.
* tests/regression.at (Invalid %directive): New.
Reported by Hans Aberg.
2001-11-26 09:49:58 +00:00
Akim Demaille
1b9a8440cd * src/conflicts.c (conflicts_print): Don't complain at all when
there are no reduce/reduce conflicts, and as many shift/reduce
conflicts as expected.
* tests/regression.at (%expect right): Adjust.
2001-11-26 09:18:40 +00:00
Akim Demaille
a9f37dee0c Attaching lineno to buckets is stupid, since only one copy of each
symbol is kept, only the line of the first occurrence is kept too.
* src/symtab.h, src/symtab.c (bucket): Remove the line member.
* src/reader.c (rline_allocated): Remove, unused.
(symbol_list): Have a `line' member.
(symbol_list_new): New.
(readgram): Use it.
* src/print.c (print_grammar): Output the rule line numbers.
* tests/regression.at (Solved SR Conflicts)
(Unresolved SR Conflicts): Adjust.
Reported by Hans Aberg.
2001-11-23 14:03:43 +00:00
Akim Demaille
c555896775 * src/bison.simple (yyparse): When reporting verbosely an error,
no longer issue additional quotes around token names.
* tests/calc.at: Adjust.
2001-11-19 09:13:26 +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
badfc69c26 %expext was not functioning at all.
* src/conflicts.c (expected_conflicts): Set to -1.
(conflict_report): Use ngettext.
(conflicts_print): Check %expect and make its violation an error.
* doc/bison.texinfo (Expect Decl): Adjust.
* configure.in (AM_GNU_GETTEXT): Ask for ngettext.
* tests/regression.at (%expect not enough, %expect right)
(%expect too much): New.
2001-11-12 09:19:48 +00:00
Akim Demaille
fb28699f95 * tests/regression.at (Conflicts): Rename as...
(Unresolved SR Conflicts): this.
(Solved SR Conflicts): New.
2001-11-12 09:16:10 +00:00
Akim Demaille
dad56b10d3 * src/conflicts.c (print_reductions): Accept OUT as argument.
Output to it, not to output_obstack.
* src/print.c (print_actions): Adjust.
2001-11-12 09:15:43 +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
b6cac93afa * tests/regression.at (Invalid input): Remove, duplicate with
``Invalid input: 1''.
2001-11-12 09:15:03 +00:00
Akim Demaille
86d5a1ed5c * tests/torture.at (AT_DATA_STACK_TORTURE)
(Exploding the Stack Size with Alloca)
(Exploding the Stack Size with Malloc): New.
2001-11-12 09:14:50 +00:00
Akim Demaille
3c5d71ca8b * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
pattern.
2001-11-05 09:18:31 +00:00
Akim Demaille
ea57e0a3c4 * src/getargs.c (longopts): Support `--output'. getopt is now
able to understand that `--out' is OK: the two racing long options
are aliases.
(usage): Adjust.
* src/lex.h (tok_setopt): Remove, replaced with...
(tok_intopt, tok_stropt): these new guys.
* src/lex.c (getopt.h): Not needed.
(token_buffer, unlexed_token_buffer): Not const.
(percent_table): Promote `-' over `_' in directive names.
Active `%name-prefix', `file-prefix', and `output'.
(parse_percent_token): Accept possible arguments to directives.
Promote `-' over `_' in directive names.
* doc/bison.texinfo (Decl Summary): Split the list into
`directives for grammars' and `directives for bison'.
Sort'em.
Add description of `%name-prefix', `file-prefix', and `output'.
Promote `-' over `_' in directive names.
(Bison Options): s/%locactions/%locations/.  Nice Freudian slip.
Simplify the description of `--name-prefix'.
Promote `-' over `_' in directive names.
Promote `--output' over `--output-file'.
Fix the description of `--defines'.
* tests/output.at: Exercise %file-prefix and %output.
2001-11-04 16:26:59 +00:00
Akim Demaille
239e5c1a9a * src/symtab.h (SUNDEF): New.
* src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
stand for `uninitialized', instead of 0.
* src/reader.c (packsymbols, parse_thong_decl): Adjust.
* src/lex.c (lex): Adjust.
* tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
Number it 0.
Let yylex return it instead of a plain 0.
Reported by Dick Streefland.
2001-11-02 15:26:33 +00:00
Akim Demaille
ae9b5e5a4f * tests/regression.at (Mixing %token styles): New test. 2001-11-02 14:12:42 +00:00
Akim Demaille
1d708336d4 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
Check that `9foo.y' produces correct cpp guards.
* src/files.c (compute_header_macro): Prepend `BISON_' to CPP
guards.
Reported by Wwp.
2001-11-01 18:29:36 +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
6b784f8552 * configure.in: Bump to 1.30a.
Adjust to newer Autotest.
2001-11-01 14:27:42 +00:00
Akim Demaille
9507085cf3 Regen. 2001-10-26 14:33:02 +00:00
Akim Demaille
8d3c8c3643 Version 1.30. 2001-10-26 13:43:20 +00:00
Akim Demaille
ddf896eb8e Version 1.29f.
* tests/calc.at (_AT_CHECK_CALC_ERROR): Don't use `foo && bar', to
avoid spurious failures.
2001-10-18 16:18:54 +00:00
Akim Demaille
94ff2b9475 * tests/atlocal.in (GCC): Add.
* tests/calc.at: s/m4_match/m4_bmatch/.
s/m4_patsubst/m4_bpatsubst/.
(AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
* configure.in: AC_SUBST(GCC).
2001-10-18 15:24:53 +00:00
Akim Demaille
470d206b2e * m4/m4.m4: Remove.
* configure.in: M4 is no longer needed, but autom4te is.
* tests/Makefile.am (AUTOTEST): Don't define AUTOM4TE, let
AC_SUBST do it.
2001-10-10 15:24:02 +00:00
Akim Demaille
16cd214585 * INSTALL, config/config.guess, config/config.sub, config/mdate-sh
* config/mkinstalldirs, lib/ansi2knr.c: Update.
2001-10-10 14:39:11 +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
f1394282f0 * tests/regression.at (Invalid input): New.
* src/lex.c (lex): Be sure to set `token_buffer' in any case.
Reported by Shura.
2001-10-02 15:52:24 +00:00
Akim Demaille
d8b1af2801 * tests/calc.at: Now that --debug works, the tests must be adjusted. 2001-10-02 15:36:11 +00:00
Akim Demaille
ab30845981 * tests/testsuite.at: Update to newer Autotest.
* tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
2001-09-28 11:56:12 +00:00
Akim Demaille
02cbcfc577 Position independent wrapper.
* tests/bison: Remove.
* tests/bison.in: New.
* configure.in: Adjust.
2001-09-27 15:06:14 +00:00
Akim Demaille
8c67836b58 Position independent wrapper.
* tests/bison: Remove.
* tests/bison.in: New.
* configure.in: Adjust.
2001-09-27 15:00:02 +00:00
Akim Demaille
19f01e885f * configure.in: Bump to 1.29b.
* tests/Makefile.am (DISTCLEANFILES): Add package.m4.
* tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
need xmalloc.c in calc.y.
From Pascal Bart.
2001-09-22 16:56:37 +00:00
Akim Demaille
ce209526ed * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend upon package.m4. 2001-09-21 16:41:46 +00:00
Akim Demaille
b94bf14aac More ignores. 2001-09-21 16:35:45 +00:00
Akim Demaille
cdd11a9322 * tests/Makefile.am (package.m4): Move to...
($(srcdir)/$(TESTSUITE)): here.
2001-09-21 14:44:22 +00:00
Marc Autret
47cef7a2ff * tests/regression.at: New test (comment in %union). 2001-09-18 15:18:26 +00:00