Commit Graph

1026 Commits

Author SHA1 Message Date
Akim Demaille
c7e441b49c * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
From Paul Hilfinger.
2003-03-31 07:10:44 +00:00
Akim Demaille
231897ad21 * m4/error.m4: Do not put under dynamic conditions some code which
expansion is under static control.
2003-03-29 13:50:44 +00:00
Akim Demaille
22a74fece3 Restore a missing ChangeLog entry. 2003-03-29 13:30:15 +00:00
Akim Demaille
5b06606339 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New. 2003-03-29 13:29:41 +00:00
Paul Eggert
0eee27e7b7 Update .cvsignore files. 2003-03-14 01:35:43 +00:00
Paul Eggert
537636c7e5 Fix "Bison blows chunks on empty file" bug.
Work around SunOS 4.1.4 porting problem with <sys/resource.h>.
Don't check for sys/wait.h twice, with two different algorithms.
2003-03-13 07:13:05 +00:00
Paul Eggert
f61aad9399 Merge changes from gnulib. This was prompted because the CVS
snapshot of Bison didn't build on Solaris 7 due to strnlen problems.
2003-03-12 23:08:11 +00:00
Akim Demaille
d2ffe11637 * ro.po: New. 2003-03-03 08:59:34 +00:00
Akim Demaille
052826fdd1 * doc/bison.texinfo (Table of Symbols): Reactivate the
documentation for %lex-param, and %parse-param.
2003-03-02 15:11:43 +00:00
Akim Demaille
c47495657b * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
generate verbose error messages.
Use the number of tokens as an upper bound in yytname, as it
cannot be a non terminal.
2003-03-02 13:39:44 +00:00
Akim Demaille
d5286af19b * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
message.
2003-03-02 13:36:55 +00:00
Akim Demaille
95b52400d5 Typo. 2003-03-02 11:27:59 +00:00
Akim Demaille
22e304a6da Write a test the yycheck overrun reported by Andrew Suffield.
* tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
Use them to exercise yycheck overrun.
Based on Andrew Suffield's grammar.
2003-03-02 11:22:19 +00:00
Akim Demaille
67a25fed4c Create tests/local.at for Bison generic testing macros.
* tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
* tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
This new file.
* tests/calc.at (AT_CHECK_CALC): Adjust.
* tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
(AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
* tests/local.at: here.
(AT_COMPILE_CXX): Tags the tests using it as c++.
Ignore the test if CXX is not functional.
2003-03-02 11:14:07 +00:00
Paul Eggert
9c2b381f79 Minor improvements to today's scan-gram.l bugfix. 2003-03-02 06:56:06 +00:00
Akim Demaille
0433ba88f9 * src/scan-gram.l (code_start): Always initialize it when entering
into yylex, as SC_EPILOGUE is activated *before* the corresponding
yylex invocation.  An alternative would be making it static, but
then it starts with the second %%'s beginning, instead of its end.
2003-03-01 10:55:31 +00:00
Paul Eggert
b305ea6918 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
around a UnixWare 7.1.1 porting bug reported by John Hughes in
<http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
2003-02-28 09:02:12 +00:00
Paul Eggert
c3d25e01e8 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
Remove Sequent/Pyramid discussion (nobody uses them any more).
Merge VMS and MS-DOS discussion; these ports may well be dead
but let's keep mentioning them for now.  Put <> around email
addresses.  Add copyright notice.
2003-02-26 21:27:11 +00:00
Paul Eggert
c267ffbced yylineno -> yylno to avoid collision with flex.
Sync depcomp with Automake 1.7.3.
2003-02-25 07:58:42 +00:00
Paul Eggert
ba1ecc079b Stick to ASCII for now. 2003-02-24 21:06:17 +00:00
Akim Demaille
f939fc12fe * data/lalr1.cc: Use temporary variables instead of casts to
change integer types.
Suggested by Paul Eggert.
2003-02-21 08:13:37 +00:00
Akim Demaille
95923bd6a6 * doc/bison.texinfo: Use "location" consistently to refer to @n,
to avoid confusions with lalr1.cc's notion of Position.
Suggested by Paul Eggert.
2003-02-21 08:07:57 +00:00
Akim Demaille
2cdc240eeb * data/lalr1.cc (position.hh): Make sure "columns" never pushes
before initial_columns.
(location.hh): Use consistent variable names when defining the
operator<<.
Use "last" so that we subtract from Positions, not from unsigned.
2003-02-20 14:42:43 +00:00
Akim Demaille
5d00311619 * data/lalr1.cc (position.hh): New subfile, including the extended
and Doxygen'ed documentation of class Position.
(location.hh): Use it.
Document a` la Doxygen.
With the help of Benot Perrot.
2003-02-20 13:36:08 +00:00
Akim Demaille
d02b25f99b * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
AT_YACC_IF.
Redefine AT_YYERROR_SEES_LOC_IF using it.
(_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
not defined.
Don't use the location in yy::Parser::error_ and
yy::Parser::print_ when not %locations.
Activate more lalr1.cc tests.
2003-02-20 08:14:27 +00:00
Akim Demaille
0d1c3a04b7 * data/lalr1.cc: When displaying a line number, be sure to make it
an int.
2003-02-19 14:55:14 +00:00
Akim Demaille
60a777aa24 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
Remove, useless.
(YYABORT, YYACCEPT, YYERROR): New.
* tests/calc.at: Renable the lalr1.cc test.
2003-02-19 14:33:27 +00:00
Akim Demaille
0b86fc416c * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
error recovery, mixing with/without pops and discarding of the
lookahead.
Exercise YYERROR.
Disable the lalr1.cc tests as currently it doesn't support YYERROR.
2003-02-19 13:40:53 +00:00
Paul Eggert
da99a5dc03 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
* tests/testsuite.at (AT_COMPILE): Use them.
This fixes the testsuite problem reported by Robert Lentz in
<http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
2003-02-18 05:10:12 +00:00
Paul Eggert
93b8c255e8 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
Avoid subscript error in yycheck.  Bug reported by Andrew Suffield in
<http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
* data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
Check for malloc failure, for consistency with yacc.c.
(yytname_size): Remove, for consistency with yacc.c.

The bug still remains in data/lalr1.cc, as I didn't have time
to fix it there.
2003-02-13 07:15:52 +00:00
Akim Demaille
7548fed236 * configure.ac (GXX): Rename as...
(CXX): this, to keep the original Autoconf semantics.
Require 2.57.
* data/lalr1.cc: Fix b4_copyright invocations.
If YYDEBUG is not defined, don't depend upon name_ being defined.
(location.hh): Include string and iostream.
(Position::filename): New member.
(Position::Position ()): New.
(operator<< (Position)): New.
(operator- (Position, int)): New.
(Location::first, Location::last): Rename as...
(Location::begin, Location::end): these, to mock the conventional
iterator names.
(operator<< (Location)): New.
* tests/atlocal.in (CXX): New.
* tests/testsuite.at (AT_COMPILE_CXX): New.
* tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
locations in a more synthetic way.
(AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
lalr1.cc is used.
Adjust the C locations to match those from Emacs: first column is
column 0.
Change all the expected results.
Conform to the GCS: simplify the locations when applicable.
(LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
(LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
these CPP macros with the m4 macros new defined by...
(AT_CHECK_PUSHDEFS): this, i.e.:
(AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
(AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALSm AT_LEX_PRE_ARGS)
New macros.
(AT_CHECK_POPDEFS): Undefine them.
(AT_CHECK_CALC_LALR1_CC): New.
Use it for the first lalr1.cc test.
2003-02-06 10:04:29 +00:00
Akim Demaille
43a176ef35 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
Location as is defined.
2003-02-04 21:05:03 +00:00
Akim Demaille
fc049e9caf * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
name_ being defined.
2003-02-04 20:57:46 +00:00
Paul Eggert
a737b2163c Use more-consistent naming conventions for local vars. 2003-02-03 15:35:57 +00:00
Akim Demaille
68e93ad549 * src/scan-skel.l: Scan more than one inert character per yylex
invocation.
2003-02-02 10:55:20 +00:00
Paul Eggert
1d9d5d7159 po/LINGUAS: Add ms. 2003-02-01 08:35:07 +00:00
Paul Eggert
9289898605 Version 1.875a, dated today. 2003-02-01 08:23:32 +00:00
Akim Demaille
0435d061f2 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
Changes in response to error report by S. Eken: GLR mode does not

(yyfill): New function to copy from stack tree into array
(yyuserAction): Modify to allow incremental move of semantic values
to rhs array when in GLR mode.
Define YYFILL to use in user-defined actions to fill semantic array
(yyresolveStates): Use X == NULL for pointers, not !X.
2003-01-30 08:03:10 +00:00
Paul Hilfinger
6029a57f53 Modifications to fix GLR bug reported by S. Eken. 2003-01-29 23:39:59 +00:00
Paul Eggert
6cee62971e * data/lalr1.cc: Do not use @output_header_name@ unless
b4_defines_flag is set.
2003-01-29 06:31:41 +00:00
Paul Eggert
b2a836b51e * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
we don't need to worry about yyerrlab1 being reported as an
"unused label" by non-GCC C compilers.
2003-01-22 06:39:16 +00:00
Paul Eggert
4196b9316c * src/output.c (symbol_printers_output): Fix typo that led
to core dump.
2003-01-17 08:43:31 +00:00
Akim Demaille
3ae831b413 Quoc Peyrot <chojin@lrde.epita.fr>,
Robert Anisko <anisko_r@lrde.epita.fr>
* data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
when the stacks contain one element, as the loop would otherwise
free the last state, and then use the top state (the one we just
popped).  This means that the initial elements will not be freed
explicitly, as is the case in yacc.c; it is not a problem, as
these elements have fake values.
2003-01-13 15:42:31 +00:00
Paul Eggert
e3aa65c502 %expect-violations are now just warnings, reverting to old behavior.
Update copyright year.
2003-01-13 07:19:17 +00:00
Akim Demaille
f0057011f7 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@. 2003-01-09 12:45:08 +00:00
Paul Eggert
1ee6d2a02e Invoke wget with -C off, to disable proxy caches. 2003-01-09 07:44:26 +00:00
Paul Eggert
d4fd77c450 Add a reference to the GLR paper of Scott, Johnstone and Hussain. 2003-01-07 06:38:40 +00:00
Paul Eggert
d600ee67ee Add --disable-yacc. 2003-01-05 06:32:12 +00:00
Paul Eggert
464c692789 Do not let the scan-skel token buffer grow unboundedly in the usual case.
Fix off-by-one error in scan-skel calculation of output line.
Fix some portability problems noted by Nelson H. F. Beebe.
2003-01-05 01:07:13 +00:00
Paul Eggert
0f42c7d501 Pacify the buggy "smart preprocessor" in MacOS 10.2.3. 2003-01-02 23:59:12 +00:00