Commit Graph

2114 Commits

Author SHA1 Message Date
Paul Eggert
28ee846711 Upgrade to 2003-06-08 libbitset, then:
lbitset_unused_clear): Use prototypes, not old-style definitions.
2003-06-17 07:24:40 +00:00
Paul Eggert
75d0ea41fa Upgrade to 2003-06-08 libbitset, then:
(ebitset_resize, ebitset_unused_clear):
Use prototypes, not old-style definitions.
2003-06-17 07:23:46 +00:00
Paul Eggert
6a75a421f0 Upgrade to 2003-06-08 libbitset, except continue to include gettext.h
unconditionally, as per recent gettext manual's suggestion.
2003-06-17 07:22:58 +00:00
Paul Eggert
fa8db4baa7 Upgrade to 2003-06-08 libbitset; then:
(bitset_compatible_p): Indent as per GNU standard.
Don't use 'index' in comments, as it's a builtin fn on some hosts.
2003-06-17 07:21:59 +00:00
Paul Eggert
3f764fe576 Upgrade to 2003-06-08 libbitset. 2003-06-17 07:21:03 +00:00
Paul Eggert
99c32453d0 Upgrade to 2003-06-08 libbitset; then:
Do not include config.h; that's the includer's job.
Do not include <sys/types.h>; shouldn't be needed on a C89 host.
2003-06-17 07:19:50 +00:00
Paul Eggert
94a23f969c (bitsets_sources): Add vbitset.c, vbitset.h. 2003-06-17 07:16:05 +00:00
Paul Eggert
ac08ca6c30 Rename stdbool.h.in to stdbool_.h, to follow gnulib. 2003-06-17 06:55:55 +00:00
Paul Eggert
e64fec0a0f (How Can I Reset the Parser): Renamed from `How Can I Reset
@code{yyparse}', since texinfo does not allow arbitrary @ in node
names.
2003-06-17 05:15:49 +00:00
Paul Eggert
e2527c97f9 * configure.ac (AM_STDBOOL_H): Invoke this instead of AC_HEADER_STDBOOL.
(AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
(AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
2003-06-16 19:45:45 +00:00
Paul Eggert
1930ac784a (EXTRA_DIST): Add stdbool_.h.
(MOSTLYCLEANFILES): New var.
($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
(stdbool.h): New rule.
2003-06-16 19:41:37 +00:00
Paul Eggert
e9665d1605 Upgrade to today's gnulib. 2003-06-16 19:41:07 +00:00
Paul Eggert
671881d12d Minor white space issues, e.g. trailing white space at end of line. 2003-06-16 19:17:38 +00:00
Paul Eggert
907e3bc851 (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
(AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
the tests right now.
2003-06-16 18:42:49 +00:00
Paul Eggert
b8a204c09b (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
yyerror are declared before use; C99 requires this.
2003-06-16 18:37:55 +00:00
Paul Hilfinger
25005f6ab0 * data/glr.c (YYERROR): Update definition.
(yyrecoverSyntaxError): Correct yyerrState logic. Correct comment.
Allow states with only a default reduction.

Fixes to avoid problem that $-N rules in GLR parsers can cause
buffer overruns, corrupting state.

* src/output.c (prepare_rules): Output max_left_semantic_context.
* src/reader.h (max_left_semantic_context): New
* src/scan-gram.l (max_left_semantic_context): Define.
(handle_action_dollar): Update max_left_semantic_context.
* data/glr.c (YYMAXLEFT): New.
(yydoAction): Increase yyrhsVals size.
(yyresolveAction): Ditto.

Fixes to problems with location handling in GLR parsers reported by
Frank Heckenbach (2003/06/05).

* data/glr.c (YYLTYPE): Make trivial if locations not used.
(YYRHSLOC): Add parentheses, make depend on whether locations used.
(YYLLOC_DEFAULT): Ditto.
(yyuserAction): Use YYLLOC_DEFAULT.
(yydoAction): Remove redundant code.

* tests/cxx-type.at: Exercise location information.
(yylex): Track locations.
(stmtMerge): Return value rather than printing.
2003-06-10 02:44:58 +00:00
Paul Eggert
144c1e767a Import of 2003-06-08 libbitset <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00005.html> 2003-06-07 23:28:20 +00:00
Paul Eggert
65d5286c12 Import of 2003-06-08 libbitset <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00005.html> 2003-06-07 00:31:37 +00:00
Paul Eggert
1f5bf95b48 Import of 2003-06-08 libbitset <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00005.html> 2003-06-06 22:03:15 +00:00
Paul Eggert
25e845d1be Import of 2003-06-08 libbitset <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00005.html> 2003-06-05 10:40:45 +00:00
Paul Eggert
711f40b715 Avoid warnings generated by GCC 2.95.4 when Bison is
configured with --enable-gcc-warnings.
2003-06-04 05:58:52 +00:00
Paul Eggert
848dc439cb (_AT_DATA_DANCER_Y): Declare yylex to take
(void) as arg when not pure, since we now assume C89 when building
Bison.  Pacify GCC by using parameter.
2003-06-04 05:54:16 +00:00
Paul Eggert
f56f6d78b0 (Improper handling of embedded actions and $-N in GLR parsers): Remove
unused local variable from yylex.
2003-06-04 05:53:44 +00:00
Paul Eggert
1d4055aa2b (yy::]b4_parser_class_name[::parse,
yy::]b4_parser_class_name[::translate_,
yy::Stack::operator[] (unsigned),
yy::Stack::operator[] (unsigned) const,
yy::Slice::operator[] (unsigned),
yy::Slice::operator[] (unsigned) const):
Rename local vars to avoid warnings.
2003-06-04 05:53:10 +00:00
Paul Eggert
e77419464c Import of 2003-06-08 libbitset <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00005.html> 2003-06-02 11:54:30 +00:00
Paul Eggert
cea5324737 Initial revision 2003-06-02 11:54:30 +00:00
Paul Eggert
eaef5507fc Import of 2003-06-08 libbitset <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00005.html> 2003-06-02 10:19:37 +00:00
Paul Eggert
ac695f7df5 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
yy::Location::lines, yy::Location::columns): Rename arguments
to avoid shadowing; this removes a warning generated by GCC 3.3.
2003-06-02 08:19:29 +00:00
Paul Eggert
2ffbee0e0b (yy::Position::lines, yy::Position::columns,
yy::Location::lines, yy::Location::columns): Rename arguments
to avoid shadowing; this removes a warning generated by GCC 3.3.
2003-06-02 08:19:08 +00:00
Paul Eggert
26ec81e097 Don't pass C-only options to g++.
Fix YYFILL in GLR parsers to conform to the C standard.
Fix infinite loops in yacc.c, and add a test case.
2003-06-02 07:29:18 +00:00
Paul Eggert
57f5199797 (AT_COMPILE_CXX): Use it instead of CFLAGS. 2003-06-02 07:26:17 +00:00
Paul Eggert
713535c232 (CXXFLAGS): New var. 2003-06-02 07:25:54 +00:00
Paul Eggert
504f20f77e (WARNING_CXXFLAGS): New subst. Set it to
everything that WARNING_CFLAGS has, except omit warnings
not suitable for C++.
(AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
2003-06-02 07:25:30 +00:00
Paul Eggert
6a84279cb5 (yyfillin): Renamed from the old yyfill. Mark
as possibly unused.
(yyfill): New function.
(YYFILL): Use it.
(yyuserAction): Change type of yynormal to bool, so that it matches
the new yyfill signature.  Mark it as possibly unused.
2003-06-02 06:18:31 +00:00
Paul Eggert
82c53be476 (_AT_DATA_CALC_Y): Include unistd.h if available.
Define 'alarm' to do nothing if unistd.h is not available.
Add a new rule "exp: '-' error;" to test the above change to
data/yacc.c.  Use 'alarm' to abort any test taking longer than
10 seconds, as it's probably looping.
(AT_CHECK_CALC): Test recovery from error in new grammar rule.
Also, the new yacc.c generates two fewer diagnostics for an
existing test.
2003-06-02 03:58:34 +00:00
Paul Eggert
a6b89bb2dc (YYERROR): Now just 'goto yyerrorlab', since the
macro's size was becoming unwieldy.
(yyerrlab): Do not discard an empty lookahead symbol, as this
might destroy garbage.
(yyerrorlab): New label, with the old contents of YYERROR,
plus the following change: pop the stack of rhs corresponding
to the production that invoked YYERROR.  That is how Yacc
behaves, and POSIX requires this behavior.
(yyerrlab1): Use YYPOPSTACK instead of its definiens.
2003-06-02 03:57:39 +00:00
Paul Eggert
ed3265ddc5 Import of 2003-06-08 libbitset <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00005.html> 2003-06-01 05:58:20 +00:00
Paul Eggert
6a0835a144 Import of 2003-06-08 libbitset <http://mail.gnu.org/archive/html/bison-patches/2003-06/msg00005.html> 2003-06-01 03:37:15 +00:00
Paul Eggert
ac89e8176f Initial revision 2003-06-01 03:37:15 +00:00
Paul Eggert
c6ae27df0b * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
This fixes a problem reported by John Bowman when the Compaq/HP
Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
-ansi -Wall -gall).
* data/yacc.c (union yyalloc): Likewise.
(YYCOPY): Do not evaluate __GNUC__ unless it is defined.
2003-05-25 06:44:31 +00:00
Paul Eggert
d7aa6ec179 (union yyalloc): Do not evaluate
YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
This fixes a problem reported by John Bowman when the Compaq/HP
Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
-ansi -Wall -gall).
(YYCOPY): Do not evaluate __GNUC__ unless it is defined.
2003-05-25 06:44:08 +00:00
Paul Eggert
f545262547 (YYSTACKEXPANDABLE): Do not evaluate
YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
This fixes a problem reported by John Bowman when the Compaq/HP
Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
-ansi -Wall -gall).
2003-05-25 06:43:19 +00:00
Paul Eggert
83a457be99 Regenerate. 2003-05-24 19:26:35 +00:00
Paul Eggert
d08290769c Switch from 'int' to 'bool' where that makes sense. 2003-05-24 19:16:02 +00:00
Paul Eggert
637fa3f83e Sync from automake 1.7.5. 2003-05-24 00:25:55 +00:00
Paul Eggert
829fd4c70d Semicolons are now allowed before "|". 2003-05-14 23:37:32 +00:00
Paul Eggert
6b2584b7a2 Require a semicolon after a grammar declaration, in the interest of
possible future changes to the Bison input language.
Do not allow a stray semicolon at the start of the grammar.
Allow one or more semicolons after any rule, including
just before "|" as required by POSIX.
2003-05-14 19:30:22 +00:00
Paul Eggert
eae34f44e6 Regenerate. 2003-05-14 19:28:04 +00:00
Paul Eggert
087b9fdf03 (Torturing the Scanner): Add tests for ";|" in a grammar. 2003-05-14 19:26:52 +00:00
Paul Eggert
8d0a98bb50 (rules_or_grammar_declaration): Require a
semicolon after a grammar declaration, in the interest of possible
future changes to the Bison input language.
Do not allow a stray semicolon at the start of the grammar.
(rhses.1): Allow one or more semicolons after any rule, including
just before "|" as required by POSIX.
2003-05-14 19:26:16 +00:00