Commit Graph

1038 Commits

Author SHA1 Message Date
Akim Demaille
a06ea4aa98 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New. 2003-04-29 09:57:34 +00:00
Akim Demaille
211074caca * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
with %pure-parser and %locations to exercise the patch from Yakov
Markovitch below.
2003-04-29 08:41:13 +00:00
Paul Eggert
6175ffe321 * data/yacc.c: (b4_lex_param): Corrected for the case where
%lex-param is provided and %pure-parser isn't.
2003-04-29 06:04:56 +00:00
Paul Eggert
b1e9585744 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
<http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
2003-04-28 06:04:39 +00:00
Paul Eggert
3470c57bea * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
Declare to be of type suitable for the ninf value itself.
2003-04-27 05:57:13 +00:00
Paul Eggert
acda9df6f9 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR invokes it. 2003-04-27 05:28:21 +00:00
Paul Eggert
b5250f2635 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch to gnulib. 2003-04-22 03:33:29 +00:00
Paul Eggert
089ac0f11c * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
Fix obvious typo that results in uncompilable GLR parsers
when both %pure-parser and %locations are used.  (trivial change)
2003-04-21 19:37:40 +00:00
Paul Eggert
1b8f2fff2a Don't invoke unput from scan-gram.l; it ran into a POSIX-compatibility
bug in flex 2.5.31.
2003-04-18 07:27:15 +00:00
Paul Eggert
5ededac618 Fix regression reported by Werner Lemberg in
<http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
2003-04-18 05:11:25 +00:00
Akim Demaille
b8be913233 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file. 2003-03-31 09:46:21 +00:00
Akim Demaille
d423d46080 * src/output.c (prepare_symbols): Avoid trailing spaces in the
output.
2003-03-31 09:17:40 +00:00
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