Commit Graph

72 Commits

Author SHA1 Message Date
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
Marc Autret
ea4f4c4c1b * tests/output.at: Add tests for --defines and --graph. 2001-09-18 11:14:21 +00:00
Marc Autret
d97207ad77 * tests/output.at: Removes tests of %{header,src}_extension features. 2001-09-18 11:04:29 +00:00
Akim Demaille
3068221b53 * tests/Makefile.am (package.m4): New.
* tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
(_AT_CHECK_CALC_ERROR): Likewise.
Factor the `, ' part of verbose error messages.
2001-09-18 10:51:36 +00:00
Akim Demaille
8cedc168fa * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
(AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
(AT_CHECK_OUTPUT): this.
Merely check ls' exit status, its output is useless.
2001-09-10 09:59:39 +00:00
Akim Demaille
3b14996787 * tests/calc.at: Use m4_match.
(_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
2001-09-10 09:31:50 +00:00
Akim Demaille
31478b7ab7 * configure.in: Bump to 1.29a. 2001-09-10 08:23:56 +00:00
Akim Demaille
d37a7c45b3 Regen. and fix typo in configure.in. 2001-08-30 15:41:41 +00:00
Akim Demaille
d63e24071f * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
* m4/atconfig.m4: Remove.
* tests/testsuite.at, tests/atlocal.in, tests/output.at,
* tests/bison: New.
* tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
m4_if, m4_patsubst, and m4_regexp.
* tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
`input' file instead of echo.
2001-08-30 15:36:37 +00:00
Akim Demaille
e0a53a7f4a More ignores. 2001-08-29 12:08:41 +00:00
Akim Demaille
e373aad966 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
* Makefile.maint: Sync. with CVS Autoconf.
2001-08-27 09:33:34 +00:00
Pascal Bart
dd9f12de60 * tests/suite.at: Exercise %header_extension and %source_extension. 2001-08-21 07:30:37 +00:00
Akim Demaille
e5aa395b38 More cvsignore. 2001-08-15 08:43:44 +00:00
Pascal Bart
1e41465a20 * tests/atconfig.in (CPPFLAGS): Fix. 2001-08-13 19:30:26 +00:00
Akim Demaille
976e528f02 * tests/atconfig.in (CPPFLAGS): Fix. 2001-08-07 13:03:20 +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
2ce1014469 * tests/Makefile.am (check-local): Ship testsuite.
* tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
Include `string.h'.
2001-08-03 10:13:42 +00:00
Akim Demaille
62ab6972e8 * src/getargs.h (raw_flag): Remove.
* src/getargs.c: Die on `-r'/`--raw'.
* src/lex.c (parse_percent_token): Die on `%raw'.
* src/reader.c (output_token_defines): Suppress call to `raw_flag'.
* tests/calc.at: Suppress test with option `--raw'.
2001-07-18 09:52:35 +00:00
Akim Demaille
1e24cc5b41 * config/: New.
* configure.in: Require Autoconf 2.50.
Update to gettext 0.10.38.
2001-07-14 17:27:59 +00:00
Akim Demaille
5141b01619 * m4/strerror_r.m4: New.
* m4/error.m4: Run AC_FUNC_STRERROR_R.
* lib/error.h, lib/error.c: Update.
2001-03-16 14:50:40 +00:00
Akim Demaille
6deb44470e Since we now use obstacks, more % directives can be enabled.
* src/lex.c (percent_table): Also accept `%yacc',
`%fixed_output_files', `%defines', `%no_parser', `%verbose', and
`%debug'.
Handle the actions for `%semantic_parser' and `%pure_parser' here,
instead of returning a token.
* src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
* src/reader.c (read_declarations): Adjust.
* src/files.c (open_files): Don't call `compute_base_names', don't
compute `attrsfile' since they depend upon data which might be
*in* the input file now.
(output_files): Do it here.
* src/output.c (output_headers): Document the fact that this patch
introduces a guaranteed SEGV for semantic parsers.
* doc/bison.texinfo: Document them.
* tests/suite.at: Exercise these %options.
2001-01-18 14:47:09 +00:00