Commit Graph

1712 Commits

Author SHA1 Message Date
Paul Eggert
14740648d5 (b4_yysymprint_generate): yyout -> yyoutput,
to avoid collision with lex macro described by Bruce Lilly in
<http://mail.gnu.org/pipermail/bug-bison/2002-November/001929.html>.
2002-11-27 18:30:50 +00:00
Paul Eggert
08cae37b47 Update version to 1.75d. 2002-11-25 08:21:40 +00:00
Paul Eggert
ceed6cdce5 Regenerate. 2002-11-25 08:05:09 +00:00
Paul Eggert
3af4feb22f Version 1.75c. 2002-11-25 07:56:44 +00:00
Paul Eggert
dda7aa54b6 Sync with gnulib. 2002-11-25 07:50:25 +00:00
Paul Eggert
16f37b35a5 (Actions after errors): Use an output format
more similar to that of the Printers and Destructors test.
Test the position of the ';' token too.
(Printers and Destructors): Likewise.
(Printers and Destructors: %glr-parser): Remove for now, to avoid
unnecessarily alarming people when the test fails.
2002-11-25 07:36:54 +00:00
Paul Eggert
300a796626 (yyerrlab1): Move this label down, so that the
parser does not discard the lookahead token if the user code
invokes YYERROR.  This change is required for POSIX conformance.
2002-11-25 06:42:10 +00:00
Paul Eggert
f6cf0f6e5f Sync with gnulib. 2002-11-23 07:25:41 +00:00
Paul Eggert
69e16b4c5e Sync with gnulib again. 2002-11-22 00:30:58 +00:00
Paul Eggert
0368ae1269 Sync with gnulib. 2002-11-21 19:14:24 +00:00
Paul Eggert
580043087e * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
Avoid use of <assert.h>, as the GNU Coding Standards hint that one
should use `if (! x) abort ();' rather than `assert (x);', and
anyway it's one less thing to worry about configuring.
2002-11-21 07:37:24 +00:00
Paul Eggert
6f5db56451 Sync with gnulib. 2002-11-21 07:35:58 +00:00
Paul Eggert
500bbfcd81 (_AT_TEST_GLR_CXXTYPES): Do not include <assert.h>.
Replace all instances of assert with abort.
2002-11-21 05:28:44 +00:00
Paul Eggert
63d0fb9ce4 (_AT_DATA_CALC_Y): Do not include <assert.h>.
Replace all instances of assert with abort.
2002-11-21 05:28:09 +00:00
Paul Eggert
7a86d7eba9 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Do not include <assert.h>. 2002-11-21 05:27:28 +00:00
Paul Eggert
4344c500b5 (get_color_str, get_textmode_str, get_shape_str,
get_layoutalgorithm_str, get_decision_str, get_orientation_str,
get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
get_view_str, get_linestyle_str, get_arrowstyle_str): Use abort rather
than assert.
2002-11-21 05:26:41 +00:00
Paul Eggert
443594d0c4 (conflict_row, pack_vector): Use abort rather than assert.
(tables_generate): Use verify rather than assert.
2002-11-21 05:25:55 +00:00
Paul Eggert
87aabbff99 Do not include <assert.h>.
(verify): New macro.
2002-11-21 05:24:53 +00:00
Paul Eggert
2f82502a6f (symbol_user_token_number_set, symbol_make_alias, symbol_pack):
Use abort rather than assert.
2002-11-21 05:23:46 +00:00
Paul Eggert
fe22d5d20f (struniq_assert): Now returns void, and aborts if the assertion is false. 2002-11-21 05:22:29 +00:00
Paul Eggert
ec14f0c83f (state_new, state_free, state_transitions_set, state_reduction_find):
Use abort rather than assert.
2002-11-21 05:21:35 +00:00
Paul Eggert
35dcf428c9 (packgram, reader): Use abort rather than assert. 2002-11-21 05:20:49 +00:00
Paul Eggert
a932883e41 (prepare_rules, token_definitions_output): Use abort rather than assert. 2002-11-21 05:20:05 +00:00
Paul Eggert
b475e0cce5 (nullable_compute): Use abort rather than assert. 2002-11-21 05:18:57 +00:00
Paul Eggert
58a84254ef (set_goto_map, map_goto): Use abort rather than assert. 2002-11-21 05:18:08 +00:00
Paul Eggert
7223426a2b (trace_argmatch, report_argmatch): Use verify rather than assert. 2002-11-21 05:17:21 +00:00
Paul Eggert
b9a0104860 (resolve_sr_conflict): Use abort rather than assert. 2002-11-21 05:16:36 +00:00
Paul Eggert
937fd8646f Do not include <assert.h>.
(hash_lookup, hash_get_first, hash_get_next,
hash_find_entry, hash_rehash, hash_insert): Likewise.
2002-11-21 05:15:52 +00:00
Paul Eggert
b973108e1e (ARRAY_CARDINALITY): Do not bother to #undef.
(ARGMATCH_CONSTRAINT): New macro.
(ARGMATCH_ASSERT): Use it.
2002-11-21 05:12:27 +00:00
Paul Eggert
51dffcbca9 Do not include <assert.h>.
(yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
yyresolveAction, yyprocessOneStack): Use abort rather than assert.
2002-11-21 05:11:29 +00:00
Paul Eggert
76ae81983c * data/glr.c (yygetLRActions): Replace `yyindex' with
`yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
This fixes the regression with Sun ONE Studio 7 cc that I reported in
<http://mail.gnu.org/pipermail/bug-bison/2002-November/001892.html>.
2002-11-19 09:33:21 +00:00
Paul Eggert
df38312ab0 (yygetLRActions): Replace `yyindex' with
`yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
This fixes the regression with Sun ONE Studio 7 cc that I reported in
<http://mail.gnu.org/pipermail/bug-bison/2002-November/001892.html>.
2002-11-19 07:35:29 +00:00
Paul Eggert
8d8a7238ee Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
to "SyntaxError" for consistency with my 2002-11-15 change.
2002-11-18 20:08:57 +00:00
Akim Demaille
d3c4e709ff * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
space.
From Tim Van Holder.
2002-11-18 09:33:22 +00:00
Paul Eggert
4e8c79eb7f (_AT_DATA_CALC_Y): Make vars static instead of
extern when possible.  Remove unused initializations.
2002-11-18 07:52:13 +00:00
Paul Eggert
ee16363fd2 (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do not define to
{}, since this breaks the common use of `YYDPRINTF ((...));' if a
single statement is desired (e.g. before `else').  Work around GCC
warnings by surrounding corresponding calls with {} if needed.
(yyhasResolvedValue): Remove unused function.
(yymergeOptionSets, yyresolvStack): Use `continue;' for empty
loop body.
(yyreportSyntaxError): Renamed from yyreportParseError.
(yyrecoverSyntaxError): Renamed from yyrecoverParseError.
All uses changed.
2002-11-18 07:51:47 +00:00
Akim Demaille
60a3dcf956 Really remove it. 2002-11-16 12:36:30 +00:00
Akim Demaille
b0937b2259 Augment the similarity between GLR and LALR traces.
* data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
(YY_REDUCE_PRINT): New.
(yyparse): Use them.
* data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
YYDPRINT here.
(yyglrReduce, yyrecoverParseError, yyparse): Don't report the
state reached after the reduction/recovery, since...
(yyparse, yyprocessOneStack): Report the state we are entering in.
2002-11-16 12:32:27 +00:00
Akim Demaille
c5e3e51055 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
Add support for --trace=skeleton.
* src/scan-skel.l: %option debug.
Scan strings of non-@ or n instead of character by character.
(scan_skel): Handle trace_skeleton.
(QPUTS): New.
(@output_parser_name@, @output_header_name@): ``Restore'' their
support (used to be M4 macros).
* data/yacc.c: Quote larger chunks, a la glr.c.
* data/lalr1.cc: Likewise.
The header guards are no longer available, so use some other
string than `YYLSP_NEEDED'.
2002-11-16 12:31:36 +00:00
Akim Demaille
4c6cc1db75 Make the ``Printers and Destructors'' test more verbose, taking
`yacc.c''s behavior as (possibly wrong) reference.
* tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
instead of fprint on stdout.
Set and report the last_line of the symbols.
Consistently display values and locations.
2002-11-16 12:30:23 +00:00
Paul Eggert
6d9e8019e1 * data/yacc.c: Avoid over-quoting of __line__ and __file__. 2002-11-16 08:14:23 +00:00
Paul Eggert
ee41006f01 Avoid over-quoting of __line__ and __file. 2002-11-16 08:13:40 +00:00
Paul Eggert
b25d88f6d2 * tests/actions.at (Actions after errors): New test case. 2002-11-16 07:32:09 +00:00
Paul Eggert
5dac0025f6 (Actions after errors): New test case. 2002-11-16 07:31:35 +00:00
Paul Eggert
f0616f0b5c Regenerate. 2002-11-15 20:58:07 +00:00
Paul Eggert
6e649e659e * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
tests/action.at, tests/calc.at, tests/conflicts.at,
tests/cxx-type.at, tests/regression.at:
"parse error" -> "syntax error" for POSIX compatibility.
"parsing stack overflow..." -> "parser stack overflow" so
that code matches Bison documentation.
2002-11-15 20:32:21 +00:00
Akim Demaille
0f39aab92a * src/parse-gram.y (declaration): Have %parse-param and %lex-param
take two BRACED_CODE, not two string_content.
Free the scanner's obstack when we are done.
(code_content): New.
* tests/calc.at: Adjust.
* doc/bison.texinfo: Adjust.
Also, make sure to include the `,' for these declarations.
2002-11-15 16:42:16 +00:00
Akim Demaille
761c1926a1 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
definition; avoids potential autoreconf problems.
2002-11-15 16:30:37 +00:00
Akim Demaille
0258d1661c 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
* src/.cvsignore: Add src-gram.c.
* tests/.cvsignore: Add atlocal.
* config/.cvsignore, m4/.cvsignore, po/.cvsignore:
Add several files that autoreconf may bring in during
bootstrap.
2002-11-15 09:04:37 +00:00
Akim Demaille
b0f98b1016 Always check the value returned by yyparse.
* tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
returned by yyparse.
(_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
Adjust calls.
* tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
returned by yyparse.
2002-11-15 08:56:40 +00:00