Commit Graph

178 Commits

Author SHA1 Message Date
Akim Demaille
2888e8b946 Less ambiguous wording. 2005-10-05 06:57:16 +00:00
Akim Demaille
b50d2359d7 * bootstrap (gnulib_modules): Add strverscmp.
* lib/.cvsignore: Add strverscmp.c, strverscmp.h.
* m4/.cvsignore: Add strverscmp.m4.
* src/parse-gram.y (%require): New token, new rule.
(version_check): New.
* src/scan-gram.l (%require): Adjust.
* tests/input.at (AT_REQUIRE): New.
Use it.
* doc/bison.texinfo (Require Decl): New.
(Calc++ Parser): Use %require.
2005-10-02 18:49:15 +00:00
Juan Manuel Guerrero
ad6a9b97e2 DJGPP support added. 2005-10-02 17:00:30 +00:00
Akim Demaille
fb9712a962 Alexandre Duret-Lutz <adl@gnu.org>
Move the token type and YYSTYPE in the parser class.
* data/lalr1.cc (stack.hh, location.hh): Include earlier.
(parser::token): New, from the moved free definition of tokens.
(parser::semantic_value): Now a full definition instead of an
indirection to YYSTYPE.
(b4_post_prologue): No longer included in the header file, but
in the implementation file.
* doc/bison.texi (C+ Language Interface): Update.
* src/parse-gram.y: Support unary %define.
* tests/actions.at: Define global_tokens_and_yystype for backward
compatibility until we update the tests.
* tests/calc.at: Idem.
(first_line, first_column, last_line, last_column): Define for lalr1.cc
to simplify the code.
2005-09-30 17:57:05 +00:00
Akim Demaille
c7fb0b9079 * NEWS, configure.ac: Bump to 2.1a. 2005-09-19 07:08:00 +00:00
Paul Eggert
1bd0dedaaa * NEWS: Version 2.1.
* NEWS: Remove notice of yytname change, since it was never in an
official release.
* data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
diagnostic.
* src/output.c (prepare): Likewise.
* data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
(yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
is not defined.  This is an awful hack, but it's enough for now.
All callers changed.
* tests/glr-regression-at (make_value): Args are const pointers now,
to avoid GCC warning.
(Duplicated user destructor for lookahead): New test.  Currently
skipped.  It fails on my host but I'm not sure it'll always fail.
2005-09-16 22:54:21 +00:00
Paul Eggert
b47dbebee5 * NEWS: Document when yyparse started to return 2.
* doc/bison.texinfo (Parser Function): Document when yyparse
returns 2.

* data/lalr1.cc: Revert part of previous change, as it's incompatible.
(b4_filename_type): Renamed back from b4_file_name_type.  All uses
changed.
(class position): file_name -> filename (reverting).  All uses changed.
2005-09-15 14:06:52 +00:00
Paul Eggert
040984073a * NEWS: Version 2.0b.
* data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
the user's name space.  All uses changed to __attribute__
((__unused__)).
(yyFail, yyMemoryExhausted, yyreportAmbiguity):
Add __attribute__ ((__noreturn__)).

* etc/clcommit: Remove.  We weren't using it, and it failed
"make maintainer-distcheck".
* Makefile.maint: Merge from coreutils.
(CVS_LIST, CVS_LIST_EXCEPT): New macros.
(syntax-check-rules): Change list of rules as described below.
(sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
(sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
(sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
(sc_trailing_space): New rules.
(sc_xalloc_h_in_src): Remove.
(sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
(sc_space_tab, sc_error_exit_success, sc_changelog):
(sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
(makefile-check, po-check, author_mark_check):
(makefile_path_separator_check, copyright-check):
Use grep -n, to make it easier to find violations.
Use CVS_LIST and CVS_LIST_EXCEPT.
(header_regexp, h_re): Remove.
(dd_c): New macro.
(sc_dd_max_sym_length, .re-list, news-date-check): New rules.
(my-distcheck): Use more-modern GCC flags.
(signatures, %.asc): Remove.
(rel-files, announcement): Remove signatures.
Restore old updating code, even though we don't use it, so
that we're the same as coreutils.
(alpha, beta, major): Depend on news-date-check.
Make the upload commands.

* data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
* lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
* lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
* lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
* src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
* src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
* src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
* tests/sets.at: Likewise.

* data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
we comment out the Autoconf version number.
* doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
it's error-prone and "make maintainer-distcheck" rejects it.

* lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
Indent calls to "error" to pacify "make maintainer-distcheck",
when the calls are not intended to be translated.
* m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.

* src/Makefile.am (DEFS): Use +=, to pacify
"make maintainer-distcheck".
(bison_SOURCES): Add scan-skel.h.
(sc_tight_scope): New rule, from coreutils.

* src/files.c (src_extension, header_extension):
Now static, not extern.
* src/getargs.c (short_options): Likewise.
* src/muscle_tab.c (muscle_table): Likewise.
* src/parse-gram.y (current_class, current_type, current_prec):
Likewise.
* src/reader.c (grammar_end, previous_rule_end): Likewise.
* src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
* src/main.c (main): Cast bindtextdomain and textdomain calls to
void, to avoid warning when NLS is disabled.
* src/output.c: Include scan-skel.h.
(scan_skel): Remove decl, since scan-skel.h does this.
(output_skeleton):
Indent calls to "error" to pacify "make maintainer-distcheck".
* src/print_graph.c: Don't include <obstack.h>, as system.h does this.
* src/reader.h (gram_end, gram_lineno): New decls to pacify
"make maintainer-distcheck".
* src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
(skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
(skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
(skel_lex_destroy, scan_skel): Move these decls to...
* src/scan-skel.h: New file.
* src/uniqstr.c (uniqstr_assert):
Indent calls to "error" to pacify "make maintainer-distcheck".

* tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
not @VAR@.

* tests/torture.at: Revamp to avoid misuse of atoi that
"make maintainer-distcheck" complained about.
2005-07-24 07:24:22 +00:00
Paul Eggert
258b75caaa Destructor cleanups and regularization among the three skeletons.
* NEWS: Document the behavior changes.
* data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
stack before failing, as the cleanup code will do it for us now.
* data/lalr1.cc (yyerrlab): Likewise.
* data/glr.c (yyparse): Pop everything off the stack before
freeing it, so that destructors get called properly.
* data/lalr1.cc (yyreturn): Likewise.
* data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
This is more consistent.
* doc/bison.texinfo (Destructor Decl): Mention more reasons
why destructors might be called.  1.875 -> 2.1.
(Destructor Decl, Decl Summary, Table of Symbols):
Some English-language cleanups for %destructor.
* tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
Add output line for destructor of start symbol.
* tests/calc.at (AT_CHECK_CALC): Add one to line counts,
because of that same extra output line.
2005-07-19 06:56:44 +00:00
Paul Eggert
1a05945136 * NEWS: Document minor wording changes in diagnostics of
Bison-generated parsers.
* data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
Remove unused formals.  All uses changed.
(yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
(yyparse): Rename yyoverflowlab to yyexhaustedlab.
* data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
Rename yyoverflowab to yyexhaustedlab.
When memory exhaustion occurs during syntax-error reporting,
report it separately rather than in a single diagnostic; this
eases translation.
* doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
(Memory Exhausted): Renamed from Parser Stack Overflow.
Revamp wording slightly to prefer "memory exhaustion".
* tests/actions.at: "parser stack overflow" -> "memory exhausted".
2005-07-19 00:05:57 +00:00
Paul Eggert
0410a6e0cc * PACKAGING: New file, suggested by Bruno Haible and taken from
similar wording in gettext's PACKAGING file.
* NEWS: Mention PACKAGING.
* Makefile.am (EXTRA_DIST): Add PACKAGING.
2005-07-13 18:16:30 +00:00
Paul Eggert
a7db4add01 Bison-generated C parser -> Bison-generated parser 2005-07-13 17:35:34 +00:00
Paul Eggert
eb520e4cc0 Don't imply the latest change was in 2.0a. 2005-07-12 23:40:43 +00:00
Paul Eggert
baf785db2e * NEWS: Document recent i18n improvements. 2005-07-12 23:37:16 +00:00
Paul Eggert
009ce67dbe Version 2.0a. 2005-05-23 06:48:08 +00:00
Paul Eggert
0fb669f9d6 Update FSF postal mail address. 2005-05-14 06:49:48 +00:00
Paul Eggert
72f000b088 * NEWS: Bison-generated C parsers no longer quote literal strings
associated with tokens.
* src/output.c (prepare_symbols): Don't escape strings,
since users don't want to see C escapes.
* tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
in diagnostics.
* tests/regression.at (Token definitions, Web2c Actions): Likewise.
2005-04-17 08:07:15 +00:00
Paul Eggert
1ce590705a * NEWS: Bison-generated C parsers now use the _ macro to
translate strings.
* data/yacc.c (_) [!defined _]: New macro.
All English strings wrapped inside this macro.
* doc/bison.texinfo (Bison Parser): Document _.
* po/POTFILES.in: Include src/parse-gram.c, since it now
includes translateable strings that parse-gram.y doesn't.
2005-04-14 00:08:56 +00:00
Paul Eggert
82de6b0dde Reformat news for version 2.0. 2004-12-26 05:49:52 +00:00
Paul Eggert
d7e14fc000 * NEWS: Bison-generated parsers no longer default to using the
alloca function (when available) to extend the parser stack, due
to widespread problems in unchecked stack-overflow detection.
* data/glr.c (YYMAXDEPTH): Remove undef when zero.  It's the user's
responsibility to set it to a positive value.  This lets the user
specify a value that is not a preprocessor constant.
* data/yacc.c (YYMAXDEPTH): Likewise.
(YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
* doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
to be a compile-time constant.  However, explain the constraints on it.
Also, explain the constraints on YYINITDEPTH.
(Table of Symbols): Explain that alloca is no longer the default.
Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
to 1.
2004-12-22 21:19:47 +00:00
Akim Demaille
efeed02327 * data/lalr1.cc: Extensive Doxygenation.
(error_): Rename as...
(error): this, since it is visible to the user.
Adjust callers.
(Parser::message): Now an automatic variable from...
(Parser::yyreport_syntax_error_): here.
* tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
Parser::error.
* tests/input.at: Escape $.
2004-12-17 15:24:32 +00:00
Paul Eggert
337116ba3d Version 1.875e. 2004-12-11 06:26:25 +00:00
Paul Eggert
f74b6f91f6 Goto numbers are no longer arbitrarily limited to 16-bit counts. 2004-10-25 16:26:20 +00:00
Akim Demaille
e342c3beaf * data/glr.c (YYRHSLOC): Move its definition next to its uses.
Introduce another definition to address simple location arrays.
(yyGLRStack): New member: yyerror_range.
(yyrecoverSyntaxError, yyparse): Update it.
(yyrecoverSyntaxError): Use it when shifting the error token to
have an accurate range, equivalent to the one computed by both
yacc.c and lalr1.cc.
* tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
that column numbers start at column 0, as per GNU Coding
Standards, the others tests, and the doc.
(_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
Adjust to the above change (first column is 0).
And adjust the location of the "<error>", now covering the whole
line.
2004-10-25 10:37:35 +00:00
Akim Demaille
18d192f0ea * doc/bison.texinfo (Initial Action Decl): New. 2004-09-20 14:29:31 +00:00
Paul Eggert
8dd162d3ff Use "look-ahead" instead of "lookahead", consistently. 2004-06-21 20:20:31 +00:00
Paul Eggert
e476c87d93 Version 1.875d. 2004-05-21 21:03:41 +00:00
Paul Eggert
4febdd9667 Reject unescaped newlines in strings. 2004-05-03 07:42:52 +00:00
Paul Eggert
1452af69b4 Add support for hex token numbers. 2004-03-08 20:49:34 +00:00
Paul Eggert
91d2c560a8 Don't document %no-default-prec for now. 2003-10-05 07:34:36 +00:00
Paul Eggert
22fccf958f Use "%no-default-prec" instead of "%default-prec 0". 2003-10-01 21:33:24 +00:00
Paul Eggert
42db4e2b74 Describe %default-prec. 2003-09-30 20:20:25 +00:00
Paul Eggert
29103e06b5 Omit the (1.875b) date from the 1.875c line. 2003-06-30 17:37:40 +00:00
Akim Demaille
6040d33886 Regen. 2003-06-25 14:02:36 +00:00
Paul Eggert
3473d0f899 Document 1.875b. 2003-06-17 07:52:27 +00:00
Paul Eggert
829fd4c70d Semicolons are now allowed before "|". 2003-05-14 23:37:32 +00:00
Akim Demaille
d5a3fe37a9 Bump 1.875b. 2003-02-05 09:58:41 +00:00
Paul Eggert
7aff61d4dc %expect-count violations will be errors again in the future. 2003-02-01 20:10:45 +00:00
Paul Eggert
9289898605 Version 1.875a, dated today. 2003-02-01 08:23:32 +00:00
Paul Eggert
69363a9e4d * NEWS: %expect-violations are now just warnings, reverting
to Bison 1.30 and 1.75 behavior.  This fixes the GCC 3.2
bootstrapping problem reported by Matthias Klose; see
<http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
* src/conflicts.c (conflicts_print): Likewise.
* tests/conflicts.at (%expect not enough, %expect too much,
%expect with reduce conflicts): Likewise.
* doc/bison.texinfo (Expect Decl): Document this.  Also mention
that the warning is enabled if the number of conflicts changes
(not necessarily increases).
2003-01-13 06:41:29 +00:00
Paul Eggert
d600ee67ee Add --disable-yacc. 2003-01-05 06:32:12 +00:00
Paul Eggert
dc546b0f6e Bison 1.875. 2003-01-01 09:04:56 +00:00
Paul Eggert
963fcc1705 Version 1.75f. 2002-12-29 03:17:12 +00:00
Paul Eggert
23f2d9dc0f Version 1.75e. 2002-12-24 08:35:23 +00:00
Paul Eggert
75eb3bc4e7 * If the user does not define YYSTYPE as a macro, Bison now declares it
using typedef instead of defining it as a macro.  POSIX requires this.
  For consistency, YYLTYPE is also declared instead of defined.

* %union directives can now have a tag before the `{', e.g., the
  directive `%union foo {...}' now generates the C code
  `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
  The default union tag is `YYSTYPE', for compatibility with Solaris 9 Yacc.
  For consistency, YYLTYPE's struct tag is now `YYLTYPE' instead of `yyltype'.

* `yystype' and `yyltype' are now obsolescent macros instead of being
  typedefs or tags; they are no longer documented and will be
  withdrawn in a future release.

Fix copyright notice.
2002-12-24 07:40:14 +00:00
Paul Eggert
20daca0631 Omit mentions of %lex-param and %parse-param from the documentation
for now.
2002-12-18 00:09:10 +00:00
Paul Eggert
d2caf5545c Add date to 1.75d notice. 2002-12-13 13:14:11 +00:00
Paul Eggert
d1de53722b Version 1.75d. 2002-12-13 12:21:57 +00:00
Paul Eggert
74724a70a5 Describe Yacc library, lex-param and parse-param changes. 2002-11-30 09:18:34 +00:00
Paul Eggert
3af4feb22f Version 1.75c. 2002-11-25 07:56:44 +00:00