1 2009-03-26 Akim Demaille <demaille@gostai.com>
4 * gnulib: Update to latest.
5 * src/local.mk (AM_CFLAGS): Move to...
7 * etc/prefix-gnulib-mk (prefix_assignment): Also transform
10 2009-03-02 Akim Demaille <demaille@gostai.com>
14 2009-03-02 Akim Demaille <demaille@gostai.com>
16 Share b4_yytranslate_define.
17 * data/lalr1.cc (b4_yytranslate_define): Move to...
20 2009-03-02 Akim Demaille <demaille@gostai.com>
22 Use locations in the variant example.
23 Yes, this obfuscates the point of this example, variants only. But glr.cc
24 cannot work (yet?) without locations. This change makes it easier to use
25 this example with glr.cc.
27 * examples/variant.yy (assert): %define it.
28 (locations): Request them.
29 (yylex): Bind the location to the stage.
31 2009-03-02 Akim Demaille <demaille@gostai.com>
33 Dub make_TOKEN as a public type interface.
34 * data/c++.m4 (b4_symbol_constructor_declare)
35 (b4_symbol_constructor_define): New empty stubs.
36 (b4_public_types_declare, b4_public_types_define): Use them.
37 * data/lalr1.cc (b4_symbol_constructor_declare)
38 (b4_symbol_constructor_declare_)
39 (b4_symbol_constructor_define_, b4_symbol_constructor_define):
41 * data/variant.hh: here.
42 Remove the "b4_variant_if" parts, as variant.hh is loaded only if
44 * data/lalr1.cc: No longer invoke b4_symbol_constructor_define and
45 b4_symbol_constructor_declare, as it is now done by
46 b4_public_types_define and b4_public_types_declare.
48 2009-03-02 Akim Demaille <demaille@gostai.com>
51 * data/lalr1.cc (b4_symbol_constructor_declaration_)
52 (b4_symbol_constructor_declarations)
53 (b4_symbol_constructor_definition_)
54 (b4_symbol_constructor_definitions)
55 (b4_yytranslate_definition): Rename as...
56 (b4_symbol_constructor_declare_)
57 (b4_symbol_constructor_declare)
58 (b4_symbol_constructor_define_)
59 (b4_symbol_constructor_define)
60 (b4_yytranslate_define): these.
61 * data/variant.hh (b4_variant_definition): Rename as...
62 (b4_variant_define): this.
64 2009-03-02 Akim Demaille <demaille@gostai.com>
66 Factor b4_assert_if, b4_lex_symbol_if, and b4_variant_if.
67 * data/bison.m4 (b4_percent_define_if_define): New.
68 * data/c++.m4 (b4_variant_if): Move to...
69 * data/bison.m4: Here, using b4_percent_define_if_define.
70 * data/lalr1.cc (b4_assert_if, b4_lex_symbol_if): Move to...
71 * data/bison.m4: Here, using b4_percent_define_if_define.
73 2009-03-02 Akim Demaille <demaille@gostai.com>
75 Dub symbol_type_base as a public type.
76 * data/c++.m4 (b4_public_types_declare): Now define
77 symbol_type_base and symbol_type.
78 (b4_public_types_define): New.
79 In both cases, the definitions are taken verbatim from lalr1.cc.
80 * data/lalr1.cc: Adjust.
82 2009-03-02 Akim Demaille <demaille@gostai.com>
84 b4_public_types_declare.
85 * data/c++.m4 (b4_public_types_declare): New.
86 * data/glr.cc, data/lalr1.cc: Use it.
88 2009-03-02 Akim Demaille <demaille@gostai.com>
90 b4_semantic_type_declare.
91 * data/c++.m4 (b4_semantic_type_declare): New.
92 Factors and generalizes what was in glr.cc and lalr1.cc.
93 * data/variant.hh (b4_semantic_type_declare): Redefine it for
95 * data/lalr1.cc, data/glr.cc: Use it.
97 2009-02-26 Akim Demaille <demaille@gostai.com>
100 * gnulib: Upgrade from master.
101 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore, m4/.gitignore:
104 2009-02-25 Akim Demaille <demaille@gostai.com>
106 Remove useless arguments.
107 * data/glr.c (yy_reduce_print): $$ and @$ are not used and not
110 2009-02-25 Akim Demaille <demaille@gostai.com>
113 * data/lalr1.cc: here.
115 2009-02-25 Akim Demaille <demaille@gostai.com>
117 Fix glr.cc's debug level handling.
118 * data/glr.cc (yydebug_): Remove, as it is actually yydebug from
120 (debug_level, set_debug_level): Adjust.
122 2009-02-25 Akim Demaille <demaille@gostai.com>
125 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
127 2009-02-25 Akim Demaille <demaille@gostai.com>
130 * etc/bench.pl.in (generate_grammar_list): Consitently use
131 location_type, not yy::location.
133 2009-02-25 Akim Demaille <demaille@gostai.com>
136 * data/lalr1.cc: here.
138 2009-02-19 Akim Demaille <demaille@gostai.com>
140 Make yyparser::error public.
141 * data/lalr1.cc: here.
142 There is no good reason to keep it private (and it is convenient
143 to use it from the scanner for instance). It is already public in
146 2009-02-19 Akim Demaille <demaille@gostai.com>
151 2009-02-19 Akim Demaille <demaille@gostai.com>
153 Remove trailing blanks.
154 The epilogue has its own ending \n, no need to add another.
156 * data/glr.c, data/lalr1.java, data/yacc.c: dnl when outputing the
158 * data/glr.cc: dnl when extending the epilogue.
159 Remove stray "private:".
161 2009-02-19 Akim Demaille <demaille@gostai.com>
164 * data/c.m4 (b4_c_function_decl): Here.
166 2009-02-19 Akim Demaille <demaille@gostai.com>
169 * data/lalr1.cc: here.
171 2009-02-19 Akim Demaille <demaille@gostai.com>
174 * data/variant.hh: New, extracted from...
175 * data/lalr1.cc: here.
177 * data/local.mk: Adjust.
179 2009-02-19 Akim Demaille <demaille@gostai.com>
181 Extract stack.hh from lalr1.cc.
182 * data/stack.hh: New.
183 * data/lalr1.cc: Extract from here.
184 * data/local.mk: Adjust.
186 2009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
188 Add reminder about uploading public key to keys.gnupg.net.
189 * HACKING (Release Procedure): Here.
191 2009-01-28 Akim Demaille <demaille@gostai.com>
193 * NEWS: Update information about 2.4.1 and 2.4.2.
195 2008-11-04 Akim Demaille <demaille@gostai.com>
198 * NEWS: Use more outline-mode markup.
199 Suggested by Jim Meyering.
201 2009-01-08 Akim Demaille <demaille@gostai.com>
203 Fix grep portability issues.
204 Grep on Solaris does not support -q.
205 Reported by Summum Bonum.
207 * NEWS: Add a stub for 2.4.2.
208 * THANKS: Add Summum Bonum.
209 * tests/atlocal.in (EGREP): New.
210 (CC, CXX, XSLTPROC): Make it possible to override them via
212 * tests/java.at: Use $EGREP instead of egrep.
213 Use AT_CHECK's ignore instead of grep's -q.
215 2008-12-11 Akim Demaille <demaille@gostai.com>
217 Pass the token type to yysyntax_error.
218 * data/yacc.c (yysyntax_error): Take the transated token instead
223 2008-12-11 Akim Demaille <demaille@gostai.com>
226 * data/glr.c: Formatting changes.
228 2008-12-11 Akim Demaille <demaille@gostai.com>
230 Propagate i18n changes into glr.c.
232 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
233 building the error message format dynamically.
234 * data/lalr1.java: Formatting changes.
236 2008-12-11 Akim Demaille <demaille@gostai.com>
239 * tests/local.mk: Replace "cd && testsuite" by "testsuite -C".
240 Solves problems when top_srcdir is an absolute path.
241 Suggested by Eric Blake.
242 * configure.ac: Require Autoconf 2.62.
244 2008-12-11 Akim Demaille <demaille@gostai.com>
246 Simplify the i18n of the error messages.
247 * data/lalr1.cc: Comment changes.
248 * data/yacc.c (yysyntax_error): Rewrite, using a switch as in
249 lalr1.cc instead of building dynamically the format string.
251 2008-12-08 Akim Demaille <demaille@gostai.com>
253 Fix portability issue in the test suite.
254 * tests/local.at (AT_MATCHES_CHECK): New.
255 Based on Perl instead of Sed. Sed has too many portability
256 pitfalls, not ever Sed is GNU Sed.
257 * tests/actions.at (Fix user actions without a trailing semicolon):
260 2008-12-08 Akim Demaille <demaille@gostai.com>
263 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
265 2008-12-08 Akim Demaille <demaille@gostai.com>
267 Install autoconf as a submodule to get m4sugar.
268 * .gitmodules: Add submodules/autoconf.
269 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
272 2008-12-08 Akim Demaille <demaille@gostai.com>
274 Test token.prefix in all the skeletons.
275 * data/java.m4 (b4_token_enum): Use the token.prefix.
276 * tests/local.at (AT_BISON_OPTION_PUSHDEFS): Define AT_TOKEN_PREFIX.
277 * tests/calc.at (_AT_DATA_CALC_Y): Use it.
278 Add checks for yacc.c, glr.c, lalr1.cc and glr.cc.
279 * tests/java.at: Comment changes.
280 (AT_CHECK_JAVA_MINIMAL): Define the END token.
281 (Java parser class and package names): Add token.prefix check.
283 2008-12-08 Akim Demaille <demaille@gostai.com>
285 Fix regeneration of atconfig.
286 * tests/local.mk (tests/atconfig): The rule was incorrect, but
287 remove it: now that there is no tests/Makefile.am, the top-level
288 Makefile properly updates atconfig when needed.
290 2008-12-07 Di-an Jan <dianj@freeshell.org>
292 Implement the FIXME that ends an user action with a semicolon
293 if it seems necessary.
294 * src/scan-code.l (flex rules section): Flag cpp directive from
295 any `#' to the first unescaped end-of-line. Semicolon is not
296 needed after `;', `{', '}', or cpp directives and is needed after
297 any other token (whitespaces and comments have no effect).
298 * tests/actions.at (Fix user actions without a trailing semicolon):
300 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
301 to make user actions complete statements.
302 Adjust column numbers in error messages.
303 * tests/regression.at (Fix user actions without a trailing semicolon):
304 Remove. Covered by new test.
306 2008-12-07 Akim Demaille <demaille@gostai.com>
309 * gnulib: Update from master.
311 2008-12-05 Eric Blake <ebb9@byu.net>
313 Avoid compiler warning.
314 * src/output.c (muscle_insert_item_number_table): Delete unused
317 2008-12-02 Eric Blake <ebb9@byu.net>
319 Build testsuite with newer autoconf.
320 * tests/output.at (m4_expand): Don't override in newer autoconf,
321 where the underlying implementation changed.
322 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
323 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
324 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
325 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
326 since some of them contain unbalanced ')'.
328 2008-12-01 Akim Demaille <demaille@gostai.com>
330 Use b4_symbol for printers and destructors everywhere.
331 * data/bison.m4 (b4_symbol_action_location): New.
332 * data/c.m4 (b4_symbol_actions): Remove.
333 Adjust all callers to use by b4_symbol_foreach and the corresponding
334 b4_symbol_printer/destructor macro.
335 * data/glr.cc: Adjust.
336 * data/lalr1.java: Adjust the %destructor sanity check.
337 * src/output.c (symbol_code_props_output): Remove, we no longer
338 need the b4_symbol_printers/destructors tables.
340 2008-12-01 Akim Demaille <demaille@gostai.com>
343 * data/lalr1.cc, data/bison.m4 (b4_symbol_action): Use
346 2008-12-01 Akim Demaille <demaille@gostai.com>
348 Move b4_symbol based macro to bison.m4.
349 * data/lalr1.cc (b4_symbol_, b4_symbol, b4_symbol_if)
350 (b4_symbol_action, b4_symbol_destructor, b4_symbol_printer)
351 (b4_symbol_case_, b4_symbol_foreach, b4_type_action_)
352 (b4_type_foreach): Move to...
353 * data/bison.m4: Here.
354 * data/lalr1.cc (b4_symbol_action): Specialize for C++: use
355 b4_symbol_value_template instead of b4_symbol_value.
357 2008-12-01 Akim Demaille <demaille@gostai.com>
359 b4_symbol/type_foreach.
360 * data/lalr1.cc (b4_symbol_foreach, b4_type_foreach): New.
363 2008-12-01 Akim Demaille <demaille@gostai.com>
365 Use the symbol properties to output the printer/destructor for lalr1.cc.
366 Instead of defining complex list of tuples to define various
367 properties of the symbols, we now prefer to define symbols as
368 "structs" in m4: using the symbol key (its number), and the
369 property name, b4_symbol gives it value. Use this to handle
370 destructors and printers.
372 * src/output.c (CODE_PROP): New.
373 (prepare_symbol_definitions): Use it to define the printer and
374 destructor related attributes of the symbols.
375 * data/lalr1.cc (b4_symbol_actions): Rename as...
376 (b4_symbol_action): this.
377 Use b4_symbol instead of 6 arguments.
378 (b4_symbol_printer, b4_symbol_destructor): New.
379 Use them instead of b4_symbol_actions.
381 2008-12-01 Akim Demaille <demaille@gostai.com>
383 Avoid capturing variables too easily.
384 * src/muscle_tab.h (MUSCLE_INSERT_BOOL, MUSCLE_OBSTACK_SGROW): Use
385 v__ and p__ instead of v and p.
387 2008-12-01 Akim Demaille <demaille@gostai.com>
389 Remove spurious empty line before syncline.
390 * data/bison.m4 (b4_syncline): Don't output an empty line before
393 2008-11-26 Akim Demaille <demaille@gostai.com>
395 Convert lib/Makefile.am into lib/local.mk.
396 The real problem is rather gnulib.mk, which itself is extracted
397 from a Makefile.am that gnulib expects to the "recursive". The
398 tool prefix-gnulib-mk converts such a gnulib.mk to be
399 non-recursive. Also, some AC_SUBST variables need to be adjusted.
401 * etc/prefix-gnulib-mk: New.
402 * bootstrap (slurp): Use it to convert further gnulib.mk.
403 No longer try to avoid re-creation of lib/gnulib.mk as the changes
405 * lib/Makefile.am: Rename as...
406 * lib/local.mk: this.
407 Adjust to be prefixed.
408 * Makefile.am, configure.ac: Adjust.
409 * src/local.mk (AM_CPPFLAGS): Extend it, don't define it.
411 2008-11-26 Akim Demaille <demaille@gostai.com>
414 * tests/local.mk (TESTSUITE_FLAGS, AUTOTEST_FLAGS): Rename as...
415 (TESTSUITEFLAGS, AUTOTESTFLAGS): these to compy with the GCS.
416 Reported by Eric Blake.
418 2008-11-26 Akim Demaille <demaille@gostai.com>
420 Use b4_parser_tables_define in glr.cc.
421 * data/glr.c: Use b4_parser_tables_define instead of defining the
422 (deterministic integral) tables by hand.
424 2008-11-26 Akim Demaille <demaille@gostai.com>
426 Use b4_parser_tables_define in Java.
427 * data/java.m4 (b4_typed_parser_table): Rename as...
428 (b4_typed_parser_table_define): this, for consistency.
429 Accept a comment as $4.
431 (b4_integral_parser_table): Rename as...
432 (b4_integral_parser_table_define): this.
433 * data/lalr1.java: Adjust all uses.
434 Use b4_parser_tables_define instead of generation by hand.
436 2008-11-26 Akim Demaille <demaille@gostai.com>
438 Prepare the convergence bw C style and Java table generation.
439 * data/bison.m4 (b4_tables_map, b4_tables_declare)
440 (b4_tables_define): Rename as...
441 (b4_integral_parser_tables_map, b4_parser_tables_declare)
442 (b4_parser_tables_define): these.
443 * data/c.m4 (b4_table_define): Rename as...
444 (b4_integral_parser_table_define): this.
445 * data/lalr1.cc: Adjust.
446 (b4_table_define, b4_table_declare): Rename as...
447 (b4_integral_parser_table_define)
448 (b4_integral_parser_table_declare): these.
449 (yyrline_): Move the comment where it is actually used.
450 * data/yacc.c: Adjust.
451 (yyrline): Use b4_integral_parser_table_define.
453 2008-11-26 Akim Demaille <demaille@gostai.com>
456 * src/parse-gram.h, src/parse-gram.c: Regen.
458 2008-11-26 Akim Demaille <demaille@gostai.com>
460 Factor the generation of the (integral) tables bw yacc.c and lalr1.cc.
461 * data/lalr1.cc (b4_tables_map): Move to...
462 * data/bison.m4: here.
463 Update the comment for yytable during the flight.
464 (b4_tables_declare, b4_tables_define): New.
465 * data/lalr1.cc: Use them.
466 * data/c.m4 (b4_table_define): New.
467 * data/yacc.c: Use b4_tables_define instead of output the tables
469 * tests/regression.at (Web2c Actions): Adjust the expected output,
470 the order of the tables changed.
472 2008-11-26 Akim Demaille <demaille@gostai.com>
474 Get rid of (yy)rhs and (yy)prhs.
475 These tables are no longer needed in the parsers, and they don't seem to
476 be useful. They are not documented either.
478 * src/output.c (prepare_rules): Get rid of rhs and prhs.
479 Adjust the computation of (yy)r2.
481 2008-11-26 Akim Demaille <demaille@gostai.com>
483 Rule length is unsigned.
484 * src/gram.h, src/gram.c (rule_rhs_length): Return a size_t.
486 2008-11-26 Akim Demaille <demaille@gostai.com>
488 Get rid of lalr1-split.cc.
489 It was no longer maintainer.
491 * data/lalr1-split.cc: Remove.
492 * etc/bench.pl.in (bench_fusion_parser): Remove.
495 2008-11-26 Akim Demaille <demaille@gostai.com>
497 Use yy* consistently.
498 * data/glr.c: Now that yyrhs no longer exists as a global
499 variable, rename local "rhs" variables into "yyrhs" for
502 2008-11-25 Akim Demaille <demaille@gostai.com>
504 Get rid of yyrhs and yyprhs in glr.c.
505 * data/glr.c (yyrhs, yyprhs): Remove.
506 Instead, use the state stack and yystos.
508 2008-11-25 Akim Demaille <demaille@gostai.com>
511 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): If glr, declare it
512 as an Autotest keyword.
514 2008-11-25 Akim Demaille <demaille@gostai.com>
516 Prefer TESTSUITE_FLAGS.
517 TESTSUITEFLAGS is barely readable.
519 * tests/local.mk (TESTSUITE_FLAGS): Default to $(TESTSUITEFLAGS)
520 for backward compatibility.
521 Use the former instead of the latter.
523 2008-11-25 Akim Demaille <demaille@gostai.com>
525 Get rid of yyrhs and yyprhs in larl1.java.
526 * data/lalr1.java (yyrhs_, yyprhs_): Remove.
527 (yy_reduce_print): Rather, use yystos_ and the state stack.
529 2008-11-25 Akim Demaille <demaille@gostai.com>
533 2008-11-25 Akim Demaille <demaille@gostai.com>
535 Get rid of yyrhs and yyprhs in yacc.c.
536 They were used to get the symbol types, given a rule number, when
537 displaying the top of the stack before a reduction. But the
538 symbol type is available from the state stack. This has two be
539 benefits: two tables less in the parser (making it smaller), and a
540 more consistent use of the three stacks which will help to fuse
543 * data/yacc.c (yyprhs, yyrhs): Remove.
544 (YY_REDUCE_PRINT): Pass yyssp to yy_reduce_print.
545 (yy_reduce_print): Take yyssp as argument.
546 Use it, together with yystos, to get the symbol type.
547 * tests/regression.at (Web2c Report): Remove these tables from the
550 2008-11-25 Akim Demaille <demaille@gostai.com>
553 The point is to factor the generation of the tables across skeletons.
554 This is language dependant.
556 * data/c.m4 (b4_comment_): New.
557 Should be usable to define how to generate tables independently of
560 (b4_comment): Bounce to b4_c_comment.
561 Now support $2 = [PREFIX] for indentation.
562 * data/lalr1.cc (b4_table_declare): Don't output a comment if
564 Indent it properly when there is one.
565 Output the ending semicolon.
566 (b4_table_define): Space changes.
567 Output the ending semicolon.
568 (b4_tables_map): New.
569 Use it twice instead of declaring and defining the (integral)
572 2008-11-25 Akim Demaille <demaille@gostai.com>
575 * data/lalr1.cc (b4_table_declare): New.
576 Use it to declare the tables defined with b4_table_define.
577 (b4_table_define): Declare a third arg to match b4_table_declare
579 Move all the comments around invocations of b4_table_define into
580 the invocations itselves.
581 Move things around to have the order for declarations and
584 2008-11-25 Akim Demaille <demaille@gostai.com>
587 * data/lalr1.java: here.
589 2008-11-25 Akim Demaille <demaille@gostai.com>
591 b4_args is more general than only C++.
592 * data/lalr1.cc (b4_args, _b4_args): Move to...
593 * data/bison.m4: here.
595 2008-11-21 Di-an Jan <dianj@freeshell.org>
597 Implement no-XXX arguments for --warnings, --report, --trace.
598 * src/getargs.c (flags_argmatch): Handles no-XXX.
599 Fix typo in doxygen comment.
601 2008-11-21 Akim Demaille <demaille@gostai.com>
603 Display the changes in cross-options.texi.
604 * build-aux/cross-options.pl ($sep): New, to separate items.
605 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Use diff to display the
608 2008-11-20 Di-an Jan <dianj@freeshell.org>
610 Improves options in the manual.
611 * doc/bison.texinfo (-g, -x): Add space before argument.
612 (Option Cross Key): Implement FIXME: listing directives also.
613 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
614 (Short Option): Special case -d. Put arguments inside @option.
615 (Bison Directive): Add column, automatically extracted from
616 src/scan-gram.l (actual name passed as the first argument)
617 with special case for %define.
618 * doc/local.mk (doc/cross-options.texi): Pass src/scan-gram.l
619 to build-aux/cross-options.pl.
620 * src/getargs.c (usage): Document limitations of cross-options.pl.
621 * src/scan-gram.l: Likewise.
623 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
625 Fix unexpanded macros in GLR defines file.
626 Reported by Csaba Raduly at
627 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
628 * THANKS (Csaba Raduly): Add.
629 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
630 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
631 lexer in a separate module that includes the defines file.
632 (AT_CHECK_CALC): From AT_FULL_COMPILE, request compilation of lexer
634 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
635 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
636 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
637 (AT_DATA_SOURCE_PROLOGUE): New.
638 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
639 (AT_DATA_SOURCE): New.
640 (AT_FULL_COMPILE): Extend to support an additional source file.
642 2008-11-18 Akim Demaille <demaille@gostai.com>
645 * TODO: More short term issues.
647 2008-11-18 Akim Demaille <demaille@gostai.com>
650 * src/parse-gram.h, src/parse-gram.c: Regen.
652 2008-11-18 Akim Demaille <demaille@gostai.com>
654 Use b4_subtract where possible.
655 * data/lalr1.cc (b4_subtract): Move to...
656 * data/bison.m4: here.
657 * data/glr.c (b4_rhs_data): Use it.
658 * data/yacc.c (b4_rhs_value, b4_rhs_location): Use it.
660 2008-11-18 Akim Demaille <demaille@gostai.com>
662 Remove incorrect mode specification.
663 * data/glr.cc: Don't pretend it's C code.
665 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
667 Simplify last patch slightly.
668 * src/getargs.c (getargs): Here.
670 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
672 Fix last warning from --enable-gcc-warnings.
673 * src/getargs.c (getargs): Don't assign const address to non-const
676 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
678 Don't let maintainer-*-check targets force a version update.
679 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
682 2008-11-17 Di-an Jan <dianj@freeshell.org>
684 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
685 Align menus. Adjust word wrapping. Use node names for menu names.
686 (Examples): Don't abbreviate node names.
687 (LocalWords): Remove abbreviations.
688 (Copying): Make description a sentence.
689 (Java Action Features): Remove period to match the rest of menu.
691 2008-11-17 Di-an Jan <dianj@freeshell.org>
693 Handles several --enable-gcc-warnings.
694 * src/getargs.c (command_line_location): Set parameters to void.
695 * src/output.c (symbol_type_name_cmp): Make static.
696 (symbols_by_type_name): Set parameters to void.
697 (symbol_definitions_output): Remove unused parameter. Rename as...
698 (prepare_symbol_definitions): this.
699 (muscles_output): Move symbol_definitions_output to...
700 (output): here as prepare_symbol_definitions.
701 * tests/c++.at (AT_CHECK_VARIANTS): Remove unused parameters of main.
702 (AT_CHECK_NAMESPACE): Make unused parameter lloc unnamed.
704 2008-11-17 Di-an Jan <dianj@freeshell.org>
706 * tests/c++.at (AT_CHECK_VARIANTS): Fixes tests 198-202.
707 Use AT_DATA_GRAMMAR instead of AT_DATA for compiled tests.
709 2008-11-16 Akim Demaille <demaille@gostai.com>
711 Add missing $(EXEEXT).
712 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): The target is
713 "src/bison$(EXEEXT)".
714 Reported by Di-an Jan.
716 2008-11-15 Akim Demaille <demaille@gostai.com>
720 2008-11-15 Akim Demaille <demaille@gostai.com>
723 * tests/input.at: here.
725 2008-11-15 Akim Demaille <demaille@gostai.com>
727 Remove duplicate header inclusion.
730 2008-11-15 Akim Demaille <demaille@gostai.com>
732 * src/parse-gram.h, src/parse-gram.c: Regen.
734 2008-11-15 Akim Demaille <demaille@gostai.com>
736 Support parametric types.
738 There are two issues to handle: first scanning nested angle
739 bracket pairs to support types such as std::pair< std::string,
740 std::list<std::string> > >.
742 Another issue is to address idiosyncracies of C++: do not glue two
743 closing angle brackets together (otherwise it's operator>>), and
744 avoid sticking blindly a TYPE to the opening <, as it can result
745 in '<:' which is a digraph for '['.
747 * src/scan-gram.l (brace_level): Rename as...
750 Implement support for complex tags.
753 * data/lalr1.cc (b4_symbol_value, b4_symbol_value_template)
754 (b4_symbol_variant): Leave space around types as parameters.
755 * examples/variant.yy: Use nested template types and leading ::.
756 * src/parse-gram.y (TYPE, TYPE_TAG_ANY, TYPE_TAG_NONE, type.opt):
758 (TAG, TAG_ANY, TAG_NONE, tag.opt): these.
759 * tests/c++.at: Test parametric types.
761 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
764 This is not sufficient, but we test at least that the make_SYMBOL
765 interface is not affected by token.prefix. A more general test
766 will be implemented when the support of token.prefix is generalized
769 * tests/c++.at: One more variant test, using token.prefix.
771 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
773 Test the make_TOKEN interface.
774 * tests/c++.at (AT_CHECK_VARIANTS): Require and use locations.
775 Factor the common code in yylex.
776 Use it to test "%define lex_symbol".
778 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
782 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
784 Simplify code for variants bench marks.
785 * etc/bench.pl.in (&generate_grammar_list): Define and use
787 Factor the common code in yylex.
789 2008-11-15 Akim Demaille <demaille@gostai.com>
791 Better error message.
792 * bootstrap (find_tool): Fix the error message.
794 2008-11-15 Akim Demaille <demaille@gostai.com>
796 Update variant.yy to newest interface.
797 * examples/variant.yy: Define lex_symbol.
800 2008-11-15 Akim Demaille <demaille@gostai.com>
802 Don't use locations in variant.yy.
803 * examples/variant.yy: Adjust to not using locations.
805 2008-11-15 Akim Demaille <demaille@gostai.com>
808 * data/local.mk, etc/local.mk, examples/local.mk: Use Automake
809 comments for the license.
811 2008-11-15 Akim Demaille <demaille@gostai.com>
813 Remove tests/Makefile.am.
814 * tests/Makefile.am: Rename as...
815 * tests/local.mk: this.
816 * Makefile.am, configure.ac: Adjust.
817 * Makefile.am (DISTCLEANFILES): Define.
818 (maintainer-check, maintainer-xml-check, maintainer-push-check):
819 Remove, we no longer need to bounce to the real targets.
821 2008-11-15 Akim Demaille <demaille@gostai.com>
825 2008-11-15 Akim Demaille <demaille@gostai.com>
828 * Makefile.am (EXTRA_DIST): Move djgpp related part to...
829 * djgpp/local.mk: this new file.
831 2008-11-15 Akim Demaille <demaille@gostai.com>
833 Remove doc/Makefile.am.
834 * doc/Makefile.am: Rename as...
835 * doc/local.mk: this.
837 * Makefile.am, configure.ac: Adjust.
838 * Makefile.am (MOSTLYCLEANFILES): New.
839 * src/local.mk: Adjust.
841 2008-11-15 Akim Demaille <demaille@gostai.com>
843 Move sc_tight_scope into maint.mk.
844 It does not work, and I don't know how it was supposed to work: it
845 seems to be looking for sources in the build tree. I just moved
846 it at a better place, fixing it is still required.
848 * src/local.mk (echo): Remove.
849 (sc_tight_scope): Move to...
852 2008-11-15 Akim Demaille <demaille@gostai.com>
855 * src/parse-gram.h, src/parse-gram.h: Regen.
857 2008-11-15 Akim Demaille <demaille@gostai.com>
859 Remove src/Makefile.am.
860 * src/Makefile.am: Rename as...
861 * src/local.mk: this.
862 Prefix all the paths with src/.
863 (AUTOMAKE_OPTIONS): Build object files in the sub dirs.
864 (AM_CPPFLAGS): Find find in builddir/src.
865 (YACC): Move the flags into...
867 * maint.mk (sc_tight_scope): Disable.
868 It used to bounce to the version in src/Makefile.am which is now
869 part of this very Makefile.
870 * Makefile.am, configure.ac: Adjust.
871 * src/scan-code-c.c, src/scan-code.l: We can no longer rely on
872 include "..." to find files "here": we are no longer in src/, so
873 qualify the includes with src/.
874 * doc/Makefile.am (PREPATH): No longer include the top_builddir
876 (.x.1): Adjust to be able to create src/foo from the top level
877 Makefile, instead of going bounce to src/Makefile the creation of
880 2008-11-15 Akim Demaille <demaille@gostai.com>
882 Remove useless variable.
883 * doc/Makefile.am (srcsrcdir): Remove.
885 2008-11-15 Akim Demaille <demaille@gostai.com>
887 Remove data/Makefile.am.
888 * data/Makefile.am: Rename as...
889 * data/local.mk: this.
891 * Makefile.am, configure.ac: Adjust.
893 2008-11-15 Akim Demaille <demaille@gostai.com>
895 Remove etc/Makefile.am.
896 * etc/Makefile.am: Rename as...
897 * etc/local.mk: this.
899 * Makefile.am, configure.ac: Adjust.
901 2008-11-15 Akim Demaille <demaille@gostai.com>
903 Remove examples/local.mk.
904 examples/calc++/Makefile.am might be interesting to keep as is, since
905 it is an example in itself.
907 * examples/Makefile.am: Rename as...
908 * examples/local.mk: this.
910 * Makefile.am, configure.ac: Adjust.
912 2008-11-15 Akim Demaille <demaille@gostai.com>
914 Remove build-aux/Makefile.am.
915 Recursive Makefiles are really way too slow, let's get rid of some of
918 * build-aux/Makefile.am: Rename as...
919 * build-aux/local.mk: this.
921 * Makefile.am, configure.ac: Adjust.
923 2008-11-15 Akim Demaille <demaille@gostai.com>
925 Provide convenience constructors for locations and positions.
926 * data/location.cc (position::position): Accept file, line and
927 column as arguments with default values.
928 Always qualify initial line and column literals as unsigned.
929 (location::location): Provide convenience constructors.
931 2008-11-15 Akim Demaille <demaille@gostai.com>
933 Instead of using make_symbol<TOK_FOO>, generate make_FOO for each
935 Using template buys us nothing, and makes it uselessly complex to
936 construct a symbol. Besides, it could not be generalized to other
937 languages, while make_FOO would work in C/Java etc.
939 * data/lalr1.cc (b4_symbol_): New.
941 (b4_symbol_constructor_declaration_)
942 (b4_symbol_constructor_definition_): Instead of generating
943 specializations of an overloaded template function, just generate
944 several functions whose names are forged from the token names
945 without the token.prefix.
946 (b4_symbol_constructor_declarations): Generate them for all the
947 symbols, not just by class of symbol type, now that instead of
948 specializing a function template by the token, we generate a
949 function named after the token.
950 (b4_symbol_constructor_specialization_)
951 (b4_symbol_constructor_specializations): Remove.
952 * etc/bench.pl.in: Adjust to this new API.
954 2008-11-13 Akim Demaille <demaille@gostai.com>
956 %define token.prefix.
957 Provide a means to add a prefix to the name of the tokens as
958 output in the generated files. Because of name clashes, it is
959 good to have such a prefix such as TOK_ that protects from names
960 such as EOF, FILE etc. But it clutters the grammar itself.
962 * data/bison.m4 (token.prefix): Empty by default.
963 * data/c.m4 (b4_token_enum, b4_token_define): Use it.
964 * data/lalr1.cc (b4_symbol): Ditto.
966 2008-11-13 Akim Demaille <demaille@gostai.com>
968 Compute at M4 time some of the subtractions.
969 * data/lalr1.cc (b4_subtract): New.
970 (b4_rhs_data): Use it.
972 2008-11-13 Akim Demaille <demaille@gostai.com>
975 This allows the user to get the type of a token returned by yylex.
977 * data/lalr1.cc (symbol::token): New.
978 (yytoknum_): Define when %define lex_symbol, independently of
980 (yytoken_number_): Move into...
981 (symbol::token): here, since that's the only use.
982 The other one is YYPRINT which was not officially supported
983 by lalr1.cc, and anyway it did not work since YYPRINT uses this
984 array under a different name (yytoknum).
986 2008-11-13 Akim Demaille <demaille@gostai.com>
989 * TODO (YYERRCODE): Mention the case of $undef.
991 2008-11-13 Akim Demaille <demaille@gostai.com>
994 * TODO (YYPRINT): New.
996 2008-11-13 Akim Demaille <demaille@gostai.com>
999 * data/lalr1.cc, data/yacc.c: Fix the description of the
1000 yytranslate and yytoknum tables.
1002 2008-11-13 Akim Demaille <demaille@gostai.com>
1004 Define make_symbol in the header.
1005 To reach good performances these functions should be inlined (yet
1006 this is to measure precisely). To this end they must be available
1009 * data/lalr1.cc (b4_symbol_constructor_definition_): Qualify
1010 location_type with the class name.
1011 Since will now be output in the header, declare "inline".
1012 No longer use b4_symbol_constructor_specializations, but
1013 b4_symbol_constructor_definitions in the header.
1014 Don't call it in the *.cc file.
1016 2008-11-13 Akim Demaille <demaille@gostai.com>
1018 Define yytranslate in the header for lex_symbol.
1019 * data/lalr1.cc: Move the invocation of b4_yytranslate_definition
1020 into the header file when using %define lex_symbol.
1021 (yytranslate_): Declare inline.
1023 2008-11-13 Akim Demaille <demaille@gostai.com>
1025 Define the constructors of symbol_type in
1026 b4_symbol_constructor_definitions.
1027 The constructors are called by the make_symbol functions, which a
1028 forthcoming patch will move elsewhere. Hence the interest of
1029 putting them together.
1031 The stack_symbol_type does not need to be moved, it is used only
1034 * data/lalr1.cc: Move symbol_type and symbol_base_type
1035 constructors into...
1036 (b4_symbol_constructor_definitions): here.
1039 2008-11-13 Akim Demaille <demaille@gostai.com>
1041 Make it easier to move the definition of yytranslate_.
1042 Forthcoming changes will make it possible to use yytranslate_
1043 from outside the parser implementation file.
1045 * data/lalr1.cc (b4_yytranslate_definition): New.
1048 2008-11-13 Akim Demaille <demaille@gostai.com>
1050 Remove useless class specification.
1051 * data/lalr1.cc (b4_symbol_constructor_specialization_): No need
1052 to refer to the class name to use a type defined by the class for
1053 arguments of member functions.
1055 2008-11-13 Akim Demaille <demaille@gostai.com>
1057 Finer input type for yytranslate.
1058 This patch is debatable: the tradition expects yylex to return an int
1059 which happens to correspond to token_number (which is an enum). This
1060 allows for instance to return characters (such as '*' etc.). But this
1061 goes against the stronger typing I am trying to have with the new
1062 lex interface which return a symbol_type. So in this case, feed
1063 yytranslate_ with a token_type.
1065 * data/lalr1.cc (yytranslate_): When in %define lex-symbol,
1066 expect a token_type.
1068 2008-11-13 Akim Demaille <demaille@gostai.com>
1070 Honor lex-params in %define lex_symbol mode.
1071 * data/lalr1.cc: Use b4_lex_param.
1073 2008-11-13 Akim Demaille <demaille@gostai.com>
1076 * src/output.c (symbol_definitions_output): Rename symbol
1077 attributes type_name and has_type_name as type and has_type.
1078 * data/lalr1.cc: Adjust uses.
1080 2008-11-13 Akim Demaille <demaille@gostai.com>
1082 Use b4_type_names for the union type.
1083 The union used to compute the size of the variant used to iterate
1084 over the type of all the symbols, with a lot of redundancy. Now
1085 iterate over the lists of symbols having the same type-name.
1087 * data/lalr1.cc (b4_char_sizeof_): New.
1088 (b4_char_sizeof): Use it.
1089 Adjust to be called with a list of numbers instead of a single
1091 Adjust its caller for new-line issues.
1093 2008-11-13 Akim Demaille <demaille@gostai.com>
1095 Define the "identifier" of a symbol.
1096 Symbols may have several string representations, for instance if
1097 they have an alias. What I call its "id" is a string that can be
1098 used as an identifier. May not exist.
1100 Currently the symbols which have the "tag_is_id" flag set are
1101 those that don't have an alias. Look harder for the id.
1103 * src/output.c (is_identifier): Move to...
1104 * src/symtab.c (is_identifier): here.
1105 * src/symtab.h, src/symtab.c (symbol_id_get): New.
1106 * src/output.c (symbol_definitions_output): Use it to define "id"
1108 Remove the definition of "tag_is_id".
1109 * data/lalr1.cc: Use the "id" and "has_id" whereever "tag" and
1110 "tag_is_id" were used to produce code.
1111 We still use "tag" for documentation.
1113 2008-11-11 Akim Demaille <demaille@gostai.com>
1115 Locations are no longer required by lalr1.cc.
1116 * data/lalr1.cc (_b4_args, b4_args): New.
1117 Adjust all uses of locations to make them optional.
1118 * tests/c++.at (AT_CHECK_VARIANTS): No longer use the locations.
1119 (AT_CHECK_NAMESPACE): Check the use of locations.
1120 * tests/calc.at (_AT_DATA_CALC_Y): Adjust to be usable with or
1121 without locations with lalr1.cc.
1123 * tests/output.at: Check lalr1.cc with and without location
1125 * tests/regression.at (_AT_DATA_EXPECT2_Y, _AT_DATA_DANCER_Y):
1126 Don't use locations.
1128 2008-11-11 Akim Demaille <demaille@gostai.com>
1131 * tests/local.at (AT_FULL_COMPILE): New.
1132 * tests/actions.at, tests/calc.at, tests/regression.at: Use it.
1134 2008-11-11 Akim Demaille <demaille@gostai.com>
1136 Support parens in calc++.
1137 * doc/bison.texinfo (Calc++ Scanner, Calc++ Parser): Support parens.
1138 * examples/calc++/test (run): Check the expected output.
1142 2008-11-11 Akim Demaille <demaille@gostai.com>
1144 Simplify lalr1.cc since %defines is mandatory.
1145 * data/lalr1.cc: Remove useless calls to b4_defines_if.
1147 2008-11-11 Akim Demaille <demaille@gostai.com>
1150 * TODO (yysyntax_error): New item.
1152 2008-11-11 Akim Demaille <demaille@gostai.com>
1155 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
1158 2008-11-11 Akim Demaille <demaille@gostai.com>
1160 Support i18n of the parse error messages.
1161 * TODO (lalr1.cc/I18n): Remove.
1162 * data/lalr1.cc (yysyntax_error_): Support the translation of the
1163 error messages, as done in yacc.c.
1164 Stay within the yy* pseudo namespace.
1166 2008-11-11 Akim Demaille <demaille@gostai.com>
1169 * TODO (single stack, yysyntax_error): New.
1171 2008-11-11 Akim Demaille <demaille@gostai.com>
1173 Make it possible to return a symbol_type from yylex.
1174 * data/lalr1.cc (b4_lex_symbol_if): New.
1175 (parse): When lex_symbol is defined, expected yylex to return the
1177 * etc/bench.pl.in (generate_grammar_list): Extend to support this
1179 (bench_variant_parser): Exercise it.
1181 2008-11-11 Akim Demaille <demaille@gostai.com>
1183 Remove useless bench case.
1184 * etc/bench.pl.in (bench_variant_parser): VARIANT_DESTROY is
1187 2008-11-11 Akim Demaille <demaille@gostai.com>
1189 Improve display of directives.
1190 * etc/bench.pl.in (parse_term): Don't add useless eol.
1192 2008-11-11 Akim Demaille <demaille@gostai.com>
1194 Use string_cast in the bench.
1195 * etc/bench.pl.in (generate_grammar_list): Define and use
1198 2008-11-11 Akim Demaille <demaille@gostai.com>
1200 Replace yychar with a Boolean.
1201 * data/lalr1.cc (parse::yychar): Replace by...
1202 (parse::yyempty): this.
1204 2008-11-11 Akim Demaille <demaille@gostai.com>
1209 2008-11-11 Akim Demaille <demaille@gostai.com>
1211 Let yytranslate handle the eof case.
1212 * data/lalr1.cc (yytranslate_): Handle the EOF case.
1214 No longer expect yychar to be equal to yyeof_, rather, test the
1215 lookahead's (translated) kind.
1217 2008-11-11 Akim Demaille <demaille@gostai.com>
1219 yychar cannot be empty in yyerrlab.
1220 * TODO (yychar == yyempty_): New.
1221 * data/lalr1.cc: Remove the handling of this case.
1222 This eases forthcoming changes related to yychar and yytranslate.
1224 2008-11-11 Akim Demaille <demaille@gostai.com>
1226 Bench: syntactic sugar for %define/#define.
1227 * etc/bench.pl.in (parse_dirs): Support %d and #d with arguments.
1228 (&bench_push_parser, bench_variant_parser): Use this feature.
1232 2008-11-11 Akim Demaille <demaille@gostai.com>
1234 Less memory pressure on the "list" bench.
1235 * etc/bench.pl.in (generate_grammar_list): Do not accumulate all
1236 the values, to limit memory pressure.
1238 2008-11-11 Akim Demaille <demaille@gostai.com>
1240 Introduce make_symbol.
1241 make_symbol provides a means to construct a full symbol (kind,
1242 value, location) in a single shot. It is meant to be a Symbol
1243 constructor, parameterized by the symbol kind so that overloading
1244 would prevent incorrect kind/value pairs. Unfortunately
1245 parameterized constructors do not work well in C++ (unless the
1246 parameter also appears as an argument, which is not acceptable),
1247 hence the use of a function instead of a constructor.
1249 * data/lalr1.cc (b4_symbol_constructor_declaration_)
1250 (b4_symbol_constructor_declarations)
1251 (b4_symbol_constructor_specialization_)
1252 (b4_symbol_constructor_specializations)
1253 (b4_symbol_constructor_definition_)
1254 (b4_symbol_constructor_definitions): New.
1255 Use them where appropriate to generate declaration, declaration of
1256 the specializations, and implementations of the templated
1257 overloaded function "make_symbol".
1258 (variant::variant): Always define a default ctor.
1259 Also provide a copy ctor.
1260 (symbol_base_type, symbol_type): New ctor overloads for value-less
1262 (symbol_type): Now public, so that functions such as yylex can use
1265 2008-11-11 Akim Demaille <demaille@gostai.com>
1267 Inform m4 whether a tag is a valid id.
1268 * src/output.c (is_identifier): New.
1269 (symbol_definitions_output): Use it to define tag_is_id.
1270 But maybe this should be done at m4 level?
1272 2008-11-11 Akim Demaille <demaille@gostai.com>
1274 Test 214 was failing: it greps with a pattern containing [ ]*
1275 which obviously meant to catch spaces and tabs, but contained only
1276 spaces. Tabulations in sources are a nuisance, so to simplify the
1277 matter, get rid of all the tabulations in the Java sources. The
1278 other skeletons will be treated equally later.
1280 * data/java.m4, data/lalr1.java: Untabify.
1281 * tests/java.at: Simplify AT_CHECK_JAVA_GREP invocations:
1282 tabulations are no longer generated.
1284 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
1286 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
1287 * configure.ac: Adjust usage.
1288 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
1289 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
1290 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
1292 2008-11-10 Di-an Jan <dianj@freeshell.org>
1294 Workaround Java's ``code too large'' problem for parser tables
1295 in most cases, by using one function per initialization.
1296 * data/java.m4 (b4_typed_parser_table, b4_integral_parser_table): New.
1297 * data/lalr1.java (yypact_, yydefact_, yypgoto_, yydefgoto_,
1298 yytable_, yycheck_, yystos_, yytoken_number_, yyr1_, yyr2_, yyrhs_
1299 yyprhs_, yyrline_, yytranslate_table_): Use b4_integral_parser_table.
1300 (yytname_): Use b4_typed_parser_table.
1301 * doc/bison.texinfo (Java Bison Interface): Add note on Java's
1302 ``code too large'' error.
1304 2008-11-10 Di-an Jan <dianj@freeshell.org>
1306 * NEWS: Document them.
1308 General Java skeleton improvements.
1309 * configure.ac (gt_JAVACOMP): Request target of 1.4, which allows
1310 using gcj < 4.3 in the testsuite, according to comments in
1311 gnulib/m4/javacomp.m4.
1312 * data/java.m4 (stype, parser_class_name, lex_throws, throws,
1313 location_type, position_type): Remove extraneous brackets from
1314 b4_percent_define_default.
1315 (b4_lex_param, b4_parse_param): Remove extraneous brackets from
1316 m4_define and m4_define_default.
1317 * data/lalr1.java (b4_pre_prologue): Change to b4_user_post_prologue,
1318 which marks the end of user code with appropriate syncline, like all
1319 the other skeletons.
1320 (b4_user_post_prologue): Add. Don't silently drop.
1322 (parse): Inline yylex.
1323 * doc/bison.texinfo (bisonVersion, bisonSkeleton): Document.
1324 (%{...%}): Fix typo of %code imports.
1325 * tests/java.at (AT_JAVA_COMPILE): Add "java" keyword.
1327 Support annotations on parser class with %define annotations.
1328 * data/lalr1.java (annotations): Add to parser class modifier.
1329 * doc/bison.texinfo (Java Parser Interface): Document
1330 %define annotations.
1331 (Java Declarations Summary): Document %define annotations.
1332 * tests/java.at (Java parser class modifiers): Test annotations.
1334 Do not generate code for %error-verbose unless requested.
1335 * data/lalr1.java (errorVerbose): Rename to yyErrorVerbose.
1336 Make private. Make conditional on %error-verbose.
1337 (getErrorVerbose, setErrorVerbose): New.
1338 (yytnamerr_): Make conditional on %error-verbose.
1339 (yysyntax_error): Make some code conditional on %error-verbose.
1340 * doc/bison.texinfo (Java Bison Interface): Remove the parts
1341 about %error-verbose having no effect.
1342 (getErrorVerbose, setErrorVerbose): Document.
1344 Move constants for token names to Lexer interface.
1345 * data/lalr1.java (Lexer): Move EOF, b4_token_enums(b4_tokens) here.
1346 * data/java.m4 (b4_token_enum): Indent for move to Lexer interface.
1347 (parse): Qualify EOF to Lexer.EOF.
1348 * doc/bison.texinfo (Java Parser Interface): Move documentation of
1349 EOF and token names to Java Lexer Interface.
1350 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove Calc qualifier.
1352 Make yyerror public.
1353 * data/lalr1.java (Lexer.yyerror): Use longer parameter name.
1354 (yyerror): Change to public. Add Javadoc comments. Use longer
1355 parameter names. Make the body rather than the declarator
1356 conditional on %locations.
1357 * doc/bison.texinfo (yyerror): Document. Don't mark as protected.
1359 Allow user to add code to the constructor with %code init.
1360 * data/java.m4 (b4_init_throws): New, for %define init_throws.
1361 * data/lalr1.java (YYParser.YYParser): Add b4_init_throws.
1362 Add %code init to the front of the constructor body.
1363 * doc/bison.texinfo (YYParser.YYParser): Document %code init
1364 and %define init_throws.
1365 (Java Declarations Summary): Document %code init and
1366 %define init_throws.
1367 * tests/java.at (Java %parse-param and %lex-param): Adjust grep.
1368 (Java constructor init and init_throws): Add tests.
1370 2008-11-10 Akim Demaille <demaille@gostai.com>
1373 * TODO (-D): is implemented.
1374 (associativity): Same precedence must have the same associativity.
1375 For instance, how can a * b / c be parsed if * is %left and / is
1377 (YYERRORCODE, YYFAIL, YYBACKUP): New.
1379 2008-11-10 Akim Demaille <demaille@gostai.com>
1383 2008-11-10 Akim Demaille <demaille@gostai.com>
1385 More information about the symbols.
1386 * src/output.c (type_names_output): Document all the symbols,
1387 including those that don't have a type-name.
1388 (symbol_definitions_output): Define "is_token" and
1390 * data/lalr1.cc (b4_type_action_): Skip symbols that have an empty
1391 type-name, now that they are defined too in b4_type_names.
1393 2008-11-10 Akim Demaille <demaille@gostai.com>
1397 2008-11-10 Akim Demaille <demaille@gostai.com>
1399 Make parser::yytranslate static.
1400 Small speedup (1%) on the list grammar. And makes yytranslate_
1401 available in non member functions.
1403 * data/lalr1.cc (yytranslate_): Does not need to be a instance
1406 2008-11-10 Akim Demaille <demaille@gostai.com>
1408 Avoid trailing spaces.
1409 * data/c.m4: b4_comment(TEXT): Don't indent empty lines.
1410 * data/lalr1.cc: Don't indent before rule and symbol actions, as
1411 they can be empty, and anyway this incorrectly indents the first
1414 2008-11-10 Akim Demaille <demaille@gostai.com>
1418 2008-11-10 Akim Demaille <demaille@gostai.com>
1420 Use "enum" for integral constants.
1421 This is just nicer to read, I observed no speedup.
1423 * data/lalr1.cc (yyeof_, yylast_, yynnts_, yyempty_, yyfinal_)
1424 (yterror_, yyerrcode_, yyntokens_): Define as members of an enum.
1425 (yyuser_token_number_max_, yyundef_token_): Move into...
1426 (yytranslate_): here.
1428 2008-11-10 Akim Demaille <demaille@gostai.com>
1430 Shortcuts in bench directives.
1431 * etc/bench.pl.in (parse_dirs): New.
1433 (bench_variant_parser, bench_fusion_parser): Use %s and %d.
1434 Create the benches in "benches/".
1436 2008-11-10 Akim Demaille <demaille@gostai.com>
1439 * data/lalr1.cc: here.
1441 2008-11-10 Akim Demaille <demaille@gostai.com>
1443 Adjust verbose message to using emacs.
1444 * etc/bench.pl.in: Inform compilation-mode when we change the
1446 (generate_grammar_list): Recognize %define "variant" in addition
1449 2008-11-10 Akim Demaille <demaille@gostai.com>
1451 Classify symbols by type-name.
1452 * src/uniqstr.h (UNIQSTR_CMP): New.
1453 * src/output.c (symbol_type_name_cmp, symbols_by_type_name)
1454 (type_names_output): New.
1455 (muscles_output): Use it.
1456 * data/lalr1.cc (b4_symbol_action_): Remove.
1457 (b4_symbol_case_, b4_type_action_): New.
1458 Adjust uses of b4_symbol_action_ to use b4_type_action_.
1460 2008-11-10 Akim Demaille <demaille@gostai.com>
1462 Change the handling of the symbols in the skeletons.
1463 Before we were using tables which lines were the symbols and which
1464 columns were things like number, tag, type-name etc. It is was
1465 difficult to extend: each time a column was added, all the numbers had
1466 to be updated (you asked for colon $2, not for "tag"). Also, it was
1467 hard to filter these tables when only a subset of the symbols (say the
1468 tokens, or the nterms, or the tokens that have and external number
1469 *and* a type-name) was of interest.
1471 Now instead of monolithic tables, we define one macro per cell. For
1472 instance "b4_symbol(0, tag)" is a macro name which contents is
1473 self-decriptive. The macro "b4_symbol" provides easier access to
1476 * src/output.c (type_names_output): Remove.
1477 (symbol_numbers_output, symbol_definitions_output): New.
1478 (muscles_output): Call them.
1479 (prepare_symbols): Define b4_symbols_number.
1481 2008-11-10 Akim Demaille <demaille@gostai.com>
1484 * src/getargs.h, src/getargs.c (trace_muscle): New.
1485 (trace_types, trace_args): Support it.
1486 * src/output.c (output_skeleton): Use it.
1488 2008-11-10 Akim Demaille <demaille@gostai.com>
1491 * src/output.c (muscles_output): New, extracted from...
1492 (output_skeleton): here.
1495 2008-11-10 Akim Demaille <demaille@gostai.com>
1499 2008-11-10 Akim Demaille <demaille@gostai.com>
1501 Update the variant example.
1502 * examples/variant.yy: Formatting changes.
1505 2008-11-10 Akim Demaille <demaille@gostai.com>
1507 Support constructor with an argument.
1508 This improves the "list" bench by 2%.
1510 * data/lalr1.cc (variant::build): Add an overloaded version with
1512 * tests/c++.at (AT_CHECK_VARIANT): Check it.
1514 2008-11-10 Akim Demaille <demaille@gostai.com>
1517 * tests/c++.at (AT_CHECK_VARIANTS): New.
1518 Use it with and without %define assert.
1520 2008-11-10 Akim Demaille <demaille@gostai.com>
1522 Add %precedence support.
1523 Unfortunately it is not possible to reuse the %prec directive. This
1524 is because to please POSIX, we do not require to end the rules with a
1525 semicolon. As a result,
1529 is ambiguous: either a rule which precedence is that of baz, or a rule,
1530 and then a declaration of the precedence of the token baz.
1532 * doc/bison.texinfo: Document %precedence.
1533 (Precedence Only): New.
1534 * src/assoc.h, src/assoc.c (precedence_assoc): New.
1535 * src/conflicts.c (resolve_sr_conflict): Support it.
1536 * src/scan-gram.l, src/parse-gram.y (%precedence): New token.
1538 * tests/calc.at: Use %precedence for NEG.
1539 * tests/conflicts.at (%precedence does not suffice)
1540 (%precedence suffices): New tests.
1542 2008-11-09 Akim Demaille <demaille@gostai.com>
1544 Make benches in a sub dirs.
1545 * etc/bench.pl.in ($dir): New.
1547 Check the use of constructors with an argument.
1548 (bench_variant_parser): Fix.
1550 2008-11-09 Akim Demaille <demaille@gostai.com>
1554 2008-11-09 Akim Demaille <demaille@gostai.com>
1558 2008-11-09 Akim Demaille <demaille@gostai.com>
1560 Require the generation of parse-gram.output.
1561 * src/Makefile.am (YACC): Pass --report=all.
1563 2008-11-09 Akim Demaille <demaille@gostai.com>
1567 2008-11-09 Akim Demaille <demaille@gostai.com>
1570 * TODO: Remove obsolete items.
1573 2008-11-09 Akim Demaille <demaille@gostai.com>
1576 * etc/bench.pl.in (parse, parse_expr, parse_term, parse_fact)
1577 (@token, $grammar, $bench): New.
1578 (generate_grammar_variant): Rename as...
1579 (generate_grammar_list): this.
1580 (generate_grammar): Adjust.
1581 (bench_grammar): Rename as...
1583 Use it in the various bench-marking routines.
1584 (-b, -g): New options.
1586 2008-11-09 Akim Demaille <demaille@gostai.com>
1588 Use a static hierarchy for symbols in the C++ parser.
1589 * data/lalr1.cc (symbol_base_type, symbol_type)
1590 (stack_symbol_type): Make it a static hierarchy.
1591 Adjust dependencies.
1593 2008-11-09 Akim Demaille <demaille@gostai.com>
1595 bench.pl -d, --directive.
1596 * etc/bench.pl.in (@directive): New.
1597 (&bench_grammar): Use it.
1598 (&bench_list_grammar): New, to provide access to the "variant"
1601 (getopts): Support -d, --directive.
1603 2008-11-09 Akim Demaille <demaille@gostai.com>
1605 Use inline for small operations.
1606 * data/lalr1.cc (symbol_base_type, symbol_type)
1607 (stack_symbol_type): Declare constructor and other operations as
1609 (yy_destroy_): Inline.
1611 2008-11-09 Akim Demaille <demaille@gostai.com>
1613 Introduce a hierarchy for symbols.
1614 * data/lalr1.cc (symbol_base_type, symbol_type): New.
1615 (data_type): Rename as...
1616 (stack_symbol_type): this.
1617 Derive from symbol_base_type.
1618 (yy_symbol_value_print_): Merge into...
1619 (yy_symbol_print_): this.
1622 (yydestruct_): Rename as...
1623 (yy_destroy_): this.
1624 (b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
1625 (parser::parse): yyla is now of symbol_type.
1626 Use its type member instead of yytoken.
1628 2008-11-09 Akim Demaille <demaille@gostai.com>
1630 Rename data_type and stack_symbol_type.
1631 * data/lalr1.cc (data_type): Rename as...
1632 (stack_symbol_type): this.
1634 2008-11-09 Akim Demaille <demaille@gostai.com>
1636 Handle semantic value and location together.
1637 * data/lalr1.cc (b4_symbol_actions): Bounce $$ and @$ to
1638 yydata.value and yydata.location.
1639 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_)
1640 (YY_SYMBOL_PRINT): Now take semantic value and location as a
1643 (yydestruct_): New overload for a stack symbol.
1645 2008-11-09 Akim Demaille <demaille@gostai.com>
1647 Push a complete symbol, not connected parts.
1648 * data/lalr1.cc (yypush_): Take a data_type&, not disconnected
1649 state, value and location.
1652 2008-11-09 Akim Demaille <demaille@gostai.com>
1654 Agregate yylval and yylloc.
1655 * data/lalr1.cc (parser::yylval, parser::yylloc): Replace by...
1656 (parser::yyla): this.
1658 2008-11-09 Akim Demaille <demaille@gostai.com>
1660 Rely on the state stack to display reduction traces.
1661 To display rhs symbols before a reduction, we used information
1662 about the rule reduced, which required the tables yyrhs and
1663 yyprhs. Now use rely only on the state stack to get the same
1666 * data/lalr1.cc (b4_rhs_data, b4_rhs_state): New.
1668 (parser::yyrhs_, parser::yyprhs_): Remove.
1669 (parser::yy_reduce_print_): Use the state stack.
1671 2008-11-09 Akim Demaille <demaille@gostai.com>
1673 Fuse yyval and yyloc into yylhs.
1674 * data/lalr1.cc (b4_lhs_value, b4_lhs_location): Adjust to using
1676 (parse): Replace yyval and yyloc with yylhs.value and
1678 After a user action, compute yylhs.state earlier.
1679 (yyerrlab1): Do not play tricks with yylhs.location, rather, use a
1682 2008-11-09 Di-an Jan <dianj@freeshell.org>
1684 Remove unused variable.
1685 * src/output.c (type_names_output): Remove unused variable sep.
1687 2008-11-09 Paolo Bonzini <bonzini@gnu.org>
1689 Change tests/output.at quoting.
1690 * tests/output.at (AT_CHECK_OUTPUT): Use conventional m4 quoting when
1691 expanding arguments.
1693 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
1695 Don't add a semicolon to actions for %skeleton or %language.
1696 It breaks Java test cases as reported by Akim Demaille.
1697 * src/scan-code.l: Implement.
1699 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
1701 Clean up %skeleton and %language priority implementation.
1702 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
1703 remove static qualifier because others will soon need to see it.
1704 (language_prio): Likewise.
1705 (getargs): Use command_line_prio rather than 0.
1706 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
1708 (skeleton_prio): Extern it.
1709 (language_prio): Extern it.
1710 * src/parse-gram.y: Use grammar_prio rather than 1.
1712 2008-11-07 Akim Demaille <demaille@gostai.com>
1714 Moving push traces into yypush_.
1715 * data/lalr1.cc (yypush_): Now takes a optional trace message.
1718 2008-11-07 Akim Demaille <demaille@gostai.com>
1720 The single-stack C++ parser is now the standard one.
1721 * data/lalr1.cc: Rename as...
1722 * data/lalr1-split.cc: this.
1723 * data/lalr1-fusion.cc: Rename as...
1724 * data/lalr1.cc: this.
1725 * etc/bench.pl.in: Adjust.
1727 2008-11-07 Akim Demaille <demaille@gostai.com>
1729 Avoid empty-if warnings.
1730 Reported by Quentin Hocquet.
1732 * data/lalr1-fusion.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT)
1733 (YY_STACK_PRINT): Provide some contents even when !YYDEBUG.
1735 2008-11-07 Akim Demaille <demaille@gostai.com>
1737 Pass command line location to skeleton_arg and language_argmatch.
1738 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
1739 The location argument is now mandatory.
1740 Adjust all dependencies.
1741 (getargs): Use command_line_location.
1743 2008-11-07 Akim Demaille <demaille@gostai.com>
1746 * src/getargs.c (usage): Document -D.
1747 Fix help string for --locations.
1748 (command_line_location): New.
1749 (short_options, long_options, getargs): Support -D, --define.
1750 (getargs): Move -d support at the right place.
1751 * doc/bison.texinfo (Bison Options): Update.
1752 * tests/input.at (%define, --define): New.
1754 2008-11-07 Akim Demaille <demaille@gostai.com>
1756 Initialize the muscle table before parsing the command line.
1757 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
1758 (getargs): Define file_name.
1759 * src/main.c (main): Initialize muscle_tab before calling
1761 * src/muscle_tab.c (muscle_init): No longer define file_name, as
1762 its value is not available yet.
1764 2008-11-07 Akim Demaille <demaille@gostai.com>
1766 Locations without columns for command line arguments.
1767 * src/location.c (location_print): Don't display negative columns.
1768 * src/location.h: Document this.
1770 2008-11-07 Akim Demaille <demaille@gostai.com>
1773 * src/getargs.c (usage): Fix help string for -W.
1775 2008-11-07 Akim Demaille <demaille@gostai.com>
1777 Handle more general types of option arguments.
1778 * build-aux/cross-options.pl: The argument ends at the first
1779 space, not the first non-symbol character.
1780 Use @var for each word appearing the argument description.
1782 2008-11-07 Akim Demaille <demaille@gostai.com>
1784 Destroy the variants that remain on the stack in case of error.
1785 * data/lalr1-fusion.cc (yydestruct_): Invoke the variant's
1787 Display the value only if yymsg is nonnull.
1788 (yyreduce): Invoke yydestruct_ when popping lhs symbols.
1790 2008-11-07 Akim Demaille <demaille@gostai.com>
1792 Add "%define assert" to variants.
1793 This is used to help the user catch cases where some value gets
1794 ovewritten by a new one. This should not happen, as this will
1797 Unfortunately this uncovered a bug in the C++ parser itself: the
1798 lookahead value was not destroyed between two calls to yylex. For
1799 instance if the previous lookahead was a std::string, and then an int,
1800 then the value of the std::string was correctly taken (i.e., the
1801 lookahead was now an empty string), but std::string structure itself
1804 This is now done in variant::build(other&) (which is used to take the
1805 value of the lookahead): other is not only stolen from its value, it
1806 is also destroyed. This incurs a new performance penalty of a few
1807 percent, and union becomes faster again.
1809 * data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
1810 (b4_variant_if): New.
1811 (variant::built): New.
1812 Use it whereever the status of the variant changes.
1813 * etc/bench.pl.in: Check the penalty of %define assert.
1815 2008-11-07 Akim Demaille <demaille@gostai.com>
1817 Use "%define variant" in bench.pl.
1818 * etc/bench.pl.in: No longer use the pseudo directive %variants,
1819 just use %define variants.
1821 2008-11-07 Akim Demaille <demaille@gostai.com>
1824 * src/parse-gram.h, src/parse-gram.c: Regen.
1826 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
1828 Fix user actions without a trailing semicolon.
1829 Reported by Sergei Steshenko at
1830 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
1831 * THANKS (Sergei Steshenko): Add.
1832 * src/scan-code.l (SC_RULE_ACTION): Fix it.
1833 * tests/regression.at (Fix user actions without a trailing semicolon):
1836 2008-11-04 Akim Demaille <demaille@gostai.com>
1838 Use b4_copyright_years.
1839 * data/yacc.c (b4_copyright_years): New.
1840 Fix its value according to the comments in the file.
1841 Use it and undefine it.
1843 2008-11-04 Akim Demaille <demaille@gostai.com>
1846 * data/lalr1-fusion.cc, src/parse-gram.y: here.
1848 2008-11-04 Akim Demaille <demaille@gostai.com>
1851 * data/lalr1-fusion.cc: here.
1853 2008-11-04 Akim Demaille <demaille@gostai.com>
1855 Use strict on bench.pl.
1856 * etc/bench.pl.in (&run, &generate_grammar): New.
1857 Rename the grammar generating functions for consistency.
1858 Change the interface so that the list of benches to run is passed
1859 as (optionless) arguments.
1860 (&compile): Use &run.
1862 2008-11-04 Akim Demaille <demaille@gostai.com>
1864 Remove spurious initial empty lines.
1865 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
1866 * data/yacc.c: End the @output lines with an @.
1868 2008-11-04 Akim Demaille <demaille@gostai.com>
1870 Improve the display of sizes.
1871 * etc/bench.p.in: Higher precision.
1872 Sort by decreasing size.
1874 2008-11-04 Akim Demaille <demaille@gostai.com>
1876 Don't memcpy C++ structures.
1877 * data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
1879 (variant::build): New overload for
1880 copy-construction-that-destroys.
1881 (variant::swap): New.
1882 (parser::yypush_): Use it in variant mode.
1884 2008-11-04 Akim Demaille <demaille@gostai.com>
1886 Better defaults for bench.pl.
1887 * etc/bench.pl.in ($verbose, $cflags, $iterations): Change the
1889 Adjust &verbose uses.
1892 2008-11-04 Akim Demaille <demaille@gostai.com>
1894 Make variant.yy more complex.
1895 std::list cannot be copied via memcpy, they are more demanding than
1896 std::string. Use one std::list to strengthen the test.
1898 * examples/variant.yy: Use lalr1-fusion.cc, not lalr1.cc.
1900 Create a list of strings, instead of a single large string.
1902 2008-11-04 Akim Demaille <demaille@gostai.com>
1905 * etc/bench.pl.in (--bench, $bench): New.
1907 2008-11-04 Akim Demaille <demaille@gostai.com>
1910 * data/lalr1-fusion.cc (destroy): Use as() in its definition.
1911 Define it after as().
1913 2008-11-04 Akim Demaille <demaille@gostai.com>
1916 * data/lalr1-fusion.cc (b4_rhs_location): Remove useless parens.
1918 2008-11-04 Akim Demaille <demaille@gostai.com>
1920 Issue missing synclines after user actions.
1921 * data/c.m4 (b4_case): Issue synclines on the output file.
1923 2008-11-04 Akim Demaille <demaille@gostai.com>
1925 Remove trailing empty line.
1926 * data/lalr1-fusion.cc: Don't add an empty line after the user's
1929 2008-11-04 Akim Demaille <demaille@gostai.com>
1931 Fix output of copyright years.
1932 * data/bison.m4 (b4_copyright): Fix the indentation of the
1933 copyright year paragraph.
1934 Use b4_copyright_years when no years are given.
1935 * data/lalr1.cc, data/lalr1-fusion.cc, data/location.cc
1936 (b4_copyright_years): New.
1939 2008-11-04 Akim Demaille <demaille@gostai.com>
1941 Avoid the spurious initial empty line.
1942 * data/lalr1-fusion.cc, data/location.cc: Put a trailing "@" at
1943 the end of @output request to suppress the empty line that
1946 2008-11-04 Akim Demaille <demaille@gostai.com>
1948 Remove parser::rhs_number_type.
1949 * data/lalr1-fusion.cc (rhs_number_type): No longer define it.
1950 (yyrhs_): Use b4_table_define.
1952 2008-11-04 Akim Demaille <demaille@gostai.com>
1955 * data/lalr1-fusion.cc: Use an int to iterate up to an int.
1957 2008-11-04 Akim Demaille <demaille@gostai.com>
1959 Factor the declaration of the integer tables.
1960 * data/lalr1-fusion.cc (b4_table_define): New.
1963 2008-11-03 Akim Demaille <demaille@gostai.com>
1965 Fix indentation of tables in lalr1.cc
1966 * data/lalr1-fusion.cc: Fix the indentation.
1968 2008-11-03 Akim Demaille <demaille@gostai.com>
1970 Destroy the lhs symbols after reduction.
1971 * data/lalr1-fusion.cc (parse): After the user action, when in
1972 variant mode, destroy the lhs symbols.
1974 2008-11-03 Akim Demaille <demaille@gostai.com>
1976 Simplify yysyntax_error_ use.
1977 * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
1978 type, but make it unnamed in the declaration when it is not used.
1980 2008-11-03 Akim Demaille <demaille@gostai.com>
1982 Let yy::variant::build return an lvalue.
1983 * data/lalr1-fusion.cc (variant::build): Return a reference to the
1986 2008-11-03 Akim Demaille <demaille@gostai.com>
1988 Define yy::variant only when needed.
1989 * data/lalr1-fusion.cc (yy::variant): Define only if variants are
1992 2008-11-03 Akim Demaille <demaille@gostai.com>
1994 Bench the three-stack lalr1.cc.
1995 * etc/bench.pl.in: Bench the three-stack lalr1.cc vs. the
1998 2008-11-03 Akim Demaille <demaille@gostai.com>
2000 Fail on parse error in calc++.
2001 * doc/bison.texinfo (calc++.cc): Propagate failures to the exit
2003 * examples/calc++/test ($me, $number, $exit, run): New.
2004 Use them to propagate errors to the exit status.
2006 2008-11-03 Akim Demaille <demaille@gostai.com>
2008 Don't specify the skeleton twice in the example.
2009 * examples/calc++/Makefile.am: Don't pass -S to Bison, the grammar
2010 file does what is needed.
2012 2008-11-03 Akim Demaille <demaille@gostai.com>
2014 bench: Improve output.
2015 * etc/bench.pl.in (bench_grammar): Tune the printf format.
2017 2008-11-03 Akim Demaille <demaille@gostai.com>
2019 bench: check impact of %debug on variants.
2020 * etc/bench.pl.in (variant_grammar): Fix the computation of
2022 Generate a grammar file that can work with or without %debug.
2023 Do use the @directive.
2024 (bench_variant_parser): Check impact of %debug.
2025 (@directives): Rename all the occurrences to...
2026 (@directive): this, for consistency.
2028 2008-11-03 Akim Demaille <demaille@gostai.com>
2030 bench: report the size too.
2031 * etc/bench.pl.in ($iterations): Defaults to -3.
2032 (&bench_grammar): Require hireswallclock.
2033 Compute and display the size of the result.
2036 2008-11-03 Akim Demaille <demaille@gostai.com>
2038 bench: More use of the verbosity level.
2039 * etc/bench.pl.in ($verbose, &verbose): New.
2041 More POD documentation.
2043 2008-11-03 Akim Demaille <demaille@gostai.com>
2045 bench.pl: a command line interface
2046 * etc/bench.pl.in: More doc.
2047 Some fixes in the documentation.
2048 ($cflags, $iterations, &help, &getopt): New.
2050 (&variant_grammar): Let the number of stages be 10 times what is
2053 2008-11-03 Akim Demaille <demaille@gostai.com>
2055 Bench the use of Boost.Variants.
2056 * etc/bench.pl.in ($cxx, &variant_grammar, &bench_variant_parser):
2058 (&compile): Be ready to compile C++ parsers.
2059 (&bench_push_parser): Move debug information to the outermost
2061 * THANKS: Add Michiel De Wilde.
2063 2008-11-03 Akim Demaille <demaille@gostai.com>
2065 bench.pl: Pass directives as a list instead of as a string.
2066 * etc/bench.pl.in (&directives): New.
2067 (&triangular_grammar, &calc_grammar): Use it to format the Bison
2069 (&triangular_grammar): Do use the directives (were ignored).
2070 (&bench_grammar, &bench_push_parser): Adjust to pass lists of
2073 2008-11-03 Akim Demaille <demaille@gostai.com>
2075 Improve genericity of bench.pl.
2076 * etc/bench.pl.in (&bench_grammar): Take the set of benches as
2078 (&bench_push_parser): New.
2081 2008-11-03 Akim Demaille <demaille@gostai.com>
2083 Add documentation to bench.pl.
2084 * etc/bench.pl.in: Comment changes.
2086 2008-11-03 Akim Demaille <demaille@gostai.com>
2088 Fuse the three stacks into a single one.
2090 In order to make it easy to perform benchmarks to ensure that
2091 there are no performance loss, lalr1.cc is forked into
2092 lalr1-fusion.cc. Eventually, lalr1-fusion.cc will replace
2095 Meanwhile, to make sure that lalr1-fusion.cc is correctly
2096 exercized by the test suite, the user must install a symbolic link
2097 from lalr1.cc to it.
2099 Instead of having three stacks (state, value, location), use a
2100 stack of triples. This considerably simplifies the code (and it
2101 will be easier not to require locations as currently does the C++
2102 parser), and also gives a 10% speedup according to
2103 etc/bench (probably mainly since memory allocation is done once
2104 instead of three times).
2106 Another motivation is to make it easier to destruct properly
2107 semantic values: now that they are bound to their state (hence
2108 symbol type) it will be easier to call the appropriate destructor.
2110 These changes should probably benefit the C parser too.
2112 * data/lalr1.cc: Copy as...
2113 * data/lalr1-fusion.cc: this new file.
2114 (b4_rhs_value, b4_rhs_location): New definitions overriding those
2116 (state_stack_type, semantic_stack_type, location_stack_type)
2117 (yystate_stack_, yysemantic_stack_, yylocation_stack_): Remove.
2118 (data_type, stack_type, yystack_): New.
2119 (YYLLOC_DEFAULT, yypush_): Adjust.
2120 (yyerror_range): Now based on data_type, not location_type.
2122 2008-11-03 Akim Demaille <demaille@gostai.com>
2124 Push the state, value, and location at the same time.
2125 This is needed to prepare a forthcoming patch that fuses the three
2128 * data/lalr1.cc (parser::yypush_): New.
2129 (parser::yynewstate): Change the semantics: instead of arriving to
2130 this label when value and location have been pushed, but yystate
2131 is to be pushed on the state stack, now the three of them must
2132 have been pushed before. yystate still must be the new state.
2133 This allows to use yypush_ everywhere instead of individual
2134 handling of the stacks.
2136 2008-11-03 Akim Demaille <demaille@gostai.com>
2138 Prefer references to pointers.
2139 * data/lalr1.cc (b4_symbol_actions): New, overrides the default C
2140 definition to use references instead of pointers.
2141 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_):
2142 Take the value and location as references.
2145 2008-11-03 Akim Demaille <demaille@gostai.com>
2147 stack::size instead of stack::height.
2148 * data/lalr1.cc (stack::height): Rename as...
2149 (stack::size): this.
2150 Fix the output type.
2153 2008-11-03 Akim Demaille <demaille@gostai.com>
2155 Use variants to support objects as semantic values.
2156 This patch was inspired by work by Michiel De Wilde. But he used
2157 Boost variants which (i) requires Boost on the user side, (ii) is
2158 slow, and (iii) has useless overhead (the parser knows the type of
2159 the semantic value there is no reason to duplicate this
2160 information as Boost.Variants do).
2162 This implementation reserves a buffer large enough to store the
2163 largest objects. yy::variant implements this buffer. It was
2164 implemented with Quentin Hocquet.
2166 * src/output.c (type_names_output): New.
2167 (output_skeleton): Invoke it.
2168 * data/c++.m4 (b4_variant_if): New.
2169 (b4_symbol_value): If needed, provide a definition for variants.
2170 * data/lalr1.cc (b4_symbol_value, b4_symbol_action_)
2171 (b4_symbol_variant, _b4_char_sizeof_counter, _b4_char_sizeof_dummy)
2172 (b4_char_sizeof, yy::variant): New.
2173 (parser::parse): If variants are requested, define
2174 parser::union_type, parser::variant, change the definition of
2175 semantic_type, construct $$ before running the user action instead
2176 of performing a default $$ = $1.
2177 * examples/variant.yy: New.
2178 Based on an example by Michiel De Wilde.
2180 2008-11-03 Akim Demaille <demaille@gostai.com>
2182 Parameterize the extraction of semantic values.
2183 To make future changes easier, no longer rely on ".TYPE" being the
2184 way to get a semantic value.
2186 * data/c.m4 (b4_symbol_value): New.
2188 * data/c++.m4, data/yacc.c: Use it.
2189 * data/glr.c: Use b4_symbol_value.
2193 2008-11-03 Akim Demaille <demaille@gostai.com>
2195 Prepare easier M4 changes.
2196 * data/lalr1.cc: Use escaped [] instead of literals to prepare
2199 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2201 Initiate further development.
2202 * NEWS: Create an empty section for new entries.
2203 * gnulib: Update submodule to HEAD.
2205 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2207 * NEWS: Version 2.4.
2209 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2211 Prepare for next release.
2212 * NEWS: Briefly mention changes since 2.3b.
2213 * README: Say GNU m4 1.4.6, which we've been requiring in release
2214 announcements already, not 1.4.3, which breaks the build.
2216 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2218 Say %language is experimental.
2219 We're thinking of extending it's effect on output file naming. See the
2221 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
2222 * NEWS: Say it's experimental.
2223 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
2224 recommend it over %skeleton for now.
2225 (Bison Options): Likewise.
2226 (C++ Bison Interface): Use %skeleton not %language.
2227 (Calc++ Parser): Use %skeleton not %language.
2228 * src/getargs.c (usage): Say it's experimental.
2230 2008-11-01 Di-an Jan <dianj@freeshell.org>
2231 Paolo Bonzini <bonzini@gnu.org>
2233 Support all Java parser class modifiers.
2234 * data/java.m4 (b4_percent_define_get3): New.
2235 (b4_final_if, b4_strictfp_if): New.
2236 * data/lalr1.java (final, strictfp, extends, implements): Support.
2237 * doc/bison.texinfo (final, strictfp, extends, implements): Add
2239 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
2240 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
2241 (AT_CHECK_JAVA_GREP): New.
2242 (Java parser class modifiers): New test.
2243 (Java parser class extends and implements): New test.
2245 Model exception propagation better with throws and lex_throws.
2246 * data/java.m4 (b4_list2): New.
2247 (throws): Change default.
2248 * data/lalr1.java (yyaction): Add throws.
2249 (parse): Add lex_throws in addition to throws.
2250 * doc/bison.texinfo (throws, lex_throws): Add documentation.
2251 * tests/java.at (Java throws specifications): New test.
2253 Improve documentation for Java parsers.
2254 * doc/bison.texinfo (Java Parsers): Add subsections.
2255 Don't quote first argument of %define.
2256 (Java Bison Interface): Document output files. Move documentation
2257 of parser class and merge into Java Parser Interface. Document
2258 features that error out. Document directives with no effect.
2259 Move note about Javadoc higher.
2260 (Java Semantic Values): Explicitly mention stype.
2261 Document that generic types cannot be used.
2262 (Java Location Values): Use @deftypeivar. Document constructors.
2263 Correct return value for toString.
2264 (Java Parser Interface): List undocumented constants/fields.
2265 Move documentation of fields added by %parse-param closer to list
2266 of members. Document that token names are added as fields.
2267 Document constructors accurately. Remove error method.
2268 (Java Scanner Interface): Move note on %pure-parser to Java Bison
2269 Interface. Describe %code lexer and yylex accutately.
2270 Remove documentation that does not match the code.
2271 (Java Action Features): New.
2272 (Java Differences): Add reference. Add item on semantic values.
2273 Add note about @{ ... @}. Clarify %% epilogue placement.
2274 (Java Declarations Summary): New.
2277 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
2278 (b4_remove_comma): Quote test argument.
2279 (b4_identification): Remove "bison" field.
2280 * tests/java.at (Java parser class and package names): New test.
2281 (Java %parse-param and %lex-param): New test.
2282 (Java stype, position_class and location_class): New test.
2284 2008-10-31 Di-an Jan <dianj@freeshell.org>
2286 * data/lalr1.jave: Update copyright years.
2287 (YYParser): Correct name of "generated from" file in Javadoc:
2288 use b4_file_name instead of @ofile@.
2289 (Location constructor): Correct Javadoc parameter name.
2290 (yylloc): Add missing opening m4 quote after b4_location_if.
2291 This removes a stray [ in the Javadoc of Lexer.getStartPos.
2292 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
2293 (YYParser constructor): Correct Javadoc parameter name.
2295 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
2297 Always put auxiliary code files in the same dir as other output files.
2298 * src/files.c (compute_file_name_parts): When the user specifies
2299 --output but not --file-prefix, extract the directory prefix from the
2300 file prefix not from the grammar file name. This affects the location
2301 of files like location.hh generated by the C++ skeleton. The includes
2302 in the other output files require this fix.
2303 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
2304 for expected output files.
2305 (Output files): Add a test for the above.
2307 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
2309 * gnulib: Update submodule to HEAD.
2311 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
2313 Update copyright year.
2314 * src/files.c: Here.
2316 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
2318 Don't overwrite the input file.
2319 * src/files.c (output_file_name_check): Fatal error if using input file
2321 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
2323 (Conflicting output files): Add test.
2325 2008-10-28 Akim Demaille <demaille@gostai.com>
2328 * data/lalr1.cc: Formatting changes.
2330 2008-10-28 Akim Demaille <demaille@gostai.com>
2332 Don't define debugging functions when !YYDEBUG.
2333 * data/lalr1.cc (debug_stream, set_debug_stream)
2334 (debug_level_type, debug_level, set_debug_level): Don't
2335 declare them when YYDEBUG is not defined.
2336 The implementation are already YYDEBUG-aware.
2338 2008-10-28 Akim Demaille <demaille@gostai.com>
2340 Prefer "continue" for empty loop bodies.
2341 * etc/bench.pl.in: Use "continue" instead of {}.
2343 2008-10-28 Akim Demaille <demaille@gostai.com>
2345 Space and comments changes.
2346 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
2347 * data/c.m4, data/lalr1.cc: Space changes.
2349 2008-10-28 Akim Demaille <demaille@gostai.com>
2351 Make gnulib a submodule.
2353 * .gitmodules (gnulib): New.
2355 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
2357 Fix yyerror_range for user-defined location type in C++. Reported by
2359 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
2360 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
2361 * THANKS (Georg Sauthoff): Add.
2363 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
2365 Update several administrative files mainly to facilitate releasing.
2366 * HACKING (Administrivia): Make the git-merge-changelog notes more
2368 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
2369 (Release Procedure): Update for git and add numerous details that were
2371 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
2372 * maint.mk (announcement): Don't list bison as a bootstrap tool so
2373 that announcements don't claim we bootstrapped with whatever bison
2374 happened to be in PATH. Add flex as a bootstrap tool.
2375 * Makefile.maint: Remove, previously replaced by maint.mk.
2376 * Makefile.cfg: Remove, and migrate settings to...
2377 * cfg.mk: ... here for the sake of `make announcement'.
2378 * bootstrap.conf (gnulib_modules): Add announce-gen.
2379 * README: Say GNU Bison instead of just Bison. Suggested by Karl
2382 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
2384 Small but important bugfixes for the Java skeleton.
2385 * data/lalr1.java (yyerror): Change Location to b4_location_type.
2386 (yy_symbol_print): Call toString on yyvaluep.
2388 2008-08-29 Akim Demaille <demaille@gostai.com>
2390 Clarify UPDATED use.
2391 * doc/bison.texinfo: It refers to the last edition of this file,
2392 not to the release date of Bison.
2393 Reported by Joel E. Denny.
2395 2008-08-29 Akim Demaille <demaille@gostai.com>
2397 * README: Update FAQ pointer.
2398 Reported by Joel E. Denny.
2400 2008-08-27 Eric Blake <ebb9@byu.net>
2402 Resync m4sugar from autoconf.
2403 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
2404 (m4_init): Adjust to latest m4.git changes.
2405 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
2407 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
2408 (_m4_list_cmp): Reduce side effects.
2410 2008-08-27 Akim Demaille <demaille@gostai.com>
2412 Check yyerrok in calc.at.
2413 * tests/calc.at (calc.y): Use yyerrok on "( error )".
2414 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
2417 2008-08-27 Akim Demaille <demaille@gostai.com>
2419 Support yyerrok in lalr1.cc.
2420 YYBACKUP is still to import back into lalr1.cc.
2421 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
2423 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
2425 For maintainer-check*, don't recompile for a $(VERSION) update.
2427 (_is-dist-target): Override the one in GNUmakefile.
2428 * Makefile.am (EXTRA_DIST): Add cfg.mk.
2430 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
2432 Update for recent change to gnulib.
2433 * src/parse-gram.y: Don't include strverscmp.h. It comes from
2436 2008-08-15 Eric Blake <ebb9@byu.net>
2438 Remaining m4sugar merge from autoconf.
2439 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
2440 * data/m4sugar/foreach.m4: New file, copied from autoconf.
2441 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
2442 * src/output.c (output_skeleton): Tell m4 how to find it.
2444 Partial m4sugar merge from autoconf: m4_map.
2445 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
2446 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
2447 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
2448 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
2450 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
2452 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
2455 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
2457 Keep .version and PACKAGE_VERSION in sync.
2458 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
2459 dependency, and add comments justifying this in more detail. Discussed
2461 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
2463 2008-08-06 Eric Blake <ebb9@byu.net>
2465 Partial m4sugar merge from autoconf: m4_shiftn.
2466 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
2467 (m4_shift2, m4_shift3): New macros.
2468 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
2469 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
2470 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
2471 * data/java.m4 (b4_remove_comma): Likewise.
2473 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
2474 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
2475 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
2476 (m4_init): Consolidate wrapped text into single m4_wrap.
2477 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
2480 2008-08-05 Eric Blake <ebb9@byu.net>
2482 Partial m4sugar merge from autoconf: builtins, version.m4.
2483 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
2484 (m4_prepend): Remove, as it is unused and inherently quadratic,
2485 whereas m4_append is linear in newer m4.
2486 (m4_mkstemp): New builtin.
2487 (m4_symbols): Make rename conditional.
2488 (m4_version_prereq): Ensure fatal error if used in bison, which
2489 intentionally lacks version.m4.
2491 Fix comments in m4sugar.
2492 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
2494 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
2496 Update for recent .gitignore fix in Gnulib.
2497 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
2498 anchored .gitignore entries.
2500 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
2502 Set gnu or gnits strictness.
2503 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
2504 development and gnits strictness for releases. Based on Eric Blake's
2506 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
2508 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
2510 * NEWS: Clarify documentation of %language.
2512 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
2514 Support usage of git-merge-changelog.
2515 * .gitattributes: New.
2516 * HACKING: Document usage of git-merge-changelog.
2517 * bootstrap: Install git-merge-changelog entries in .git/config
2520 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
2522 Remove remaining dependence on CVS Id keyword.
2523 * ChangeLog: For the sake of people still using CVS, don't use dollars
2525 * data/xslt/bison.xsl: Remove Id from header comments, where it was
2527 * data/xslt/xml2dot.xsl: Likewise.
2528 * data/xslt/xml2text.xsl: Likewise.
2529 * data/xslt/xml2xhtml.xsl: Likewise.
2530 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
2531 * doc/Makefile.am (neutralize): Remove, no longer needed.
2532 (.x.1): Don't use neutralize.
2533 (edit): Don't substitute for ID.
2534 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
2536 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
2538 Fix dependence on computed configure variables.
2539 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
2540 $(top_srcdir)/configure.ac so that changes to computed variables, such
2541 as PACKAGE_VERSION, are seen.
2542 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
2544 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
2546 Update copyright dates for recent changes.
2547 * Makefile.am: Here.
2548 * src/Makefile.am: Here.
2549 * src/reduce.c: Here.
2550 * tests/reduce.at: Here.
2552 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
2554 Use git-version-gen for version names between releases.
2555 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
2556 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
2557 * .prev-version: New.
2558 * .version.in: Remove.
2559 * ChangeLog: Remove the Id previously used for capturing the CVS
2561 * GNUmakefile: Remove, now copied from Gnulib.
2562 * Makefile.am: Add code suggested by comments in
2563 build-aux/git-version-gen.
2564 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
2565 .prev-version, and .version.
2566 * NEWS (2.3b+): Rename to...
2567 (?.?): ... this because we're dropping the "+" version naming scheme,
2568 but, in general, we still can't be sure of our next release name.
2569 * bootstrap: Add a quick hack to remove from .gitignore the
2570 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
2571 entry. This should really be fixed in gnulib instead.
2572 * bootstrap.conf (gnulib_modules): Add gnumakefile.
2573 * configure.ac (AC_INIT): Set version name by invoking
2574 build-aux/git-version-gen.
2575 (AC_CONFIG_FILES): Remove .version, now generated by
2576 build-aux/git-version-gen.
2577 * maint.mk: New, copied from coreutils.
2578 * doc/.cvsignore (bison.1): Add.
2579 * doc/.gitignore (/bison.1): Add.
2580 * doc/bison.1: Remove, generated.
2581 * src/.cvsignore (revision.c): Remove.
2582 * src/.gitignore (/revision.c): Remove.
2583 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
2584 (BUILT_SOURCES): Remove revision.c.
2585 (revision.c): Remove.
2586 * src/getargs.c (version): Don't print revision after the VERSION.
2587 * src/revision.h: Remove.
2589 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
2591 Fix untranslatable composition of sentences. Reported by Goran
2593 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
2594 * THANKS (Goran Uddeborg): Add.
2595 * src/reduce.c (reduce_print): Report the number of nonterminals and
2596 rules useless in the grammar in separate sentences.
2597 * tests/reduce.at (Useless Rules): Update output.
2598 (Reduced Automaton): Likewise.
2599 (Underivable Rules): Likewise.
2600 (Empty Language): Likewise.
2602 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2604 Fix some .gitignore and .cvsignore problems.
2605 * bootstrap (insert_sorted_if_absent): Replace all uses with...
2606 (insert_vc_ignore): ... this new function, which prepends `/' to all
2607 .gitignore entries before passing them to insert_sorted_if_absent.
2608 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
2609 .cvsignore files are maintained even though Bison developers run
2610 bootstrap while using Git.
2611 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
2614 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
2615 unneeded. Reported by Eric Blake.
2616 * lib/.gitignore (/*~): Add.
2617 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
2618 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
2620 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
2622 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2624 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
2625 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
2626 * bootstrap.conf (gnulib_modules): Add unsetenv.
2627 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
2628 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
2630 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
2631 the first argument because it may become position-dependent, and unset
2632 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
2633 Add comments explaining these issues in more detail.
2635 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
2637 Add .gitignore everywhere based on .cvsignore.
2639 * build-aux/.gitignore: New.
2640 * data/.gitignore: New.
2641 * doc/.gitignore: New.
2642 * etc/.gitignore: New.
2643 * examples/.gitignore: New.
2644 * examples/calc++/.gitignore: New.
2645 * lib/.gitignore: New.
2646 * m4/.gitignore: New.
2647 * po/.gitignore: New.
2648 * runtime-po/.gitignore: New.
2649 * src/.gitignore: New.
2650 * tests/.gitignore: New.
2652 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
2654 * NEWS (2.3b+): New section, empty for now.
2655 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
2657 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
2659 * NEWS (2.3b): Update release date since there has been a delay in
2660 getting the announcements and tarballs out.
2662 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
2664 * NEWS: Version 2.3b.
2665 * configure.ac (AC_INIT): Likewise.
2666 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
2668 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
2670 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
2671 been doing it for years.
2672 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
2673 (Release Procedure): Add FIXME about make alpha being unmaintained.
2675 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
2677 * data/yacc.c: Reformat m4 a little for readability.
2678 * src/lalr.c (build_relations): Correct comment.
2680 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2682 DJGPP specific issue.
2683 * djgpp/config.sed: Fixes required to run configure scripts generated
2686 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
2688 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
2689 coordinator@translationproject.org.
2691 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
2693 * THANKS: Add Eric Blake.
2695 2008-04-23 Eric Blake <ebb9@byu.net>
2697 Revert prior patch, by working around autoconf regression.
2698 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
2699 ("Output file name: ("): Uncomment test.
2700 ("Output file name: )"): Likewise.
2701 Based on an idea from Noah Misch.
2703 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2705 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
2706 2.61. Reported by Juan Manuel Guerrero at
2707 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
2708 * tests/output.at ("Output file name: ("): Comment out test case for
2710 ("Output file name: )"): Likewise.
2712 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2714 * GNUmakefile: Update git-version-gen invocation so make dist
2717 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2719 Update to the current gnulib CVS repository, and fix trigraph handling
2721 * bootstrap: Update gnulib CVS repository URL.
2722 (symlink_to_dir): Encapsulate the code that guarantees the destination
2723 directory exists into...
2724 (check_dst_dir): ... this new function, and...
2725 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
2726 fail when copying files into lib/uniwidth/.
2727 * src/output.c (prepare_symbols): When writing yytname muscles, where
2728 symbol names will be encoded in C-string literals, tell quotearg to
2729 escape trigraphs. This used to be the default in gnulib.
2730 * tests/regression.at (Token definitions): Because of the change in
2731 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
2732 escapes trigraphs in symbol names. Thus, yytname no longer has
2733 trigraphs unnecessarily doubly escaped. Update test case output.
2734 Extend test case to be sure Bison's own error messages will no longer
2735 have trigraphs in symbol names unnecessarily escaped once.
2737 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
2739 Fix make dist infinite loop reported by Juan Manuel Guerrero at
2740 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
2741 * .cvsignore: Add .version.
2743 * bootstrap.conf (gnulib_modules): Add git-version-gen.
2744 * configure.ac (AC_CONFIG_FILES): Add .version.
2745 * build-aux/.cvsignore: Add git-version-gen.
2747 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
2749 * NEWS (2.3a+): Mention that -g now takes an argument.
2750 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
2751 consistency. Update the -g and -x entries now that they take
2752 arguments. Use brackets to indicate optional arguments.
2753 * src/getargs.c (usage): Explain the relationship between arguments of
2754 long and short options more completely. Document --defines and -d
2755 separately since the former takes an argument but, for POSIX Yacc, the
2757 (short_options): Let -W take an optional argument like --warnings.
2758 (getargs): Sort cases.
2760 2008-02-28 Akim Demaille <demaille@gostai.com>
2762 * doc/bison.texinfo: Fix a few typos.
2764 2008-02-28 Akim Demaille <akim@epita.fr>
2766 * doc/bison.texinfo (Bison Options): Document -W.
2767 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
2769 2008-02-28 Akim Demaille <akim@epita.fr>
2771 * src/getargs.c (short_options): Split and sort for readability.
2772 -g and -x take optional arguments, just like their long options.
2773 * build-aux/cross-options.pl: Use /x to make the regexp easier to
2775 Fix the handling of $opt which resulted in all the argument to be
2776 considered as optional.
2778 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
2780 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
2781 say its interface is experimental.
2782 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
2784 (Bison Options): In the -L and --language entry, mention Java.
2785 (Java Bison Interface): Say the interface is experimental.
2786 * src/getargs.c (usage): Mention -L and --language.
2788 * NEWS (2.3a+): Say the push parsing interface is experimental.
2789 * doc/bison.texinfo (Push Decl): Likewise.
2790 (Decl Summary): Likewise in the "%define api.push_pull" entry.
2791 (Push Parser Function): Likewise.
2792 (Pull Parser Function): Likewise.
2793 (Parser Create Function): Likewise.
2794 (Parser Delete Function): Likewise.
2795 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
2796 yypull_parse, and yypush_parse entries.
2798 * NEWS (2.3a+): Mention XML support, and say the schema is
2800 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
2801 * src/getargs.c (usage): Say the XML schema is experimental.
2803 * NEWS (2.3a+): Say option instead of flag.
2805 2008-02-21 Wojciech Polak <polak@gnu.org>
2807 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
2810 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
2812 Fix impure push parser compile error reported by Bob Rossi at
2813 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
2814 * data/yacc.c: Clean up whitespace in the output a little.
2815 (yypstate_allocated): Define for impure push parsers regardless of
2816 whether the pull interface is also requested.
2817 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
2818 check impure push parsers without the pull interface.
2820 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
2821 yyerror takes arguments specified by %parse-param while yypstate_new
2823 * doc/bison.texinfo (Parser Create Function): Document that
2824 yypstate_new returns 0 for multiple impure parser instances.
2825 * tests/push.at (Push Parsing: Multiple impure instances): Update
2826 expected stderr output.
2828 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
2830 * runtime-po/POTFILES.in (push.c): Remove.
2832 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
2834 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
2835 * data/push.c: Rename to...
2836 * data/yacc.c: ... this, overwriting it.
2837 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
2838 `%push-pull-parser' -> `%define api.push_pull "both"'.
2839 Remove old yacc.c tests, and update push.c tests to yacc.c.
2841 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
2843 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
2844 `"%code top" blocks' instead of `%code "top" blocks'.
2845 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
2846 Clean up whitespace in the output a little.
2848 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
2850 Fix documentation problems reported by Tim Josling at
2851 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
2852 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
2853 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
2854 integers. Explain the effect of literal string aliases on error
2855 messages. Copy token 0 documentation from the C++ skeleton
2858 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
2860 Accept a token number in a %left, %right, or %nonassoc for POSIX
2861 conformance. Reported by Tim Josling at
2862 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
2863 * NEWS (2.3a+): Mention.
2864 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
2865 and code numbers are treated by precedence declarations.
2866 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
2868 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
2870 (symbol.prec): New, just like symbol but allows INT.
2871 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
2873 * tests/regression.at (Token number in precedence declaration): New
2876 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2878 DJGPP specific issues.
2879 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
2880 be changed. Copyright timestamp adjusted.
2881 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
2882 be changed. Copyright timestamp adjusted.
2883 * djgpp/config.site: Copyright timestamp adjusted.
2884 * djgpp/config_h.sed: Copyright timestamp adjusted.
2885 * djgpp/djunpack.bat: Copyright timestamp adjusted.
2886 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
2887 filename translation list.
2888 * djgpp/subpipe.c (init_subpipe): Check the environment variables
2889 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
2890 files shall be created. Before trying to use the temp dir where the
2891 environment variable points to check that the dir really exists. If
2892 not default to the cwd as temp dir. Copyright timestamp adjusted.
2893 * djgpp/subpipe.h: Copyright timestamp adjusted.
2894 * djgpp/testsuite.sed: Copyright timestamp adjusted.
2896 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
2898 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
2900 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
2902 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
2903 Problem reported by Claudio Saavedra in
2904 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
2906 2008-01-05 Wojciech Polak <polak@gnu.org>
2908 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
2909 document's title with the input grammar file name.
2911 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
2913 Automate regression testing of the XML/XSLT implementation. Discussed
2915 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
2916 * configure.ac (XSLTPROC): New substitution.
2917 * Makefile.am (maintainer-xml-check): New phony target invoking...
2918 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
2919 invoking make maintainer-check with BISON_TEST_XML=1.
2920 * tests/atlocal.in (XSLTPROC): New.
2921 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
2922 not to report reachable memory when Bison is expected to have a
2923 non-zero exit status and (2) to compare XML/XSLT output with --graph
2924 and --report=all output for every working grammar when
2926 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
2927 (AT_BISON_CHECK_XML): New.
2928 (AT_QUELL_VALGRIND): New.
2929 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
2930 (AT_CHECK): ... don't redefine this since this was the old way to
2932 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
2933 AT_BISON_CHECK invocations.
2934 * tests/c++.at: Likewise.
2935 * tests/calc.at: Likewise.
2936 * tests/conflicts.at: Likewise.
2937 * tests/cxx-type.at: Likewise.
2938 * tests/existing.at: Likewise.
2939 * tests/glr-regression.at: Likewise.
2940 * tests/headers.at: Likewise.
2941 * tests/input.at: Likewise.
2942 * tests/java.at: Likewise.
2943 * tests/output.at: Likewise.
2944 * tests/push.at: Likewise.
2945 * tests/reduce.at: Likewise.
2946 * tests/regression.at: Likewise.
2947 * tests/sets.at: Likewise.
2948 * tests/skeletons.at: Likewise.
2949 * tests/synclines.at: Likewise.
2950 * tests/torture.at: Likewise.
2951 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
2952 tends to hang xsltproc.
2953 (Big horizontal): Likewise.
2955 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
2957 In XML output, remove redundant class attribute on symbol element.
2958 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
2959 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
2960 look up a symbol to determine whether it's a nonterminal or terminal.
2961 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
2962 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
2964 Add prec/assoc information to XML output.
2965 * src/gram.c (grammar_rules_print_xml): For each rule that has a
2966 %prec, add a percent_prec attribute.
2967 * src/print-xml.c (print_grammar): For each terminal that has a
2968 precedence or associativity, add a prec or assoc attribute.
2970 (xml_puts): Use xml_indent.
2971 (xml_printf): Use xml_indent.
2972 * src/print-xml.h (xml_indent): Prototype.
2974 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
2975 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
2977 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
2979 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
2980 (bison:ruleByNumber): ... this for clarity.
2981 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
2982 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
2983 (xsl:template match="reduction"): Update.
2984 (xsl:template match="item"): Update.
2985 (xsl:template match="reduction"): Update.
2987 In the XML output, don't print the list of rules where symbols appear.
2988 Compute it in XSLT instead. Discussed at
2989 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
2990 * data/xslt/bison.xsl (bison:ruleByLhs): New.
2991 (bison:ruleByRhs): New.
2992 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
2994 (xsl:template match="terminal/rule"): Remove.
2995 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
2997 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
2999 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
3000 bison:ruleByRhs and mode="number-link" for rule template.
3001 (xsl:template match="terminal/rule"): Remove.
3002 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3003 bison:ruleByRhs and mode="number-link" for rule template.
3004 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3006 (xsl:template match="rule" mode="number-link"): ... this.
3007 * src/print-xml.c (print_grammar): Don't print the list of rules.
3009 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
3011 Don't let --report affect XML output; always print all information.
3013 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
3014 * src/conflicts.c (log_resolution): Implement.
3015 * src/print-xml.c (print_core): Implement.
3016 (print_state): Implement.
3017 (print_xml): Implement.
3019 * NEWS (2.3a+): Fix quotes.
3020 * src/parse-gram.y (prologue_declaration): For consistency with -v,
3021 don't let %verbose clear the list specified by --report.
3023 2007-11-26 Akim Demaille <akim@epita.fr>
3025 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
3027 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
3029 In the XML output, list useless and unused symbols and rules with the
3030 useful ones and add a "usefulness" attribute. Discussed starting at
3031 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
3032 * src/gram.c (grammar_rules_partial_print_xml): Remove.
3033 (grammar_rules_print_xml): Print all rules instead of just those
3034 useful in the grammar, and add a "usefulness" attribute.
3035 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
3036 * src/print-xml.c (print_rules_useless_in_parser): Remove.
3037 (print_grammar): Print all nonterminals instead of just useful ones,
3038 and add a "usefulness" attribute to nonterminals and terminals.
3039 (print_xml): Don't print a separate "reductions" or
3040 "rules-useless-in-parser" element.
3041 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
3042 (reduce_xml): Remove.
3043 (reduce_token_unused_in_grammar): New.
3044 (reduce_nonterminal_useless_in_grammar): New.
3045 * src/reduce.h (reduce_xml): Remove prototype.
3046 (reduce_token_unused_in_grammar): Add prototype.
3047 (reduce_nonterminal_useless_in_grammar): Add prototype.
3048 * data/xslt/xml2text.xsl: Update for XML changes.
3049 * data/xslt/xml2xhtml.xsl: Update for XML changes.
3050 * tests/reduce.at (Useless Terminals): Update output.
3051 (Useless Rules): Update output.
3052 (Reduced Automaton): Update output.
3054 Say "Terminals unused in grammar" instead of "Unused terminals".
3055 * NEWS (2.3a+): Update.
3056 * doc/bison.texinfo (Understanding): Update example output.
3057 * src/reduce.c (reduce_output): Implement.
3058 * data/xslt/xml2text.xsl: Implement.
3059 * data/xslt/xml2xhtml.xsl: Implement.
3061 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
3063 Accept --report-file=FILE to override the default `.output' filename.
3064 * NEWS (2.3a+): Mention.
3065 * doc/bison.texinfo (Bison Options): Add an entry.
3066 * src/files.c (compute_output_file_names): Don't override
3067 spec_verbose_file if already set.
3068 * src/getargs.c (usage): Document --report-file.
3069 (REPORT_FILE_OPTION): New anonymous enum member.
3070 (long_options): Add entry for it.
3071 (getargs): Add case for it setting spec_verbose_file.
3073 * build-aux/cross-options.pl: Don't record a short option just because
3075 * doc/.cvsignore: Add yacc.1.
3077 2007-11-14 Akim Demaille <akim@epita.fr>
3079 * doc/yacc.1.in: New.
3080 * configure.ac, doc/Makefile.am: Adjust.
3081 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
3083 Use AC_SUBST for assignments too.
3084 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
3086 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
3088 * src/gram.c: Remove comments that duplicate comments in gram.h.
3090 When reporting useless rules and nonterminals, say "useless in grammar"
3091 instead of "useless", and say "useless in parser" instead of "never
3092 reduced". Discussed starting at
3093 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
3094 * NEWS (2.3a+): Mention this change.
3095 * data/xslt/xml2text.xsl: Update output text and expected input XML
3096 element names to match changes below.
3097 * data/xslt/xml2xhtml.xsl: Likewise.
3098 (xsl:template match="bison-xml-report"): Add missing entry in Table of
3099 Contents: "Rules useless in parser due to conflicts".
3100 * doc/bison.texinfo (Decl Summary): Reword a little.
3101 (Understanding): Update example output for changes below.
3102 * src/gram.c: (rule_useful_p): Rename to...
3103 (rule_useful_in_grammar_p): ... this.
3104 (rule_useless_p): Rename to...
3105 (rule_useless_in_grammar_p): ... this.
3106 (rule_never_reduced_p): Rename to...
3107 (rule_useless_in_parser_p): ... this.
3108 (grammar_rules_print): Update for renames.
3109 (grammar_rules_print_xml): Update for renames.
3110 (grammar_rules_never_reduced_report): Rename to...
3111 (grammar_rules_useless_report): ... this since it is used for either
3112 kind of useless rule.
3113 * src/gram.h: Reword comments and update function names in prototypes.
3114 * src/main.c (main): Say "rule useless in parser due to conflicts".
3115 * src/print-xml.c (print_rules_never_reduced): Rename to...
3116 (print_rules_useless_in_parser): ... this, and rename output XML
3117 element "rules-never-reduced" to "rules-useless-in-parser".
3118 (print_xml): Update for rename.
3119 * src/print.c (print_results): Say "Rules useless in parser due to
3121 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
3122 (nonterminals_reduce): Say "nonterminal useless in grammar".
3123 (reduce_output): Say "Nonterminals useless in grammar".
3124 Say "Rules useless in grammar".
3125 (reduce_xml): Rename output XML element "useless" to
3126 "useless-in-grammar".
3127 (reduce_print): Don't report the count of grammatically useless rules
3128 as "rules never reduced" just because %yacc is specified.
3129 In the correct report of this count, say nonterminal(s) and rule(s)
3130 "useless in grammar".
3131 * tests/conflicts.at (S/R in initial): Update expected output.
3132 (Defaulted Conflicted Reduction): Likewise.
3133 (Unreachable States After Conflict Resolution): Likewise.
3134 * tests/existing.at (GNU pic Grammar): Likewise.
3135 * tests/reduce.at (Useless Nonterminals): Likewise.
3136 (Useless Rules): Likewise.
3137 (Reduced Automaton): Likewise.
3138 (Underivable Rules): Likewise.
3139 (Empty Language): Likewise.
3141 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
3143 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
3144 here document and before the EOF so that BSD's implementation of Bourne
3145 shell doesn't parse the delimiter as part of the here document.
3146 * doc/.cvsignore: Add cross-options.texi.
3147 * src/getargs.c (usage): Add a blank line after the warning categories.
3149 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
3151 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
3153 2007-11-05 Akim Demaille <akim@epita.fr>
3155 Remove Id: from bison.1.
3156 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
3157 (perl -0777 -pi -e 's/\.PP\nId): New.
3158 (.x.1): Use it to ignore the version control revision.
3160 2007-11-05 Akim Demaille <demaille@gostai.com>
3162 * build-aux/Makefile.am: Ship cross-options.pl.
3163 * doc/Makefile.am: Always refer to cross-options.texi with
3165 (MAINTAINERCLEANFILES): Add it.
3167 2007-11-04 Akim Demaille <demaille@gostai.com>
3169 Generate the long/short option cross-table.
3170 * build-aux/cross-options.pl: New.
3171 * doc/Makefile.am (cross-options.texi): New.
3172 * doc/bison.texinfo: Use it.
3174 2007-11-04 Akim Demaille <demaille@gostai.com>
3176 Generate bison.1 using help2man.
3177 * doc/common.x, doc/bison.x: New.
3178 * doc/Makefile.am (bison.1, .x.1): New.
3179 The code is taken from autoconf-2.61/man/Makefile.am.
3180 * configure.ac: Look for help2man.
3182 2007-11-04 Akim Demaille <demaille@gostai.com>
3185 * src/getargs.c (usage): Document -W, make it clear that -d,
3186 -g and -x have optional arguments.
3188 2007-11-04 Akim Demaille <demaille@gostai.com>
3190 Find sha1sum when named gsha1sum.
3191 * bootstrap (find_tool): New.
3194 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3196 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
3198 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
3199 * NEWS (2.3a+): Mention.
3200 * data/bison.m4 (b4_pure_if): Don't define it here.
3201 * data/c.m4 (b4_identification): Depend on individual skeletons to
3202 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
3203 values of the %define variables api.pure or api.push_pull. Define
3204 YYPURE, YYPUSH, and YYPULL accordingly.
3205 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
3206 glr.cc has already defined b4_pure_flag.
3207 * data/push.c: Define b4_pure_if based on `%define api.pure'.
3208 Remove YYPUSH and YYPULL since they're back in b4_identification again.
3209 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
3210 * doc/bison.texinfo (Pure Decl): Update.
3211 (Push Decl): Update.
3212 (Decl Summary): Add api.pure to %define entry.
3213 In %pure-parser entry, say it's deprecated and reference %define.
3214 (Pure Calling): Update.
3215 (Error Reporting): Update.
3216 (C++ Scanner Interface): Update.
3217 (How Can I Reset the Parser): Update.
3218 (Table of Symbols): In %pure-parser entry, say it's deprecated and
3220 * src/getargs.c (pure_parser): Remove global variable.
3221 * src/getargs.h (pure_parser): Remove extern.
3222 * src/output.c (prepare): Don't define pure_flag muscle.
3223 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
3224 wrapper around `%define api.pure'.
3225 * tests/calc.at (Simple LALR Calculator): Update.
3226 (Simple GLR Calculator): Update.
3227 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
3229 (GLR: Resolve ambiguity, pure, locations): Update.
3230 (GLR: Merge conflicting parses, pure, no locations): Update.
3231 (GLR: Merge conflicting parses, pure, locations): Update.
3232 * tests/glr-regression.at (Uninitialized location when reporting
3234 * tests/input.at (Unused %define api.pure): New test case.
3235 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
3236 AT_PURE_IF and AT_PURE_AND_LOC_IF.
3237 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
3239 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3241 %define push_pull -> %define api.push_pull. Discussed starting at
3242 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
3243 * data/push.c: Expect the new name.
3244 * data/yacc.c: Likewise.
3245 * doc/bison.texinfo (Push Decl): Update.
3246 (Decl Summary): Update %define entry.
3247 (Push Parser Function): Update.
3248 (Pull Parser Function): Update.
3249 (Parser Create Function): Update.
3250 (Parser Delete Function): Update.
3251 * tests/calc.at (Simple LALR Calculator): Update.
3252 * tests/input.at (%define enum variables): Update.
3253 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
3254 (Push Parsing: Multiple impure instances): Update.
3255 (Push Parsing: Unsupported Skeletons): Update.
3256 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
3257 (Exploding the Stack Size with Malloc): Update.
3259 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
3262 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
3264 For the XML output's terminal element, rename @number to @token-number,
3265 and add @symbol-number. In the nonterminal element, rename @number to
3266 @symbol-number. Discussed starting at
3267 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
3268 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
3270 (xsl:template match="nonterminal"): Likewise.
3271 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
3272 (xsl:template match="nonterminal"): Likewise.
3273 * src/print-xml.c (print_grammar): Implement.
3275 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
3277 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
3278 2007-10-11 change, the child elements here are items not rules.
3279 (xsl:template match="item"): New.
3280 (xsl:template match="rule"): Update for new reduced itemset.
3281 (xsl:template match="point"): Remove.
3282 (xsl:template match="empty"): For consistency with --graph, don't
3283 output "/* empty */".
3284 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
3285 line-wrap, don't pass a negative value as first-line-length since this
3286 won't work with the following changes.
3287 (xsl:template name="line-wrap"): Simplify slightly.
3288 (xsl:template name="ws-search"): Eliminate recursion.
3289 * src/print_graph.c (print_core): Don't print a reduction's lookahead
3290 set next to an item whose dot is not at the end of the RHS even if it
3291 happens to be associated with the same rule.
3293 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
3295 Add %define lr.keep_unreachable_states.
3296 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
3297 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
3298 * src/main.c (main): Implement it.
3299 * tests/conflicts.at (Unreachable States After Conflict Resolution):
3300 Extend to test it, and fix a typo.
3302 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
3304 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
3305 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
3306 the example .output text.
3307 * tests/regression.at (Extra lookahead sets in report): Improve wording
3310 2007-10-17 Wojciech Polak <polak@gnu.org>
3312 * src/print-xml.c (print_grammar): Renamed
3313 <terminal> and <nonterminal> attributes:
3314 "type" to "number" and "symbol" to "name".
3315 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
3316 Use new attribute names.
3317 (xsl:template match="nonterminal"): Likewise.
3318 * data/xslt/xml2xhtml.xsl: Likewise.
3320 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
3322 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
3323 (Option Cross Key): Likewise.
3325 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
3326 next to an item whose dot is not at the end of the RHS even if it
3327 happens to be associated with the same rule.
3328 * src/print.c (print_core): Likewise.
3329 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
3330 (Resolved SR Conflicts): Update output.
3331 * tests/regression.at (Extra lookahead sets in report): New test case.
3333 2007-10-11 Wojciech Polak <polak@gnu.org>
3335 * src/print-xml.c (print_core): Remove item set
3337 * data/xslt/bison.xsl (bison:ruleNumber): New key.
3338 Improve processing time. Suggested by Joel E. Denny.
3339 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
3340 Write xsl:param "required" attribute as comment.
3341 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
3342 (xsl:template match="rule"): Support new reduced itemset.
3343 (xsl:template match="point"): Remove.
3344 * data/xslt/xml2xhtml.xsl: Likewise.
3346 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
3348 * src/getargs.c (version): Update copyright year.
3350 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
3352 Make xml2dot.xsl and --graph produce the same output.
3353 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a ` '
3354 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
3356 (xsl:template name="output-node"): Use the new escape template instead
3357 of the string-replace template directly.
3358 (xsl:template name="output-edge"): Likewise.
3359 (xsl:template name="escape"): New, escapes backslashes and newlines in
3360 addition to quotation marks.
3361 * src/graphviz.c (start_graph, output_node, output_edge): Add
3362 whitespace to output for legibility.
3364 Make xml2text.xsl and --report produce the same output, and remove the
3365 XML "conflicts" element since a conflict summary is easily extracted
3367 * data/xslt/bison.xsl: New.
3368 (xsl:template match="state" mode="bison:count-conflicts): New.
3369 * data/xslt/xml2text.xsl: Import bison.xsl.
3370 (xsl:template match="bison-xml-report"): Instead of styling the
3371 "conflicts" element, style the "automaton" element with mode
3372 "conflicts". Unlike the former, the latter lists S/R and R/R
3373 conflicts for a state on the same line.
3374 (xsl:template match="conflicts"): Remove.
3375 (xsl:template match="conflict"): Remove.
3376 (xsl:template match="terminal"): Line-wrap the list of rules in which
3377 the terminal is used.
3378 (xsl:template match="nonterminal"): Likewise for nonterminals.
3379 (xsl:template match="automaton" mode="conflicts"): New.
3380 (xsl:template match="state" mode="conflicts"): New.
3381 (xsl:template name="line-wrap"): New.
3382 (xsl:template name="ws-search"): New.
3383 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
3384 (xsl:template match="bison-xml-report"): Instead of styling the
3385 "conflicts" element, style the "automaton" element with mode
3387 (xsl:template match="conflicts"): Remove.
3388 (xsl:template match="conflict"): Remove.
3389 (xsl:template match="automaton" mode="conflicts"): New.
3390 (xsl:template match="state" mode="conflicts): New.
3391 * src/conflicts.c (conflicts_output_xml): Remove.
3392 * src/conflicts.h (conflicts_output_xml): Remove prototype.
3393 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
3394 * src/print.c (print_grammar): Consistently wrap at the 66th column so
3395 the corresponding XSLT is easier. Also, never wrap between a word and
3396 the comma that follows it.
3398 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
3400 Improve C++ namespace support. Discussed starting at
3401 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
3402 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
3403 b4_namespace_close): New macros that interpret the %define variable
3404 "namespace" so its value can contain "::" to indicate nested
3406 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
3408 * data/lalr1.cc (b4_namespace): Likewise.
3409 * data/location.cc (b4_namespace): Likewise.
3410 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
3411 inside a new table in the general %define entry. Document `%define
3412 namespace' there as well. Point the %name-prefix entry to it since it
3413 explains it more completely in the case of C++.
3414 (C++ Bison Interface): Mention `%define namespace' instead of
3416 (Table of Symbols): Remove the `%define push_pull' entry. The %define
3418 * tests/c++.at (Relative namespace references): New test case.
3419 (Absolute namespace references): New test case.
3420 (Syntactically invalid namespace references): New test case.
3421 * tests/input.at (C++ namespace reference errors): New test case.
3423 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
3425 Add syncline support and location accessor to internal %define
3427 * data/bison.m4 (b4_percent_define_get_loc): New.
3428 (b4_percent_define_get_syncline): New.
3429 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
3430 (b4_percent_define_default): Record defining location as line 1 rather
3431 than 0 for the sake of synchronizing #line's, and define
3432 b4_percent_define_syncline(VARIABLE).
3433 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
3434 * src/muscle_tab.c (muscle_syncline_grow): New.
3435 (muscle_code_grow): Use muscle_syncline_grow.
3436 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
3437 define b4_percent_define_syncline(VARIABLE).
3438 (muscle_percent_define_get_loc): New.
3439 (muscle_percent_define_get_syncline): New.
3440 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
3441 remove some unused variables.
3442 (muscle_percent_define_default): Record defining location as line 1
3443 rather than 0 for the sake of synchronizing #line's, and define
3444 b4_percent_define_syncline(VARIABLE).
3445 (muscle_percent_define_check_values): Use
3446 muscle_percent_define_get_loc.
3447 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
3448 (muscle_percent_define_get_syncline): Prototype.
3449 * tests/skeletons.at (%define Boolean variables: invalid skeleton
3450 defaults): Update output for location change.
3451 (Complaining during macro argument expansion): Extend to test
3452 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
3454 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
3456 Fix some error-reporting macro bugs.
3457 * data/bison.m4 (b4_cat): New.
3458 (b4_error, b4_error_at): Use b4_cat to send error directives directly
3459 to stdout so they don't become arguments to other macros. Update
3460 comments and add examples.
3461 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
3463 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
3464 after printing the error directive so that M4 doesn't report subsequent
3465 problems that are induced by this problem.
3466 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
3467 instead of just in them. Recognize @\n in both places. Both expand to
3468 the empty string. Needed by b4_cat.
3469 * tests/skeletons.at (Complaining during macro argument expansion):
3471 (Fatal errors make M4 exit immediately): New test case.
3473 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
3475 Implement --print-datadir.
3476 * src/getargs.c (usage): Mention.
3477 (PRINT_DATADIR_OPTION): New anonymous enum member.
3478 (long_options): Add entry for it.
3479 (getargs): Add case for it calling compute_pkgdatadir.
3480 * src/output.c (output_skeleton): Encapsulate data directory
3481 computation from here...
3482 (prepare): ... and from here...
3483 (compute_pkgdatadir): ... into this new function.
3484 * src/output.h (compute_pkgdatadir): Prototype.
3486 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
3488 * src/print-xml.c (escape_bufs): New static global variable
3490 (xml_escape_n): ... the static local variable buf here.
3491 (print_xml): Free memory for escape_bufs.
3492 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
3494 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
3496 Replace `%push-parser' and `%push-pull-parser' with
3497 `%define push_pull "push"' and `%define push_pull "both"'.
3498 `%define push_pull "pull"' is the default.
3499 * doc/bison.texinfo (Push Decl, Push Parser Function,
3500 Pull Parser Function, Parser Create Function, Parser Delete Function):
3501 Update declarations.
3502 (Decl Summary, Table of Symbols): Replace %push-parser and
3503 %push-pull-parser entries with a %define push_pull entry.
3504 * data/bison.m4 (b4_percent_define_check_values): New macro.
3505 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
3507 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
3509 * data/push.c: ... to here and compute them from the value of the
3510 %define variable push_pull.
3511 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
3512 parsing requests here...
3513 * data/yacc.c: ... hack this to switch to push.c any time
3514 b4_use_push_pull_flag or the %define variable push_pull is set. This
3515 will go away when we mv push.c yacc.c.
3516 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
3517 push parsing is not supported since unused %define variables are
3519 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
3520 * src/muscle_tab.h (muscle_percent_define_check_values): Update
3521 comments for consistency with b4_percent_define_check_values.
3522 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
3524 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
3526 (prologue_declaration): Remove %push-parser and %push-pull-parser
3528 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
3529 * tests/calc.at: Update declarations.
3530 * tests/input.at (%define enum variables): New test case.
3531 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
3533 (Push Parsing: Multiple impure instances): Update declaration.
3534 (Push Parsing: Unsupported Skeletons): New test case.
3535 * tests/torture.at (Exploding the Stack Size with Alloca): Update
3537 (Exploding the Stack Size with Malloc): Update declaration.
3539 2007-09-24 Wojciech Polak <polak@gnu.org>
3541 Add XSLT transformations.
3543 * data/xslt/xml2dot.xsl: Transform XML into DOT.
3544 * data/xslt/xml2text.xsl: Transform XML into plain text.
3545 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
3546 * data/Makefile.am (xsltdir): New variable.
3547 (dist_xslt_DATA): Add xslt/*.xsl files.
3549 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
3551 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
3552 Problem reported by Wojciech Polak.
3553 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
3554 (xml_printf): Undo change I made on 21 September; that is,
3555 indent 2 spaces, not 1.
3557 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
3559 Pacify ./configure --enable-gcc-warnings.
3560 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
3561 `char const *' instead of `char *'.
3562 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
3563 local variable `sep'.
3565 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
3567 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
3569 * src/print-xml.c: Prefer "const" after types; that's more consistent.
3570 (xml_printf): Indent just 1 space for level.
3571 (e_char, xlate_char): Remove.
3572 (xml_escape_string): Rewrite to avoid undefined behavior (used
3573 storage that was freed from the stack).
3574 (xml_escape_n): Don't bother checking for subscript error.
3576 2007-09-21 Wojciech Polak <polak@gnu.org>
3578 Add Bison XML Automaton Report.
3580 Add support for an -x option to generate an XML report.
3581 It is not documented yet.
3582 * src/print-xml.c: New file.
3583 * src/print-xml.h: Likewise.
3584 * lib/timevar.def (TV_XML): New var.
3585 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
3586 * src/conflicts.c: Include print-xml.h.
3587 (solved_conflicts_xml_obstack): New var.
3588 (log_resolution, conflicts_solve, conflicts_free):
3589 Add support for XML report.
3590 (conflicts_output_val): New function.
3591 * src/conflicts.h (conflicts_output_val): New decl.
3592 * src/files.c (spec_xml_file): New var.
3593 (compute_output_file_names, output_file_names_free): Add XML support.
3594 * src/files.h (spec_xml_file): New decl.
3595 * src/getargs.c (xml_flag): New var.
3596 (usage, short_options, long_options, getargs): Add XML support.
3597 * src/getargs.h (xml_flag): New decl.
3598 * src/gram.c: Include print-xml.h.
3599 (rule_lhs_print_xml, rule_rhs_print_xml):
3600 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
3602 * src/gram.h: Declare external ones.
3603 * src/main.c: Include print-xml.h.
3604 (main): Add XML support.
3605 * src/reduce.c: Include print-xml.h.
3606 (reduce_xml): New function.
3607 * src/reduce.h: Declare it.
3608 * src/state.c: Include print-xml.h.
3609 (state_new): Add XML support.
3610 (state_rule_lookahead_tokens_print_xml): New function.
3611 * src/state.h: Declare it.
3612 (struct state): New member solved_conflicts_xml.
3613 * src/symtab.c (symbol_class_get_string): New function.
3614 * src/symtab.h: Declare it.
3616 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
3618 * GNUmakefile: Switch to coreutils's version.
3619 * bootstrap: Likewise.
3620 * Makefile.cfg: Adjust to new GNUmakefile.
3621 * README-hacking: Likewise.
3625 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
3626 Bruno Haible <bruno@clisp.org>
3628 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
3629 and is a script that invokes bison. Tighten the code. Add comments.
3631 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
3633 Spell "boolean" as "Boolean". Reported by Akim Demaille.
3634 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
3635 * doc/bison.texinfo (Decl Summary): Fix.
3636 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
3637 * tests/input.at (Boolean %define variables): Update output.
3638 * tests/skeletons.at (%define boolean variables: invalid skeleton
3639 defaults): Rename to...
3640 (%define Boolean variables: invalid skeleton defaults): ... this and
3643 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
3645 In impure push mode, don't allow more than one yypstate to be allocated
3646 since multiple impure parsers would corrupt yynerrs.
3647 * data/push.c (yypstate_allocated): New static global variable
3649 (yypull_parse): If yypstate_new returns 0, don't report it as memory
3650 exhaustion if yypstate_allocated is 1, but still return 2.
3651 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
3652 already 1. Otherwise, set it to 1.
3653 (yypstate_delete): Set it to 0.
3654 * tests/push.at (Push Parsing: Multiple impure instances): New test
3657 2007-08-17 Bob Rossi <bob@brasko.net>
3659 * doc/bison.texinfo (Push Decl): Document the push parser.
3660 (Table of Symbols): Ditto.
3662 (Decl Summary): Ditto.
3663 (Multiple Parsers, Push Parser Function, Pull Parser Function,
3664 Parser Create Function, Parser Delete Function):
3665 Add new push parser symbols.
3666 (Table of Symbols): Document push-parser, push-pull-parser,
3667 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
3669 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
3672 * doc/gpl-3.0.texi: New file.
3673 * doc/gpl.texi: Remove.
3674 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
3675 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
3676 * README-hacking, TODO, bootstrap, bootstrap.conf:
3677 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
3678 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
3679 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
3680 * data/lalr1.cc, data/lalr1.java, data/location.cc:
3681 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
3682 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
3683 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
3684 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
3685 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
3686 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
3687 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
3688 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
3689 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
3690 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
3691 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
3692 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
3693 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
3694 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
3695 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
3696 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
3697 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
3698 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
3699 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
3700 * src/complain.c, src/complain.h, src/conflicts.c:
3701 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
3702 * src/files.h, src/flex-scanner.h, src/getargs.c:
3703 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
3704 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
3705 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
3706 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
3707 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
3708 * src/print.c, src/print.h, src/print_graph.c:
3709 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
3710 * src/reduce.h, src/relation.c, src/relation.h:
3711 * src/revision.h, src/scan-code.h, src/scan-code.l:
3712 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
3713 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
3714 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
3715 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
3716 * tests/Makefile.am, tests/actions.at, tests/c++.at:
3717 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
3718 * tests/existing.at, tests/glr-regression.at:
3719 * tests/headers.at, tests/input.at, tests/java.at:
3720 * tests/local.at, tests/output.at, tests/push.at:
3721 * tests/reduce.at, tests/regression.at, tests/sets.at:
3722 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
3726 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
3728 Get rid of broken %no-parser, -n, and --no-parser implementation and
3730 * TODO: Don't mention them.
3731 * doc/bison.1: Likewise.
3732 * doc/bison.texinfo (Decl Summary): Likewise.
3733 (Bison Options): Likewise.
3734 (Option Cross Key): Likewise.
3735 * src/getargs.c (no_parser_flag): Remove global variable.
3736 (usage): Don't print description of -n and --no-parser.
3737 (long_options): Remove --no-parser entry here.
3738 (getargs): Remove -n case in the switch here.
3739 * src/getargs.h (no_parser_flag): Remove extern.
3740 * tests/regression.at (Web2c Actions): Remove comment that mentions
3743 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
3745 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
3746 name user variables starting with `yy'. Just pass NULL instead of a
3747 dummy local &yylval to yypush_parse.
3748 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
3751 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
3753 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
3754 true since it's then always used regardless of whether yyoverflow is
3755 defined. Reported by Christian Burger at
3756 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
3757 * THANKS: Add Christian Burger.
3759 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
3760 node names: say "Decl Summary" not "Bison Declaration Summary".
3762 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
3764 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
3765 determine whether this function has already complained about an invalid
3766 value for a %define boolean variable, don't check whether Bison has
3767 ever examined the value. As written, the check was a tautology.
3768 Instead, record and check for this complaint using a separate muscle.
3770 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3772 Fix push parsing memory leak reported by Brandon Lucia at
3773 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
3774 * THANKS: Add Brandon Lucia.
3775 * data/push.c (yypstate_delete): Free the stack if it was reallocated
3776 but the parse never completed and thus freed it.
3777 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
3778 * tests/testsuite.at: Include push.at.
3779 * test/push.at: New.
3780 (Push Parsing: Memory Leak for Early Deletion): New test case.
3782 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
3784 Improve handling of multiple S/R conflicts in the same state and of S/R
3785 conflicts involving multiple reductions.
3786 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
3787 set for a state here or Bison will abort if it is reassigned on a
3788 later conflicted reduction in the same state.
3789 Similarly, don't finalize and assign the solved conflicts report here
3790 or it will be lost if it is reassigned on a later conflicted reduction
3792 (set_conflicts): Instead, assign them both here after all S/R conflicts
3793 in the state have been fully examined.
3794 * src/print.c (shift_set): Rename to...
3795 (no_reduce_set): ... this.
3796 (print_reductions): Update for rename, and add %nonassoc error action
3797 tokens to no_reduce_set so that, when printing the first remaining
3798 reduction on an error action token, the reduction is enclosed in
3800 (print_results): Update for rename.
3801 * tests/conflicts.at (Solved conflicts report for multiple reductions
3802 in a state): New test case.
3803 (%nonassoc error actions for multiple reductions in a state): New test
3806 * src/main.c (main): Don't depend on C99 features.
3808 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
3810 * build-aux/.cvsignore: Add compile.
3811 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
3814 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
3816 * bootstrap (slurp): Create target directories that don't exist.
3817 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
3819 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
3821 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
3823 * closure.c (closure): Likewise.
3824 * state.h (reductions): Comment sorting of rules.
3825 (state): Comment sorting of items.
3827 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
3829 Fix C++ test cases after recent Gnulib changes. Discussed starting at
3830 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
3831 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
3832 definition in order to avoid Gnulib headers since we don't use config.h
3834 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
3835 rather than AT_DATA so that config.h is included.
3837 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
3839 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
3840 instead of fprintf. Guard these functions with #if YYDEBUG instead of
3841 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
3842 and so that YYFPRINTF is guaranteed to be defined here.
3844 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
3846 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
3848 (muscle_percent_define_check_values): ... this more helpful function.
3849 Again, it's not used yet, but it will be.
3850 * src/muscle_tab.h: Likewise.
3852 Improve some comments in parser table construction.
3853 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
3854 (generate_states): Don't mention ruleset, which is internal to closure.
3855 * src/closure.c (closure): Explain sorting of core and itemset, which
3856 is required for this function to behave correctly.
3857 * src/closure.h (closure): Mention sorting.
3859 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
3861 * src/lalr.c (state_lookahead_tokens_count): For code readability,
3862 move the check for disabled transitions to an aver since conflict
3863 resolution hasn't happened yet.
3865 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
3866 labels a state as inconsistent just because it has error transitions.
3867 The original form of this check appeared in revision 1.1 of lalr.c,
3868 which was committed on 1991-12-21. Now (at least), changing the
3869 consistency label on such a state appears to have no useful effect in
3870 any of the places it is examined, which I enumerate below. The key
3871 point to understanding each item in this enumeration is that a state
3872 with an error transition is labelled consistent in the first place only
3873 if it has no rules, so the check cannot matter for states that have
3874 rules. (1) Labelling a state as inconsistent will cause set_conflicts
3875 to try to identify its conflicts, and a state must have *rules* to have
3876 conflicts. (2) Labelling a state as inconsistent will affect how
3877 action_row sets the default *rule* for the state. (3) Labelling a
3878 state as inconsistent will cause build_relations to add lookback edges
3879 to *rules* in that state.
3880 * src/state.h (struct state): Word the comment for member consistent
3883 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3885 Don't depend on C99 features.
3886 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
3887 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
3888 * src/reader.c (check_and_convert_grammar): Fix for-loop.
3889 * src/state.c (state_mark_reachable_states): Fix for-loop.
3890 (state_remove_unreachable_states): Fix for-loop.
3892 Don't widen struct state with member reachable just to temporarily
3893 record reachability. Instead, use a local bitset.
3894 * src/state.h (struct state): Remove member.
3895 * src/state.c (state_new): Don't initialize it.
3896 (state_mark_reachable_states): Rename to...
3897 (state_record_reachable_states): ... this, and use bitset.
3898 (state_remove_unreachable_states): Use bitset.
3900 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
3902 * src/Makefile.am (yacc): Quote target action commands properly so
3903 that the yacc script isn't corrupt. Reported by Hans Aberg at
3904 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
3906 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
3907 the case of pure parsers. Reported by Frans Englich at
3908 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
3909 * THANKS: Add Frans Englich.
3911 * NEWS (2.3a+): In the %code entry, reference section `Bison
3912 Declaration Summary' from the manual now since the %code summary has
3914 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
3915 in the rules section must be terminated by semicolons.
3917 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
3919 Extend the front-end API for %define variables to more completely
3920 mirror the back-end. This will be useful in the future.
3921 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
3922 Update comments to mention the new front-end counterparts of these
3924 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
3925 for muscle_string_decode and muscle_location_decode.
3926 (muscle_string_decode): New static function.
3927 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
3928 (muscle_percent_define_get, muscle_percent_define_ifdef): New
3930 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
3931 muscle_percent_define_get to mimic the b4_percent_define_flag_if
3932 implementation more closely.
3933 (muscle_percent_define_invalid_value): New function.
3934 * src/muscle_tab.h (muscle_percent_define_get,
3935 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
3938 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
3940 * NEWS (2.3a+): Mention yesterday's state-removal change.
3941 (2.3a): Remove the %language entry, which was added after 2.3a.
3942 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
3943 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
3944 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
3945 tests/existing.at: Update copyright date.
3947 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3949 If conflict resolution makes states unreachable, remove those states,
3950 report rules that are then unused, and don't report conflicts in those
3952 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
3953 New global function.
3954 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
3956 * src/main.c (main): After conflict resolution, remove the unreachable
3957 states and update all data structures that reference states by number.
3958 * src/state.c (state_new): Initialize each state's reachable member to
3960 (state_mark_reachable_states): New static function.
3961 (state_remove_unreachable_states): New global function.
3962 * src/state.h (struct state): Add member bool reachable.
3963 (state_remove_unreachable_states): Prototype.
3964 * tests/conflicts.at (Unreachable States After Conflict Resolution):
3966 * tests/existing.at (GNU pic Grammar): Update test case output now that
3967 an unused rule is discovered.
3969 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3971 Minor code cleanup in parser table construction.
3972 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
3973 (new_itemsets, save_reductions): Update for rename to nitemset.
3974 * src/closure.c (nritemset): Rename to...
3975 (nitemset): ... this since the "r" appears to meaningless and isn't
3976 used in the comments.
3977 (closure): Update for rename.
3978 * src/closure.h (nritemset): Update extern to...
3979 (nitemset): ... this.
3980 * src/lalr.c (LA): Fix a typo in comments.
3981 * src/print.c (print_core): Update for rename to nitemset.
3982 * src/print_graph.c (print_graph): Likewise.
3983 * src/state.h: Fix some typos in header comments.
3985 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
3987 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
3988 still sticks to ASCII. Sorry!
3990 * README-hacking: New file, taken mostly from coreutils, with changes
3991 for Bison. Contains much of the contents of:
3992 * README-cvs: Remove.
3993 * bootstrap: Sync from gnulib.
3994 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
3995 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
3997 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
3999 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
4001 (Java Differences): Fix some typos.
4002 * THANKS: Add Sebastian Setzer.
4004 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
4006 * data/java.m4 (b4_single_class_if): Remove.
4007 (b4_abstract_if): Look at "%define abstract".
4009 (b4_union_name): Rename...
4010 (b4_yystype): ... to this. Map to "%define stype".
4011 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
4012 b4_maybe_throws): Fix quoting.
4013 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
4014 * data/lalr1.java (Lexer interface): Always define.
4015 (Lexer interface within parser class): Remove.
4016 (YYLexer class): New, used when "%code lexer" is present.
4017 (constructor): When "%code lexer" is used, pass %lex-param
4018 to the lexer constructor.
4019 (yylex, yyparse): Remove %lex-param from method invocations
4020 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
4022 * doc/bison.texinfo (Java Bison Interface): Mention "%define
4023 abstract". Rename "%define union_name" to "%define stype".
4024 Rename method names according to previous patch.
4025 (Java Scanner Interface): Describe "%code lexer" instead of
4026 "%pure-parser" and "%define single_class".
4027 (Java Differences): Mention "%code lexer".
4029 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
4030 Include scanner here, using macros from tests/local.at.
4031 (AT_DATA_CALC_Y): Remove final argument.
4032 (_AT_CHECK_JAVA_CALC): Likewise.
4033 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
4034 of %locations and %error-verbose.
4035 (main): Test with and without %lex-param.
4036 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
4037 (AT_BISON_OPTION_POPDEFS): Pop it.
4039 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4041 DJGPP spefic issue. Inhibit the use of disallowed characters for
4042 file name genertion on Win98, WinXP, etc. These are |<>":?*\
4043 and concern testsuite case 46.
4044 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
4045 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
4046 * djgpp/config.bat: Inhibit the use of disallowed characters.
4048 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4050 Miscellaneous %define and %code cleanup.
4051 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
4052 values are interpreted.
4053 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
4054 documentation a little more.
4055 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
4056 muscle_percent_define_insert, muscle_percent_code_grow): New
4058 * src/muscle_tab.h (muscle_percent_define_insert,
4059 muscle_percent_code_grow): Prototype.
4060 * src/parse-gram.y (prologue_declaration): Use
4061 muscle_percent_define_insert and muscle_percent_code_grow when parsing
4062 %define and %code directives.
4064 Make it easy to share %define boolean variables between the front-end
4065 and back-end. Though not used yet, this will be useful in the future.
4066 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
4067 Bison uses of names rather than just skeleton uses of names.
4068 (b4_percent_define_get, b4_percent_define_ifdef): Rename
4069 b4_percent_define_skeleton_variables(VARIABLE) to
4070 b4_percent_define_bison_variables(VARIABLE).
4071 (b4_percent_code_get, b4_percent_code_ifdef): Rename
4072 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
4073 b4_percent_code_bison_qualifiers(QUALIFIER).
4074 (b4_check_user_names_wrap): Update for renames.
4075 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
4076 muscle_percent_define_default): New functions mimicking
4077 b4_percent_define_flag_if and b4_percent_define_default.
4079 For %define variables, report locations for invalid values and
4081 * data/bison.m4 (b4_percent_define_flag_if): Read
4082 b4_percent_define_loc(VARIABLE) to report the location of an invalid
4084 (b4_percent_define_default): Save a special location in
4085 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
4086 must later be reported as invalid.
4087 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
4089 (muscle_percent_define_insert): Record the location of VARIABLE in
4090 muscle percent_define_loc(VARIABLE), and use it to report the previous
4091 location for a redefinition.
4092 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
4093 (muscle_percent_define_default): Update like b4_percent_define_default.
4094 (muscle_grow_user_name_list): Rename to...
4095 (muscle_user_name_list_grow): ... this for consistency and use
4096 muscle_location_grow.
4097 * src/muscle_tab.h (muscle_location_grow): Prototype.
4098 * tests/input.at (%define errors): Update expected output.
4099 * tests/skeletons.at (%define boolean variables: invalid skeleton
4100 defaults): New test case.
4102 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
4104 * src/print.c (lookahead_set, state_default_rule): Remove.
4105 (print_reductions): Replace state_default_rule invocation with
4106 equivalent use of yydefact, which was computed in token_actions in
4108 (print_results): Don't allocate lookahead_set.
4110 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
4112 * data/lalr1.java: Prefix all private members with yy.
4114 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
4116 Use YYFPRINTF instead of fprintf where appropriate. Reported by
4117 Sebastien Fricker at
4118 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
4119 * THANKS: Add Sebastien Fricker.
4120 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
4121 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
4122 accept a variable number of arguments.
4124 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
4126 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
4128 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4130 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
4131 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
4132 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
4134 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
4136 Undo my 2007-02-07 change, switching back to the c-strcase module
4137 introduced in the 2007-02-03 change. Bruno Haible reported that
4138 the 2007-02-07 change would be dangerous in Turkish if we add a
4139 language whose name contains "i", since "i" is not lowercase "I"
4141 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
4142 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
4143 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
4144 * m4/.cvsignore: Remove strcase.m4.
4145 * src/getargs.c: Revert 2007-02-07 change, as follows.
4146 Include c-strcase.h.
4147 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
4149 2007-02-11 Bruno Haible <bruno@clisp.org>
4151 Enable the Java related testsuite tests when the only Java compiler
4152 found is a gcj < 4.3. Discussed at
4153 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
4154 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
4156 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
4158 * data/Makefile.am: Update copyright date.
4159 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
4160 yypstate_new returns NULL.
4161 (yypstate_new): Return NULL if malloc does.
4162 * src/reader.c (packgram): Move translation of rule actions from the
4163 beginning of packgram to...
4164 (check_and_convert_grammar): ... here right before packgram is invoked
4165 so it's easier to write more complete comments, and remove redundant
4168 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
4170 As in semantic actions, make @$ in %initial-action, %destructor, and
4171 %printer imply %locations.
4172 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
4174 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
4175 (@$ in %initial-action implies %locations,
4176 @$ in %destructor implies %locations,
4177 @$ in %printer implies %locations): ... these new test cases.
4179 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
4181 Undo most of the 2007-02-03 change, switching to the strcase module
4182 now that gnulib strcase has been fixed.
4183 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
4184 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
4185 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
4186 * m4/.cvsignore: Add strcase.m4.
4187 * src/getargs.c: Revert 2007-02-03 change, as follows.
4188 Don't include c-strcase.h.
4189 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
4190 strcasecmp has "unspecified behavior" outside the POSIX locale,
4191 but it works fine in practice if at least one argument is ASCII,
4192 as is the case in Bison.
4194 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
4196 * tests/java.at: Skip tests if only one of javac/java is present.
4197 Reported by Joel E. Denny.
4198 * tests/atlocal.in: Adjust copyright years.
4200 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
4202 * data/lalr1.java (Stack): Work around old verifiers that disallow
4203 access to the private fields of an inner class, from the outer class.
4204 We can make Stack's fields public because user code doesn't have access
4205 to the instance of Stack used by parse(). Reported by Paul Eggert.
4207 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
4209 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
4210 the right spot for these files?
4211 * bootstrap.conf (gnulib_modules): Add c-strcase.
4212 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
4214 * src/getargs.c: Include c-strcase.h.
4215 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
4216 to avoid unspecified behavior.
4218 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
4220 * doc/bison.texinfo (Decl Summary): Correct typo.
4222 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
4224 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
4225 Complain if the value does not match empty, "true" or "false".
4226 * data/c++.m4: Adjust default definitions of %define variables.
4227 * data/java.m4: Adjust default definitions of %define variables.
4228 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
4230 * tests/input.at (Boolean %define variables): Test new behavior.
4232 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
4234 * NEWS: Mention java.
4235 * TODO: Remove things that are done.
4236 * bootstrap.conf: Add javacomp-script and javaexec-script.
4237 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
4239 * data/Makefile.am: Add new files.
4240 * data/java-skel.m4: New.
4241 * data/java.m4: New.
4242 * data/lalr1.java: New.
4244 * doc/bison.texinfo: Put "A Complete C++ Example" under
4245 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
4246 under Other Languages.
4248 * src/getargs.c (valid_languages): Add Java.
4249 * src/getargs.h (struct bison_language): Update size of string fields.
4251 * tests/Makefile.am: Add java.at.
4252 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
4253 * tests/java.at: New.
4254 * tests/testsuite.at: Include it.
4256 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
4259 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
4260 at_directive_argv arguments so these no longer have to be global
4261 variables. Also, update the implementation for the following changes.
4262 (fail_for_at_directive_too_many_args,
4263 fail_for_at_directive_too_few_args): Add at_directive_name argument.
4264 (at_directive_name): Remove as at_directive_argv[0] will be used for
4266 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
4267 for the directive name.
4268 (at_directive_argc, at_directive_argv): Make these local within
4269 skel_lex instead of global.
4270 (INITIAL): Update directive start action for above changes.
4271 (SC_AT_DIRECTIVE_ARG): Rename to...
4272 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
4273 (SC_AT_DIRECTIVE_SKIP_WS): Update.
4274 (scan_skel): Move yylex_destroy to...
4275 (skel_scanner_free): ... here.
4276 * tests/skeletons.at (installed skeleton file name): Rename to...
4277 (installed skeleton file names): ... this.
4279 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
4281 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
4282 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
4283 Summary" not "Directives".
4284 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
4285 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
4286 since the former is now the more complete one.
4287 (Prologue Alternatives): Likewise and do the same for %defines.
4288 (Table of Symbols): Add summary of %code, add summary of %define, and
4289 move full %code documentation to...
4290 (Decl Summary): ... here for consistency with other entries in these
4292 Move %define entry in order to keep this list alphabetized.
4293 Reword %define entry a little to put less emphasis on the skeleton
4294 concept, which most users shouldn't have to think about.
4296 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
4298 Adjust to recent gnulib changes.
4299 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
4300 Add string.h, string_.h, unistd_.h, wchar_.h.
4301 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
4302 * src/system.h: Don't include <stpcpy.h>; this is now done by
4305 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
4307 Simplify implementation of unqualified %code, implement macros for
4308 uniform treatment of boolean %define flags. Document %define.
4309 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
4310 b4_percent_code_ifdef): New.
4311 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
4312 * data/c++.m4: Define default value for global_tokens_and_yystype.
4313 * data/glr.cc: Likewise.
4314 * data/location.cc: Use b4_percent_define_flag_if.
4316 * doc/bison.texinfo (Decl Summary): Document %define.
4318 * src/parse-gram.y (Unqualified %code): Change muscle name to
4320 (content.opt): Default to empty.
4322 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
4324 Implement support for relative and absolute skeleton file names.
4325 Discussed starting at
4326 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
4327 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
4328 (Bison Options): Document in --skeleton entry.
4329 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
4330 full_skeleton can't necessarily hold all of pkgdatadir.
4331 If the specified skeleton file name contains a `/', don't prepend
4333 * src/parse-gram.y (prologue_declaration): If the specified skeleton
4334 file name contains a `/', prepend the grammar file directory.
4335 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
4336 * skeletons.at: New file.
4337 (relative skeleton file names): New test case.
4338 (installed skeleton file names): New test case.
4339 * tests/testsuite.at: Include skeletons.at.
4341 * bootstrap: Update copyright to 2007.
4343 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
4345 * bootstrap: Remove occurrences of .#bootmp from the files.
4347 2007-01-17 Akim Demaille <akim@epita.fr>
4349 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
4351 Use per-type %printer.
4353 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
4355 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
4356 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4357 djgpp/config.site, src/files.c, src/files.h, src/main.c,
4358 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
4359 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
4360 tests/glr-regression.at, tests/input.at, tests/local.at,
4361 tests/output.at, tests/torture.at: Update copyright to 2007.
4363 2007-01-16 Akim Demaille <akim@epita.fr>
4365 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
4367 (Calc++ Scanner): Exit with failure if we can't open the input
4369 Accept "-" standing for stdin.
4370 (Calc++ Top Level): Print the result only if the parsing was
4373 2007-01-16 Akim Demaille <akim@epita.fr>
4375 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
4377 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
4378 and Joel E. Denny <jdenny@ces.clemson.edu>
4380 Clean up %define and %code implementation in M4 some. Most
4381 importantly, rename all related macros to be in the b4_percent_define
4382 and b4_percent_code namespaces. Also, complete support for `.' in
4383 %define variable names and %code qualifiers.
4384 * data/bison.m4 (b4_check_user_names): Check for special
4385 "SKELETON-NAMESPACE(name)" macros instead of using two nested
4387 (b4_get_percent_define, b4_get_percent_code): Rename to...
4388 (b4_percent_define_get, b4_percent_code_get): ... these.
4389 Extend documentation with examples.
4390 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
4391 b4_percent_define_skeleton_variables and
4392 b4_percent_code_skeleton_qualifiers.
4393 Expect any value for the %define variable `foo' to be stored in the
4394 macro named `b4_percent_define(foo)'; expect any %code blocks for the
4395 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
4396 expect any unqualified %code blocks to be stored in a macro named
4397 `b4_percent_code_unqualified'.
4398 Use m4_indir so that %define variable names and %code qualifiers can
4399 contain `.', which is allowed by the grammar parser.
4400 (b4_percent_define_default): New macro to set a default value for a
4402 (m4_wrap): Update wrapped code, and fix some underquoting.
4403 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
4404 Expect grammar uses of %define variables and %code qualifiers to be
4405 defined in b4_percent_define_user_variables and
4406 b4_percent_code_user_qualifiers.
4407 * data/c++.m4: Use b4_percent_define_default rather than
4408 m4_define_default. Fix some underquoting. Skeleton usage of %define
4409 variable define_location_comparison now implies skeleton usage of
4410 %define variable filename_type.
4411 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4412 data/push.c, data/yacc.c: Update macro names.
4413 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
4416 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4418 DJGPP specific issues.
4420 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
4421 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
4423 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4425 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
4426 run parsers in all tests so that Valgrind is invoked during
4427 maintainer-check-valgrind.
4428 (Duplicate representation of merged trees): Free all semantic values.
4429 (Duplicated user destructor for lookahead): Likewise.
4431 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4433 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
4434 command-line prefix.
4435 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
4436 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
4437 miss Valgrind messages.
4438 (Exploding the Stack Size with Malloc): Likewise.
4440 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4442 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
4443 locals. Reported by Juan Manuel Guerrero at
4444 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
4445 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
4446 Fix some indentation also.
4447 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
4448 explaining this issue.
4450 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
4451 and Joel E. Denny <jdenny@ces.clemson.edu>
4453 Simplify union and prologue handling, and escape union and lex/parse
4454 params with digraphs.
4455 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
4456 values to the empty string since these are no longer guaranteed
4457 initialized by the front-end.
4458 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
4459 braces around b4_user_stype since this is no longer done by the
4461 * src/files.c, src/files.h (pre_prologue_obstack,
4462 post_prologue_obstack): Remove.
4463 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
4464 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
4465 with digraphs. This fixes lex params and parse params.
4466 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
4467 * src/output.c (prepare): Remove muscle insertion of the prologues.
4468 (output): Remove freeing of pre_prologue_obstack and
4469 post_prologue_obstack.
4470 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
4471 than prologue_augment for prologue parsing so you don't need prologue
4473 (grammar_declaration): For %union RHS, use `braceless' instead of
4474 "{...}" so that braces are already stripped and code is escaped with
4476 * src/reader.c (prologue_augment): Remove.
4477 (reader): Remove initialization of pre_prologue_obstack and
4478 post_prologue_obstack.
4479 * src/reader.h (prologue_augment): Remove.
4481 * data/c.m4: Remove stray parenthesis.
4483 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4485 Remove quotes from variables names in %define directives and from
4486 qualifiers in %code directives, and restrict the characters that are
4487 allowed in them to M4-friendly ones. For %define, continue to support
4488 the quoted form as a deprecated feature. Discussed starting at
4489 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
4490 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
4492 * doc/bison.texinfo (Prologue Alternatives): Update.
4493 (Decl Summary): In %defines entry, update mention of `%code requires'
4494 and `%code provides'.
4495 (C++ Location Values): Update %define uses.
4496 (Calc++ Parser Interface): Likewise.
4497 (Calc++ Parser): Likewise, and update `%code requires' uses.
4498 (Table of Symbols): Update %code documentation.
4499 * src/parse-gram.y (prologue_declaration): For %define variables, use
4500 `variable' instead of `STRING'.
4501 (grammar_declaration): For %code qualifiers, use `ID' instead of
4503 (variable): New nonterminal that takes an `ID' or a `STRING'.
4504 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
4506 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
4507 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
4508 (%define errors): Update %define uses.
4510 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4512 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
4513 instead of muscle_insert for %define values so that M4-special
4514 characters are replaced with digraphs.
4515 * tests/input.at (%define errors): Extend to check weird values.
4517 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4519 Instead of having skeletons declare all valid %define variables and
4520 %code qualifiers, provide macros that retrieve the associated values
4521 and build these lists automatically. Thus Bison will now warn when a
4522 variable or qualifier is not used by the skeleton in the current
4523 invocation regardless of whether it might sometimes be used by that
4524 skeleton in other invocations. Also, move all %define value macros to
4525 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
4526 form, which is replaced by %code.
4527 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
4528 (b4_check_user_names): ... this, and change the series of valid name
4529 arguments to a single list argument for names used in the skeleton
4530 similar to the existing list argument for names used in the grammar.
4531 Warn instead of complaining.
4532 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
4533 values and %code code, to format %code code properly, and to build
4534 lists of all %define variables and %code qualifiers used in the
4535 skeleton: b4_skeleton_percent_define_variables and
4536 b4_skeleton_percent_code_qualifiers.
4537 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
4539 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
4540 the skeleton names lists can finish building first. In place of
4541 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
4542 expect the lists b4_user_percent_define_variables and
4543 b4_user_percent_code_qualifiers.
4544 * data/c++.m4: Where setting default values for b4_parser_class_name,
4545 b4_location_type, b4_filename_type, b4_namespace, and
4546 b4_define_location_comparison, update their names to the
4547 b4_percent_define_ namespace.
4548 * data/glr.c: Don't use b4_check_percent_define_variables and
4549 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
4550 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
4551 (b4_parser_class_name, b4_namespace): Define these using
4552 b4_get_percent_define for parser_class_name and namespace.
4553 * data/location.cc: Use b4_get_percent_define.
4554 * data/push.c: Don't use b4_check_percent_define_variables and
4555 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
4556 * data/yacc.c: Likewise, and don't call m4_exit in
4557 b4_use_push_for_pull_if or m4_wrap code will never execute.
4558 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
4560 (muscle_grow_user_name_list): ... this for consistency with the
4561 terminology used in bison.m4.
4562 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
4563 %define variable names, and rename muscle used_percent_define_variables
4564 to user_percent_define_variables.
4565 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
4566 user_percent_code_qualifiers.
4568 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
4569 {CODE} form is no longer accepted.
4570 * tests/input.at (Reject bad %code qualifiers): Rename to...
4571 (Reject unused %code qualifiers): ... this, and update test output.
4572 (%define error): Update test output.
4574 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
4576 Check for unrecognized %define variables similar to checking for
4577 unrecognized %code qualifiers. Check for redefined %define variables.
4578 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
4580 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
4581 (b4_check_percent_define_variables): New, also wraps it.
4582 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
4583 variables using b4_check_percent_define_variables.
4584 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
4585 all those exercised in the test suite and all those listed in the
4586 `Default values' section of c++.m4. Are there others?
4587 * data/push.c, data/yacc.c: Declare no valid %define variables.
4588 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
4589 similar to muscle_find, but it works even when the muscle stores a
4591 (muscle_grow_used_name_list): New function for constructing the used
4592 name list muscles that b4_check_for_unrecognized_names requires.
4593 * src/parse-gram.y (prologue_declaration): Warn if a variable is
4594 %define'd more than once. Define the b4_used_percent_define_variables
4595 muscle with muscle_grow_used_name_list.
4596 (grammar_declaration): Abbreviate %code code with
4597 muscle_grow_used_name_list.
4598 * tests/input.at (%define errors): New.
4600 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4602 Provide warn_at, complain_at, and fatal_at function callbacks to the
4603 skeletons, and use this for %code qualifier complaints.
4604 * data/bison.m4 (b4_error_at): New, invoked by...
4605 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
4606 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
4607 @fatal_at(...@) directives.
4608 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
4609 qualifiers in b4_used_percent_code_qualifiers and to use
4611 * src/location.c, src/location.h (boundary_set_from_string): New global
4613 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
4615 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
4616 to b4_used_percent_code_qualifiers.
4617 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
4619 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
4620 (lineno): Rename to...
4621 (out_lineno): ... this so I don't misunderstand it again.
4622 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
4623 here; these newlines are in the input but not the output file.
4624 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
4625 (at_directive_perform): ... this new static function, and add handling
4626 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
4628 * tests/input.at (Reject bad %code qualifiers): Update test output with
4629 locations and extend.
4631 * tests/output.at (Output file name: [, Output file name: ]): Remove
4632 bogus comment about these tests failing.
4634 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4636 Clean up b4_check_percent_code_qualifiers a little.
4637 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
4638 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
4639 documentation and add examples.
4640 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
4643 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
4645 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
4646 unreliable -- especially when they're hidden inside another macro.
4647 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
4648 data/c.m4: Remove m4_divert(-1).
4649 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4650 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
4651 m4_divert_push(0) and m4_divert_pop(0).
4652 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
4653 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
4654 pushed and popped by m4sugar, should be first on the stack.
4656 Provide warn, complain, and fatal function callbacks to the skeletons.
4657 This provides more flexibility than m4_fatal, improves the error
4658 message format, and captures messages for translation. Discussed
4660 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
4661 * data/bison.m4 (b4_error): New, invoked by...
4662 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
4663 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
4664 directives. Because these M4 macros might be called when the current
4665 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
4666 the previous removal of uses of m4_divert, which caused trouble.
4667 (b4_check_percent_code_qualifiers): Use b4_complain instead of
4668 m4_fatal to report unrecognized %code qualifiers.
4669 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
4670 push parser requests.
4671 * data/glr.c: Use b4_complain instead of m4_fatal to report
4672 non-deterministic push parser requests.
4673 Update @output usage to @output(...@) form.
4674 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
4675 report missing %defines. Update @output usage to @output(...@) form.
4676 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
4678 * src/main.c (main): Invoke skel_scanner_free.
4679 * src/scan-skel.h (skel_scanner_free): Prototype new function.
4680 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
4681 obstack_for_string from flex-scanner.h.
4682 (YY_DECL): Use to declare skel_lex static.
4683 (decode_at_digraphs): Remove; now handled in the new
4684 SC_AT_DIRECTIVE_ARG start condition.
4685 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
4687 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
4688 at_directive_argv): New static globals.
4689 (INITIAL): Use fail_for_invalid_at.
4690 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
4691 recognize the start of a generalized `@directive(...@)' form and
4693 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
4694 directive args (using the new obstack_for_string), to decode the
4695 contained @ diagraphs, and to perform the directive. It recognizes
4696 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
4698 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
4699 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
4701 (scan_skel): Initialize obstack_for_string on the first call.
4702 (skel_scanner_free): New function to free obstack_for_string.
4703 * tests/input.at (Reject bad %code qualifiers): Update test output.
4705 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
4707 Consolidate the 4 prologue alternative directives (%code, %requires,
4708 %provides, and %code-top) into a single %code directive with an
4709 optional qualifier field. Discussed at
4710 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
4711 * NEWS (2.3a+): Rewrite the existing entry for the prologue
4713 * doc/bison.texinfo (Prologue Alternatives): Update.
4714 (Decl Summary): Update to %code "requires" and %code "provides".
4715 (Calc++ Parser): Update to %code "requires".
4716 (Table of Symbols): Remove entries for %requires, %provides, and
4717 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
4718 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
4719 are replaced by b4_percent_code_provides and b4_percent_code_requires,
4720 which are skeleton-specific.
4721 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
4722 declare what %code qualifiers it supports and to complain if any other
4723 qualifiers were used in the grammar.
4724 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
4725 and b4_user_code([b4_percent_code_provides]) in place of
4726 b4_user_requires and b4_user_provides.
4727 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
4728 Add b4_user_code([b4_percent_code_top]) and
4729 b4_user_code([b4_percent_code]).
4730 Invoke b4_check_percent_code_qualifiers.
4731 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
4732 PERCENT_REQUIRES): Remove.
4733 (grammar_declaration): Remove RHS's for %code-top, %provides, and
4734 %requires. Rewrite the %code RHS as the unqualified form defining the
4735 muscle b4_percent_code. Add another RHS for the qualified %code form,
4736 which defines muscles of the form b4_percent_code_QUALIFIER and the
4737 b4_used_percent_code_qualifiers muscle.
4738 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
4739 PERCENT_REQUIRES): Remove.
4740 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
4741 %code "requires" and %code "provides".
4742 * tests/input.at (Reject bad %code qualifiers): New.
4744 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
4746 Use the new code_props interface for destructors and printers.
4747 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
4748 printer_location members, and change the type of the destructor and
4749 printer members to code_props.
4750 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
4751 symbol_printer_get, semantic_type_destructor_set,
4752 semantic_type_printer_set, default_tagged_destructor_set,
4753 default_tagless_destructor_set, default_tagged_printer_set,
4754 default_tagless_printer_set): Use code_props in arguments and return
4755 types in place of char const * and location.
4756 (symbol_destructor_location_get, symbol_printer_location_get): Remove
4757 since the locations are now contained in the return of
4758 symbol_destructor_get and symbol_printer_get.
4759 * src/output.c (symbol_destructors_output, symbol_printers_output):
4761 (symbol_code_props_output): ... this to eliminate duplicate code.
4762 (output_skeleton): Update to use symbol_code_props_output.
4763 * src/reader.c (symbol_should_be_used): Update use of
4764 symbol_destructor_get.
4765 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
4766 Update uses of the various _destructor_set and _printer_set functions.
4767 * src/symtab.c: (default_tagged_destructor_location,
4768 default_tagless_destructor_location, default_tagged_printer_location,
4769 default_tagless_printer_location): Remove since we...
4770 (default_tagged_destructor, default_tagless_destructor,
4771 default_tagged_printer, default_tagless_printer): ... change the type
4772 of these to code_props.
4773 (symbol_new, semantic_type_new, symbol_destructor_set,
4774 semantic_type_destructor_set, symbol_destructor_get,
4775 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
4776 symbol_check_alias_consistency, default_tagged_destructor_set,
4777 default_tagless_destructor_set, default_tagged_printer_set,
4778 default_tagless_printer_set): Update.
4779 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
4780 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
4782 (symbol_print): Use SYMBOL_CODE_PRINT.
4784 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
4786 Use the new code_props interface for rule actions.
4787 * src/symlist.h (symbol_list): Replace action, action_location, and
4788 used members with a code_props action_props member.
4789 * src/reader.c (symbol_should_be_used, grammar_rule_check,
4790 grammar_midrule_action, grammar_current_rule_merge_set,
4791 grammar_current_rule_symbol_append, packgram): Update.
4792 * src/scan-code.h (translate_rule_action): Remove, no longer used.
4793 * src/scan-code.l (handle_action_dollar): Update.
4794 (translate_rule_action): Remove, no longer used.
4795 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
4797 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
4799 Use the new code_props interface in parse-gram.y.
4800 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
4801 Update all uses of translate_* functions to use the new code_props
4802 interface and to use gram_scanner_last_string_free and
4803 code_scanner_last_string_free where possible.
4804 (grammar_declaration): symbol_list_destructor_set and
4805 symbol_list_printer_set now perform the translation, so don't do it
4806 here. Use gram_scanner_last_string_free where possible.
4807 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
4808 translate_code): Remove, no longer used.
4809 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
4810 symbol_list_printer_set): Perform code translation here rather than
4811 depending on the caller to do so.
4813 * src/symlist.h (struct symbol_list): Correct some documentation typos.
4814 * src/scan-gram.h (gram_last_string): Remove declaration.
4815 * src/scan-gram.l (last_string): Declare it static.
4817 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
4819 Encapsulate code properties and related functionality for the various
4820 destructors, printers, and actions into a code_props structure and
4821 interface. This patch merely implements code_props in scan-code.h and
4822 scan-code.l. Future patches will rewrite other modules to use it.
4823 Discussed starting at
4824 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
4825 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
4826 consistently initialize const structs that have an empty location
4828 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
4829 to ensure consistency.
4830 * src/scan-code.h (code_props): New structure.
4831 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
4832 function, macro, and const global variable for initializing a
4833 code_props with no code.
4834 (code_props_plain_init, code_props_symbol_action_init,
4835 code_props_rule_action_init, code_props_translate_code): The rest of
4836 the new code_props functional interface. Among other things, the init
4837 functions set the code_props kind field so that
4838 code_props_translate_code will know whether to behave like
4839 translate_symbol_action, translate_rule_action, or translate_code.
4840 These old translate functions must remain until all other modules are
4841 updated to use the new code_props interface.
4842 (code_scanner_last_string_free): New function similar to
4843 gram_scanner_last_string_free.
4844 (code_scanner_free): Add documentation.
4845 * src/scan-code.l: Implement the new interface.
4846 (code_lex): Make it static, add a code_props* argument, and remove the
4848 (last_string): New static global similar to the one in scan-gram.l.
4849 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
4851 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
4852 code_props since Bison may one day use this information for destructors
4854 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
4855 (handle_action_dollar): Use symbol_list_n_get and set used flag
4856 directly since symbol_list_n_used_set is removed.
4857 (translate_action): Add a code_props* argument and remove the rule,
4858 action, and location arguments. Pass the code_props* on to code_lex.
4859 (translate_rule_action, translate_symbol_action, translate_code):
4860 Rewrite as wrappers around the new code_props interface.
4861 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
4862 it would eventually need to break the encapsulation of code_props.
4864 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
4866 * etc/.cvsignore: New.
4868 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
4870 Add maintainer-push-check to run maintainer-check using push parsing in
4871 place of pull parsing where available.
4872 * Makefile.am (maintainer-push-check): New.
4873 * data/bison.m4 (b4_use_push_for_pull_if): New.
4874 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
4875 appropriately based on their existing values.
4876 (yypush_parse): Don't print push-parser-specific diagnostics if push
4877 parsing is being used in place of pull parsing.
4878 * data/yacc.c: If push parsing should replace pull parsing, redirect to
4880 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
4881 variable, and insert b4_use_push_for_pull_flag into muscles.
4882 * tests/Makefile.am (maintainer-push-check): New.
4884 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
4886 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
4887 (whether successful or failed) so that yypush_parse can be invoked
4888 again to start a new parse using the same yypstate.
4889 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
4890 check multiple yypull_parse invocations on the same yypstate. For pull
4891 mode, extend to check multiple yyparse invocations.
4892 (Exploding the Stack Size with Alloca): Extend to try with
4894 (Exploding the Stack Size with Malloc): Likewise.
4896 * tests/calc.at (Simple LALR Calculator): Don't specify
4897 %skeleton "push.c" since %push-pull-parser implies that now.
4898 * tests/headers.at (export YYLTYPE): Don't check for the push
4899 declarations. Otherwise, this test case can't be used to see if push
4900 mode can truly emulate pull mode.
4901 * tests/input.at (Torturing the Scanner): Likewise.
4902 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
4903 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
4904 AT_YACC_IF, which now includes the case of push mode since %skeleton
4905 need not be used for push mode. This will be more intuitive once
4906 push.c is renamed to yacc.c.
4908 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
4910 For push mode, convert yyparse from a macro to a function, invoke yylex
4911 instead of passing a yylexp argument to yypull_parse, and don't
4912 generate yypull_parse or yyparse unless %push-pull-parser is declared.
4913 Discussed starting at
4914 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
4915 * data/bison.m4 (b4_pull_if): New.
4916 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
4917 * data/push.c: Improve M4 quoting a little.
4918 (b4_generate_macro_args, b4_parenthesize): Remove.
4919 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
4920 any time a pull parser is requested.
4921 Don't #define this as a wrapper around yypull_parse. Instead, when
4922 both push and pull are requested, make it a function that does that
4924 (yypull_parse): If there's a b4_prefix, #define this to
4925 b4_prefix[pull_parse] when both push and pull are requested.
4926 Don't define this as a function unless both push and pull are
4928 Remove the yylexp argument and hard-code yylex invocation instead.
4929 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
4931 * src/getargs.c (pull_parser): New global initialized to true.
4932 * getargs.h (pull_parser): extern it.
4933 * src/output.c (prepare): Insert pull_flag muscle.
4934 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
4935 (prologue_declaration): Set both push_parser and pull_parser = true for
4936 %push-pull-parser. Set push_parser = true and pull_parser = false for
4938 * src/scan-gram.l: Don't accept %push_parser as an alternative to
4939 %push-parser since there's no backward-compatibility concern here.
4940 Scan %push-pull-parser.
4941 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
4942 instead of %push-parser.
4943 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
4944 prototype it in the module that calls yyparse.
4945 * tests/input.at (Torturing the Scanner): Likewise.
4946 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
4948 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
4950 Update etc/bench.pl. Optimize push mode a little (the yyn change
4951 deserves most of the credit).
4952 * Makefile.am (SUBDIRS): Add etc subdirectory.
4953 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
4954 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
4955 yytoken, yyval, and yyloc declarations to...
4956 (yyparse or yypush_parse): ... here to improve performance. For
4957 yypush_parse invocations after the first, be sure to assign yyn its old
4959 (yypstate_new): Don't bother initializing the yyresult field since the
4960 initial value isn't used.
4961 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
4962 remove the #define that, in push mode, set it to yyps->NAME.
4963 * etc/Makefile.am: New.
4964 * etc/bench.pl: Remove and build it instead from...
4965 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
4966 "tests/bison" from the build directory by default rather than just
4967 invoking "bison" from $PATH.
4968 (calc_grammar): Update push parser code: don't declare yylval globally,
4969 don't define yyparse_wrapper, and don't #define yyparse.
4970 (bench_grammar): Update to check all working combinations of yacc.c,
4971 push.c, impure, pure, pull, and push.
4973 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
4975 For push mode, add pull wrappers around yypush_parse.
4976 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
4977 (yypull_parse): New function wrapping yypush_parse.
4978 (yyparse): New #define wrapping yypull_parse.
4979 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
4981 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
4982 prototype yylex in the module that calls yyparse, and don't prototype
4983 yyparse there. Otherwise, the yyparse expansion won't compile.
4984 * tests/input.at (Torturing the Scanner): Likewise.
4986 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
4988 Enable push parsers to operate in impure mode. Thus, %push-parser no
4989 longer implies %pure-parser. The point of this change is to move
4990 towards being able to test the push parser code by running the entire
4991 test suite as if %push-parser had been declared.
4992 * data/push.c (yypush_parse): For impure mode, remove the
4993 yypushed_char, yypushed_val, and yypushed_loc arguments.
4994 Instead, declare these as local variables initialized to the global
4995 yychar, yylval, and yylloc.
4996 For the first yypush_parse invocation only, restore the initial values
4997 of these global variables when it's time to read a token since they
4998 have been overwritten.
4999 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
5001 * tests/calc.at (Simple LALR(1) Calculator): Always declare
5002 %pure-parser along with %push-parser since this test case was designed
5003 for pure push parsers.
5004 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
5005 (AT_YACC_OR_PUSH_IF): New.
5006 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
5007 add a note that it's still wrong for some cases (as it has been for a
5009 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
5010 %push-parser no longer implies %pure-parser.
5012 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5014 Remove some unnecessary differences between the pull parser code and
5015 the push parser code. This patch enables yynerrs in push mode.
5016 * data/push.c: Reformat M4 a little.
5017 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
5018 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
5019 because push mode is on. Instead, if pure mode is on, move yynerrs
5021 (b4_declare_parser_state_variables): ... here.
5022 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
5023 to yyps->NAME so it can be used in yypush_parse.
5024 (yypush_parse): Don't omit uses of yynerrs in push mode.
5026 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5028 Fix bug such that the first pushed token's value and location are
5029 sometimes overwritten (sometimes by %initial-action) before being used.
5030 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
5031 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
5032 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
5033 more closely mimic the pull parser logic.
5034 Don't copy the pushed token to yychar, yylval, and yylloc until it's
5035 time to read a token, which is after any initialization of yylval and
5037 (gottoken): Rename label to...
5038 (yyread_pushed_token): ... for clarity and to avoid infringing on the
5041 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5043 Rearrange initialization of the parser state variables so that the
5044 skeleton doesn't have to have a copy for pull mode and another for push
5045 mode. This patch also fixes at least a bug such that yylloc was not
5046 initialized (with b4_location_initial_line and
5047 b4_location_initial_column) upon calling yypush_parse. However, that
5048 initialization now overwrites the first token's location;
5049 %initial-action assigning @$ already did the same thing, and both bugs
5050 will be fixed in a later patch.
5051 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
5052 (b4_declare_parser_state_variables): Remove initialization of yytoken,
5053 yyss, yyvs, yyls, and yystacksize.
5054 (yypstate_new): Remove initialization of some yypstate fields: yystate,
5055 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
5057 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
5058 yyps->NAME so it can be used in yypush_parse.
5059 (yyparse or yypush_parse): For yypush_parse, don't print the
5060 "Starting parse" diagnostic for invocations after the first.
5061 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
5062 yypush_parse, only do it for the first invocation.
5063 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
5064 initialization to occur in yypush_parse but only on the first
5067 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5069 * data/push.c: Add CPP guards around push parser declarations in both
5070 the header and the code file.
5071 In the code file, move the push parser declarations to the same place
5072 they appear in the header file.
5073 Clean up the M4 some, especially the inconsistent underquoting in
5074 some b4_c_function_def and b4_c_function_decl uses.
5076 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5078 Encapsulate the push parser state variables into an M4 macro so the
5079 push skeleton doesn't have to list them again for pull mode's yyparse.
5080 For push mode, remove yypush_parse's local equivalents of these
5081 variables to eliminate unnecessary copying between the two sets at
5082 run-time. This patch also fixes at least a bug related to multiple
5083 %initial-action invocations in push mode.
5084 * data/push.c (b4_declare_parser_variables): Rename to...
5085 (b4_declare_scanner_communication_variables): ... this for clarity and
5087 (b4_declare_yyparse_variables): Remove and move its contents to the one
5088 spot where it was invoked.
5089 (b4_declare_parser_state_variables): New macro containing the parser
5090 state variables required by push mode.
5091 (struct yypstate): Replace all fields but yynew with
5092 b4_declare_parser_state_variables.
5093 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
5094 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
5095 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
5096 (yyparse or yypush_parse): For yyparse in pull mode, replace local
5097 parser state variable declarations with
5098 b4_declare_parser_state_variables.
5099 Don't initialize parser state variables when calling yypush_parse since
5100 yypstate_new already does that.
5101 Invoke the user's initial action only upon the first yypush_parse
5103 Remove all code that copies between the local parser state variables
5106 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5108 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
5109 prevent a name collision in a future patch where these names will
5110 sometimes be #define'd.
5111 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
5112 since it no longer has the same name as the existing argument.
5113 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
5115 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
5116 and Joel E. Denny <jdenny@ces.clemson.edu>
5118 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
5119 that the argument is case-insensitive, and there's no `=' here.
5120 For the %skeleton entry, mention that %language is better.
5121 (Bison Options): Likewise for --language and --skeleton. Move the
5122 --skeleton entry so that the `Tuning the parser' section is sorted
5123 alphabetically on long options.
5124 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
5125 %language directive in detail here; cross-reference the %language
5126 documentation instead.
5127 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
5128 `%require "2.3b"' so that the example is always up-to-date.
5129 (Table of Symbols): Add entries for %language and %skeleton.
5130 * examples/extexi (normalize): Instead of replacing every %require
5131 argument with the current Bison version, just substitute for
5132 `@value{VERSION}'. This guarantees that we're testing what actually
5133 appears in the documentation.
5134 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
5135 rather than `@VERSION@'.
5137 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
5139 * NEWS: Reword the %language news a bit, and put it earlier.
5141 * src/getargs.c (skeleton_arg): Last arg is now location const *.
5142 Rewrite to simplify the logic.
5143 (language_argmatch): Likewise.
5144 (program_name): We now own this var.
5145 * src/getargs.h (struct bison_language): Use char[] rather than
5148 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
5150 * src/complain.c (program_name): Remove decl; no longer needed.
5151 * src/main.c (program_name): Remove; now belongs to getargs.
5153 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
5155 * NEWS: Document %language.
5157 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
5159 * data/c-skel.m4, data/c++-skel.m4: New files.
5160 * data/glr.c: Complain on push parsers.
5162 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
5164 (Decl Summary): Document %language and %skeleton.
5165 (Command line): Document -L.
5167 * examples/extexi: Rewrite %require directive.
5168 * examples/calc++/Makefile.am: Pass VERSION to extexi.
5170 * src/files.c (compute_exts_from_gc): Look in language structure
5172 (compute_file_name_parts): Check whether .tab should be added.
5173 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
5174 (language, skeleton_arg, language_argmatch): New.
5175 (long_options): Add --language.
5176 (getargs): Use skeleton_arg, add -L/--language.
5177 * src/getargs.h: Include location.h.
5178 (struct bison_language, language, skeleton_arg, language_argmatch): New.
5179 * src/output.c (prepare): Pick default skeleton from struct language.
5180 Don't dispatch C skeletons here.
5181 * src/parse-gram.y (PERCENT_LANGUAGE): New.
5182 (prologue_declaration): Add "%language" rule, use skeleton_arg.
5183 * src/scan-gram.l ("%language"): New rule.
5185 * tests/calc.at: Test %skeleton and %language.
5186 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
5187 (AT_GLR_IF): Look for %skeleton "glr.cc".
5188 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
5189 (AT_YACC_IF): Reject %language.
5191 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
5193 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
5194 since it wasn't used; only the typedef name 'semantic_type' is needed.
5195 Also, omit trailing white space.
5197 * bootstrap: Sync from coreutils.
5198 (gnulib_extra_files): Add build-aux/announce.gen.
5199 (slurp): Adjust .gitignore files like .cvsignore files.
5200 * build-aux/announce-gen: Remove from CVS, since bootstrap
5203 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
5205 Make %push-parser imply %pure-parser. This fixes several bugs; see
5206 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
5207 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
5209 * data/push.c: Don't bother testing b4_push_if when deciding whether
5210 to expand b4_declare_parser_variables globally.
5211 (yypush_parse): Likewise in here.
5213 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
5214 (yy_reduce_print): Reformat M4 for readability.
5216 2006-12-15 Bob Rossi <bob@brasko.net>
5217 and Joel Denny <jdenny@ces.clemson.edu>
5219 * data/push.c (yypstate): Add typedef, and update all uses of
5220 struct yypstate to just yypstate.
5221 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
5223 2006-12-14 Bob Rossi <bob@brasko.net>
5225 * data/push.c (yypush_parse): Declare prototype regardless of
5228 2006-12-14 Bob Rossi <bob@brasko.net>
5230 * data/push.c (yyparse): Remove the prototype and the #define when in
5233 2006-12-13 Bob Rossi <bob@brasko.net>
5235 * data/push.c (yypstate_init): Rename to...
5236 (yypstate_new): ... this and use b4_c_function_def.
5237 (yypstate_delete): New.
5238 (yypush_parse): Change parameters yynval and yynlloc to be const.
5239 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
5240 yypstate_delete functions.
5242 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
5244 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
5245 strange test case titles. Reported by Bob Rossi.
5247 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
5249 * TODO: Add pointer to Sylvain Schmitz's work on static detection
5250 of potential ambiguities in GLR grammers.
5252 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
5254 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
5255 `bison ', use m4_index instead of m4_substr since chopping up a string
5256 containing M4-special characters causes problems here.
5258 Fix a couple of bugs related to special characters in user-specified
5259 file names, and make it easier for skeletons to compute output file
5260 names with the same file name prefix as Bison-computed output file
5262 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
5263 b4_parser_file_name and b4_spec_defines_file instead of
5264 @output_parser_name@ and @output_header_name@, which are now redundant.
5265 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
5266 b4_parser_file_name, b4_spec_defines_file, and the new
5267 @basename(FILENAME@) instead of @output_parser_name@ and
5268 @output_header_name@, which inappropriately escaped the file names as
5270 * src/files.c (all_but_ext): Remove static qualifier.
5271 (compute_output_file_names): Move `free (all_but_ext)' to...
5272 (output_file_names_free): ... here since all_but_ext is needed later.
5273 * src/files.h (all_but_ext): Extern.
5274 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
5275 exactly what MUSCLE_INSERT_STRING used to do.
5276 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
5277 characters are escaped properly.
5278 * src/output.c (prepare): Define muscle file_name_all_but_ext as
5280 For pkgdatadir muscle, maintain previous functionality by using
5281 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
5282 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
5283 digraphs would never be expanded. Hopefully no one has M4-special
5284 characters in his Bison installation path.
5285 * src/scan-skel.l: Don't parse @output_header_name@ and
5286 @output_parser_name@ anymore since they're now redundant.
5287 In @output, use decode_at_digraphs.
5288 Parse a new @basename command that invokes last_component.
5289 (decode_at_digraphs): New.
5290 (BASE_QPUTS): Remove unused.
5291 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
5292 (Output file name): New tests.
5294 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
5296 Warn about output files that are generated by the skeletons and that
5297 conflict with other output files.
5298 * data/glr.c: Don't generate the header file here when glr.cc does.
5299 * src/files.c (file_names, file_names_count): New static globals.
5300 (compute_output_file_names): Invoke output_file_name_check for files
5301 not generated by the skeletons and remove existing checks.
5302 (output_file_name_check): New function that warns about conflicting
5304 (output_file_names_free): Free file_names.
5305 * src/files.h (output_file_name_check): Declare.
5306 * src/scan-skel.l: Invoke output_file_name_check for files generated by
5308 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
5309 (Conflicting output files): New tests.
5311 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5313 * doc/bison.texinfo: Fix a couple of typos.
5315 2006-12-08 Bob Rossi <bob@brasko.net>
5317 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
5319 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
5321 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
5322 (yypush_parse): Rename yypvars argument to yyps and remove redundant
5324 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
5325 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
5327 2006-12-07 Bob Rossi <bob@brasko.net>
5328 and Joel Denny <jdenny@ces.clemson.edu>
5330 * data/push.c (yypvarsinit): Change return type from void* to struct
5331 yypvars*. No longer cast to void* on return.
5332 (struct yypvars): Remove yylen since it need not be remembered between
5333 yypushparse invocations.
5334 (yypushparse): Don't copy between yylen and pv->yylen.
5336 2006-12-05 Bob Rossi <bob@brasko.net>
5338 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
5339 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
5340 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
5341 (struct yypvars): Remove b4_declare_parser_variables.
5342 (yypvarsinit): Remove init code for removed variables.
5343 (global scope): Do not declare b4_declare_parser_variables if
5345 (yypushparse): Add b4_declare_parser_variables.
5346 Init new local variables, and remove init code for removed
5349 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
5350 and yyparse for other modes.
5351 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
5352 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
5353 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
5354 (AT_PURE_LEX_IF): True if pure or push parser.
5356 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
5358 Document Yacc prologue alternatives and default %destructor's and
5359 %printer's as experimental. Don't mention Java yet. Discussed at
5360 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
5361 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
5362 (2.3a): Annotate this entry to say the old forms of these features were
5364 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
5365 Table of Symbols): Say they're experimental. Comment out any mention
5366 of Java (we'll want this back eventually).
5368 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
5370 Support a file name argument to %defines. Deprecate `=' in
5371 %file-prefix, %name-prefix, and %output. Discussed at
5372 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
5373 * NEWS (2.3a+): Mention.
5374 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
5375 form of %defines, and remove `=' from entries for %file-prefix,
5376 %name-prefix, and %output.
5377 * src/parse-gram.y (prologue_declaration): Implement.
5378 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
5379 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
5380 all but one occurrence of %name-prefix.
5381 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
5382 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
5383 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
5384 occurrence of each of %file-prefix and %output. Add check for %defines
5386 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
5387 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
5388 Remove the `=' from %output.
5390 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
5392 Don't escape $ in test case titles since Autoconf 2.61 now does that
5394 * tests/actions.at (Default %printer and %destructor are not for error
5395 or $undefined): Here.
5396 (Default %printer and %destructor are not for $accept): Here.
5397 * tests/input.at (Invalid $n and @n): Here.
5399 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
5401 Rename <!> to <>. Discussed starting at
5402 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
5403 * NEWS (2.3a+): Update.
5404 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
5406 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
5407 * src/scan-gram.l (INITIAL): Implement.
5408 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
5409 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
5411 * tests/actions.at (Default tagless %printer and %destructor,
5412 Default tagged and per-type %printer and %destructor,
5413 Default %printer and %destructor are not for error or $undefined,
5414 Default %printer and %destructor are not for $accept,
5415 Default %printer and %destructor for mid-rule values): Update.
5416 * tests/input.at (Default %printer and %destructor redeclared,
5417 Unused values with default %destructor): Update.
5419 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
5421 Don't let %prec take a nonterminal.
5422 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
5424 * tests/input.at (%prec takes a token): New test checking that %prec
5425 won't take a nonterminal.
5427 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
5429 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
5430 it was double-quoted.
5431 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
5432 grammar is maintained with Bison's highest standards.
5433 * src/getargs.c: Fix some typos in Doxygen comments.
5435 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
5437 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
5438 later. Reported by Paul Eggert in
5439 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
5440 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
5441 * src/scan-code.l (translate_action): Don't bother invoking
5442 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
5443 (code_scanner_free): Instead of invoking
5444 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
5446 * src/scan-gram.l (gram_scanner_free): Likewise.
5447 * src/scan-skel.l (scan_skel): Likewise.
5449 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
5451 * src/files.c (tr): Change return type to void.
5452 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
5453 has been called previously for the same key.
5454 (muscle_find): Return storage instead of value so that
5455 --enable-gcc-warnings doesn't produce warnings that the return discards
5456 const. aver that the value and storage are the same since storage
5457 could potentially be NULL when value is not.
5458 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
5461 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
5463 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
5464 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
5465 us a slightly cleaner distribution, and also works.
5466 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
5469 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
5470 and Paul Eggert <eggert@cs.ucla.edu>
5472 Don't let Bison leak memory except when it complains.
5473 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
5474 (spec_defines_file, dir_prefix): Now char *, not const char *,
5475 since they are freed.
5476 * src/files.c: Likewise.
5477 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
5479 (tr): Now operates in-place. All uses changed.
5480 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
5482 (compute_file_name_parts, compute_output_file_names): Don't store
5483 read-only data in variables that will be freed.
5484 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
5485 src_extension, and header_extension.
5486 (output_file_names_free): New public function to free
5487 spec_verbose_file, spec_graph_file, spec_defines_file,
5488 parser_file_name, and dir_prefix.
5489 * src/getargs.c (getargs): Don't store read-only data in variables that
5491 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
5492 (which previously existed but was unused), and quotearg_free.
5493 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
5494 * src/muscle_tab.c: Likewise.
5495 (muscle_entry): Make the value char const *,
5496 and add a new storage member that is char * and can be freed.
5497 (muscle_entry_free): New private function.
5498 (muscle_init): Use it instead of free.
5499 (muscle_insert, muscle_grow): Update and use new storage member.
5500 (muscle_code_grow): Free the string passed to muscle_grow
5501 since it's not needed anymore.
5502 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
5503 add a new `char *code' member.
5504 ("{...}"): Declare semantic type as code.
5505 * src/scan-code.h (translate_rule_action):
5506 (translate_symbol_action, translate_code, translate_action): Return
5507 `char const *' rather than `char *' since external code should not free
5509 * src/scan-code.l: Likewise.
5510 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
5511 which is "{...}" in the parser.
5512 * tests/Makefile.am (maintainer-check-valgrind): Set
5513 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
5515 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
5517 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
5518 expecting a non-zero exit status sets --leak-check=summary and
5519 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
5520 this case, and we don't want to hear about it.
5522 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
5524 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
5525 instead of from the template, to simplify configuration a bit.
5526 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
5527 and m4/wint_t.m4, as they are needed with the latest gnulib.
5529 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5531 Disable unset/unused mid-rule value warnings by default, and recognize
5532 --warnings=midrule-values to enable them. Discussed starting at
5533 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
5534 * NEWS (2.3a+): Mention.
5535 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
5536 warnings): Add entry for midrule-values subargument.
5537 * src/reader.c (symbol_should_be_used): Don't return true just because
5538 the value is a set/used mid-rule value unless
5539 --warnings=midrule-values was specified.
5540 * tests/input.at (Unused values, Unused values before symbol
5541 declarations): Run tests with and without --warnings=midrule-values.
5543 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
5544 than LIST_FREE directly.
5546 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5548 Finish implementing --warnings=error, which should not be implied by
5549 --warnings=all (or by its synonyms -W and --warnings without
5551 * src/complain.c (set_warning_issued): New function to report that
5552 warnings are being treated as errors and to record an error if so.
5554 (warn_at, warn): ... here.
5555 * src/getargs.c (warnings_args, warnings_types): Reorder so that
5556 "error - warnings are errors" does not appear above "all - all of the
5558 (getargs): For -W and --warnings without subarguments, don't let
5559 FLAGS_ARGMATCH set warnings_error in warnings_flag.
5560 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
5562 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5564 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
5565 empty subargument list. For example: `bison --warnings= parser.y'.
5567 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5569 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
5570 the parser header file so that gcc doesn't warn.
5572 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5574 Split the default %destructor/%printer into two kinds: <*> and <!>.
5575 Discussed starting at
5576 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
5577 * NEWS (2.3a+): Mention.
5578 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
5579 previous change today related to mid-rules.
5580 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
5581 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
5582 (TYPE_TAG_ANY): Add as <*>.
5583 (TYPE_TAG_NONE): Add as <!>.
5584 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
5586 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
5587 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
5588 * src/symlist.c (symbol_list_default_new): Split into tagged and
5590 (symbol_list_destructor_set, symbol_list_printer_set): Split
5591 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
5592 SYMLIST_DEFAULT_TAGLESS.
5593 * src/symlist.h: Update symbol_list_default*_new prototypes.
5594 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
5595 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
5596 * src/symtab.c (default_destructor, default_destructor_location,
5597 default_printer, default_printer_location): Split each into tagged and
5599 (symbol_destructor_get, symbol_destructor_location_get,
5600 symbol_printer_get, symbol_printer_location_get): Implement tagged
5601 default and tagless default cases.
5602 (default_destructor_set, default_printer_set): Split each into tagged
5603 and tagless versions.
5604 * src/symtab.h: Update prototypes.
5605 * tests/actions.at (Default %printer and %destructor): Rename to...
5606 (Default tagless %printer and %destructor): ... this, and extend.
5607 (Per-type %printer and %destructor): Rename to...
5608 (Default tagged and per-type %printer and %destructor): ... this, and
5610 (Default %printer and %destructor for user-defined end token): Extend.
5611 (Default %printer and %destructor are not for error or $undefined):
5613 (Default %printer and %destructor are not for $accept): Update.
5614 (Default %printer and %destructor for mid-rule values): Extend.
5615 * tests/input.at (Default %printer and %destructor redeclared): Extend.
5616 (Unused values with default %destructor): Extend.
5618 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5620 Don't apply the default %destructor/%printer to an unreferenced midrule
5622 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
5623 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
5624 like $@n instead of just @n so that the default %destructor/%printer
5625 logic doesn't see them as user-defined symbols.
5626 (symbol_is_dummy): Check for both forms of the name.
5627 * src/reader.c (packgram): Remove the `$' from each midrule symbol
5628 name for which the midrule value is referenced in any action.
5629 * tests/actions.at (Default %printer and %destructor for mid-rule
5631 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
5632 for change to dummy symbol names.
5634 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
5636 Warn about unset midrule $$ if the corresponding $n is used.
5637 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
5639 (packgram): Before invoking grammar_rule_check on any rule, make sure
5640 all actions have already been scanned in order to set `used' flags.
5641 Otherwise, checking that a midrule's $$ is set will not always work
5642 properly because the midrule check must forward-reference the midrule's
5644 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
5647 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
5649 More improvements to the documentation of the prologue alternatives:
5650 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
5652 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
5653 some text to clarify the relative importance of the new directives and
5654 to show how these directives may be viewed as code labels.
5656 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
5658 Similar to the recently removed %before-header, add %code-top as the
5659 alternative to the pre-prologue. Mentioned at
5660 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
5661 Also, let the prologue alternatives appear in the grammar section.
5662 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
5663 (prologue_declaration): Move the existing prologue alternatives to...
5664 (grammar_declaration): ... here and add %code-top.
5665 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
5667 Clean up and extend documentation for the prologue alternatives.
5668 * NEWS (2.3a+): Describe prologue alternatives.
5669 * doc/bison.texinfo (Prologue): Move discussion of prologue
5671 (Prologue Alternatives): ... this new section, and extend it to discuss
5672 all 4 directives in detail.
5673 (Table of Symbols): Clean up discussion of prologue alternatives and
5676 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5678 DJGPP specific issues.
5680 * djgpp/config.bat: config.hin has been moved to lib. Adjust
5681 config.bat accordingly.
5682 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
5683 * djgpp/config.site: Likewise.
5685 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
5687 Replace %*-header with %provides, %requires, %code. See discussion at
5688 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
5690 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
5691 (b4_user_start_header): Remove.
5692 * data/glr.c: Use new macros instead of b4_*start_header
5694 * data/glr.cc: Likewise.
5695 * data/lalr1.cc: Likewise.
5696 * data/push.c: Likewise.
5697 * data/yacc.c: Likewise.
5699 * doc/bison.texinfo: Remove %before-header, rename
5700 %{start,end,after}-header to %requires, %provides, %code.
5702 * src/parse-gram.y: Likewise (also rename token names accordingly).
5703 * src/scan-gram.l: Likewise.
5704 * tests/actions.at: Likewise.
5706 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
5708 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
5709 Problem reported by Joel E. Denny.
5711 2006-10-14 Jim Meyering <jim@meyering.net>
5713 (Sync from coreutils.)
5714 Work also when the working directory (with e.g. coreutils sources)
5715 is version controlled with git, rather than CVS.
5716 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
5718 In messages and comments, say e.g., "checked-out sources",
5719 rather than "CVS sources".
5720 (version_controlled_file): New function. Work for git as well as
5721 for CVS. Don't use grep's -q option.
5722 (slurp): Call it here, in place of CVS-specific code.
5724 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
5726 Fix testsuite for ./configure --enable-gcc-warnings:
5727 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
5728 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
5729 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
5730 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
5731 * test/regression.at (Diagnostic that expects two alternatives):
5734 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
5736 * bootstrap.conf (gnulib_modules): Add config-h.
5737 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
5738 worry about HAVE_CONFIG_H.
5739 * lib/abitset.c: Likewise.
5740 * lib/bitset.c: Likewise.
5741 * lib/bitset_stats.c: Likewise.
5742 * lib/bitsetv-print.c: Likewise.
5743 * lib/bitsetv.c: Likewise.
5744 * lib/ebitset.c: Likewise.
5745 * lib/get-errno.c: Likewise.
5746 * lib/lbitset.c: Likewise.
5747 * lib/subpipe.c: Likewise.
5748 * lib/timevar.c: Likewise.
5749 * lib/vbitset.c: Likewise.
5750 * lib/bitset.c: Include "bitset.h" first, to test interface.
5751 * lib/bitset_stats.c: Include "bitset_stats.h" first.
5752 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
5753 * lib/bitsetv.c: Include "bitsetv.h" first.
5754 * lib/get-errno.c: Include "get-errno.h" first.
5755 * m4/.cvsignore: Add config-h.m4.
5756 * tests/actions.at (Default %printer and %destructor for ...):
5757 Adjust expected line numbers in output to reflect removal of #if
5758 HAVE_CONFIG_H lines.
5759 * tests/glr-regression.at (Missed %merge type warnings when ...):
5761 * tests/regression.at (Braced code in declaration in rules section):
5763 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
5764 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
5765 Include <config.h> unconditionally.
5767 * bootstrap: Sync from coreutils, as follows:
5769 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
5771 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
5772 variable was sometimes used without being initialized. This
5773 messed up the installation of the INSTALL file in some cases.
5775 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
5777 * bootstrap (usage, main program, symlink_to_gnulib): Add option
5778 --copy. Inspired by a suggestion from Bruno Haible.
5780 2006-10-03 Jim Meyering <jim@meyering.net>
5782 * bootstrap: Undo last change to this file, since now gnulib-tool
5783 sticks with the automake default in generating dependencies.
5785 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
5787 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
5788 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
5790 * doc/bison.1: Add copyright notice.
5792 * data/glr.c: Don't include <stdarg.h>; not used.
5794 * NEWS: The -g and --graph options now output graphs in Graphviz
5795 DOT format, not VCG format.
5796 * doc/bison.1: Likewise.
5797 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
5798 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
5800 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
5801 * TODO: Remove Graphviz entry.
5802 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
5803 remove vcg.c, vcg.h, vcg_defaults.h.
5804 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
5805 * src/graphviz.c, src/graphviz.h: New files.
5806 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
5807 * src/files.h: Make comment more generic.
5808 * src/main.c (main): Likewise.
5809 * src/print_graph.h: Likewise.
5810 * src/getargs.c (usage): Make usage description more generic.
5811 * src/print_graph.c: Include graphviz.h rather than vcg.h.
5812 (static_graph, fgraph): Remove. All uses changed to pass
5813 arguments instead of sharing a static var.
5814 (print_core, print_actions, print_state, print_graph):
5815 Output graphviz format rather than VCG format.
5816 * tests/.cvsignore: Remove *.vcg; add *.dot.
5817 * tests/output.at: Expect *.dot files, not *.vcg files.
5819 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
5820 accommodates the 2006-10-08 change.
5822 2006-10-11 Bob Rossi <bob@brasko.net>
5824 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
5825 (b4_yyssa, b4_yyerror_range): New macros.
5826 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
5827 (yypvarsinit): Remove init of removed fields.
5828 (yypushparse): Remove use of removed fields; use new macros instead.
5830 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
5832 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
5833 in a push parser. Reindent slightly to match yacc.c better.
5835 2006-10-11 Bob Rossi <bob@brasko.net>
5837 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
5839 (yypvarsinit, yypushparse): Remove init of removed fields.
5840 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
5842 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
5844 * THANKS: Add Paolo Bonzini and Bob Rossi.
5846 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
5848 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
5849 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
5850 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
5851 b4_define_user_cde and uses): Remove.
5852 (b4_comment, b4_prefix, b4_sync_start): New.
5853 * data/bison.m4: New file, with most of the content removed from c.m4.
5854 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
5855 * src/output.c (output_skeleton): Pass bison.m4.
5856 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
5859 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
5861 Fix test failure reported by Tom Lane in
5862 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
5863 and try to make such failures easier to catch in the future.
5864 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
5865 that's now the caller's responsibility.
5866 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
5867 Set yychar = YYEOF if it's negative.
5868 * tests/actions.at (yylex): Abort if asked to read past EOF.
5869 * tests/conflicts.at (yylex): Likewise.
5870 * tests/cxx-type.at (yylex): Likewise.
5871 * tests/glr-regression.at (yylex): Likewise.
5872 * tests/input.at (yylex): Likewise.
5873 * tests/regression.at (yylex): Likewise.
5874 * tests/torture.at (yylex): Likewise.
5876 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
5878 Fix problems with translating English-language diagnostics.
5879 * bootstrap: Fix bug introduced in recent bootstrap changes, with
5880 respect to bison-runtime pot generation. The YY_ stuff
5881 wasn't being captured.
5882 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
5883 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
5884 * runtime-po/POTFILES.in: Add data/push.c.
5886 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
5888 Merge bootstrap changes from coreutils.
5890 2006-09-28 Jim Meyering <jim@meyering.net>
5892 Automatically generated dependencies are important even
5893 when all of the sources in a directory come from gnulib.
5894 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
5895 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
5897 2006-09-23 Jim Meyering <jim@meyering.net>
5899 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
5901 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
5903 * bootstrap: Add support for --force.
5904 (usage): New function. Describe usage less tersely.
5905 (CVS_only_file): New var.
5907 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
5909 * data/push.c (YYPUSH_MORE): Make it an enum instead.
5910 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
5911 Adjust white space and comments to match GNU style better.
5913 2006-09-20 Bob Rossi <bob@brasko.net>
5915 * data/push.c (yyresult_get): Remove function.
5916 (YYPUSH_MORE): Add #define.
5917 (yypushparse): Modify return value.
5919 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
5921 * stamp-h.in: Remove; no longer needed.
5922 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
5923 Remove config.h, config.hin, intl (no longer created).
5924 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
5927 Sync bootstrap from coreutils, as follows:
5929 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
5931 * bootstrap (symlink_to_gnulib): New function.
5932 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
5933 to copies-of-gnulib.
5934 (cp_mark_as_generated, slurp, gnulib_files):
5935 Avoid making a copy if it's the same as the old version.
5936 (gnulib_files): Add support for this variable (used by Bison).
5938 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
5940 * src/getargs.c (usage): Rework to use conventions similar to
5941 coreutils, to make translation a bit easier and the code a bit
5942 smaller. Problem reported by Tim Van Holder.
5944 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
5946 Use some of gnulib's new modules, taken from coreutils.
5948 * bootstrap: Sync from coreutils, except add support for gnulib_files.
5949 * bootstrap.conf: New file.
5950 (gnulib_modules): Add configmake, inttypes, unistd.
5951 (XGETTEXT_OPTIONS): Add complain, complain_at,
5952 fatal, fatal_at, warn, warn_at, unexpected_end.
5953 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
5954 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
5956 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
5958 (GNULIB_AUTOCONF_SNIPPET): Remove.
5959 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
5961 * lib/.cvsignore: Add inttypes_.h.
5962 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
5963 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
5964 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
5965 no-longer-necessary initializations.
5966 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
5967 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
5968 use the unistd module.
5969 * src/system.h: Likewise.
5970 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
5971 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
5972 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
5973 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
5974 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
5975 * src/system.h: Include inttypes.h unconditionally, now that we
5976 use the inttypes module. Don't bother to include stdint.h, since
5977 inttypes.h now does that for us.
5978 (LOCALEDIR): Remove, now that we use the configmake module.
5979 * src/getargs.c: Include configmake.h.
5980 * src/main.c: Likewise.
5981 * src/output.c: Likewise.
5982 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
5983 not from $abs_top_builddir, since config.h moved.
5986 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
5987 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
5989 * src/parse-gram.y (symbol_declaration): Don't put statements
5990 before declarations; it's not portable to C89.
5991 * src/scan-code.l (handle_action_at): Likewise.
5993 * src/scan-code.l: Always initialize braces_level; the old code
5994 left it uninitialized and therefore had undefined behavior.
5996 Don't attempt to redefine 'assert', since it runs afoul of
5997 systems where standard headers (mistakenly) include <assert.h>.
5998 Instead, define and use our own alternative, called 'aver'.
5999 * src/reader.c: Don't include assert.h, since we no longer
6001 * src/scan-code.l: Likewise.
6002 * src/system.h (assert): Remove, replacing with....
6003 (aver): New function, taking a bool arg. All uses changed.
6004 * src/tables.c (pack_vector): Ensure that aver arg is bool,
6005 not merely an integer.
6007 2006-09-15 Bob Rossi <bob@brasko.net>
6009 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
6010 * data/c.m4 (YYPUSH): New.
6011 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
6012 * src/getargs.c (push_parser): New var.
6013 * src/getargs.h (push_parser): New declaration.
6014 * src/output.c (prepare): Add macro insertion of `push_flag'.
6015 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
6016 (prologue_declaration): Parse %push-parser.
6017 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
6018 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
6019 list of removed lines from the traces observed.
6020 (AT_CHECK_CALC_LALR): Added push parser tests.
6022 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
6024 * NEWS: Version 2.3a.
6025 * configure.ac (AC_INIT): Likewise.
6027 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
6028 "#define YYSTYPE int" that caused "make maintainer-check" to fail
6029 due to header ordering dependencies. I don't know why the #define
6032 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
6033 runtime cost when YYDEBUG is not defined, and so that some tests
6034 that used to fail now work. Problem and initial suggestion by
6036 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
6037 * data/glr.cc (b4_parser_class_name):
6038 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
6039 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
6040 (yydebug_) [YYDEBUG]: New member.
6041 (yycdebug_): Now defined only if YYDEBUG.
6042 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
6043 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
6044 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
6046 (debug_stream, set_debug_stream, debug_level, set_debug_level):
6047 Define only if YYDEBUG.
6048 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
6050 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
6051 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
6052 AT_CHECK_CALC_GLR_CC that are working now.
6054 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
6056 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
6057 We don't need them in glr.cc, and glr.c defines them.
6058 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
6059 assumes that defining it to anything is the same as defining
6060 it to 1. Problem reported by Paolo Bonzini.
6062 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
6064 * data/c.m4 (b4_null, b4_case): Define.
6065 * src/output.c (prepare_symbols): Use b4_null.
6066 (user_actions_output): Use b4_case.
6068 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
6070 * data/glr.c (b4_shared_declarations): Put start-header first,
6071 before any #includes that we generate, so that feature-test
6072 macros work. Problem reported by Michael Deutschmann in
6073 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
6074 * data/lalr1.cc: Likewise.
6075 * doc/bison.texinfo (Prologue): Document that feature-test macros
6076 should be defined before any Bison declarations.
6077 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
6078 that depend on location.hh after, not before, Bison decls, since
6079 we now include location.hh after the first user prologue.
6081 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
6082 Sander Brandenburg in
6083 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
6084 Also, fix minor white space and comment issues.
6085 (Prologue): Mention that it's better to define feature-test macros
6086 before Bison declarations. Problem reported by Michael Deutschmann.
6088 * README-cvs: Fix typo: "&" should be "&&". Problem reported
6090 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
6091 This adjusts to recent gnulib changes.
6093 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
6095 Finish implementation of per-type %destructor/%printer. Discussed
6097 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
6099 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
6100 * NEWS (2.3+): Add a description of this feature to the default
6101 %destructor/%printer description.
6102 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
6103 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
6104 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
6105 list node contains a semantic type.
6106 * src/symtab.c, src/symtab.h: Extend with a table that associates
6107 semantic types with their %destructor's and %printer's.
6108 (semantic_type_from_uniqstr, semantic_type_get,
6109 semantic_type_destructor_set, semantic_type_printer_set): New functions
6110 composing the public interface of that table.
6111 (symbol_destructor_get, symbol_destructor_location_get,
6112 symbol_printer_get, symbol_printer_location_get): If there's no
6113 per-symbol %destructor/%printer, look up the per-type before trying
6115 * tests/actions.at (Per-type %printer and %destructor): New test case.
6116 * tests/input.at (Default %printer and %destructor redeclared):
6117 Extend to check that multiple occurrences of %symbol-default in a
6118 single %destructor/%printer declaration is an error.
6119 (Per-type %printer and %destructor redeclared, Unused values with
6120 per-type %destructor): New test cases.
6122 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
6124 Require default %destructor/%printer to be declared using
6125 %symbol-default instead of an empty symbol list, and start working on
6126 new per-type %destructor/%printer. Discussed at
6127 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
6128 * NEWS (2.3+): Add %symbol-default to example.
6129 * bison.texinfo (Freeing Discarded Symbols): Likewise.
6130 (Table of Symbols): Add entry for %symbol-default.
6131 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
6132 (generic_symlist, generic_symlist_item): New nonterminals for creating
6133 a list in which each item is a symbol, semantic type, or
6135 (grammar_declaration): Use generic_symlist in %destructor and %printer
6136 declarations instead of symbols.1 or an empty list.
6137 (symbol_declaration, precedence_declaration, symbols.1): Update actions
6138 for changes to symbol_list.
6139 * src/reader.c: Update for changes to symbol_list.
6140 * src/scan-code.l: Likewise.
6141 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
6142 * src/symlist.c, src/symlist.h: Extend such that a list node may
6143 represent a semantic type or a %symbol-default in addition to just an
6144 ordinary symbol. Add switched functions for setting %destructor's and
6146 * tests/actions.at, tests/input.at: Add %symbol-default to all default
6147 %destructor/%printer declarations.
6149 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
6151 Whether the default %destructor/%printer applies to a particular symbol
6152 isn't a question of whether the user *declares* that symbol (in %token,
6153 for example). It's a question of whether the user by any means
6154 *defines* the symbol at all (by simply using a char token, for
6155 example). $end is defined by Bison whereas any other token with token
6156 number 0 is defined by the user. The error token is always defined by
6157 Bison regardless of whether the user declares it with %token, but we
6158 may one day let the user define error as a nonterminal instead.
6159 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
6160 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
6161 the meaning of "user-defined".
6162 * tests/actions.at (Default %printer and %destructor for user-declared
6163 end token): Rename to...
6164 (Default %printer and %destructor for user-defined end token): ...
6167 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
6168 computation of whether to apply the default, don't maintain a list of
6169 every Bison-defined symbol. Instead, just check for a first character
6170 of '$', which a user symbol cannot have, and check for the error token.
6172 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
6174 Don't apply the default %destructor or %printer to the error token,
6175 $undefined, or $accept. This change fits the general rule that the
6176 default %destructor and %printer are only for user-declared symbols,
6177 and it solves several difficulties that are described in the new test
6179 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
6180 * tests/actions.at (Default %printer and %destructor are not for error
6181 or $undefined, Default %printer and %destructor are not for $accept):
6184 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
6186 Allow %start after the first rule.
6187 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
6188 when parsing the first rule.
6189 (check_and_convert_grammar): Search for it here after all grammar
6190 declarations have been parsed. Skip midrules, which have dummy LHS
6192 * src/symtab.c (symbol_is_dummy): New function.
6193 * src/symtab.h (symbol_is_dummy): Declare it.
6194 * tests/input.at (%start after first rule): New test.
6196 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
6198 Redo some of the previous commit: add back the ability to use
6199 non-aliased/undeclared string literals since it might be useful to
6200 those declaring %token-table.
6201 * src/reader.c (check_and_convert_grammar): Undo changes in previous
6202 commit: don't worry about complaints from symbols_pack.
6203 * src/symtab.c (symbol_new, symbol_class_set,
6204 symbol_check_alias_consistency): Undo changes in previous commit: count
6205 each string literal as a new symbol and token, assign it a symbol
6206 number, and don't complain about non-aliased string literals.
6207 (symbols_pack): Since symbol_make_alias still does not decrement symbol
6208 and token counts but does still set aliased tokens to the same number,
6209 symbol_pack_processor now leaves empty slots in the symbols array.
6211 * tests/regression.at (Undeclared string literal): Remove test case
6212 added in previous commit since non-aliased string literals are allowed
6214 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
6215 remove unnecessary string literal declarations.
6216 * tests/sets.at (Firsts): Likewise.
6218 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
6220 Don't allow an undeclared string literal, but allow a string literal to
6221 be used before its declaration.
6222 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
6223 symbols_pack complained.
6224 * src/symtab.c (symbol_new): Don't count a string literal as a new
6226 (symbol_class_set): Don't count a string literal as a new token, and
6227 don't assign it a symbol number since symbol_make_alias does that.
6228 (symbol_make_alias): It's not necessary to decrement the symbol and
6229 token counts anymore. Don't assume that an alias declaration occurs
6230 before any uses of the identifier or string, and thus don't assert that
6231 one of them has the highest symbol number so far.
6232 (symbol_check_alias_consistency): Complain if there's a string literal
6233 that wasn't declared as an alias.
6234 (symbols_pack): Bail if symbol_check_alias_consistency failed since
6235 symbol_pack asserts that every token has been assigned a symbol number
6236 although undeclared string literals have not.
6237 * tests/regression.at (String alias declared after use, Undeclared
6238 string literal): New test cases.
6239 (Characters Escapes, Web2c Actions): Declare string literals as
6241 * tests/sets.at (Firsts): Likewise.
6243 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
6245 In the grammar scanner, STRING_FINISH unclosed constructs and return
6246 them to the parser in order to improve error messages.
6247 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
6248 SC_BRACED_CODE, SC_PROLOGUE): Implement.
6249 * tests/input.at (Unclosed constructs): New test case.
6250 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
6253 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
6256 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
6258 Handle string aliases for character tokens correctly.
6259 * src/symtab.c (symbol_user_token_number_set): If the token has an
6260 alias, check and set its alias's user token number instead of its own,
6261 which is set to indicate the alias. Previously, every occurrence of
6262 the character token in the grammar overwrote that alias indicator with
6264 * tests/input.at (String aliases for character tokens): New test.
6266 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
6268 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
6270 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
6272 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
6273 to prevent failures when building on older platforms.
6274 Check for autopoint failure.
6275 Set XGETTEXT_OPTIONS to values that check for C format strings,
6276 so that translators are warned about them (this also helps
6277 prevent core dumps).
6279 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
6280 function, since it simplifies our code a bit.
6282 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
6283 rather than -W, so we don't get bogus warnings about sign comparisons.
6284 Add -Wpointer-arith, since that warning is useful (it reports code
6285 that does not conform to C89 and that some compilers reject).
6286 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
6287 since it's no longer needed.
6289 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
6291 Clean up scanners a bit.
6292 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
6293 definitions so gcc won't warn when obstack_for_string is unused.
6294 * src/scan-code.l: config.h and system.h are already #include'd by
6295 scan-code-c.c, so get rid of them here.
6296 * src/scan-gram.l: Likewise.
6297 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
6298 definitions rather than duplicating the rest of it.
6299 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
6301 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
6303 Suppress signed/unsigned comparison warnings for yycheck.
6304 * data/c.m4 (b4_safest_int_type): New macro.
6305 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
6306 a signed int type, cast it to b4_safest_int_type first.
6307 * data/yacc.c: Likewise.
6308 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
6311 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
6313 * doc/bison.texinfo: Fix some typos.
6315 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
6317 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
6318 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
6320 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
6321 the latest gnulib does this a different way.
6322 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
6323 translation was patched, so stop omitting it.
6325 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
6327 Enable declaration of default %printer/%destructor. Make the parser
6328 use these for all user-declared grammar symbols for which the user does
6329 not declare a specific %printer/%destructor. Thus, the parser uses it
6330 for token 0 if the user declares it but not if Bison generates it as
6331 $end. Discussed starting at
6332 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
6333 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
6335 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
6336 * NEWS (2.3+): Mention.
6337 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
6338 declare a %destructor for a mid-rule's semantic value. It's just
6339 impossible to declare one specific to it.
6340 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
6341 code. Describe default %destructor form.
6342 * src/parse-gram.y (grammar_declaration): Parse default
6343 %printer/%destructor declarations.
6344 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
6345 and symbol_destructor_location_get rather than accessing the destructor
6346 and destructor_location members of struct symbol.
6347 (symbol_printers_output): Likewise but for %printer's.
6348 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
6350 * src/symtab.c (default_destructor, default_destructor_location,
6351 default_printer, default_printer_location): New static global
6352 variables to record the default %destructor and %printer.
6353 (symbol_destructor_get, symbol_destructor_location_get,
6354 symbol_printer_get, symbol_printer_location_get): New functions to
6355 compute the appropriate %destructor and %printer for a symbol.
6356 (default_destructor_set, default_printer_set): New functions to set the
6357 default %destructor and %printer.
6358 * src/symtab.h: Prototype all those new functions.
6359 * tests/actions.at (Default %printer and %destructor): New test to
6360 check that the right %printer and %destructor are called, that they're
6361 not called for $end, and that $$ and @$ work correctly.
6362 (Default %printer and %destructor for user-declared end token): New
6363 test to check that the default %printer and %destructor are called for
6364 a user-declared end token.
6365 * tests/input.at (Default %printer and %destructor redeclared, Unused
6366 values with default %destructor): New tests to check related grammar
6367 warnings and errors.
6369 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
6371 Clean up handling of %destructor for the end token (token 0).
6372 Discussed starting at
6373 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
6375 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
6377 Make the skeletons consistent in how they pop the end token and invoke
6379 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
6380 state, which has token number 0, since this would invoke the
6381 %destructor for the end token.
6382 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
6383 until after shifting the end token, or else it won't be popped.
6384 * data/yacc.c (yyparse): Likewise.
6386 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
6387 it's the end token. Upon termination, destroy an unshifted lookahead
6388 even when it's the end token.
6389 * data/lalr1.cc (yy::parser::parse): Likewise.
6390 * data/yacc.c (yyparse): Likewise.
6392 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
6393 value warnings for the end token when the user gives the end token a
6396 * tests/actions.at (Printers and Destructors): Test all the above.
6398 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
6400 Update to latest gnulib and gettext versions.
6401 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
6403 (gnulib_files): Add m4/warning.m4. Don't worry about files
6404 overwritten by autopoint.
6405 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
6406 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
6408 Don't use autoreconf; instead, invoke autopoint etc. by hand,
6409 so that we can remove the intl files at a better time.
6410 (intl_files_to_remove): Remove aclocal.m4, since it gets
6411 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
6412 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
6413 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
6414 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
6415 Remove datarootdir hack; no longer needed.
6416 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
6417 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
6418 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
6420 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
6421 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
6423 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
6425 * bootstrap: Adjust to today's change to gnulib-tool by invoking
6426 it with --assume-autoconf='latest-stable'.
6428 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
6430 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
6431 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
6433 * src/muscle_tab.h (muscle_grow): Replace the header comments with
6434 those from muscle_tab.c since the old ones are misleading.
6436 2006-07-13 Akim Demaille <akim@epita.fr>
6438 Support %define "KEY" {VALUE}.
6439 * src/scan-code.h, src/scan-code.l (translate_action)
6440 (translate_rule_action, translate_symbol_action, translate_code):
6441 Return char *, not const char *.
6442 * src/parse-gram.y (declaration): Rename as...
6443 (prologue_declaration): this.
6444 (string_content): Remove this nonterminal, use STRING.
6445 (braceless, content, content.opt): New nonterminal.
6447 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
6449 * src/scan-gram.l (getargs.h): Don't include it.
6451 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
6453 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
6454 rather than a for-loop that declares a local bool variable. This
6455 should work around a compatibility problem with a Cray x1e C++
6456 compiler reported by Hung Nguyen in
6457 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
6458 The for-loop was introduced in the 2004-11-17 change but I don't
6459 know why it was needed.
6461 2006-07-12 Akim Demaille <akim@epita.fr>
6463 * data/c.m4: Comment changes.
6465 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
6467 * src/complain.c (error_message, ERROR_MESSAGE): New.
6469 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
6470 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
6472 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
6474 * NEWS: Instead of %union, you can define and use your own union type
6475 YYSTYPE if your grammar contains at least one <type> tag.
6476 Your YYSTYPE need not be a macro; it can be a typedef.
6477 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
6478 (Union Decl, Decl Summary): Document this.
6479 * data/glr.c (YYSTYPE): Implement this.
6480 * data/glr.cc (YYSTYPE): Likewise.
6481 * data/lalr1.cc (YYSTYPE): Likewise.
6482 * data/yacc.c (YYSTYPE): Likewise.
6483 * src/output.c (prepare): Output tag_seen_flag.
6484 * src/parse-gram.y (declaration, grammar_declaration):
6485 Use 'union_seen' rather than 'typed' to determine whether
6486 %union has been seen, since grammars can now be typed without
6488 (symbol_declaration, type.opt, symbol_def):
6489 Keep track of whether a tag has been seen.
6490 * src/reader.c (union_seen, tag_seen): New vars.
6492 * src/reader.h (union_seen, tag_seen, typed): Likewise.
6493 * src/scan-code.l (untyped_var_seen): New variable.
6494 (handle_action_dollar): Adjust to above changes.
6495 (handle_action_dollar, handle_action_at):
6496 Improve overflow checking for outlandish numbers.
6497 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
6498 avoid new diagnostics generated by above changes.
6499 * tests/regression.at (YYSTYPE typedef): Add test to check
6500 for type tags without %union.
6502 * src/symlist.c (symbol_list_length): Return int, not unsigned
6503 int, since callers expect int. This may need to get revisited
6504 once we have proper integer overflow checking.
6506 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
6507 object is now static.
6509 * src/getargs.c (flags_argmatch): Return void, not int,
6510 to pacify ./configure --enable-gcc-warnings.
6512 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
6513 since last_string is already defined to FLEX_PREFIX (last_string).
6515 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
6517 Implement --warnings/-W.
6518 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
6520 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
6522 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
6523 (warnings_args, warnings_types): New.
6524 (getargs, short_options, long_options): Accept -W/--warnings.
6525 Sort the options by alphabetical order, upper case letter right
6526 before its lower case.
6528 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
6530 Change %merge result type clash warnings to errors. Discussed at
6531 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
6532 * src/reader.c (record_merge_function_type): Use complain_at.
6533 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6534 declared later): Update test case results.
6536 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
6538 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
6539 to be in alphabetical order.
6540 (trace_args): Spelling fixes.
6542 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
6544 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
6545 so they don't collide with user-defined macros.
6546 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
6547 this was never guaranteed, and now that we're using gnulib stdint,
6548 which defines int_fast16_t to long int, the problem is exposed.
6550 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
6552 * data/c.m4 (b4_basename): Simplify a bit, since we don't
6553 need the full POSIX semantics (and weren't implementing them
6556 Adjust to Autoconf 2.60 and today's gnulib.
6557 * bootstrap (gnulib_modules): Add stdint.
6558 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
6559 no longer copies it.
6560 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
6561 since stdint needs the former and wcwidth (which is now required
6562 by mbswidth) needs the latter.
6563 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
6564 work around a compatibility glitch between gettext 0.14.6 and
6566 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
6567 Do not check for uintptr_t, since new stdint module does the right
6569 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
6570 Add stdint.h, stdint_.h, wcwidth.h.
6571 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
6572 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
6573 stdint.m4, wchar_t.m4, wcwidth.m4.
6574 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
6575 usual order for ../lib/*.h files.
6576 (file_name_split): Use last_component, not base_name, to adjust
6578 * src/parse-gram.h: Include <strverscmp.h> in the usual order
6579 for ../lib/*.h files.
6580 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
6581 Define unconditionally, since we now assume the stdint module.
6582 * src/scan-skel.l: Include <dirname.h>.
6583 (BASE_QPUTS): Use last_component, not base_name.
6584 * src/system.h: Include <unlocked-io.h> in the usual order
6585 for ../lib/*.h files. Include <stdint.h> unconditionally,
6586 since we now use the stdint module.
6587 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
6588 HAVE_UINTPTR_T, since we now use the stdint module.
6589 (base_name): Remove decl, since files now include <dirname.h>
6592 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
6594 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
6596 * data/yacc.c, data/glr.c, data/location.cc: Use them.
6597 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
6599 * tests/calc.at: Adjust.
6601 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
6603 * data/c.m4 (b4_basename): New.
6604 (b4_syncline): Also output the location of its invocation (from
6606 (b4_user_action, b4_define_user_action, b4_user_actions)
6607 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
6608 (b4_user_stype): New.
6609 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
6611 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
6613 In the grammar file, the first column is 1 not 0 on the first line as
6614 on every other line.
6615 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
6616 * tests/input.at (Torturing the Scanner): Update output.
6618 * src/scan-gram.l (scanner_cursor): Declare it static.
6620 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
6622 In warnings, say "previous declaration" rather than "first
6624 * src/symtab.c (redeclaration): Do that here.
6625 * src/reader.c (record_merge_function_type): In the case of a result
6626 type clash, report the previous declaration rather than the very first
6627 one in the grammar file.
6628 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6629 declared later): Add a third declaration to check this behavior.
6630 * tests/input.at (Incompatible Aliases): Update output.
6632 2006-06-27 Akim Demaille <akim@epita.fr>
6634 * doc/Doxyfile.in: New.
6635 * doc/Makefile.am: Use it.
6636 * src/lalr.h, src/symtab.h: Initial doxygenation.
6638 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6640 Don't miss %merge result type warnings just because the LHS types are
6641 declared after the %merge. This continues the effort of the previous
6643 * src/reader.c (get_merge_function): Don't set the merger type yet.
6644 (record_merge_function_type): New function for setting the merger type
6645 and checking for clashes.
6646 (grammar_current_rule_merge_set): Set the location of the %merge for
6648 (packgram): Invoke record_merge_function_type for each rule now that
6649 all symbol type declarations have been parsed.
6650 * src/reader.h (merger_list.type_declaration_location): New member
6651 storing the location of the first %merge from which the type for this
6652 merging function was derived.
6653 * src/symlist.h (symbol_list.merger_declaration_location): New member
6654 storing the location of a rule's %merge, if any.
6655 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6656 declared later): New test to catch the error fixed by the above patch.
6658 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6660 Get action warnings (grammar_rule_check) right even when symbol
6661 declarations appear after the rules. Discussed at
6662 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
6664 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
6665 Don't mistake the type of $$ in a midrule to be that of its parent
6667 * src/reader.c (grammar_current_rule_end): Don't invoke
6668 grammar_rule_check yet since not all symbol declarations may have been
6670 (grammar_midrule_action): Likewise.
6671 Don't record whether the midrule's $$ has been used yet since actions
6672 haven't been translated yet.
6673 Record the midrule's parent rule and its RHS index within the parent
6675 (grammar_current_rule_action_append): Don't translate the action yet
6676 since not all symbol declarations may have been parsed yet and, thus,
6677 warnings about types for $$, $n, @$, and @n can't be reported yet.
6678 (packgram): Translate the action and invoke grammar_rule_check now that
6679 all symbol declarations have been parsed.
6680 * src/scan-code.l (handle_action_dollar): Now that this is invoked
6681 after parsing the entire grammar file, the symbol list here in the case
6682 of a midrule is actually the midrule's empty RHS, so reference its
6683 parent rule's RHS where necessary.
6684 On the other hand, now that you can already know it's a midrule, you
6685 aren't forced to think $$ has the same type as its parent rule's $$.
6686 (handle_action_at): In the case of a midrule, reference the parent rule
6688 * src/symlist.c (symbol_list_new): Initialize new midrule-related
6690 (symbol_list_length): Now that this is invoked after all rules have
6691 been parsed, a NULL symbol (rather than a NULL symbol list node)
6692 terminates a rule. symbol_list_print already does this correctly.
6693 * src/symlist.h (symbol_list.midrule_parent_rule,
6694 symbol_list.midrule_parent_rhs_index): New members so that midrules can
6695 remember their relationships with their parents.
6696 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
6697 fixed by the above patch.
6698 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
6700 (Unused values): ... this old test case and...
6701 (Unused values before symbol declarations): ... this new test case.
6702 This one is the same as `Unused values' except that all symbol
6703 declarations appear after the rules in order to catch the rest of the
6704 errors fixed by the above patch.
6706 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6709 * src/reader.c (current_rule): Declare it static since it's no longer
6710 used outside this file.
6711 (grammar_current_rule_action_append): Remove redundant arguments from
6712 translate_rule_action invocation.
6713 * src/reader.h (current_rule): Remove this unused extern.
6714 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
6715 * src/scan-code.l (translate_rule_action): Likewise.
6717 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
6719 Clean up yesterday's patch.
6720 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
6722 * src/reader.c (grammar_current_rule_action_append): ... here for
6723 consistency with grammar_current_rule_symbol_append.
6724 * tests/regression.at (Braced code in declaration in rules section):
6725 Make yyerror and yylex static as usual.
6727 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
6729 Fix bug that mistakes braced code in a declaration in the rules section
6730 to be a rule action. Mentioned at
6731 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
6732 * src/scan-gram.l: Move midrule action detection from the start of the
6733 scanning of any braced code to...
6734 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
6735 action. For readability, use $2 and @2 rather than the equivalent
6737 * tests/regression.at (Braced code in declaration in rules section):
6738 New test to catch the error fixed by the above patch.
6740 Work on code readability some.
6741 * src/scan-code.l (current_rule): Get rid of this misleading and
6742 redundant declaration: it's actually extern'ed in reader.h.
6743 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
6744 translate_action): Add a rule argument and use it instead of the global
6746 (translate_rule_action): This already receives current_rule through an
6747 argument, so pass it on to translate_action instead of assigning
6748 current_rule to current_rule.
6749 (translate_symbol_action, translate_code): Pass rule = NULL to
6752 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
6754 Rename %before-definitions to %start-header and %after-definitions to
6755 %end-header. Don't use these declarations to separate pre-prologue
6756 blocks from post-prologue blocks. Add new order-independent
6757 declarations %before-header and %after-header as alternatives to the
6758 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
6759 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
6760 * NEWS (2.3+): Update for these changes.
6761 * data/glr.c (b4_before_definitions): Update to...
6762 (b4_start_header): ... this.
6763 (b4_after_definitions): Update to...
6764 (b4_end_header): ... this.
6765 * data/glr.cc: Likewise.
6766 * data/lalr1.cc: Likewise.
6767 * data/yacc.c: Likewise.
6768 * doc/bison.texinfo (The prologue): Update names, and replace remaining
6769 prologue blocks with %*-header declarations.
6770 (Calc++ Parser): Likewise.
6771 (Decl Summary): Update names.
6772 (Table of Symbols): Update description.
6773 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
6774 (PERCENT_END_HEADER): ... this.
6775 (PERCENT_BEFORE_DEFINITIONS): Update to...
6776 (PERCENT_START_HEADER): ... this.
6777 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
6778 (declaration): Update token names and m4 macro names.
6779 When parsing %end-header and %start-header, invoke translate_code
6780 before muscle_code_grow, and no longer set global booleans to remember
6781 whether these declarations have been seen.
6782 Parse new %after-header and %before-header.
6783 * src/reader.c (before_definitions, after_definitions): Remove.
6784 (prologue_augment): Accept a new bool argument to specify whether to
6785 augment the pre-prologue or post-prologue.
6786 * src/reader.h (before_definitions, after_definitions): Remove these
6788 (prologue_augment): Add new bool argument.
6789 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
6790 (PERCENT_END_HEADER): ... this.
6791 (PERCENT_BEFORE_DEFINITIONS): Update to...
6792 (PERCENT_START_HEADER): ... this.
6793 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
6794 * tests/actions.at (Printers and Destructors): Update names.
6796 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
6798 Add comparison operators for C++ location classes. Discussed at
6799 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
6800 * data/c++.m4 (b4_define_location_comparison): New boolean %define
6801 declaration indicating whether filename_type has an operator==. If
6802 filename_type is `std::string', it defaults to `1', `0' otherwise.
6803 * data/location.cc: Iff b4_define_location_comparison is `1', add
6804 operator== and operator!= for class position and for class location.
6807 * src/scan-action.l: Remove unused file.
6808 * src/symtab.c (symbol_printer_set): Use printer_location not
6809 destructor_location.
6810 * src/symtab.h (struct symbol): Replace incorrect source comment for
6812 * tests/input.at (Incompatible Aliases): Update output with correct
6815 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
6817 Don't put the pre-prologue in the header file. For the yacc.c code
6818 file and the glr.c header and code files, move the pre-prologue before
6819 the token definitions. Add new %before-definitions and
6820 %after-definitions to declare code that will go in both the header file
6821 and code file. Discussed at
6822 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
6823 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
6825 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
6826 * NEWS (2.3+): Describe these changes.
6827 * data/glr.c (b4_pre_prologue): Move from within to before...
6828 (b4_shared_declarations): ... this.
6829 Add new b4_before_definitions before b4_token_enums.
6830 Add new b4_after_definitions at the end.
6831 * data/glr.cc (b4_pre_prologue): Replace with...
6832 (b4_before_definitions): ... this in the header file.
6833 (b4_after_definitions): New near the end of the header file.
6834 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
6835 code file right before including the header file.
6836 (b4_before_definitions): New in the previous position of
6837 b4_pre_prologue in the header file.
6838 (b4_after_definitions): New near the end of the header file.
6839 * data/yacc.c: Clean up some m4 quoting especially in the header file.
6840 (b4_token_enums_defines): In the code file, move to right before
6841 YYSTYPE for consistency with the header file.
6842 (b4_before_definitions): New right before b4_token_enums_defines in
6843 both the header and code file.
6844 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
6845 header and code file.
6846 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
6847 of prologues for %union dependencies.
6848 (Decl Summary): In %defines description, mention the effect of
6849 %before-definitions and %after-definitions on the header file.
6850 (Calc++ Parser): Forward declare driver in a %before-definitions rather
6851 than in the pre-prologue so that make check succeeds.
6852 (Table of Symbols): Add entries for %before-definitions and
6854 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
6855 %before-definitions.
6856 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
6857 (declaration): Parse those declarations and append to
6858 b4_before_definitions and b4_after_definitions, respectively.
6859 * src/reader.c (before_definitions, after_definitions): New bools to
6860 track whether those declarations have been seen.
6861 (prologue_augment): Add to the post-prologue if %union,
6862 %before-definitions, or %after-definitions has been seen.
6863 * src/reader.h (before_definitions, after_definitions): New extern's.
6864 * src/scan-gram.l: Scan the new declarations.
6865 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
6866 prologue block in a %before-definitions or a %after-definitions based
6867 on whether the %union is declared.
6868 * tests/regression.at (Early token definitions with --yacc, Early token
6869 definitions without --yacc): Move tests for token definitions into the
6870 post-prologue since token names are no longer defined in the
6873 2006-06-20 Akim Demaille <akim@epita.fr>
6875 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
6876 (symbol_get): Use it.
6877 * src/parse-gram.y: Use it.
6879 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
6881 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
6882 build succeeds when configured with --enable-gcc-warnings.
6884 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
6886 * src/parse-gram.y (char_name): New function.
6887 (CHAR, STRING, string_content): For %printer, properly escape.
6888 (ID): Prefer fputs to fprintf.
6889 (id): Reindent to be consistent with other rules.
6890 Properly quote char.
6892 The Translation Project changed its way of publishing translations
6893 to maintainers. I haven't received any responses to my request
6894 for supporting the old way, or for documenting the new way. I
6895 have modified 'bootstrap' to use screen scraping
6896 (in this case, HTML scraping). This is unreliable and inelegant,
6897 but I don't see any better way. Yuck.
6898 * bootstrap (TP_URL, WGET_COMMAND): New vars.
6899 (get_translations): New function, which uses HTML scraping to
6900 deduce locations of latest translations.
6901 Use this function to grab both bison and bison-runtime .po files.
6902 Don't bother priming the pump for the runtime-po domain any more,
6903 as it's now translated better than bison is.
6905 2006-06-19 Akim Demaille <akim@epita.fr>
6907 * src/scan-gram.l: No longer "parse" things after `%union' until
6908 `{'. Rather, return a single "%union" token.
6909 No longer make symbols: return strings, and leave the conversion
6910 to symbols to the parser.
6911 (SC_PRE_CODE, token_type): Remove.
6912 * src/parse-gram.y (%union): New field `character'.
6915 (ID, ID_COLON): Now that the scanner no longer makes them
6916 identifiers, adjust all uses to invoke symbol_get.
6917 (id_colon): New, wraps the conversion from string to symbol.
6918 (%union): Accept a possible union_name.
6919 (symbol): Now can be a char.
6920 * data/c.m4 (b4_union_name): Leave a default value.
6921 * data/glr.c, data/yacc.c: Use it.
6923 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
6925 For associating token numbers with token names for "yacc.c", don't use
6926 #define statements unless `--yacc' is specified; always use enum
6927 yytokentype. Most important discussions start at:
6928 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
6929 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
6931 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
6932 * NEWS (2.3+): Mention.
6933 * data/c.m4 (b4_yacc_if): New.
6934 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
6936 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
6937 on token name definitions.
6938 * src/getargs.c (usage): Capitalize `Yacc' in English.
6939 * src/output.c (prepare): Define b4_yacc_flag.
6940 * tests/regression.at (Early token definitions): Test that tokens names
6941 are defined before the pre-prologue not just before the post-prologue.
6942 Remove this test case and copy to...
6943 (Early token definitions with --yacc): ... this to test #define's.
6944 (Early token definitions without --yacc): ... and this to test enums.
6946 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
6948 * NEWS: Reword the post-2.3 change to not be so optimistic about
6949 removing the old "look-ahead" spelling.
6950 Update previous look-ahead/lookahead change reports.
6951 * REFERENCES: look-ahead -> lookahead (since that's
6952 what he actually wrote).
6953 * doc/refcard.tex: look ahead -> lookahead,
6954 look-ahead -> lookahead
6956 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
6958 For consistency, use `lookahead' instead of `look-ahead' or
6959 `look_ahead'. Discussed starting at
6960 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
6962 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
6963 * NEWS: For the next release, note the change to `--report'.
6964 * TODO, doc/bison.1: Update English.
6965 * doc/bison.texinfo: Update English.
6966 (Understanding Your Parser, Bison Options): Document as
6967 `--report=lookahead' rather than `--report=look-ahead'.
6968 * src/conflicts.c: Update English in comments.
6969 (lookahead_set): Rename from look_ahead_set.
6970 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
6971 (resolve_sr_conflict): Rename local look_ahead_tokens to
6972 lookahead_tokens, and update other uses.
6973 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
6974 count_rr_conflicts, conflicts_free): Update uses.
6975 * src/getargs.c (report_args): Move "lookahead" before alternate
6977 (report_types): Update uses.
6978 (usage): For `--report' usage description, state `lookahead' spelling
6979 rather than `look-ahead'.
6980 * src/getargs.h (report.report_lookahead_tokens): Rename from
6981 report_look_ahead_tokens.
6982 * src/lalr.c: Update English in comments.
6983 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
6984 (state_lookahead_tokens_count): Rename from
6985 state_look_ahead_tokens_count.
6986 Rename local n_look_ahead_tokens to n_lookahead_tokens.
6987 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
6988 Rename local n_look_ahead_tokens to n_lookahead_tokens.
6990 Update English in output.
6991 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
6992 * src/print.c: Update English in comments.
6993 (lookahead_set): Rename from look_ahead_set.
6994 (print_reduction): Rename argument lookahead_token from
6996 (print_core, state_default_rule, print_reductions, print_results):
6998 * src/print_graph.c: Update English in comments.
6999 (print_core): Update uses.
7000 * src/state.c: Update English in comments.
7001 (reductions_new): Update uses.
7002 (state_rule_lookahead_tokens_print): Rename from
7003 state_rule_look_ahead_tokens_print, and update other uses.
7004 * src/state.h: Update English in comments.
7005 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
7006 (state_rule_lookahead_tokens_print): Rename from
7007 state_rule_look_ahead_tokens_print.
7008 * src/tables.c: Update English in comments.
7009 (conflict_row, action_row): Update uses.
7010 * tests/glr-regression.at
7011 (Incorrect lookahead during deterministic GLR,
7012 Incorrect lookahead during nondeterministic GLR): Rename
7013 print_look_ahead to print_lookahead.
7014 * tests/torture.at: Update English in comments.
7015 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
7016 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
7017 (Many lookahead tokens): Update uses.
7018 * data/glr.c: Update English in comments.
7019 * lalr1.cc: Likewise.
7021 * src/conflicts.h: Likewise.
7022 * src/lalr.h: Likewise.
7023 * src/main.c: Likewise.
7024 * src/output.c: Likewise.
7025 * src/parse-gram.c: Likewise.
7026 * src/tables.h: Likewise.
7027 * tests/calc.at: Likewise.
7029 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
7031 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
7033 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
7035 * TODO: Add request from Nelson H. F. Beebe to be able to install
7036 Bison without installing the yacc script.
7038 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
7040 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
7041 and yytext if they're already #define'd.
7042 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
7043 * src/scan-code-c.c: ... here.
7044 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
7047 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
7049 Get Bison to build again when configured with --enable-gcc-warnings.
7050 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
7052 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
7053 loc argument as it shadows a global.
7054 * src/scan-gram.l: Remove stray comma that prevents boundary_set
7057 * src/.cvsignore: Add scan-code.c.
7059 2006-06-07 Akim Demaille <akim@epita.fr>
7061 * src/scan-gram.l: Move the "add a trailing ; to actions" code
7063 * src/scan-code.l: here.
7064 * tests/input.at (Torturing the Scanner): Fix another location
7067 2006-06-07 Akim Demaille <akim@epita.fr>
7069 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
7071 2006-06-06 Akim Demaille <akim@epita.fr>
7073 Extract the parsing of user actions from the grammar scanner.
7074 As a consequence, the relation between the grammar scanner and
7075 parser is much simpler. We can also split "composite tokens" back
7077 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
7078 * src/scan-gram.l (add_column_width, adjust_location): Move to and
7080 * src/location.h, src/location.c (add_column_width)
7081 (location_compute): these.
7082 Fix the column count: the initial column is 0.
7083 (location_print): Be robust to ending column being 0.
7084 * src/location.h (boundary_set): New.
7085 * src/main.c: Adjust to scanner_free being renamed as
7087 * src/output.c: Include scan-code.h.
7088 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
7090 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
7091 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
7092 which is now, again, a separate token.
7093 Adjust all dependencies.
7094 Whereever actions with $ and @ are used, use translate_code.
7095 (action): Remove this nonterminal which is now useless.
7096 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
7097 (grammar_current_rule_action_append): Use translate_code.
7098 (packgram): Bound check ruleno, itemno, and rule_length.
7099 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
7100 (last_string, last_braced_code_loc, max_left_semantic_context)
7101 (scanner_initialize, scanner_free, scanner_last_string_free)
7102 (gram_out, gram_lineno, YY_DECL_): Move to...
7103 * src/scan-gram.h: this new file.
7104 (YY_DECL): Rename as...
7106 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
7107 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
7108 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
7109 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
7110 Move these declarations, and...
7111 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
7113 * src/flex-scanner.h: this new file.
7114 * src/scan-gram.l (rule_length, rule_length_overflow)
7115 (increment_rule_length): Remove.
7116 (last_braced_code_loc): Rename as...
7117 (gram_last_braced_code_loc): this.
7118 Adjust to the changes of the parser.
7119 Move all the handling of $ and @ into...
7120 * src/scan-code.l: here.
7121 * src/scan-gram.l (handle_dollar, handle_at): Remove.
7122 (handle_action_dollar, handle_action_at): Move to...
7123 * src/scan-code.l: here.
7124 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
7125 scan-code.h, scan-code-c.c, scan-gram.h.
7126 (EXTRA_bison_SOURCES): Add scan-code.l.
7127 (BUILT_SOURCES): Add scan-code.c.
7128 (yacc): Be robust to white spaces.
7130 * tests/conflicts.at, tests/input.at, tests/reduce.at,
7131 * tests/regression.at: Adjust the column numbers.
7132 * tests/regression.at: Adjust the error message.
7134 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
7136 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
7137 Use Akim's wording from
7138 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
7140 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
7142 Between Bison releases, manually append `+' to the previous Bison
7143 release number, and use that as a signal to automatically print the
7144 ChangeLog's CVS Id keyword from --version. Discussed starting at
7145 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
7146 * ChangeLog: Add Id header.
7147 * configure.ac (AC_INIT): Append `+' to `2.3'.
7148 * src/.cvsignore: Add revision.c.
7149 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
7150 (BUILT_SOURCES): Add revision.c.
7151 (revision.c): New target rule. This file defines a new global variable
7152 named revision. It initializes it with either the Id from ChangeLog
7153 or, if VERSION doesn't contain `+', with the empty string.
7154 * src/getargs.c (version): Print the value of revision.
7155 * src/revision.h: Extern revision.
7157 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
7159 * NEWS: Version 2.3.
7160 * configure.ac (AC_INIT): Likewise.
7162 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
7164 * data/glr.c (YYRECOVERING): Define to be a function-like macro
7165 with no arguments, not as an object-like macro. This is for
7166 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
7167 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
7168 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
7171 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
7173 * src/getargs.c (usage): Back out yesterday's modification of the
7174 --help output so that we don't have to wait for translation before
7177 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
7179 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
7180 Problem reported by Akim Demaille.
7182 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
7184 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
7186 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
7188 * data/yacc.c (yy_reduce_print): Omit trailing white space in
7189 generated source code. Problem reported by Frans Englich in
7190 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
7192 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
7194 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
7195 shell, not within 'make', so that 'make' by an ordinary builder
7196 (using GNU make) does not worry about configuring gzip. This also
7197 works around a bug reported independently by Keith Thompson and by
7198 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
7199 stderr rather than stdout, messing up the build logs.
7201 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
7203 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
7204 to make sure that YYID will never be unused. This fixes a 'make
7205 maintainer-check' failure caused by the recent changes to the 'Trivial
7206 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
7208 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
7210 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
7212 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
7213 state before an empty RHS is always resolved here. Only the location
7214 of that state is guaranteed to be resolved, and that's enough. This
7215 fixes the remaining bug reported by Derek M. Jones in
7216 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
7217 * tests/glr-regression.at (Uninitialized location when reporting
7218 ambiguity): Test the above case.
7219 Also, the embedded comments in this test case claim it checks the case
7220 of an empty RHS that has inherited the initial location. However, the
7221 corresponding LHS was already resolved, so yyresolveLocations didn't
7222 actually have reason to modify it. Fix this by forcing
7223 nondeterministic operation at the beginning of the parse.
7225 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
7227 * data/c.m4 (b4_yy_symbol_print_generate):
7228 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
7229 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
7230 of the bugs reported today by Derek M Jones in
7231 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
7232 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
7233 defined to be a type name without parens or brackets.
7234 (Location Type): Similarly for YYLTYPE.
7235 * tests/regression.at (Trivial grammars): Put in a test for this
7236 bug that will be caught by 'make maintainer-check' (though not,
7237 alas, by 'make check' unless your compiler is picky).
7239 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
7241 * NEWS: Version 2.2.
7242 * configure.ac (AC_INIT): Likewise.
7244 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
7246 * data/glr.c (yyreportTree): Make room in yystates for the state
7247 preceding the RHS. This fixes the segmentation fault reported by Derek
7249 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
7250 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
7251 to the user. Reported for yyreportTree by Derek M. Jones later in the
7253 * THANKS: Add Derek M. Jones.
7254 Update my email address.
7255 Fix typo in Steve Murphy's name.
7257 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
7259 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
7260 checking against YYLAST that caused the parser to miss a potential
7261 alternative in its diagnostic.
7262 Problem reported by Maria Jose Moron Fernandez in
7263 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
7264 * data/lalr1.cc (yysyntax_error_): Likewise.
7265 * data/yacc.c (yysyntax_error): Likewise.
7266 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
7267 tokens, in case we run into an older C compiler.
7268 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
7269 Use them to check for the off-by-one error fixed above.
7271 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
7272 YYSIZE_T, not size_t.
7273 * tests/regression.at (Trivial grammars): New test, to catch
7274 the error fixed by the above patch.
7276 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7278 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
7280 Reported by Steve Murphy.
7282 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7284 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
7285 * data/glr.cc: b4_location_flag is now b4_locations_flag.
7287 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7289 Implement --trace=m4.
7290 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
7291 * src/output.c (output_skeleton): When set, pass -dV to m4.
7293 Factor the handling of flags in m4.
7294 * src/output.c (prepare): Rename the muscle names debug, defines,
7295 error_verbose to debug_flag, defines_flag, error_verbose_flag.
7296 * data/c.m4: Adjust.
7297 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
7298 Use b4_define_flag_if to define other b4_FLAG_if macros.
7299 (b4_location_if): As a consequence, rename as...
7300 (b4_locations_if): this, for consistency.
7301 Adjust all the skeletons.
7303 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7305 * etc/bench.pm: Shorten bench names.
7307 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7309 * src/output.h, src/output.c (error_verbose): Move to...
7310 * src/getargs.h, src/getargs.c: here.
7312 Adjust dependencies.
7314 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
7316 * data/c.m4 (b4_copyright): Put the special exception for Bison
7317 skeletons here, so we don't have to put it in each skeleton. All
7318 uses changed. Suggested by Akim Demaille. Also, wrap the
7319 copyright notice, in case it is longer than 80 columns. Replace
7320 comma by newline after title.
7322 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
7324 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
7325 incompatibility, not a bug. Mention that it wasn't fixed as of
7328 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
7330 * examples/extexi: Enforce the precedence of concatenation over
7332 Reported by Tommy Nordgren.
7334 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
7336 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
7337 with the member "token".
7338 Reported by Martin Nylin.
7340 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
7342 * data/glr.c: Switch to Bison 2.2 special-exception language in
7343 the copyright notice. Use more-regular format for titles and
7345 * data/glr.cc: Likewise.
7346 * data/location.cc: Likewise.
7347 * data/yacc.cc: Likewise.
7348 * doc/bison.texinfo (Conditions): Document this.
7349 * NEWS: likewise. Upgrade version to 2.2.
7351 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
7353 * data/glr.cc: Remove dead code.
7355 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
7357 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
7358 that variable and the line breaks the bootstrap. Problem reported
7359 by Juan M. Guerrero.
7361 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
7363 * doc/bison.texinfo (Multiple start-symbols): New.
7365 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
7367 * etc/README, etc/bench.pl: New.
7369 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
7371 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
7373 Reported by Mickael Labau.
7374 * tests/input.at (Torturing the Scanner): Test it.
7376 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
7378 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
7379 Problem reported by Bob Rossi.
7381 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
7383 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
7384 and didn't really work.
7385 For the index, use @ifnotinfo, not @iftex.
7386 Minor cleanups of spacing and terminology.
7388 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
7390 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
7391 of AT_NAME_PREFIX when %name-prefix is not used.
7393 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
7395 Apply --prefix to C++ skeletons too: they change the namespace.
7396 The test suite already exercize these cases.
7397 * data/c++.m4 (b4_namespace): New.
7398 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
7399 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
7400 * data/yacc.c, data/glr.c: Remove a useless `[]'.
7401 * doc/bison.texinfo: Document it.
7402 (Option Cross Key): Use @multitable in all formats. It looks
7403 nicer, even in TeX outputs.
7404 (Rules): Use the same code whatever the output type is.
7405 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
7406 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
7407 * tests/calc.at: Use it, instead of hard coding `yy'.
7409 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
7411 * TODO: Remove dead items.
7413 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
7415 * doc/FAQ: Remove, merged into...
7416 * doc/bison.texinfo (FAQ): this.
7417 * doc/Makefile.am (EXTRA_DIST): Adjust.
7419 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
7421 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
7423 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
7424 * doc/bison.texinfo (Calc++ Scanner): Use it.
7426 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
7428 Fix two nits reported by twlevo, plus one more that I discovered.
7430 * src/assoc.h (assoc_to_string): Give a name to the arg, as
7431 this is the usual Bison style.
7432 * src/location.h (location_print): Likewise.
7434 * src/reader.h (token_name): Likewise.
7436 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
7438 Fix some nits reported by twlevo.
7439 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
7440 and "POSIX". Use more-modern syntax for URLs. Mention C++
7441 and ask for Java. Don't hardwire OS version numbers. Add
7443 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
7444 * src/conflicts.c (solved_conflicts_obstack): Now static.
7446 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
7448 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
7449 page. Say "you can use it" not "you may use it" as on the web page;
7450 we're describing capabilities not granting permission.
7452 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
7454 * data/glr.c (yyresolveLocations): Rename local variables to avoid
7455 shadowing warnings. Use usual patter for iterating through RHS.
7456 * tests/glr-regression.at
7457 (Uninitialized location when reporting ambiguity):
7458 Modify yylex so that it uses its argument, rather than trying
7459 to rely on ARGSUSED (which doesn't work for gcc with warnings).
7460 const char -> char const.
7462 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
7463 Don't use tabs inside commands; it messes up 'ps'.
7464 Problem reported by twlevo.
7466 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
7468 * tests/glr-regression.at (Uninitialized location when reporting
7469 ambiguity): New test case.
7470 * data/glr.c (yyresolveLocations): New function, which uses
7472 (yyresolveValue): Invoke yyresolveLocations before reporting an
7474 * doc/bison.texinfo (Default Action for Locations): Note
7475 YYLLOC_DEFAULT's usage for ambiguity locations.
7476 (GLR Semantic Actions): Cross-reference those notes.
7478 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
7480 * tests/glr-regression.at (Leaked semantic values when reporting
7481 ambiguity): Remove unnecessary union and type declarations.
7482 (Leaked lookahead after nondeterministic parse syntax error): New test
7484 * data/glr.c (yyparse): Check for zero stacks remaining before
7485 attempting to shift the lookahead so that you don't lose it.
7487 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
7489 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
7490 * tests/glr-regression.at (Leaked semantic values when reporting
7491 ambiguity): New test case.
7492 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
7493 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
7494 now unnecessary yystackp parameter.
7495 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
7496 destructors can be called.
7498 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
7499 in existing testcases.
7501 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
7503 Don't leak semantic values for parent RHS when a user action cuts the
7504 parser, and clean up related code a bit.
7505 * tests/glr-regression.at (Leaked merged semantic value if user action
7506 cuts parse): Rename to...
7507 (Leaked semantic values if user action cuts parse): ... this. Add check
7508 for leaked parent RHS values.
7509 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
7510 between an unresolved state (non-empty chain of semantic options) and
7511 an incomplete one (signaled by an empty chain).
7512 (yyresolveStates): Document the interface. Move all manipulation of a
7513 successfully or unsuccessfully resolved yyGLRState to...
7514 (yyresolveValue): ... here so that yyresolveValue always leaves a
7515 yyGLRState with consistent data and thus is easier to understand.
7516 Remove the yyvalp and yylocp parameters since they are always just
7517 taken from the yys parameter. When reporting a discarded merged value
7518 in debugging output, note that it is incompletely merged. Document the
7520 (yyresolveAction): If resolving any of the RHS states fails, destroy
7521 them all rather than leaking them. Thus, as long as user actions are
7522 written to clean up the RHS correctly, yyresolveAction always cleans up
7523 the RHS of a semantic option. Document the interface.
7525 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
7527 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
7528 led to a segmentation fault in GNU Pascal. Problem reported
7531 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
7533 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
7534 mid-rule action inside a nonterminal symbol in order to declare a
7535 destructor for its semantic value.
7537 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
7539 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
7540 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
7541 __cplusplus && ! defined _STDLIB_H && !
7542 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
7543 defined free))]: Include <stdlib.h> rather than rolling our own
7544 declarations of malloc and free, to avoid problems with
7545 incompatible declarations (using 'throw') C++'s stdlib.h. This
7546 should fix Debian bug 340012
7547 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
7548 reported by Guillaume Melquiond.
7550 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
7552 * NEWS: Clarify symbols versus types in unused-value warnings.
7554 * configure.ac (AC_INIT): Bump version number.
7556 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
7558 * NEWS: Version 2.1a.
7559 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
7560 since C99 requires this.
7562 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
7564 * m4/c-working.m4: New file.
7565 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
7567 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
7569 * Makefile.maint: Merge from coreutils.
7571 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
7573 More portability fixes for problems summarized by Nelson H. F. Beebe.
7575 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
7576 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
7577 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
7578 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
7579 messes up because C++ code is compiled in 32-bit mode but linked
7582 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
7584 More portability fixes for problems summarized by Nelson H. F. Beebe.
7586 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
7587 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
7589 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
7590 nodist_PROGRAMS, since we don't need to actually compile the
7591 example if we're just doing a plain 'make'. This avoids bothering
7592 the installer unnecessarily about problems due to weird C++
7595 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
7597 More portability fixes for problems summarized by Nelson H. F. Beebe.
7599 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
7600 than #include "...", and compile with -I'.'. The old method was
7601 not portable, according to Posix and the C standard, and it does
7602 not work with Sun C 5.7, where previous #line directives affect
7603 the working directory used in later #include "..." directives.
7605 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7607 Various DJGGP specific issues in /djgpp
7609 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
7611 More portability fixes for problems summarized by Nelson H. F. Beebe.
7613 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
7614 '#include <map>' works and that you can apply ++ to iterators.
7616 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
7618 Work around portability problems summarized by Nelson H. F. Beebe in
7619 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
7621 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
7622 that '#include <string>' works.
7624 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
7625 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
7626 "warning: sorry: semantics of inline function static data `const
7627 unsigned char translate_table[262]' are wrong (you'll wind up with
7630 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
7631 or, xor to not_, and_, or_, and xor_, respectively. This works
7632 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
7633 random system header somewhere that includes the equivalent of
7636 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
7637 -E" works; it apparently doesn't work with PathScale EKO Compiler
7640 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
7642 During deterministic GLR operation, user actions should be able to
7643 influence the parse by changing yychar. To make this easier to fix and
7644 to make glr.c easier to evolve in general, don't maintain yytoken in
7645 parallel with yychar; just compute yytoken when needed.
7646 * tests/glr-regression.at (Incorrect lookahead during deterministic
7647 GLR): Check that setting yychar in a user action has the intended
7649 * data/glr.c (yyGLRStack): Remove yytokenp member.
7650 (yyclearin): Don't set *yytokenp.
7651 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
7652 yychar rather than *yytokenp to determine the current lookahead.
7653 Compute yytoken locally when needed.
7654 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
7657 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
7658 after `--report' documentation.
7660 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
7662 * src/parse-gram.y (grammar_declaration): Location of printer
7663 symbol is @1, not list->location. Bug reported by twlevo.
7664 * tests/input.at (Incompatible Aliases): Adjust to above change.
7666 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
7668 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
7669 all the test at once. This makes the output easier to read in the
7672 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
7673 got from <http://bro-ids.org/download.html>. The bug is that
7674 when two actions appeared in succession, the second one was
7675 scanned before the first one was added to the grammar rule
7676 as a midrule action. Bison then output the incorrect warning
7677 "parse.y:905.17-906.36: warning: unused value: $3".
7678 * src/parse-gram.y (BRACED_CODE, action): These are no longer
7679 associated with a value.
7680 (rhs): Don't invoke grammar_current_rule_action_append.
7681 (action): Invoke it here instead.
7682 * src/reader.c (grammar_midrule_action): Now extern.
7683 (grammar_current_rule_action_append): Don't invoke
7684 grammar_midrule_action; that is now the scanner's job.
7685 * src/reader.h (last_string, last_braced_code_loc):
7686 (grammar_midrule_action): New decls.
7687 * src/scan-gram.l (last_string): Now extern, sigh.
7688 (last_braced_code_loc): New extern variable.
7689 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
7690 rule already has an action.
7691 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
7692 * tests/input.at (AT_CHECK_UNUSED_VALUES):
7693 Add some tests to check that the above changes fixed the bug.
7695 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
7697 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
7698 All used changed. Check whether the symbol has a destructor,
7699 not whether it is typed.
7700 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
7701 that the values are still reported as unused. All line numbers
7704 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
7706 Work around a bug in bro 0.8, which underparenthesizes its
7707 definition of YYLLOC_DEFAULT.
7708 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
7710 * data/lalr1.cc: Likewise.
7711 * data/yacc.cc: Likewise.
7713 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
7715 Work around a bug in Pike 7.0, and give the Pike folks a
7716 better way to override the usual int widths.
7717 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
7718 user can override the types.
7719 (short): #undef, to work around a bug in Pike 7.0.
7720 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
7721 (union yyalloc.yyss): Use yytype_int16 rather than short.
7723 (yysigned_char): Remove.
7724 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
7725 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
7726 * tests/regression.at (Web2c Actions): Adjust to above changes.
7728 * src/reader.c (check_and_convert_grammar): New function.
7729 (reader): Close the input file even if something went wrong during
7730 parsing. Minor file descriptor leak reported by twlevo.
7732 * src/assoc.c (assoc_to_string): Use a default: abort (); case
7733 to pacify gcc -Wswitch-default.
7734 * src/scan-gram.l (adjust_location): Use a default: break; case
7735 to pacify gcc -Wswitch-default.
7736 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
7737 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
7738 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
7739 Move these decls to scan-skel.l, since they don't need to be
7741 * src/scan-skel.l: Accept the above decls.
7742 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
7745 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
7747 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
7748 since we don't want to insist on a version number at the start
7749 of the changelog every time.
7750 * Makefile.maint: Sync from coreutils a bit better.
7751 (sc_trailing_blank): Renamed from sc_trailing_space.
7753 (sc_no_if_have_config_h, sc_require_config_h):
7754 (sc_prohibit_assert_without_use): New rules.
7755 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
7756 (sc_dd_max_sym_length): Fix leading spaces in rule.
7757 (sc_system_h_headers): Prefix with @.
7758 (sc_useless_cpp_parens, m4-check): Output line numbers.
7759 (changelog-check): Allow version only in head.
7760 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
7761 satisfy new Makefile.maint rule.
7762 * data/glr.c: Likewise.
7763 * data/glr.cc: Likewise.
7764 * data/lalr1.cc: Likewise.
7765 * data/yacc.c: Likewise.
7766 * lib/ebitsetv.c: Likewise.
7767 * lib/lbitset.c: Likewise.
7768 * lib/subpipe.c: Likewise.
7769 * lib/timevar.c: Likewise.
7770 * src/system.h: Likewise.
7771 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
7772 * djgpp/Makefile.maint: Add copyright notice.
7773 * djgpp/README.in: Likewise.
7774 * djgpp/config.bat: Likewise.
7775 * djgpp/config.site: Likewise.
7776 * djgpp/config_h.sed: Likewise.
7777 * djgpp/djunpack.bat: Likewise.
7778 * djgpp/config.sed: Fix copyright notice to match standard format.
7779 * djgpp/subpipe.h: Likewise.
7780 * lib/bitsetv-print.c: Likewise.
7781 * lib/bitsetv.c: Likewise.
7782 * lib/subpipe.h: Likewise.
7783 * lib/timevar.c: Likewise.
7784 * lib/timevar.h: Likewise.
7785 * djgpp/subpipe.c: Use standard recipe for config.h.
7786 * lib/abitset.c: Likewise.
7787 * lib/bitset.c: Likewise.
7788 * lib/bitset_stats.c: Likewise.
7789 * lib/bitsetv-print.c: Likewise.
7790 * lib/bitsetv.c: Likewise.
7791 * lib/ebitsetv.c: Likewise.
7792 * lib/get-errno.c: Likewise.
7793 * lib/lbitset.c: Likewise.
7794 * lib/subpipe.c: Likewise.
7795 * lib/timevar.c: Likewise.
7796 * lib/vbitset.c: Likewise.
7797 * tests/local.at: Likewise.
7798 * src/scan-gram.l: Don't include verify.h, since system.h does
7800 * .x-sc_require_config_h: New file.
7801 * .x-sc_unmarked_diagnostics: New file.
7803 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
7805 Be a bit more systematic about using 'abort'.
7806 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
7807 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
7808 Put 'default: abort ();' before some other case, to satisfy older
7810 * lib/bitset_stats.c (bitset_stats_init): Likewise.
7811 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
7812 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
7813 * src/conflicts.c (resolve_sr_conflict): Likewise.
7814 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
7815 (get_decision_str, get_orientation_str, get_node_alignment_str):
7816 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
7817 (get_linestyle_str, get_arrowstyle_str): Likewise.
7818 * src/conflicts.c (resolve_sr_conflict):
7819 Use a default case rather than one for the one remaining enum
7820 value, to catch invalid enum values as well.
7821 * src/lalr.c (set_goto_map, map_goto):
7822 Prefer "assert (FOO);" to "if (!FOO) abort ();".
7823 * src/nullable.c (nullable_compute, token_definitions_output):
7825 * src/reader.c (packgram, reader): Likewise.
7826 * src/state.c (transitions_to, state_new, state_reduction_find):
7828 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
7829 (symbol_pack): Likewise.
7830 * src/tables.c (conflict_row, pack_vector): Likewise.
7831 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
7832 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
7833 * src/system.h: Don't include <assert.h>.
7834 (assert): New macro.
7836 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
7837 (Destructor Decl, Parser Function, Pure Calling):
7838 Describe rules for braces inside C code more carefully.
7840 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
7842 Fix some porting glitches found by Nelson H. F. Beebe.
7843 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
7844 compilers that don't understand that abort () does not return.
7845 * src/state.c (transitions_to): Likewise.
7846 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
7847 that '#include <cstdlib>' works.
7848 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
7849 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
7850 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
7851 for the benefit of some pre-C99 compilers.
7853 * bootstrap: Undo changes to gnulib files that autoreconf made.
7855 Minor fixups to get 'make maintainer-check' to work.
7856 * configure.ac: Don't use -Wnested-externs, as it's incompatible
7857 with the new verify.h implementation.
7858 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
7859 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
7860 * data/yacc.c (YYUSE): Likewise.
7861 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
7862 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
7863 * src/parse-gram.y (declaration): Don't pass a string constant
7864 to a function that expects char *, since GCC might complain
7865 about the constant value.
7866 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
7867 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
7868 before #defining them.
7869 * tests/glr-regression.at
7870 (Incorrectly initialized location for empty right-hand side in GLR):
7871 In yyerror, use the msg arg.
7872 (Corrupted semantic options if user action cuts parse):
7873 (Incorrect lookahead during deterministic GLR):
7874 (Incorrect lookahead during nondeterministic GLR):
7875 Don't name a local var 'index'; it shadows string.h's 'index'.
7877 2006-01-19 Akim Demaille <akim@epita.fr>
7879 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
7880 location, not just parts of it.
7882 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
7884 * NEWS: Document the fact that multiple %unions are now allowed.
7885 * doc/bison.texinfo (Union Decl): Likewise.
7886 * TODO: This feature is now implemented, so remove it from
7889 * Makefile.maint: Merge with coreutils Makefile.maint.
7890 (CVS_LIST): Use build-aux version if available.
7891 (VERSION_REGEXP): New macro.
7892 (syntax-check-rules): Add sc_no_if_have_config_h,
7893 sc_prohibit_assert_without_use, sc_require_config_h,
7894 sc_useless_cpp_parens.
7895 (sc_obsolete_symbols): Check for O_NDELAY.
7896 (sc_dd_max_sym_length): Track coreutils.
7897 (sc_unmarked_diagnostics): Look in all files, not just *.c.
7898 (sc_useless_cpp_parens): New rule.
7899 (news-date-check): Look for version or today's date.
7900 (changelog-check): Don't require version number near head.
7901 (copyright-check): Use current year instead of hardwiring 2005.
7902 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
7903 (announcement): Add --gpg-key-ID.
7905 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
7908 Avoid undefined behavior that addressed just before the start of an
7909 array. Problem reported by twlevo.
7910 * src/reader.c (packgram): Prepend a new sentinel before ritem.
7911 * src/lalr.c (build_relations): Rely on new sentinel.
7912 * src/gram.c (gram_free): Adjust to new sentinel.
7914 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
7916 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
7917 yylookaheadNeeds. All uses updated.
7918 (yysplitStack): Rename local yynewLookaheadStatuses to
7919 yynewLookaheadNeeds.
7920 * data/glr-regression.at (Incorrect lookahead during nondeterministic
7921 GLR): In comments, change `lookahead status' to `lookahead need'.
7923 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7925 * data/glr.c (yysplitStack): A little stylistic rewrite.
7927 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7929 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
7931 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
7933 * doc/bison.texinfo: Fix some typos.
7934 (GLR Semantic Actions): New subsection discussing special
7935 considerations because GLR semantic actions might be deferred.
7936 (Actions): Mention look-ahead usage of yylval.
7937 (Actions and Locations): Mention look-ahead usage of yylloc.
7938 (Special Features for Use in Actions): Add YYEOF entry and mention it
7939 in the yychar entry.
7940 In the yychar entry, remove mention of the local yychar case (pure
7941 parser) since this is irrelevant information when writing semantic
7942 actions and since it's already discussed in `Table of Symbols' where
7943 yychar is otherwise described as an external variable.
7944 In the yychar entry, don't call it the `current' look-ahead since it
7945 isn't when semantic actions are deferred.
7946 In the yychar and yyclearin entries, add note about deferred semantic
7948 Add yylloc and yylval entries discussing look-ahead usage.
7949 (Look-Ahead Tokens): When discussing yychar, don't call it the
7950 `current' look-ahead, and do mention yylval and yylloc.
7951 (Error Recovery): Cross-reference `Action Features' when mentioning
7953 (Table of Symbols): In the yychar entry, don't call it the `current'
7955 In the yylloc and yylval entries, mention look-ahead usage.
7957 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
7959 * tests/glr-regression.at: Update copyright year to 2006.
7961 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7963 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
7964 use during nondeterministic operation to track which stacks have
7965 actually needed the current lookahead.
7966 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
7967 Allocate, deallocate, resize, and otherwise shuffle space for
7968 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
7969 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
7970 appropriately during nondeterministic operation.
7971 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
7972 members to store the current lookahead to be used by the deferred
7974 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
7975 from which the RHS is taken. Set the lookahead members of the new
7976 yySemanticOption according to the lookahead status for stack yyk.
7977 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
7978 yyaddDeferredAction.
7979 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
7980 members of yySemanticOption before invoking yyuserAction, and then set
7981 them back to their current values afterward.
7982 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
7983 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
7984 * tests/glr-regression.at: Remove `.' from the ends of recent test case
7985 titles for consistency.
7986 (Leaked merged semantic value if user action cuts parse): In order to
7987 suppress lint warnings, use arguments in merge function, and assign
7988 char value < 128 in main.
7989 (Incorrect lookahead during deterministic GLR): New test case.
7990 (Incorrect lookahead during nondeterministic GLR): New test case.
7992 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7994 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
7995 !yyvaluep as signal that no semantic value is available to print.
7996 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
7997 to print a semantic value.
7999 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8001 * tests/glr-regression.at: For consistency with my newer test cases,
8004 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
8006 * data/glr.c (yyresolveValue): When merging semantic options, if at
8007 least one user action succeeds but a later one cuts the parse, then
8008 destroy the semantic value before returning rather than leaking it.
8009 (yyresolveStates): If a user action cuts the parse and thus
8010 yyresolveValue fails, ignore the (unset) semantic value rather than
8011 corrupting the yyGLRState, and empty the semantic options list since
8012 the user actions should have called all necessary destructors.
8013 Simplify code with YYCHK.
8014 * tests/glr-regression.at (Corrupted semantic options if user action
8015 cuts parse): New test case.
8016 (Undesirable destructors if user action cuts parse): New test case.
8017 Before applying any of this patch, this test case never actually failed
8018 for me... but only because the corrupted semantic options usually
8020 (Leaked merged semantic value if user action cuts parse): New test
8023 2006-01-05 Akim Demaille <akim@epita.fr>
8025 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
8027 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
8029 * data/c.m4 (b4_c_modern): New macro, with a new provision for
8030 _MSC_VER. Problem reported by Cenzato Marco.
8031 (b4_c_function_def): Use it.
8032 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
8034 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
8035 than rolling our own.
8037 2006-01-04 Akim Demaille <akim@epita.fr>
8039 Also warn about non-used mid-rule values.
8040 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
8042 (symbol_list_new): Adjust.
8043 * src/reader.c (symbol_typed_p): New.
8044 (grammar_rule_check): Use it.
8045 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
8047 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
8049 * tests/actions.at (Exotic Dollars): Adjust.
8051 2006-01-04 Akim Demaille <akim@epita.fr>
8053 * src/reader.c (grammar_midrule_action): If $$ is set in a
8054 mid-rule, move the `used' bit to its lhs.
8055 * tests/input.at (Unused values): New.
8056 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
8058 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
8060 * doc/bison.texinfo (Bison Options): Say more accurately what
8062 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
8063 about declarations in the grammar when in Yacc mode, as POSIX does
8064 not require a diagnostic when the grammar uses extensions.
8066 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
8068 Warn about dubious constructions like "%token T T".
8070 * src/symtab.h (struct symbol.declared): New member.
8071 * src/symtab.c (symbol_new): Initialize it to false.
8072 (symbol_class_set): New arg DECLARING, specifying whether
8073 this is a declaration that we want to warn about, if there
8074 is more than one of them. All uses changed.
8076 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
8077 Allow multiple %union directives, whose contents concatenate.
8078 * src/parse-gram.y (grammar_declaration): Likewise.
8079 Use muscle_code_grow, so that we don't need stype_line any more.
8082 * src/muscle_tab.c (muscle_grow): Fix comment.
8084 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
8085 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
8086 Update copyright year to 2006.
8088 2006-01-03 Akim Demaille <akim@epita.fr>
8090 Have glr.cc pass (some of) the calc.at tests.
8091 * data/glr.cc (b4_parse_param_orig): New.
8092 (b4_parse_param): Improve its definition, and bound it more
8093 clearly in the skeleton.
8094 (b4_epilogue): Append, instead of prepending, in order to keep
8096 Simplify the generation of auxiliary functions: locations and
8097 purity are mandated.
8098 (b4_global_tokens_and_yystype): Honor it.
8099 * data/location.cc (c++.m4): Don't include it.
8100 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
8102 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
8104 Be sure to initialize the first position's filename.
8105 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
8107 (AT_CHECK_CALC_GLR_CC): New.
8108 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
8110 2006-01-02 Akim Demaille <akim@epita.fr>
8112 * src/output.c (output_skeleton): Don't hard wire the inclusion of
8114 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
8115 * data/glr.cc: Do not include stack.hh.
8117 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
8119 * data/glr.c: Reformat whitespace with tabs.
8120 (b4_lpure_formals): Remove this unused m4 macro.
8121 * tests/cxx-type.at: Reformat whitespace with tabs.
8122 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
8123 since it's a member. Rename type to isNterm for clarity.
8125 2005-12-29 Akim <akim@sulaco.local>
8127 Let glr.cc catch up with symbol_value_print.
8128 * data/glr.cc (b4_yysymprint_generate): Replace by...
8129 (b4_yy_symbol_print_generate): this.
8130 (yy_symbol_print, yy_symbol_value_print): Declare them.
8132 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
8134 * src/location.h (boundary): Note that a line or column equal
8135 to INT_MAX indicates an overflow.
8136 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
8137 (rule_length_overflow, increment_rule_length, add_column_width):
8139 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
8140 (<SC_BRACED_CODE>"}"):
8141 Use increment_rule_length rather than incrementing it by hand.
8142 (adjust_location, handle_syncline): Diagnose overflow.
8143 (handle_action_dollar, handle_action_at):
8144 Fix bug with monstrosities like $-2147483648.
8145 Remove now-unnecessary checks.
8146 (scan_integer): Verify assumptions and remove now-unnecessary checks.
8147 (convert_ucn_to_byte): Verify assumptions.
8148 (handle_syncline): New arg LOC. All callers changed.
8149 Don't store through a value derived from char const * pointer.
8151 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
8154 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
8156 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
8157 Remove unnecessary forward static decls.
8159 2005-12-27 Akim Demaille <akim@epita.fr>
8161 * src/reader.c (grammar_current_rule_check): Also check that $$
8163 Take the rule to check as argument, hence rename as...
8164 (grammar_rule_check): this.
8165 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
8167 (grammar_rule_begin, grammar_rule_end): these, for consistency.
8168 (grammar_midrule_action, grammar_symbol_append): Now static.
8169 * tests/torture.at (input): Don't rely on the default action
8170 being always performed.
8171 * tests/calc.at: "Set" $$ even when the action is "cut" with
8173 * tests/actions.at (Exotic Dollars): Instead of using unused
8174 values, check that the warning is issued.
8176 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
8178 * NEWS: Improve wording for unused-value warnings.
8180 2005-12-22 Akim Demaille <akim@epita.fr>
8182 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
8183 (b4_yysymprint_generate): Rename as...
8184 (b4_yy_symbol_print_generate): this.
8185 Generate yy_symbol_print instead of yysymprint.
8186 Generate also yy_symbol_value_print, and use it.
8188 2005-12-22 Akim Demaille <akim@epita.fr>
8190 * NEWS: Warn about unused values.
8191 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
8193 (symbol_list_n_get, symbol_list_n_used_set): New.
8194 (symbol_list_n_type_name_get): Use symbol_list_n_get.
8195 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
8196 * src/reader.c (grammar_current_rule_check): Check that values are
8198 * src/symtab.c (symbol_print): Accept 0.
8199 * tests/existing.at: Remove the type information.
8201 Remove useless actions (beware of mid-rule actions: perl -000
8202 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
8203 * tests/actions.at (Exotic Dollars): Use unused values.
8204 * tests/calc.at: Likewise.
8205 * tests/glr-regression.at (No users destructors if stack 0 deleted):
8208 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
8211 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
8213 Undo 2005-12-01 tentative license wording change. The wording is
8214 still being reviewed by the lawyers, and we don't want to wait for
8215 them before publishing a test release. For now, revert to the
8217 * NEWS: Undo 2005-12-01 change.
8218 * data/glr.c: Revert to previous license wording.
8219 * data/glr.cc: Likewise.
8220 * data/lalr1.cc: Likewise.
8221 * data/location.cc: Likewise.
8222 * data/yacc.c: Likewise.
8224 * NEWS: Reword %destructor vs YYABORT etc.
8225 * data/glr.c: Use American spacing, for consistency.
8226 * data/glr.cc: Likewise.
8227 * data/lalr1.cc: Likewise.
8228 * data/yacc.c: Likewise.
8229 * data/yacc.c: Reformat comments slightly.
8230 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
8231 for consistency. Fix some spelling errors and reword recently-included
8233 * tests/cxx-type.at: Cast results of malloc, for C++.
8235 2005-12-21 Joel E. Denny <address@hidden>
8237 * tests/cxx-type.at: Construct a tree, count the parents of shared
8238 nodes, and free each node once and only once. Previously, the memory
8239 for semantic values was leaked instead.
8241 2005-12-21 Joel E. Denny <address@hidden>
8243 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
8244 (yylval, yylloc): If pure, #define to yystackp->yyval and
8245 yystackp->yyloc similar to yychar and yynerrs.
8246 (yyparse): If pure, remove local yylval and yylloc. Add local
8247 yystackp to accommodate pure definitions of yylval and yylloc.
8248 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
8249 yylvalp and yyllocp to &yylval and &yylloc.
8250 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
8251 namespace. Previously, nerrs and char were missing, but lval and lloc
8253 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
8254 yylvalp and yyllocp parameters since, if pure, these are now always
8255 accessible through yystackp. If not pure, they are still accessible
8257 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
8258 `if (YYID (N))' to pacify lint.
8260 2005-12-21 Akim Demaille <akim@epita.fr>
8262 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
8263 destroy the RHS symbols of a rule.
8264 * data/yacc.c (yylen): Initialize to 0.
8265 Keep its value to the number of items to possibly shift.
8266 In particular, a regular successful parse that ends on YYFINAL by
8267 a (internal) YYACCEPT must not have yylen != 0.
8268 (yyerrorlab, yyreturn): Pop the RHS.
8269 Reorder a bit to emphasize the `shifting' bits of code.
8270 (YYPOPSTACK): Now accept a number of items to pop.
8271 * data/lalr1.cc: Likewise.
8272 * data/glr.c: Formatting changes.
8273 Use goto instead of fall through.
8274 * doc/bison.texinfo (Destructor Decl): Complete.
8276 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8278 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
8279 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
8280 * djgpp/config.bat: Replace every occurence of the file name
8281 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
8282 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
8283 * djgpp/config.sed: Replace every occurence of the file name
8284 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
8285 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
8286 * djgpp/djunpack.bat: DJGPP specific file.
8287 * djgpp/fnchange.lst: DJGPP specific file.
8288 * djgpp/README.in: Add new information about how to unpack the bison
8289 source on MSDOS and other systems which have 8.3 file name restrictions
8290 using djunpack.bat and fnchange.lst.
8292 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
8294 * bootstrap (build_cvs_prefix): Remove; unused.
8295 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
8296 when getting gnulib.
8298 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
8300 * data/glr.c: Reorder typedef declarations for structs to match order
8301 of struct declarations.
8302 Rename yystack everywhere to yystackp except in yyparse where it's not
8304 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
8306 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
8307 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
8308 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
8311 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
8313 * tests/sets.at (Accept): Fix typos in regular expression used to
8314 sed out the final state number.
8316 Work around portability problem on Solaris 10: flex-generated
8317 files include <stdio.h> before <config.h>, which messes up
8318 because the latter defines __EXTENSIONS__. Address the problem
8319 by creating two new little files that include <config.h> first,
8320 then include the flex-generated files. Rewrite everyone else
8321 to include <config.h> first, as well.
8322 * lib/timevar.c: Always include "config.h".
8323 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
8324 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
8325 (EXTRA_bison_SOURCES): New macro.
8326 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
8327 * src/system.h: Don't include config.h.
8328 * src/LR0.c: Include <config.h> first.
8329 * src/assoc.c: Likewise.
8330 * src/closure.c: Likewise.
8331 * src/complain.c: Likewise.
8332 * src/conflicts.c: Likewise.
8333 * src/derives.c: Likewise.
8334 * src/files.c: Likewise.
8335 * src/getargs.c: Likewise.
8336 * src/gram.c: Likewise.
8337 * src/lalr.c: Likewise.
8338 * src/location.c: Likewise.
8339 * src/main.c: Likewise.
8340 * src/muscle_tab.c: Likewise.
8341 * src/nullable.c: Likewise.
8342 * src/output.c: Likewise.
8343 * src/parse-gram.y: Likewise.
8344 * src/print.c: Likewise.
8345 * src/print_graph.c: Likewise.
8346 * src/reader.c: Likewise.
8347 * src/reduce.c: Likewise.
8348 * src/relation.c: Likewise.
8349 * src/state.c: Likewise.
8350 * src/symlist.c: Likewise.
8351 * src/symtab.c: Likewise.
8352 * src/tables.c: Likewise.
8353 * src/uniqstr.c: Likewise.
8354 * src/vcg.c: Likewise.
8356 * src/parse-gram.y: Fix minor problems uncovered by lint.
8357 (current_lhs, current_lhs_location): Now static.
8358 (current_assoc): Remove unused variable.
8360 Cleanups so that Bison-generated parsers have less lint.
8361 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
8362 Prepend /*ARGSUSED*/, for lint's sake.
8363 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
8364 definition if 'lint' is defined.
8365 (YYID): New macro (or function, if lint).
8366 All uses of /*CONSTCOND*/0 replaced by YYID(0).
8367 * data/yacc.c: Likewise.
8368 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
8369 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
8370 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
8372 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
8373 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
8374 Use YYID(0) rather than 0, for lint.
8375 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
8376 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
8378 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
8380 * tests/glr-regression.at
8381 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
8382 Close memory leak reported by twlevo.
8384 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
8386 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
8388 (yyparse): Iterate another stack in order to call user destructors.
8389 * tests/glr-regression.at (No users destructors if stack 0 deleted):
8391 (Duplicated user destructor for lookahead): This test now is expected
8394 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
8396 * NEWS: Document the following change.
8397 * data/yacc.c: Say "parser skeleton" rather than "file", since
8398 it's no longer just a file.
8399 * data/glr.c: Grant a special exception for C GLR parsers, that
8400 reads like the already-existing exception for C LALR(1) parsers.
8401 * data/glr.cc: Likewise.
8402 * data/lalr1.cc: Likewise.
8403 * data/location.cc: Likewise.
8404 * data/yacc.c: Reword the "written by" statement to clarify that
8405 it was the parser skeleton, not the entire output file.
8406 * data/glr.c: Written by Paul Hilfinger.
8407 * data/glr.cc: Written by Akim Demaille.
8408 * data/lalr1.cc: Likewise.
8410 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
8412 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
8413 Fix typos in previous change that broke 'make check'.
8414 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
8416 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
8417 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
8418 We can revert this once things settle down.
8420 * src/conflicts.c (conflicts_print): Don't print file name twice
8421 when %expect fails because there were no conflicts.
8422 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
8424 * tests/conflicts.at (%expect not enough, %expect too much):
8425 (%expect with reduce conflicts): Adjust to new behavior.
8427 2005-11-18 Akim Demaille <akim@epita.fr>
8429 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
8431 * NEWS: Document this.
8432 * doc/bison.texinfo (Expect Decl): Likewise.
8434 2005-11-16 Akim Demaille <akim@epita.fr>
8436 Generalize the display of semantic values and locations in traces.
8437 * data/glr.c (yy_reduce_print): Fix indices (again).
8438 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
8440 * data/lalr1.cc (yyreduce_print): Rename as...
8441 (yy_reduce_print): this.
8442 Display values and locations.
8443 * data/yacc.c (yy_reduce_print): Likewise.
8444 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
8445 (yysymprint): Move higher to be visible from yy_reduce_print).
8447 * tests/calc.at: Adjust the expected length of the traces.
8449 2005-11-14 Akim Demaille <akim@epita.fr>
8451 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
8452 from 1 to N, while values and location start at 0.
8453 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
8455 2005-11-14 Akim Demaille <akim@epita.fr>
8457 * data/glr.c (yy_reduce_print): Fix the $ number.
8459 2005-11-14 Akim Demaille <akim@epita.fr>
8461 "Use" parse parameters.
8462 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
8463 * data/glr.c, data/glr.cc: Use them.
8464 * data/glr.c (YYUSE): Have a C++ definition that supports
8467 2005-11-14 Akim Demaille <akim@epita.fr>
8469 * data/glr.c (yyexpandGLRStack): Declare only if defined.
8471 2005-11-14 Akim Demaille <akim@epita.fr>
8474 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
8476 2005-11-12 Akim Demaille <akim@epita.fr>
8478 Let position and location be PODs.
8479 * data/location.cc (position::initialize, location::initialize): New.
8480 (position::position, location::location): Define only if
8481 b4_location_constructors is defined.
8482 * data/lalr1.cc (b4_location_constructors): Define it for backward
8484 * doc/bison.texinfo (Initial Action Decl): Use initialize.
8486 2005-11-12 Akim Demaille <akim@epita.fr>
8488 * data/lalr1.cc: Move the body of the ctor and dtor into the
8489 parser file (instead of the header).
8490 Wrap the implementations in a "namespace yy".
8492 2005-11-12 Akim Demaille <akim@epita.fr>
8494 Have glr.c include its header file when created.
8495 * data/glr.c (b4_shared_declarations): New.
8496 Output them verbatim in the parser if !%defines, otherwise
8497 output then in the header file, and include it instead.
8499 2005-11-11 Akim Demaille <akim@epita.fr>
8501 * data/glr.c: Comment changes.
8503 2005-11-11 Akim Demaille <akim@epita.fr>
8505 When yydebug, report semantic and location values for reductions.
8506 * data/glr.c (yy_reduce_print): Report the semantic values and the
8508 (YY_REDUCE_PRINT): Adjust.
8509 (yyglrReduce): Use them.
8510 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
8511 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
8512 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
8515 2005-11-10 Akim Demaille <akim@epita.fr>
8517 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
8518 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
8519 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
8521 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
8523 * m4/cxx.m4, examples/Makefile.am: Don't build
8524 examples/calc++ if no C++ compiler is available. (trivial change)
8526 2005-11-09 Akim Demaille <akim@epita.fr>
8528 * src/scan-skel.l: Use a couple of asserts.
8530 2005-11-03 Akim Demaille <akim@epita.fr>
8532 In some (weird) cases, the final state number is incorrect.
8533 Reported by Alexandre Duret-Lutz.
8534 * src/LR0.c (state_list_append): Remove the computation of
8536 (save_reductions): Do it here.
8537 (get_state): Alpha conversion.
8538 (generate_states): Use a for loop.
8539 * src/gram.h (item_number_is_rule_number)
8540 (item_number_is_symbol_number): New.
8541 * src/state.c: Use assert.
8542 * src/system.h: Include assert.h.
8543 * tests/sets.at (Accept): New.
8545 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8547 * data/glr.c (yyfill): Adjust comment.
8548 (yyresolveAction): Initialize default location properly
8549 for empty right-hand sides.
8550 (yydoAction): Ditto.
8551 Add comment explaining apparently dead code.
8552 * tests/glr-regression.at
8553 (Incorrectly initialized location for empty right-hand side in GLR):
8556 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
8558 * bootstrap (cleanup_gnulib): New function. Use it to clean up
8559 gnulib when interrupted. This fixes some race conditions and
8560 works around some portability problems (one noted by Paul
8563 2005-10-22 Akim <akim@epita.fr>
8565 * Makefile.cfg: Adjust to config -> build-aux.
8568 2005-10-21 Akim Demaille <akim@epita.fr>
8570 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
8572 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
8573 * data/yacc.c (b4_Pure_if): Rename as...
8574 (b4_yacc_pure_if): this.
8575 (YY_SYMBOL_PRINT, yyparse): Adjust.
8576 * doc/bison.texinfo: Formatting changes.
8578 2005-10-21 Akim Demaille <akim@epita.fr>
8580 Finish the transition config -> build-aux.
8581 * configure.ac, Makefile.am: Use build-aux.
8582 * config/prev-version, config/announce-gen, config/Makefile.am:
8584 * build-aux/prev-version, build-aux/announce-gen,
8585 * build-aux/Makefile.am: here.
8587 2005-10-14 Akim Demaille <akim@epita.fr>
8589 * examples/calc++/test: Use set -x only when VERBOSE.
8591 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
8593 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
8594 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
8596 2005-10-13 Akim Demaille <akim@epita.fr>
8598 * src/scan-skel.l: Output the base name parts of the parser and
8600 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
8602 Use this to exercise C++ outputs in subdirs.
8603 Reported by Oleg Smolsky.
8605 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
8607 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
8608 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
8609 Problem reported by John P. Hartmann.
8610 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
8613 2005-10-12 Akim Demaille <akim@epita.fr>
8615 * src/parse-gram.y (version_check): Exit 63 to please missing
8616 (stands for "version mismatch).
8617 * tests/input.at, doc/bison.texinfo: Adjust.
8619 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
8621 Work around portability problems with Visual Age C compiler
8622 (xlc and xlC_r) reported by John P. Hartmann.
8623 * data/location.cc (initial_column, initial_line): Remove.
8624 All uses replaced by 0 and 1.
8625 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
8626 that xlc complains about.
8627 * src/scan-skel.l (skel_wrap): Likewise.
8628 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
8630 * data/yacc.c (YYMODERN_C): New macro, which also looks at
8631 __STDC_VERSION__. Use it everywhere instead of looking at
8632 __STDC__ and __cplusplus.
8634 2005-10-10 Akim Demaille <akim@epita.fr>
8636 * examples/calc++/test: Be quiet unless VERBOSE.
8638 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
8640 * data/c.m4 (yydestruct, yysymprint):
8641 Use YYUSE instead of casting to void.
8642 * data/glr.c (YYUSE): New macro.
8643 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
8644 Use it instead of rolling our own.
8645 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
8647 Use /*CONSTCOND*/ to suppress lint warnings.
8648 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
8649 (YY_STACK_PRINT): Use 'false' not '0'.
8651 (yysymprint_, yydestruct_): Use it instead of rolling our own.
8652 * data/yacc.c (YYUSE): New macro.
8653 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
8654 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
8655 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
8658 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
8659 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
8661 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
8663 Undo the parts of the unlocked-I/O change that substituted
8664 putc or puts for printf. This might hurt performance a bit,
8665 but some people prefer the printf style.
8666 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
8667 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
8668 All uses replaced by YYFPRINTF and YYDPRINTF.
8669 * data/yacc.c: Likewise.
8670 * lib/bitset.c (bitset_print): Likewise.
8671 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
8673 * lib/lbitset.c (debug_lbitset): Likewise.
8674 * src/closure.c (print_firsts, print_fderives): Likewise.
8675 * src/gram.c (grammar_dump): Likewise.
8676 * src/lalr.c (look_ahead_tokens_print): Likewise.
8677 * src/output.c (escaped_output): Likewise.
8678 (user_actions_output): Break apart two printfs.
8679 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
8680 * src/reduce.c (reduce_print): Likewise.
8681 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
8682 * src/system.h: Include unlocked-io.h rathe than stdio.h.
8684 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
8685 Use assignments rather than casts-to-void to suppress
8686 unused-variable warnings. This pacifies 'lint'.
8687 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
8688 unused-variable warnings.
8690 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8692 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
8694 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
8696 Use unlocked I/O for a minor performance improvement on hosts like
8697 GNU/Linux and Solaris that support unlocked I/O. The basic idea
8698 is to use the gnlib unlocked-io module, and to prefer putc and
8699 puts to printf when either will work (since the latter doesn't
8700 come in an unlocked flavor).
8701 * bootstrap (gnulib_modules): Add unlocked-io.
8702 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
8703 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
8704 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
8705 and similarly for puts and putc and printf.
8706 * data/yacc.c: Likewise.
8707 * lib/bitset.c (bitset_print): Likewise.
8708 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
8709 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
8711 * lib/lbitset.c (debug_lbitset): Likewise.
8712 * src/closure.c (print_firsts, print_fderives): Likewise.
8713 * src/gram.c (grammar_dump): Likewise.
8714 * src/lalr.c (look_ahead_tokens_print): Likewise.
8715 * src/output.c (escaped_output): Likewise.
8716 (user_actions_output): Coalesce two printfs.
8717 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
8718 * src/reduce.c (reduce_print): Likewise.
8719 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
8720 * src/system.h: Include unlocked-io.h rather than stdio.h.
8722 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
8723 this confuses xgettext.
8725 2005-10-02 Akim Demaille <akim@epita.fr>
8727 * bootstrap (gnulib_modules): Add strverscmp.
8728 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
8729 * m4/.cvsignore: Add strverscmp.m4.
8730 * src/parse-gram.y (%require): New token, new rule.
8731 (version_check): New.
8732 * src/scan-gram.l (%require): Adjust.
8733 * tests/input.at (AT_REQUIRE): New.
8735 * doc/bison.texinfo (Require Decl): New.
8736 (Calc++ Parser): Use %require.
8738 2005-10-02 Akim Demaille <akim@epita.fr>
8740 * data/location.cc: New.
8742 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
8743 Akim Demaille <akim@epita.fr>
8745 Make sure -odir/foo.cc creates dir/location.hh etc.
8746 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
8747 (spec_file_prefix, spec_verbose_file, spec_graph_file)
8748 (spec_defines_file): Now const.
8750 (short_base_name): Remove.
8751 * src/files.c: Adjust.
8752 (dirname.h): Include.
8753 (base_name): Don't prototype it.
8754 (finput): Remove, duplicates gram_in.
8755 (full_base_name, short_base_name): Replace by...
8756 (all_but_ext, all_but_tab_ext): these.
8757 (compute_base_names): Rename as...
8758 (compute_file_name_parts): this.
8759 Update to compute the new variables, including dir_prefix.
8760 Adjust dependencies.
8761 * src/output.c (prepare): Output them.
8762 * src/reader.c: Adjust to use gram_in, not finput.
8763 * src/scan-skel.l (@dir_prefix@): New.
8765 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8767 * lib/subpipe.c: New function end_of_output_subpipe() added
8768 to allow support for non-posix systems. This is a no-op function
8771 * lib/subpipe.h: New function end_of_output_subpipe() added
8772 to allow support for non-posix systems. This is a no-op function
8775 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
8776 handle the lack of pipe/fork functionality on non-posix systems.
8778 * djgpp/Makefile.maint: DJGPP specific file.
8780 * djgpp/README.in: DJGPP specific file.
8782 * djgpp/config.bat: DJGPP specific configuration file.
8784 * djgpp/config.sed: DJGPP specific configuration file.
8786 * djgpp/config.site: DJGPP specific configuration file.
8788 * djgpp/config_h.sed: DJGPP specific configuration file.
8790 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
8792 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
8794 2005-10-02 Akim Demaille <akim@epita.fr>
8796 * data/location.cc: New, extract from...
8797 * data/lalr1.cc: here.
8798 (location.hh): Include it after the user prologue, in case the
8799 filename type is defined by the user.
8800 Forward declation location and position before the pre-prologue.
8801 (yyresult_): Rename as...
8802 (yyresult): this, it's a local variable, not an attribute.
8803 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
8805 2005-10-01 Akim Demaille <akim@epita.fr>
8807 * examples/extexi: Restore the #line generation.
8809 2005-09-30 Akim Demaille <akim@epita.fr>,
8810 Alexandre Duret-Lutz <adl@gnu.org>
8812 Move the token type and YYSTYPE in the parser class.
8813 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
8814 (parser::token): New, from the moved free definition of tokens.
8815 (parser::semantic_value): Now a full definition instead of an
8816 indirection to YYSTYPE.
8817 (b4_post_prologue): No longer included in the header file, but
8818 in the implementation file.
8819 * doc/bison.texi (C+ Language Interface): Update.
8820 * src/parse-gram.y: Support unary %define.
8821 * tests/actions.at: Define global_tokens_and_yystype for backward
8822 compatibility until we update the tests.
8823 * tests/calc.at: Idem.
8824 (first_line, first_column, last_line, last_column): Define for lalr1.cc
8825 to simplify the code.
8827 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
8829 Port to SunOS 4.1.4, which lacks strtoul and strerror.
8830 Ah, the good old days! Problem reported by Peter Klein.
8831 * bootstrap (gnulib_modules): Add strerror, strtoul.
8832 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
8833 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
8835 2005-09-29 Akim Demaille <akim@epita.fr>
8837 * data/c.m4 (b4_error_verbose_if): New.
8838 * data/lalr1.cc: Use it.
8839 (YYERROR_VERBOSE_IF): Remove.
8840 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
8841 parser members, replaced by...
8842 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
8844 (yysyntax_error_): Takes the state number as argument.
8845 (yyreduce_print_): Use the argument yyrule, not the former
8848 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
8850 * bootstrap (gnulib_modules): Add verify.
8851 * lib/.cvsignore: Add verify.h.
8852 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
8853 * src/system.h (verify): Remove.
8854 Include verify.h instead.
8855 * src/tables.c (tables_generate): Use new API for 'verify'.
8857 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
8859 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
8860 local variables whose names begin with 'yy'.
8861 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
8862 Trivial changes from Joel E. Denny.
8864 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
8866 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
8867 don't use alloca any more.
8869 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
8870 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
8871 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
8872 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
8873 to match yacc.c, to test more hosts.
8875 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
8877 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
8878 doesn't affect behavior.
8879 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
8881 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
8882 This works a bit better with glibc, if user code has already included
8884 * doc/bison.texinfo (Bison Parser): Document that users can't
8885 arbitrarily use malloc and free for other purposes. Document
8886 that <alloca.h> and <malloc.h> might be included.
8887 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
8888 user must declare alloca.
8890 * HACKING (release): Forwarn the Translation Project about
8893 2005-09-20 Akim Demaille <akim@epita.fr>
8895 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
8897 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
8899 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
8900 (YYSTACK_ALLOC_MAXIMUM): Use it.
8901 (yysyntax_error): New function.
8902 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
8903 multiple syntax errors are reported, and alloca is being used.
8904 Instead, reallocate buffers twice as big each time, so that
8905 we waste at most half the allocated memory. Start with a small
8906 (128-byte) buffer that will suffice in most cases anyway.
8907 Use yysyntax_error to do most of the work.
8909 * doc/bison.texinfo (Error Reporting, Table of Symbols):
8910 yynerrs is the number of errors reported, not the number of
8913 * tests/glr-regression.at (Duplicated user destructor for lookahead):
8914 Mark it as expected to fail.
8915 Cast result of malloc; problem reported by twlevo@xs4all.nl.
8916 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
8917 Don't start user-code symbols with "yy", to avoid name space problems.
8919 2005-09-19 Akim Demaille <akim@epita.fr>
8921 Remove the traits, failed experiment.
8922 It never proved useful, and anyway because of the current
8923 definition, it was not possible to have several specialization of
8924 this traits, making it useless.
8925 * data/lalr1.cc (yy:traits): Remove.
8926 Inline its definitions in the parser class.
8928 2005-09-19 Akim Demaille <akim@epita.fr>
8930 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
8931 least Mac OSX with a /usr/local install of gettext.
8933 2005-09-19 Akim Demaille <akim@epita.fr>
8935 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
8936 and yytoken for similarity with the other skeletons.
8938 2005-09-19 Akim Demaille <akim@epita.fr>
8940 * NEWS, configure.ac: update version number to 2.1a.
8942 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
8944 * NEWS: Version 2.1.
8946 * NEWS: Remove notice of yytname change, since it was never in an
8948 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
8950 * src/output.c (prepare): Likewise.
8951 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
8952 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
8953 is not defined. This is an awful hack, but it's enough for now.
8954 All callers changed.
8955 * tests/glr-regression-at (make_value): Args are const pointers now,
8956 to avoid GCC warning.
8957 (Duplicated user destructor for lookahead): New test. Currently
8958 skipped. It fails on my host but I'm not sure it'll always fail.
8960 2005-09-16 Akim Demaille <akim@epita.fr>
8962 * src/symtab.h (struct symbol): Declare the printer and destructor
8963 as const, to avoid accidental calls to free.
8964 (symbol_destructor_set, symbol_printer_set): Adjust.
8965 * src/symtab.c: Adjust.
8967 2005-09-16 Akim Demaille <akim@epita.fr>
8969 * data/c.m4 (b4_token_enums): New.
8970 (b4_token_defines): Rename as...
8971 (b4_token_enums_defines): this.
8972 (b4_token_defines): New, output only the #defines.
8973 * data/yacc.c, data/glr.c: Adjust.
8974 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
8975 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
8978 2005-09-16 Akim Demaille <akim@epita.fr>
8980 * data/lalr1.cc (yylex_): Remove, inline its code.
8981 (yyreport_syntax_error_): Remove, replaced by...
8982 (yysyntax_error_): this which returns a string and leaves to the
8983 caller the call to the users' error function.
8984 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
8985 Move from members of the parser object...
8986 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
8987 to local variables of the parse function.
8989 2005-09-16 Akim Demaille <akim@epita.fr>
8991 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
8992 since it's in Bison's name space.
8994 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
8996 * data/glr.c (yyresolveValue): Add default case to pacify
8997 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
8999 * NEWS: Document when yyparse started to return 2.
9000 * doc/bison.texinfo (Parser Function): Document when yyparse
9003 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
9004 (b4_filename_type): Renamed back from b4_file_name_type. All uses
9006 (class position): file_name -> filename (reverting). All uses changed.
9008 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
9010 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
9011 do anything if $@ exists. This reverts part of the 2005-07-07
9014 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
9016 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
9017 contains obsolete information and isn't worth distributing as a
9018 separate file anyway.
9019 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
9020 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
9021 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
9022 (yyparse): Abort if user code uses longjmp to throw an unexpected
9025 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
9027 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
9028 Suggested by twlevo@xs4all.nl.
9030 * data/glr.c (YYCHK1): Do not assume YYE is in range.
9031 This avoids a diagnostic from gcc -Wswitch-enum.
9032 Problem reported by twlevo@xs4all.nl.
9034 * doc/bison.texinfo: Don't use "filename", as per GNU coding
9035 standards. Use "file name" or "file" or "name", depending on
9037 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
9038 not to hack/foo.tab.c.
9039 (Calc++ Top Level): 2nd arg of main is not const.
9040 * data/glr.c: b4_filename -> b4_file_name.
9041 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
9043 (class position): filename -> file_name. All uses changed.
9044 * data/yacc.c: b4_filename -> b4_file_name.
9045 * lib/bitset.h: filename -> file_name in local vars.
9046 * lib/bitset_stats.c: Likewise.
9047 * src/files.c: Likewise.
9048 * src/scan-skel.l ("@output ".*\n): Likewise.
9049 * src/files.c (file_name_split): Renamed from filename_split.
9050 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
9052 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
9054 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
9055 to accommodate latest gnulib.
9057 * tests/glr-regression.at (Duplicate representation of merged trees):
9058 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
9060 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
9063 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
9065 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
9066 All uses changed. Invoke user destructor after an error during a
9067 split parse (trivial change from Joel E. Denny).
9069 * tests/glr-regression.at
9070 (User destructor after an error during a split parse): New test case.
9071 Problem reported by Joel E. Denny in:
9072 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
9074 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
9076 * README-cvs: Give URLs for recommended tools.
9077 Mention Gzip version problem, and bootstrapping issues.
9078 Remove troubleshooting section, as it's somewhat obsolete.
9080 * bootstrap (no_cache): New var, to accommodate different wget
9081 variants. Use it instead of '-C off'. Problem reported by
9084 * data/glr.c (yydestroyStackItem): New function.
9085 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
9086 debugging information. Problem reported by Joel E. Denny.
9088 2005-08-25 Akim Demaille <akim@epita.fr>
9090 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
9092 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
9094 * data/glr.c (yyrecoverSyntaxError, yyreturn):
9095 Don't invoke destructor on unresolved entries.
9096 * tests/glr-regression.at
9097 (User destructor for unresolved GLR semantic value): New test case.
9098 Problem reported by Joel E. Denny in:
9099 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
9101 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
9103 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
9105 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
9106 lib-prefix.m4, po.m4.
9108 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
9109 in yydestruct diagnostic, since it might not be an error.
9110 Problem reported by Joel Denny near end of
9111 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
9112 * data/lalr1.cc (yyerturn): Likewise.
9113 * data/yacc.c (yyreturn): Likewise.
9114 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
9116 * src/files.c: Remove obsolete FIXME comment.
9118 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
9119 with the other templates, and to fix bogus run-on messages such
9120 as the one reported at the end of
9121 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
9122 All callers changed to avoid the newline.
9123 (yyprocessOneStack): Output two lines rather than one, to accommodate
9124 the above change. This changes the debug output format slightly.
9126 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
9127 reported by Joel E. Denny in
9128 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
9130 * tests/glr-regression.at (Duplicate representation of merged trees):
9131 New test, from Joel E. Denny in:
9132 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
9133 * THANKS: Add Joel E. Denny.
9135 * configure.ac (AC_INIT): Bump to 2.0c.
9137 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
9139 * NEWS: Version 2.0b.
9141 * Makefile.am (SUBDIRS): Put examples before tests, so that
9142 "make check" doesn't finish with "All 1 tests passed".
9144 * tests/regression.at (Token definitions): Don't rely on
9145 AT_PARSER_CHECK for data that contains backslashes. It currently
9146 uses 'echo', and 'echo' isn't portable if its argument contains
9147 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
9148 that the byte '\0xff' is not printable in the C locale; it is,
9149 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
9150 not printable, so use '\0x81' to test.
9152 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
9153 version of GCC, since the macro is used with non-GCC compilers.
9155 Fix core dump reported by Pablo De Napoli in
9156 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
9157 * tests/regression.at (Invalid inputs with {}): New test.
9158 * src/parse-gram.y (token_name): Translate type before using
9161 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
9162 the user's name space. All uses changed to __attribute__
9164 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
9165 Add __attribute__ ((__noreturn__)).
9167 * etc/clcommit: Remove. We weren't using it, and it failed
9168 "make maintainer-distcheck".
9169 * Makefile.maint: Merge from coreutils.
9170 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
9171 (syntax-check-rules): Change list of rules as described below.
9172 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
9173 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
9174 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
9175 (sc_trailing_space): New rules.
9176 (sc_xalloc_h_in_src): Remove.
9177 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
9178 (sc_space_tab, sc_error_exit_success, sc_changelog):
9179 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
9180 (makefile-check, po-check, author_mark_check):
9181 (makefile_path_separator_check, copyright-check):
9182 Use grep -n, to make it easier to find violations.
9183 Use CVS_LIST and CVS_LIST_EXCEPT.
9184 (header_regexp, h_re): Remove.
9186 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
9187 (my-distcheck): Use more-modern GCC flags.
9188 (signatures, %.asc): Remove.
9189 (rel-files, announcement): Remove signatures.
9190 Restore old updating code, even though we don't use it, so
9191 that we're the same as coreutils.
9192 (alpha, beta, major): Depend on news-date-check.
9193 Make the upload commands.
9195 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
9196 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
9197 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
9198 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
9199 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
9200 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
9201 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
9202 * tests/sets.at: Likewise.
9204 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
9205 we comment out the Autoconf version number.
9206 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
9207 it's error-prone and "make maintainer-distcheck" rejects it.
9209 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
9210 Indent calls to "error" to pacify "make maintainer-distcheck",
9211 when the calls are not intended to be translated.
9212 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
9214 * src/Makefile.am (DEFS): Use +=, to pacify
9215 "make maintainer-distcheck".
9216 (bison_SOURCES): Add scan-skel.h.
9217 (sc_tight_scope): New rule, from coreutils.
9219 * src/files.c (src_extension, header_extension):
9220 Now static, not extern.
9221 * src/getargs.c (short_options): Likewise.
9222 * src/muscle_tab.c (muscle_table): Likewise.
9223 * src/parse-gram.y (current_class, current_type, current_prec):
9225 * src/reader.c (grammar_end, previous_rule_end): Likewise.
9226 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
9227 * src/main.c (main): Cast bindtextdomain and textdomain calls to
9228 void, to avoid warning when NLS is disabled.
9229 * src/output.c: Include scan-skel.h.
9230 (scan_skel): Remove decl, since scan-skel.h does this.
9232 Indent calls to "error" to pacify "make maintainer-distcheck".
9233 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
9234 * src/reader.h (gram_end, gram_lineno): New decls to pacify
9235 "make maintainer-distcheck".
9236 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
9237 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
9238 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
9239 (skel_lex_destroy, scan_skel): Move these decls to...
9240 * src/scan-skel.h: New file.
9241 * src/uniqstr.c (uniqstr_assert):
9242 Indent calls to "error" to pacify "make maintainer-distcheck".
9244 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
9247 * tests/torture.at: Revamp to avoid misuse of atoi that
9248 "make maintainer-distcheck" complained about.
9250 * examples/extexi (message): Don't print a message more than once,
9251 and omit line-number decoration that makes Emacs compile think
9252 that informative messages are worth worrying about.
9254 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
9256 * configure.ac: Update version number.
9258 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
9260 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
9261 autogenerated by the maintainer.
9262 * examples/calc++/.cvsignore: Add *.yy.
9264 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
9265 * lib/bitset_stats.c (bitset_stats_init): Likewise.
9266 * lib/bitsetv.c (bitsetv_alloc): Likewise.
9268 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
9270 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
9271 from maintainer-distcheck about casting the argument of 'free'.
9273 * NEWS: Mention recent yytname changes.
9274 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
9276 * bootstrap: For translations that have not yet been upgraded to
9277 the new runtime-po domain, prime the pump by extracting the
9278 relevant strings from the obsolete translations. This code can be
9279 removed once the bison-runtime domain has been translated by each
9282 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
9283 now that token names are already quoted.
9285 Fix problem reported by Anthony Heading.
9286 * data/glr.c (YYTOKEN_TABLE): New macro.
9287 (yytname): Define if YYTOKEN_TABLE.
9288 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
9289 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
9290 (YYERROR_VERBOSE): Define the same way the other skeletons do.
9291 * src/output.c (prepare_symbols): Output token_table_flag.
9293 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
9295 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
9296 again if the first call fails.
9298 * data/glr.c (yytnamerr): New function.
9299 (yyreportSyntaxError): Use it to dequote most string literals.
9300 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
9301 with other skeletons. All uses changed.
9302 (yytnameerr_): New function.
9303 (yyreport_syntax_error): Use it to dequote most string literals.
9304 * data/yacc.c (yytnamerr): New function.
9305 (yyerrlab): Use it to decode most string literals.
9306 * doc/bison.texinfo (Decl Summary, Calling Convention):
9307 Clarify quoting convention of yytname.
9308 * src/output.c (prepare_symbols): Quote all names. This undoes
9309 the 2005-04-17 change, which is now accomplished (mostly) via
9310 changes in the parsers as described above.
9311 * tests/regression.at (Token definitions, Web2c Actions):
9312 Undo most 2005-04-17 change here, too.
9314 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
9316 Fix more problems reported by twlevo@xs4all.nl.
9317 * tests/cxx-type.at: Don't pipe output of ./types through sed to
9318 remove trailing spaces. This loses the exit status of ./types,
9319 and isn't needed since ./types shouldn't be emitting trailing
9321 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
9322 as the stack isn't valid in that case.
9324 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
9325 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
9326 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
9327 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
9329 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
9330 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
9331 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
9334 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
9335 overly-picky compilers that reject 'char *foo = "bar";'.
9337 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
9338 to FILE * parameter, not to stderr. This fixes a typo introduced
9339 in the 2005-07-12 change.
9341 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
9342 warnings from GCC 4.
9344 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
9345 (yyglrShiftDefer, yysplitStack):
9346 Remove unused parameters b4_pure_formals. All uses changed.
9347 (yyglrShift): Remove unused parameters b4_user_formals.
9349 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
9351 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
9353 Destructor cleanups and regularization among the three skeletons.
9354 * NEWS: Document the behavior changes.
9355 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
9356 stack before failing, as the cleanup code will do it for us now.
9357 * data/lalr1.cc (yyerrlab): Likewise.
9358 * data/glr.c (yyparse): Pop everything off the stack before
9359 freeing it, so that destructors get called properly.
9360 * data/lalr1.cc (yyreturn): Likewise.
9361 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
9362 This is more consistent.
9363 * doc/bison.texinfo (Destructor Decl): Mention more reasons
9364 why destructors might be called. 1.875 -> 2.1.
9365 (Destructor Decl, Decl Summary, Table of Symbols):
9366 Some English-language cleanups for %destructor.
9367 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
9368 Add output line for destructor of start symbol.
9369 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
9370 because of that same extra output line.
9372 * NEWS: Document minor wording changes in diagnostics of
9373 Bison-generated parsers.
9374 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
9375 Remove unused formals. All uses changed.
9376 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
9377 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
9378 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
9379 Rename yyoverflowab to yyexhaustedlab.
9380 When memory exhaustion occurs during syntax-error reporting,
9381 report it separately rather than in a single diagnostic; this
9383 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
9384 (Memory Exhausted): Renamed from Parser Stack Overflow.
9385 Revamp wording slightly to prefer "memory exhaustion".
9386 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
9388 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
9390 Add i18n support to the GLR skeleton. Partially fix the C++
9391 skeleton; a C++ expert needs to finish this. Remove debugging
9392 msgids; there's little point to having them translated, since they
9393 can be understood only by someone who can read the
9394 (English-language) source code.
9396 Generate runtime-po/bison-runtime.pot automatically, so that we
9397 don't have to worry about garbage getting in that file. We'll
9398 make sure after the next official release that old msgids don't
9400 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
9402 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
9404 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
9405 Fix typos in explanations of the runtime file.
9406 * bootstrap: Change gettext keyword from YYI18N to YY_.
9407 Use standard Makefile.in.in in runtime-po, since we'll arrange
9408 for backward-compatible bison-runtime.po files in a different way.
9409 * data/glr.c (YY_): New macro, from yacc.c.
9410 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
9411 Translate messages intended for users.
9412 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
9413 the wording in the other skeletons. We don't know that the memory
9415 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
9416 Use same method that yacc.c uses.
9417 Don't translate debugging messages.
9418 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
9419 it doesn't work (yet), and requires C++ expertise to fix.
9420 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
9421 Move defn to a more logical place, to be consistent with other
9423 Don't translate debugging messages.
9424 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
9425 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
9426 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
9427 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
9429 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
9430 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
9432 * tests/glr-regression.at (Badly Collapsed GLR States):
9434 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9435 yylex should return 0 at EOF rather than aborting.
9437 Improve tests for stack overflow in GLR parser.
9438 Problem reported by twlevo@xs4all.nl.
9439 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
9441 (yyStackOverflow): Just longjmp, but with value 2 so that caller
9442 can handle the problem.
9443 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
9444 (yyparse): New local variable yyresult to record the result.
9445 Use result of setjmp to set it, rather than storing itinto
9447 (yyDone): Remove label.
9448 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
9449 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
9450 if YYABORT is used).
9451 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
9452 yyparse status; put status > 1 into diagnostic.
9453 Check that status==2 works.
9454 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
9455 Use exit status 3 for failure to open (which shouldn't happen).
9457 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
9459 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
9460 1 on syntax error; just let yyparse do its thing.
9461 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
9462 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
9463 (Exploding the Stack Size with Alloca):
9464 (Exploding the Stack Size with Malloc):
9465 Expect exit status 2, not 1, since the parser is supposed to blow
9466 its stack. Problem reported by twlevo@xs4all.nl.
9468 * data/glr.c (yyparse): Don't assume that the initial calls
9469 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
9470 Print a stack-overflow message and fail instead.
9471 Initialize the line-number information before creating the stack,
9472 so that the stack-overflow message can report line zero safely.
9474 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
9476 Fix problems reported by twlevo@xs4all.nl.
9477 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
9478 (yyuserMerge): Provide a default case if b4_mergers is empty.
9479 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
9480 * tests/glr-regression.at
9481 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9482 Add casts to pacify C++ compilers.
9483 * tests/glr-regression.at (Improper merging of GLR delayed action
9484 sets): Declare yylex before using it.
9485 * tests/Makefile.am (maintainer-check-g++): Fix a stray
9486 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
9487 test for valgrind; valgrind is independent of g++.
9488 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
9489 for compatibility with POSIX 1003.1-2001 (if running coreutils).
9490 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
9491 Use a destructor, so that we can expand the stack. Change
9492 YYSTYPE to char * so that we can free it. Cast result of malloc.
9494 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
9496 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
9497 a valgrind failure. Problem reported by twlevo@xs4all.nl.
9499 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
9501 * PACKAGING: New file, suggested by Bruno Haible and taken from
9502 similar wording in gettext's PACKAGING file.
9503 * NEWS: Mention PACKAGING.
9504 * Makefile.am (EXTRA_DIST): Add PACKAGING.
9506 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
9508 * NEWS: Document recent i18n improvements.
9509 * bootstrap: Get runtime translations into runtime-po.
9510 Create runtime-po files automatically, if possible.
9511 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
9512 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
9513 does not infringe on the user's name space.
9514 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
9515 * doc/bison.texinfo (Internationalization): Revamp the English
9516 and Texinfo syntax a bit, to try to make it clearer.
9517 (Bison Options, Option Cross Key): Mention --print-localedir.
9518 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
9519 YYENABLE_NLS. Quote a bit more.
9520 * runtime-po/.cvsignore: New file.
9521 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
9522 * runtime-po/Rules-quot: Remove; now created by bootstrap.
9523 * runtime-po/quot.sed: Likewise.
9524 * runtime-po/boldquot.sed: Likewise.
9525 * runtime-po/en@quot.header: Likewise.
9526 * runtime-po/en@boldquot.header: Likewise.
9527 * runtime-po/insert-header.sin: Likewise.
9528 * runtime-po/remove-potcdate.sin: Likewise.
9529 * runtime-po/Makevars: Likewise.
9530 * runtime-po/LINGUAS: Likewise.
9531 * runtime-po/de.po: Likewise; we will rely on the translation project
9532 to maintain this, so "bootstrap" should get it.
9533 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
9535 * src/main.c (main): Bind the bison-runtime domain, too.
9537 2005-07-12 Bruno Haible <bruno@clisp.org>
9539 * data/yacc.c: Include <libintl.h> when NLS is enabled.
9540 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
9541 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
9542 * runtime-po: New directory.
9543 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
9544 $(DOMAIN).pot-update rule, so that old messages are never dropped.
9545 * runtime-po/Rules-quot: New file, copied from po/.
9546 * runtime-po/quot.sed: Likewise.
9547 * runtime-po/boldquot.sed: Likewise.
9548 * runtime-po/en@quot.header: Likewise.
9549 * runtime-po/en@boldquot.header: Likewise.
9550 * runtime-po/insert-header.sin: Likewise.
9551 * runtime-po/remove-potcdate.sin: Likewise.
9552 * runtime-po/Makevars: New file.
9553 * runtime-po/POTFILES.in: New file.
9554 * runtime-po/LINGUAS: New file.
9555 * runtime-po/bison-runtime.pot: New file.
9556 * runtime-po/de.po: New file.
9557 * m4/bison.m4: New file.
9558 * Makefile.am (SUBDIRS): Add runtime-po.
9559 (aclocaldir, aclocal_DATA): New variables.
9560 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
9562 * src/getargs.c (usage): Document --print-localedir option.
9563 (PRINT_LOCALEDIR_OPTION): New enum item.
9564 (long_options): Add --print-localedir option.
9565 (getargs): Handle --print-localedir option.
9566 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
9567 (Internationalization): New section.
9569 2005-07-12 Akim Demaille <akim@epita.fr>
9571 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
9572 for consistency with the rest of the code.
9573 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
9576 2005-07-12 Akim Demaille <akim@epita.fr>
9578 * src/parse-gram.y: Use %printer instead of YYPRINT.
9580 2005-07-12 Akim Demaille <akim@epita.fr>
9582 * src/symtab.h, src/symtab.c (symbol_print): New.
9583 * src/symlist.h, src/symlist.c (symbol_list_print): New.
9584 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
9586 2005-07-12 Akim Demaille <akim@epita.fr>
9588 * data/glr.c (b4_syncline): Fix (swap) the definitions of
9589 b4_at_dollar and b4_dollar_dollar.
9591 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
9593 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
9594 and Pennello's paper.
9596 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
9598 * data/yacc.c (yyparse): Undo previous patch. Instead,
9599 set yylsp[0] and yyvsp[0] only if the initial action
9600 sets yylloc and yylval, respectively.
9602 * data/yacc.c (yyparse): In the initial action, set
9603 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
9604 This avoids the use of undefined variables if the initial
9605 action does not set yylloc and/or yylval.
9607 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
9609 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
9610 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
9611 Remove from CVS. These files are automatically generated.
9612 * examples/extexi: Clarify that this file is now part of Bison,
9613 not GNU M4, and that it works with any POSIX-compatible Awk.
9614 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
9615 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
9616 so that we also get calc++-parser.yy. Geneate it.
9617 Use $(AWK), not gawk, since any conforming Awk will do.
9618 Put comment before action, since older 'make' can't handle comment
9620 $(BUILT_SOURCES): List all built sources, not just some of them.
9621 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
9622 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
9623 $($(calc_sources_generated)): Remove unnecessary test for existence
9624 of target. (This had a shell syntax error anyway; a stray "x".)
9625 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
9627 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
9629 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
9630 implied by the other modules.
9632 2005-07-06 Akim Demaille <akim@epita.fr>
9634 Bind examples/calc++ to the package.
9635 * examples/calc++/Makefile: Remove, replaced by...
9636 * examples/calc++/Makefile.am: ... this new file.
9637 * examples/calc++/test: Remove input.
9638 * examples/calc++/compile: Remove.
9639 * examples/Makefile.am: New.
9640 * configure.ac, Makefile.am: Adjust.
9641 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
9643 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
9645 * data/glr.c (yyFail): Drastically simplify; since the format argument
9646 never had any % directives, we can simply pass it to yyerror.
9647 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
9648 be modified later, as that is the usual style in glr.c.
9649 Problems reported by Paul Hilfinger.
9651 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
9652 and size overflow errors.
9653 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
9654 in case the user prolog sets feature-test macros like _GNU_SOURCE.
9655 (YYSIZEMAX): New macro.
9656 (yystpcpy): New function, taken from yacc.c.
9657 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
9658 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
9659 so that we don't have to maintain their signatures.
9660 (yyFail): Check for buffer overflow, by using vsnprintf rather
9661 than vsprintf. Allocate a bigger buffer if possible.
9662 Report an error if buffer allocation fails.
9663 (yyStackOverflow): New function.
9664 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
9665 the initialization was successful. It might fail if storage was
9667 (yyexpandGLRStack): Add more checks for storage allocation failure.
9668 Use yyStackOverflow to report failures.
9669 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
9670 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
9671 Don't assume stack number fits in int.
9672 (yysplitStack): Check for storage allocation failure.
9673 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
9674 can print diagnostics on storage allocation failure. All callers
9676 (yyresolveValue): Use yybool for boolean.
9677 (yyreportSyntaxError): Check for size-calculation overflow.
9678 This code is taken from yacc.c.
9679 (yyparse): Check for storage allocation errors when allocating
9682 2005-07-05 Akim Demaille <akim@epita.fr>
9684 Extract calc++ from the documentation.
9685 * doc/bison.texinfo (Calc++): Add the extraction marks.
9686 * examples/extexi: New, from the aborted GNU Programming 2E.
9687 Separate the different paragraph of a file with empty lines.
9688 * examples/Makefile: Use it to extract the whole calc++ example.
9690 2005-06-24 Akim Demaille <akim@epita.fr>
9692 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
9695 2005-06-22 Akim Demaille <akim@epita.fr>
9697 * doc/bison.texinfo (C++ Language Interface): First stab.
9698 (C++ Parsers): Remove.
9700 2005-06-22 Akim Demaille <akim@epita.fr>
9702 * data/lalr1.cc (yylex_): Honor %lex-param.
9704 2005-06-22 Akim Demaille <akim@epita.fr>
9706 Start a set of simple examples.
9707 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
9708 * examples/calc++/calc++-driver.hh,
9709 * examples/calc++/calc++-parser.yy,
9710 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
9711 * examples/calc++/compile, examples/calc++/test: New.
9713 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
9715 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
9716 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
9717 which stems from the 2005-05-27 patch.
9719 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9721 * data/glr.c: Modify treatment of unused parameters to permit use
9722 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
9724 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
9726 Fix infringement on user name space reported by Janos Zoltan Szabo.
9727 * data/yacc.c (yyparse): strlen -> yystrlen.
9729 2005-05-30 Akim Demaille <akim@epita.fr>
9731 * data/lalr1.cc (_): New.
9732 Translate the various messages.
9734 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
9736 Fix infringement on user name space reported by Bruno Haible.
9737 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
9738 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
9739 the user's name space.
9740 (alloca): Include <stdlib.h> to get it, if it's not built in.
9741 (YYMALLOC, YYFREE): Define only if needed.
9742 (malloc, free): Declare, but only if needed, as this infringes on
9743 the user name space.
9745 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
9747 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
9748 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
9750 * lib/ebitset.c (min, max): Undef before defining.
9751 * lib/vbitset.c (min, max): Likewise.
9752 * lib/subpipe.c (create_subpipe): Save local variables in case
9753 vfork clobbers them.
9755 2005-05-24 Bruno Haible <bruno@clisp.org>
9757 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
9758 error message syntax used by gcc-4.0.
9760 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
9762 * README: Mention m4 1.4.3. Remove obsolete advice about
9763 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
9765 * bootstrap: Remove workaround for problem I encountered with
9766 gettext 0.14.1; it seems to be fixed now.
9768 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
9770 * NEWS: Version 2.0a.
9772 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
9773 the previous change.
9775 Various maintainer cleanups.
9776 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
9777 conftest*, for benefit of CVS commands run at the same time as
9778 "configure". Add build-aux, since "bootstrap" now creates it and
9780 * Makefile.cfg (move_if_change): Remove.
9781 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
9782 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
9783 (po_repo, do-po-update, po-update, wget_files, get-targets):
9784 (config.guess-url_prefix, config.sub-url_prefix):
9785 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
9786 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
9787 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
9789 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
9790 this is now the recommended name.
9791 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
9792 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
9793 ylwrap. These files now go into build-aux.
9794 * config/move-if-change: Remove.
9795 * config/prev-version.txt: Bump from 1.75 to 2.0.
9797 * bootstrap: Add stdio-safer, unistd-safer modules.
9798 Remove m4/glibc2.m4 (introduced by latest gnulib, but
9800 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
9801 fopen-safer.c, stdio-safer.h, unistd-safer.h.
9802 * lib/subpipe.c: Include "unistd-safer.h".
9803 (create_subpipe): Make sure all the newly-created
9804 file descriptors are > 2, so that diagnostics don't
9805 get sent down them (which might cause Bison to hang, in theory).
9806 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
9807 * src/files.c (xfopen): Use fopen_safer, not fopen.
9809 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
9810 yesterday's yacc.c fix.
9812 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
9814 * data/glr.c, data/lalr1.cc: Update copyright date.
9816 Fix a destructor bug reported by Wolfgang Spraul in
9817 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
9818 * data/yacc.c (yyabortlab): Don't call destructor, and
9819 don't set yychar to EMPTY.
9820 (yyoverflowlab): Don't call destructor.
9821 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
9822 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
9823 since we no longer output the message "discarding lookahead token
9826 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
9828 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
9829 fix a small glitch in debugging output.
9830 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
9831 after YY_SYMBOL_PRINT where needed.
9833 (struct yyGLRState): Add some comments.
9834 (struct yySemanticOption): Add some comments.
9835 (union yyGLRStackItem): Add comment.
9837 (yymergeOptionSets): Correct this to properly perform the union,
9838 avoiding infinite reported by Michael Rosien.
9841 * tests/glr-regression.at: Add test for GLR merging error reported
9844 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
9846 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
9847 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
9848 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
9849 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
9850 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
9851 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
9852 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
9853 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
9854 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
9855 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
9856 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
9857 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
9858 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
9859 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
9860 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
9861 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
9862 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
9863 src/derives.h, src/files.c, src/files.h, src/getargs.c,
9864 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
9865 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
9866 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
9867 src/output.h, src/parse-gram.c, src/parse-gram.h,
9868 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
9869 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
9870 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
9871 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
9872 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
9873 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
9874 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
9875 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
9876 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
9877 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
9878 tests/reduce.at, tests/regression.at, tests/sets.at,
9879 tests/synclines.at, tests/testsuite.at, tests/torture.at:
9880 Update FSF postal mail address.
9882 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
9884 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
9885 Problem reported by Ralf Menzel.
9887 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
9889 * tests/actions.at: Test that stack overflow invokes destructors.
9890 From Marcus Holland-Moritz.
9891 * data/yacc.c (yyerrlab): Move the code that destroys the stack
9893 (yyreturn): to here. That way, destructors are called properly
9894 even if the stack overflows, or the user calls YYACCEPT or
9895 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
9896 (yyoverflowlab): Destroy the lookahead.
9898 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
9900 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
9902 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
9904 * NEWS: Bison-generated C parsers no longer quote literal strings
9905 associated with tokens.
9906 * src/output.c (prepare_symbols): Don't escape strings,
9907 since users don't want to see C escapes.
9908 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
9910 * tests/input.at (Torturing the Scanner): Likewise.
9911 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
9913 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
9915 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
9916 the data size is known to be too small and we can't increase it.
9917 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
9919 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
9921 * src/parse-gram.y: Include quotearg.h.
9922 (string_as_id): Quote $1 before using it as a key, since the
9923 lexer no longer quotes it for us.
9924 (string_content): Don't strip quotes, since lexer no longer
9926 * src/scan-gram.l: Include quotearg.h.
9928 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
9929 a key, since the rest of the lexer doesn't quote it.
9930 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
9931 * tests/regression.at (Token definitions): Check for backslashes
9934 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
9935 (YYSIZE_T): Define to unsigned long int when using an older compiler.
9936 (yyparse): Revamp code to generate long syntax error message, to
9937 make it easier to translate, and to avoid problems with arithmetic
9938 overflow. Change "virtual memory" to "memory" in diagnostic, since
9939 we don't know whether the memory is virtual.
9941 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
9943 * NEWS: Bison-generated C parsers now use the _ macro to
9945 * data/yacc.c (_) [!defined _]: New macro.
9946 All English strings wrapped inside this macro.
9947 * doc/bison.texinfo (Bison Parser): Document _.
9948 * po/POTFILES.in: Include src/parse-gram.c, since it now
9949 includes translateable strings that parse-gram.y doesn't.
9951 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
9953 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
9954 reverting the 2004-10-11 change to this function.
9955 (symbol_check_alias_consistency): Don't call symbol_type_set
9956 if the type name is already correct.
9957 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
9959 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
9961 * tests/regression.at (Token definitions): Don't use a token named
9962 c, as that generates a "#define c ..." that runs afoul of buggy
9963 stdlib.h that uses the identifier c as a member of struct
9964 drand48_data. Problem reported by Horst Wente.
9966 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
9968 * bootstrap: Change translation URL from
9969 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
9970 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
9971 redirection glitches. Problem reported by twlevo@xs4all.nl.
9973 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
9975 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
9976 after operands; POSIX says this isn't portable for the c99 command.
9978 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
9980 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
9981 immediately if a data overrun has occurred; this may help us track
9982 down what may be a spurious failure on MacOS.
9984 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
9986 Respond to problems reported by twlevo@xs4all.nl.
9988 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
9990 * src/vcg.h: Comment fix.
9991 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
9992 (G_CMAX): Change to -1 instead of INT_MAX.
9994 * data/yacc.c (yyparse): Omit spaces before #line.
9996 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
9998 * src/tables.c (state_number_to_vector_number): Put it inside an
9999 "#if 0", since it's not currently used. Problem reported by
10002 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
10004 * src/output.c (escaped_output): Renamed from
10005 escaped_file_name_output, since we now use it for symbol tags as
10006 well. All uses changed.
10007 (symbol_destructors_output, symbol_printers_output):
10008 Escape symbol tags too.
10009 Problem reported by Matyas Forstner in
10010 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
10012 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
10014 * src/output.c (user_actions_output, token_definitions_output,
10015 symbol_destructors_output, symbol_printers_output): Likewise.
10016 * src/reader.c (prologue_augment): Likewise.
10017 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
10019 * src/vcg.c (output_edge): Don't quote linestyle arg.
10020 Problem reported by twlevo@xs4all.nl.
10022 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
10024 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
10025 example, reported by Derek M Jones. Also, make the example even
10026 more outrageous, to better illustrate how bad the problem is.
10028 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
10030 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
10031 putsym. Typo reported by Sebastian Piping.
10033 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
10035 * doc/bison.texinfo (Language and Grammar): some -> same
10036 (Epilogue): int he -> in the
10037 Typos reported by Sebastian Piping via Justin Pence.
10039 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
10041 * tests/glr-regression.at (Improper handling of embedded actions
10042 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
10043 embedded actions and $-N in GLR parsers", work around an Autoconf bug
10044 with dollar signs in test names.
10045 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
10046 for a similar reason.
10048 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
10050 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
10051 wants to redefine G_VIEW.
10053 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
10055 * src/vcg.c (get_view_str): Remove case for normal_view.
10056 Problem reported by twlevo@xs4all.nl.
10058 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
10060 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
10061 Problem reported by twlevo@xs4all.nl.
10063 * doc/bison.texinfo: Change @dircategory from "GNU programming
10064 tools" to "Software development". Requested by Richard Stallman
10067 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
10069 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
10070 Problem reported by twlevo@xs4all.nl.
10072 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
10074 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
10075 keyword; it's not needed with modern compilers, and it doesn't
10076 affect correctness with older compilers. Suggested by
10079 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
10081 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
10082 gcc -Wswitch-default.
10083 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
10084 * data/yacc.c (yyparse): Likewise.
10086 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
10088 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
10089 already. Let config.h define any nonstandard values.
10091 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
10093 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
10094 for the benefit of slower hosts. Problem reported by
10095 Nelson H. F. Beebe.
10097 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
10099 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
10100 being defined and not used.
10101 * data/lalr1.cc (yyparse): Likewise.
10102 Use "if (false)" rather than "if (0)".
10104 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
10106 * TODO: Mention that we should allow NUL bytes in tokens.
10108 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
10110 * src/scan-skel.l (<<EOF>>): Don't close standard output.
10111 Problem reported by Hans Aberg.
10113 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
10115 * src/getargs.c (version): Happy new year; update overall
10116 program copyright date from 2004 to 2005.
10118 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
10119 Problem reported by Hans Aberg.
10120 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
10121 (Output file names.): Add a test for the case when standard output
10124 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
10126 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
10127 to fix an oversight in the Bison 2.0 manual.
10129 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
10131 * NEWS: Version 2.0. Reformat the existing news items since
10132 1.875, so that related items are grouped together.
10133 * configure.ac (AC_INIT): Bump version to 2.0.
10134 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
10136 * tests/torture.at (Exploding the Stack Size with Alloca): Set
10137 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
10138 otherwise, we're not testing alloca. Unfortunately there's no
10139 simple way to consult HAVE_ALLOCA here.
10141 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
10144 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
10145 hand. This avoids a warning about comparing int to size_t when
10146 GCC warnings are enabled.
10148 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
10150 * NEWS: Bison-generated parsers no longer default to using the
10151 alloca function (when available) to extend the parser stack, due
10152 to widespread problems in unchecked stack-overflow detection.
10153 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
10154 responsibility to set it to a positive value. This lets the user
10155 specify a value that is not a preprocessor constant.
10156 * data/yacc.c (YYMAXDEPTH): Likewise.
10157 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
10158 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
10159 to be a compile-time constant. However, explain the constraints on it.
10160 Also, explain the constraints on YYINITDEPTH.
10161 (Table of Symbols): Explain that alloca is no longer the default.
10162 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
10165 * doc/bison.texinfo (Location Default Action): Mention that n must
10166 be zero when k is zero. Suggested by Frank Heckenbach.
10168 2004-12-22 Akim Demaille <akim@epita.fr>
10170 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
10171 (parser::state_type, parser::semantic_type, parser::location_type):
10172 Private, not public.
10173 (parser::parse): Return ints, not bool.
10174 Returning a bool introduces a problem: 0 corresponds to false, and
10175 it seems weird to return false on success. Returning true changes
10176 the conventions for yyparse.
10177 Alternatively we could return void and send an exception.
10178 There is no clear consensus (yet?).
10179 (state_stack, semantic_stack, location_stack): Rename as...
10180 (state_stack_type, semantic_stack_type, location_stack_type): these.
10181 Private, not public.
10182 * tests/c++.at: New.
10183 * tests/testsuite.at, tests/Makefile.am: Adjust.
10185 2004-12-21 Akim Demaille <akim@epita.fr>
10187 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
10189 2004-12-21 Akim Demaille <akim@epita.fr>
10191 Don't impose std::string for filenames.
10193 * data/lalr1.cc (b4_filename_type): New.
10194 (position::filename): Use it.
10195 (parser.hh): Move the inclusion of stack.hh and location.hh below
10196 the user code, so that needed headers for the filename type can be
10198 Forward declare them before the user code.
10199 * tests/Makefile.am (check-local, installcheck-local): Pass
10200 TESTSUITEFLAGS to the TESTSUITE.
10202 2004-12-20 Akim Demaille <akim@epita.fr>
10204 Use more STL like names: my_class instead of MyClass.
10206 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
10207 (SemanticStack, SemanticType, StateStack, StateType)
10208 (TokenNumberType, Stack, Slice, Traits, Parser::location)
10209 (Parser::value): Rename as...
10210 (location_stack, location_type, rhs_number_type, semantic_stack)
10211 (semantic_type, state_stack, state_type, token_number_type, stack)
10212 (slice, traits, parser::yylloc, parser::yylval): these.
10214 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
10216 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
10218 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
10219 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
10221 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
10223 Remove uses of 'short int' and 'unsigned short int'. This raises
10224 some arbitrary limits. It uses more memory but nowadays that's
10225 not much of an issue.
10227 This change does not affect the generated parsers; that's a different
10228 task, as some users will want to conserve memory there.
10230 Ideally we should use size_t to represent all object counts, and
10231 something like ptrdiff_t to represent signed differences of object
10232 counts; but that will require more code-cleanup than I have the
10233 time to do right now.
10235 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
10236 Use size_t, not int or short int, to count objects.
10237 * src/closure.c (nritemset, closure): Likewise.
10238 * src/closure.h (nritemset, closure): Likewise.
10239 * src/nullable.c (nullable_compute): Likewise.
10240 * src/print.c (print_core): Likewise.
10241 * src/print_graph.c (print_core): Likewise.
10242 * src/state.c (state_compare, state_hash): Likewise.
10243 * src/state.h (struct state): Likewise.
10244 * src/tables.c (default_goto, goto_actions): Likewise.
10246 * src/gram.h (rule_number, rule): Use int, not short int.
10247 * src/output.c (prepare_rules): Likewise.
10248 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
10249 errs, reductions): Likewise.
10250 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
10252 * src/tables.c (vector_number, tally, action_number,
10253 ACTION_NUMBER_MINIMUM): Likewise.
10254 * src/output.c (muscle_insert_short_int_table): Remove.
10256 2004-12-17 Akim Demaille <akim@epita.fr>
10258 * data/lalr1.cc: Extensive Doxygenation.
10259 (error_): Rename as...
10260 (error): this, since it is visible to the user.
10262 (Parser::message): Now an automatic variable from...
10263 (Parser::yyreport_syntax_error_): here.
10264 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
10266 * tests/input.at: Escape $.
10268 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
10270 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
10271 Parenthesize rhs to avoid obscure problems with mistakes like
10272 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
10273 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
10274 b4_rhs_location): Likewise.
10275 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
10276 b4_rhs_location): Likewise.
10278 2004-12-16 Akim Demaille <akim@epita.fr>
10280 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
10281 yacc.c: be sure to stay within yycheck_.
10282 * tests/actions.at: Re-enable C++ tests.
10284 2004-12-16 Akim Demaille <akim@epita.fr>
10286 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
10289 2004-12-16 Akim Demaille <akim@epita.fr>
10291 Use #define to handle the %name-prefix.
10293 * data/glr.c, data/yacc.c: Comment changes.
10294 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
10295 so that one can refer to yylex in the parser file, and have it
10296 renamed, as is the case with other skeletons.
10298 2004-12-16 Akim Demaille <akim@epita.fr>
10300 Move lalr1.cc internals into yy*.
10302 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
10303 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
10304 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
10305 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
10306 (empty_, final_, terror_, errcode_, ntokens_)
10307 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
10308 (looka_, ilooka_, error_range_, nerrs_):
10310 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
10311 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
10312 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
10313 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
10314 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
10315 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
10316 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
10317 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
10320 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
10322 Fix some problems reported by twlevo at xs4all.
10323 * src/symtab.c (symbol_new): Report an error if the input grammar
10324 contains too many symbols. This is better than calling abort() later.
10325 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
10326 (struct node, struct graph):
10327 Rename member expand to stretch. All uses changed.
10328 (struct graph): Remove member layoutalgorithm. All uses removed.
10329 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
10330 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
10332 (N_STRETCH): Rename from N_EXPAND. All uses changed.
10334 2004-12-15 Akim Demaille <akim@epita.fr>
10336 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
10337 Add more Doxygen comments.
10338 (symprint_, stack_print_, reduce_print_, destruct_, pop)
10339 (report_syntax_error_, translate_): Rename as...
10340 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
10341 (yypop_, yyreport_syntax_error_, yytranslate_): this.
10343 2004-12-15 Akim Demaille <akim@epita.fr>
10345 * data/lalr1.cc (lex_): Rename as...
10347 Move the trace here.
10348 Take the %name-prefix into account.
10349 Reported by Alexandre Duret-Lutz.
10351 2004-12-15 Akim Demaille <akim@epita.fr>
10353 Simplify the C++ parser constructor.
10355 * data/lalr1.cc (debug_): Rename as...
10356 (yydebug_): so that the parser's internals are always in the yy*
10359 (b4_parse_param_decl): Remove the leading comma as it is now only
10360 called as unique argument list.
10361 (Parser::Parser): Remove the constructor accepting a location and
10362 an initial debugging level.
10363 Remove from the other ctor the argument for the debugging level.
10364 (debug_level_type, debug_level, set_debug_level): New.
10366 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
10369 2004-12-15 Akim Demaille <akim@epita.fr>
10371 Remove b4_root related material: failure experiment
10372 (which goal was to allow to derive from a class).
10374 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
10375 definitions and uses.
10377 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
10379 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
10380 not 2, since it's not portable to subtract 1 from the start of an
10381 array. The new item 0 is never set or used. All uses changed.
10383 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
10384 the default definition of YYLLOC_DEFAULT. Problem reported
10385 by Frank Heckenbach.
10387 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
10389 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
10390 the normal case and one for the error case. Just use the
10391 first one uniformly. Problem reported by Frank Heckenbach.
10392 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
10393 use exactly the same macro in both places.
10394 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
10395 so that the normal-case YYRHSLOC works for the error case too.
10397 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
10398 (YYLLOC_DEFAULT): Use the same macro as glr.c.
10399 * doc/bison.texinfo (Location Default Action): Don't claim that
10400 we have an array of locations. Use the same macro for both glr
10401 and lalr parsers. Mention YYRHSLOC. Mention what happens when
10404 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
10406 * HACKING: Update email addresses to send announcements to.
10408 * configure.ac (AC_INIT): Bump version to 1.875f.
10410 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
10412 * NEWS: Version 1.875e.
10413 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
10415 * src/scan-skel.l: Include "complain.h", for "fatal".
10417 * src/relation.h (relation_print, relation_digraph):
10418 Relation sizes are of type relation_node, not size_t (this is
10419 merely a doc fix, since the two types are equivalent).
10420 (relation_transpose): Relation sizes are of type relation_node,
10422 * src/relation.c: Likewise.
10423 (top, infinity): Now of type relation_node, not int.
10424 (traverse, relation_transpose): Use relation_node, not int.
10426 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
10427 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
10428 (yyparse): Remove unused local introduced in 2004-10-25 patch.
10430 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
10431 specifying whether the test should be skipped. Use it tp
10432 specify that the [%defines %skeleton "lalr1.cc"] tests currently
10433 fail on some hosts, and should be skipped.
10435 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
10437 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
10438 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
10439 unless otherwise specified below.
10441 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
10442 to allocate kernel_base, kernel_items, kernel_size, since
10443 they needn't be initialized to 0.
10444 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
10445 * src/closure.c (new_closure): Likewise, for itemset.
10446 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
10447 * src/lalr.c (set_goto_map): Likewise, for temp_map.
10448 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
10449 (build_relations): Likewise for edge, states1, includes.
10450 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
10451 * src/reader.c (packgram): Likewise, for ritem, rules.
10452 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
10453 * src/relation.c (relation_digraph): Likewise for VERTICES.
10454 (relation_transpose): Likewise for new_R, end_R.
10455 * src/symtab.c (symbols_token_translations_init): Likewise for
10456 token_translations.
10457 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
10458 (token_actions): Likewise for yydefact, actrow, conflrow,
10460 (save_column): Likewise for froms[symno], tos[symno].
10461 (goto_actions): Likewise for state_count.
10462 (pack_table): Likewise for base, pos, check.
10463 (tables_generate): Likewise for width.
10465 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
10466 for initial core. Just have a separate core, so we needn't worry
10467 about whether kernel_size and kernel_base are initialized.
10469 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
10470 kernel_size, kernel_items): Remove unnecessary initialization.
10471 * src/conflicts.c (conflicts): Likewise.
10472 * src/derives.c (derives): Likewise.
10473 * src/muscle_tablc (muscle_insert): Likewise.
10474 * src/relation.c (relation_digraph): Likewise.
10475 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
10476 conflrow, conflict_table, conflict_list, table, check):
10479 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
10480 This is because all callers pass unsigned int.
10481 * src/closure.h (new_closure): Likewise.
10483 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
10484 (build_relations): Initialize includes[i] in all cases.
10485 * src/reader.c (packgram): Always initialize rules[ruleno].prec
10486 and rules[ruleno].precsym. Initialize members in order.
10487 * src/relation.c (relation_transpose): Always initialize new_R[i]
10489 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
10491 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
10492 conflict_list[0] was always 0, but now it isn't initialized.
10494 * src/table.c (table_grow): When conflict_table grew, the grown
10495 area wasn't cleared. Fix this.
10497 * lib/.cvsignore: Add strdup.c, strdup.h.
10498 * m4/.cvsignore: Add strdup.m4.
10500 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
10502 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
10503 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
10504 GOTO_NUMBER_MAXIMUM, since we occasionally compute
10505 ngotos + 1 without checking for overflow.
10506 (build_relations): Use END_NODE, not -1, to denote end of edges.
10507 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
10508 build_relations): Use goto_number, not int, for goto numbers.
10509 * src/tables.c (save_column, default_goto): Likewise.
10511 2004-11-23 Akim Demaille <akim@epita.fr>
10513 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
10514 of #defining from yystype.
10515 Don't typedef yystype, C++ does not need it.
10516 This lets it possible to forward declare it as union.
10518 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
10520 * bootstrap (gnulib_modules): Add extensions.
10521 Problem reported by Jim Meyering.
10523 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
10525 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
10526 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
10527 src/system.h, src/tables.c: XFREE -> free, to accommodate
10528 recent change to gnulib xalloc.h.
10529 Problem reported by Jim Meyering.
10531 2004-11-17 Akim Demaille <akim@epita.fr>
10533 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
10535 2004-11-17 Akim Demaille <akim@epita.fr>,
10536 Alexandre Duret-Lutz <adl@gnu.org>
10538 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
10540 (YYCDEBUG): Adjust.
10541 Use it instead of cdebug_.
10542 (Parser::debug_stream, Parser::set_debug_stream): New.
10543 (Parser::symprint_): Define cdebug_ for temporary backward
10545 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
10548 2004-11-17 Akim Demaille <akim@epita.fr>
10550 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
10551 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
10552 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
10553 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
10555 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
10557 * data/glr.c (yyloc_default): Remove; not used.
10558 Problem reported by Frank Heckenbach.
10560 2004-10-25 Akim Demaille <akim@epita.fr>
10562 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
10563 Introduce another definition to address simple location arrays.
10564 (yyGLRStack): New member: yyerror_range.
10565 (yyrecoverSyntaxError, yyparse): Update it.
10566 (yyrecoverSyntaxError): Use it when shifting the error token to
10567 have an accurate range, equivalent to the one computed by both
10568 yacc.c and lalr1.cc.
10569 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
10570 that column numbers start at column 0, as per GNU Coding
10571 Standards, the others tests, and the doc.
10572 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
10573 Adjust to the above change (first column is 0).
10574 And adjust the location of the "<error>", now covering the whole
10577 2004-10-22 Akim Demaille <akim@epita.fr>
10578 and Paul Eggert <eggert@cs.ucla.edu>
10580 Remove some arbitrary limits on goto numbers and relations.
10581 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
10582 initial values, since they're never used.
10583 (set_goto_map): ngotos is now unsigned, so test for overflow
10584 by seeing whether it wraps around to zero.
10585 * src/lalr.h (goto_number): Now size_t, not short int.
10586 (GOTO_NUMBER_MAXIMUM): Remove.
10587 * src/relation.c (relation_print, traverse, relation_transpose):
10588 Check for END_NODE rather than looking at sign.
10589 * src/relation.h (END_NODE): New macro.
10590 (relation_node): Now size_t, not short int.
10592 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
10594 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
10595 keyword, not an identifier. Problem reported by Baron Schwartz in
10596 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
10598 2004-10-11 Akim Demaille <akim@epita.fr>
10600 * src/symtab.c (symbol_check_alias_consistency): Also check
10601 type names, destructors, and printers.
10602 Reported by Alexandre Duret-Lutz.
10603 Recode the handling of associativity and precedence in terms
10604 of symbol_precedence_set.
10605 Accept no redeclaration at all, not even equal to the previous
10607 (redeclaration): New.
10608 Use it to factor redeclaration complaints.
10609 (symbol_make_alias): Don't set the type of the alias, let
10610 symbol_check_alias_consistency do it as for other features.
10611 * src/symtab.h (symbol): Add new member prec_location, and
10613 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
10614 * tests/input.at (Incompatible Aliases): New.
10616 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
10618 .cvsignore fixes to accommodate gnulib changes,
10619 and the practice of naming build directories "_build".
10620 * .cvsignore: Add "_*". Sort.
10621 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
10622 * m4/.cvsignore: Add "*_gl.m4".
10624 2004-10-06 Akim Demaille <akim@epita.fr>
10626 * src/parse-gram.y (add_param): Fix the truncation of trailing
10629 2004-10-05 Akim Demaille <akim@epita.fr>
10631 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
10632 whether the reducion was empty or not. This leaves room to
10633 improve the use of YYLLOC_DEFAULT in such a case.
10634 lalr1.cc is still experimental, so changing this is acceptable.
10635 And finally, there are probably not many users who changed the
10636 handling of locations in GLR, so changing is admissible too.
10638 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
10639 empty reduction, set @$ to an empty location ending the previously
10641 Adjust uses to make sure the code is triggered on empty
10643 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
10644 expected output: empty reductions have empty locations.
10646 2004-09-29 Akim Demaille <akim@epita.fr>
10648 * data/lalr1.cc: Move towards a more standard C++ coding style
10649 for templates: Class < T > -> Class<T>.
10651 2004-09-29 Akim Demaille <akim@epita.fr>
10653 * data/lalr1.cc: Reinstall the former ctor, for sake of
10654 compatibility, but warn it will be removed.
10655 Move towards a more standard C++ coding style (i.e., type *var ->
10658 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
10660 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
10661 since it's less likely to work if NULs are involved in the future.
10663 2004-09-27 Akim Demaille <akim@epita.fr>
10665 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
10667 2004-09-27 Akim Demaille <akim@epita.fr>
10669 * data/lalr1.cc (b4_parse_param_decl_1): New.
10670 (b4_parse_param_decl): Use it to have different names between attribute
10671 and argument names.
10672 (b4_cc_constructor_call): Likewise.
10674 2004-09-24 Akim Demaille <akim@epita.fr>
10676 * src/parse-gram.y (add_param): Strip the leading and trailing
10677 blanks from a formal argument declaration.
10678 (YY_LOCATION_PRINT): New.
10680 2004-09-24 Akim Demaille <akim@epita.fr>
10682 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
10683 after the location.
10685 2004-09-24 Akim Demaille <akim@epita.fr>
10687 * doc/bison.texinfo (Table of Symbols): Sort.
10689 2004-09-21 Akim Demaille <akim@epita.fr>
10691 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
10692 the useless parentheses.
10693 Suggested by Paul Eggert.
10695 2004-09-20 Akim Demaille <akim@epita.fr>
10697 Let the initial-action act on the look-ahead, and use it for the
10698 "initial push" (corresponding to an hypothetical beginning-of-file).
10699 And let lalr1.cc honor %initial-action.
10701 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
10703 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
10704 (Parser::Parser): Remove the ctor that used to initialize it.
10705 (Parser::parse): Like in the other skeletons, issue the "starting
10706 parse" message before any action.
10707 Honor %initial-action.
10708 Initialize the stacks with the lookahead.
10709 * data/yacc.c: Let $$ and @$ in %initial-action designate the
10711 Push them in the stacks.
10712 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
10714 2004-09-20 Akim Demaille <akim@epita.fr>
10716 * doc/bison.texinfo (Initial Action Decl): New.
10718 2004-09-20 Akim Demaille <akim@epita.fr>
10720 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
10721 clearer criterion to define it.
10722 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
10723 When reducing on an empty RHS, use the latest stacked location as
10725 yylloc is not always available.
10726 * data/glr.c: Likewise.
10727 Also, honor initial-actions.
10729 2004-09-20 Akim Demaille <akim@epita.fr>
10731 * data/yacc.c (YY_LOCATION_PRINT): New.
10732 Define when we know YYLTYPE's structure, i.e., when the default
10733 YYLLOC_DEFAULT is used.
10734 * data/c.m4 (b4_yysymprint_generate): Use it.
10735 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
10736 value of the result.
10737 (error_start_): Replace with...
10738 (error_range_): this location array.
10739 This allows to replace code relying on the implementation of
10740 locations by portable code.
10741 * data/yacc.c (yylerrsp): Replace with...
10742 (yyerror_range): this.
10743 Every time a token is popped, update yyerror_range[0], to have an
10744 accurate location for the error token.
10745 * data/glr.c (YY_LOCATION_PRINT): New.
10746 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
10747 deference a pointer.
10748 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
10749 report the location in %printers.
10751 * src/scan-skel.l: Instead of abort, report error messages to ease
10752 understanding skeleton scanning failures.
10754 2004-09-16 Akim Demaille <akim@epita.fr>
10756 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
10757 (iterator, const_iterator): these, to be more in the C++ spirit.
10758 Also, return reverse iterators so that when displaying the stack
10759 we display its bottom first.
10760 (Parser::stack_print_, Parser::reduce_print_): Match the messages
10762 We should probably use vector here though.
10764 2004-09-16 Akim Demaille <akim@epita.fr>
10766 Have more complete shift traces.
10768 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
10769 to report Shifts instead of ad hoc YYDPRINTF invocations,
10770 including for the error token.
10771 * data/lalr1.cc (symprint_): Output the location.
10772 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
10773 output the location within the %printer.
10774 Activate GLR tests, at least to make sure they compile properly.
10775 They still don't pass though.
10776 * tests/calc.at: Adjust expect verbose output, since now "Entering
10777 state..." is on a different line than the "Shifting" message.
10779 2004-09-08 Akim Demaille <akim@epita.fr>
10781 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
10782 Bison directive from the Bison file to the invocation of this
10783 macro, so that these directives are passed to
10784 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
10785 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
10786 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
10787 the extra Bison directives instead of the whole series.
10788 Change the grammar so that there are recoverable errors, and
10789 unrecoverable errors. Now we can have the parser give up before
10790 consuming the whole input. As a result we now can observe that
10791 the lookahead is freed when needed.
10792 Change the parser source to parse argv[1] instead of a hard coded
10794 Simplify yylex, and give a value and location to EOF.
10795 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
10796 passed directives already coded in the file.
10797 Add some tests to check the location of "error".
10798 For some tests, the C++ parser is correct, and not yacc.c.
10799 For other tests, they provide different, but unsatisfying, values,
10800 so keep the C++ value so that at least one parser is "correct"
10801 according to the test suite.
10802 (Actions after errors): Remove, this is subsumed by the
10803 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
10805 2004-09-06 Akim Demaille <akim@epita.fr>
10807 * data/lalr1.cc: Adjust the indentation of the labels.
10808 (Parser::pop): New.
10811 2004-09-06 Akim Demaille <akim@epita.fr>
10813 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
10814 argument, an informative message.
10815 Call YY_SYMBOL_PRINT.
10816 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
10817 * data/lalr1.cc (destruct_): Likewise.
10818 In addition, no longer depend on b4_yysymprint_generate and
10819 b4_yydestruct_generate to generate these functions, do it "by
10822 2004-09-03 Akim Demaille <akim@epita.fr>
10824 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
10825 invoked, yydestruct the lookahead.
10826 * tests/calc.at (Calculator $1): Update the expected lengths of
10827 traces: there is an added line for the discarded lookahead.
10828 * doc/bison.texinfo (Destructor Decl): Some rewording.
10829 Define "discarded" symbols.
10831 2004-09-02 Akim Demaille <akim@epita.fr>
10833 * data/lalr1.cc (translate_, destruct_): No reason to be static.
10835 2004-09-02 Akim Demaille <akim@epita.fr>
10837 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
10838 (YYDSYMPRINTF): Rename as...
10839 (YY_SYMBOL_PRINT): this.
10840 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
10842 Use it instead of direct symprint_ calls.
10843 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
10846 2004-09-02 Akim Demaille <akim@epita.fr>
10848 * data/lalr1.cc (b4_yysymprint_generate): New.
10849 (symprint_): New member function, defined when YYDEBUG.
10850 Use it consistently instead of token/nterm debugging output by
10852 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
10853 %printer calls to use cdebug_ when using lalr1.cc.
10855 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
10857 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
10858 with #ifdef YYDEBUG.
10860 2004-08-26 Akim Demaille <akim@epita.fr>
10862 * doc/bison.texinfo (Implementing Loops): Rename as...
10863 (Implementing Gotos/Loops): this.
10865 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
10867 Adjust to latest gnulib.
10868 * bootstrap (gnulib_modules): Add xalloc-die.
10869 Set LC_ALL=C so that file names sort consistently.
10870 Prefer the gnulib copies of gettext.m4, glibc21.m4,
10871 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
10872 uintmax_t.m4, ulonglong.m4.
10873 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
10874 po.m4 since we are now using _gl.m4 instead.
10876 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
10878 * src/scan-action.l: Remove. Scanning of semantic actions is
10879 handled in scan-gram.l.
10881 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
10883 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
10885 * src/location.h (struct): The file member is a uniqstr.
10886 (equal_boundaries): Use UNIQSTR_EQ for comparison.
10888 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
10890 Fix bug with non-%union parsers that have printers or destructors,
10891 which led to a Bison core dump. Reported by Peter Fales in
10892 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
10894 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
10895 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
10896 not to our own type.
10897 * src/output.c (symbol_destructors_output, symbol_printers_output):
10898 Don't assume %union.
10899 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
10900 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
10901 UNION-FLAG. All callers changed.
10902 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
10903 Use type char, not unsigned int, when declaring an array of char;
10904 this lets us remove a cast.
10905 (Printers and Destructors): Add non-%union test cases.
10907 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
10909 * doc/bison.texinfo: Minor editorial changes, mostly to the new
10910 GLR writeups. E.g., avoid frenchspacing and the future tense,
10911 change "lookahead" to "look-ahead", and change "wrt" to "with
10914 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10916 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
10917 New sections, split off from the GLR Parsers section. Put the new
10918 Simple GLR Parser near the start of the GLR section, for clarity.
10919 Rewrite connective text.
10921 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
10923 * doc/bison.texinfo (Simple GLR Parsers): New section.
10925 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
10927 * NEWS, TODO, doc/bison.texinfo:
10928 Use "look-ahead" instead of "lookahead", to be consistent.
10929 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
10930 while we're fixing "look-ahead".
10931 * src/conflicts.c (shift_set): Renamed from shiftset.
10932 (look_ahead_set): Renamed from lookaheadset.
10933 * src/print.c: Likewise.
10934 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
10935 name for "lookahead".
10936 (report_types, usage): Likewise.
10937 * src/getargs.h (report_look_ahead_tokens): Renamed from
10939 * src/lalr.c (compute_look_ahead_tokens): Renamed from
10940 compute_lookaheads.
10941 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
10942 (look_ahead_tokens_print): Renamed from lookaheads_print.
10943 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
10944 state_rule_lookaheads_print.
10945 * src/state.h: Likewise.
10946 (reductions.look_ahead_tokens): Renamed from lookaheads.
10947 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
10948 AT_DATA_LOOKAHEADS_GRAMMAR.
10950 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
10952 * README: Update location of patched M4 distribution.
10954 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
10956 Don't assume the C++ compiler takes the same arguments as the C compiler
10958 * configure.ac (O0CXXFLAGS): New var.
10959 * tests/atlocal.in (CXXFLAGS): Use it.
10961 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
10963 Fix some "make check" problems with C++ reported by
10964 Albert Chin-A-Young for Tru64 C++ in this thread:
10965 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
10967 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
10968 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
10969 Output to a .cc file for C++, not to a .c file.
10970 * tests/calc.at (AT_CHECK_CALC): Likewise.
10971 * tests/regression.at (AT_CHECK_DANCER): Likewise.
10972 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
10974 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
10976 * tests/calc.at, tests/actions.at: Workaround for SGI
10977 C++ compiler. (trivial change)
10979 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
10981 Spent a few hours checking out which prerequisite versions the
10982 current sources actually require. I went all the way back to
10983 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
10984 a seemingly endless set of combinations of versions more recent
10985 than that. The bottom line is that the current sources require
10986 fairly recent versions of the build tools, and it'll be some work
10988 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
10989 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
10990 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
10991 Add comments explaining why those particular versions are
10994 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
10995 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
10996 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
10998 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
10999 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
11001 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
11003 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
11004 0.11.5. Suggested by Bruno Haible.
11005 * bootstrap: Remove gettext version checking.
11007 * doc/bison.texinfo (Decl Summary): Also mention that %union
11008 can depend on prerequisite types. Problem reported by Tim
11011 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
11013 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
11014 * README-alpha: Don't tell people not to package this.
11016 * bootstrap: Don't assume $(...) works; use `...` instead.
11017 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
11020 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
11021 put into the -d output file, and mention what to do if YYSTYPE is
11022 defined as a macro.
11024 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
11026 Undo change made earlier today: it caused autopoint to not bring
11027 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
11030 * bootstrap: Check that gettext version matches what's in
11031 configure.ac. Warn users to ignore robots.txt ERROR 404.
11032 * bootstrap: Undo today's earlier change (logged below).
11033 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
11035 The gettext version checking is causing more trouble than it's
11036 curing; remove it. Problem reported by Paul Hilfinger.
11038 * bootstrap: Issue a warning that one can expect a message
11039 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
11040 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
11042 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
11044 Ensure that the C++ compiler used for testing actually works on a
11045 simple test program; if not, skip the C++-related tests. Problem
11046 reported by Vin Shelton in:
11047 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
11049 * m4/cxx.m4: New file.
11050 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
11051 * tests/atlocal.in (BISON_CXX_WORKS): Add.
11052 * tests/local.at (AT_COMPILE_CXX): Use it.
11054 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
11056 * data/glr.c (yylloc): Output this macro even if locations are not
11057 being generated, as the GLR parser needs it even in that case.
11058 Problem reported by Troy A. Johnson
11059 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
11061 * configure.ac (AC_INIT): Update to 1.875e.
11063 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
11065 * NEWS: Version 1.875d.
11066 * configure.ac (AC_INIT): Likewise.
11067 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
11069 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
11070 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
11071 lalr1.cc runs afoul of the first, and the last two are no longer
11072 supported by GCC 3.4.0.
11073 * README: Mention GNU m4 1.4 or later; mention m4 patches.
11074 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
11076 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
11078 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
11079 unsigned int, for compatibility with latest gnulib hash module.
11080 * src/state.c (state_hash, state_hasher): Likewise.
11081 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
11082 * src/uniqstr.c (hash_uniqstr): Likewise.
11084 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
11086 * NEWS: Unescaped newlines are no longer allowed in char & strings.
11088 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
11089 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
11090 character and string literals.
11091 (unexpected_end): New function.
11092 (unexpected_eof): Use it.
11093 (unexpected_newline): New function.
11094 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
11097 * NEWS: Document %expect-rr.
11099 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
11100 Fix typo by replacing $1 with $option.
11101 Remove more 'intl'-related files.
11102 Don't DEFUN AM_INTL_SUBDIR twice.
11104 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
11105 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
11107 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
11108 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
11109 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
11110 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
11111 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
11112 * src/.cvsignore: Add *.output.
11114 * src/parse-gram.y: Put copyright notice inside %{ %} so it
11115 gets copied to the output file.
11117 2004-04-28 Paul Eggert <eggert@twinsun.com>
11119 Get files from the gnulib and po repositories, instead of relying
11120 on them being in our CVS. Upgrade to latest versions of gnulib
11123 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
11124 * bootstrap: Bootstrap from gnulib and po repositories.
11125 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
11126 * README-cvs: Document these changes. Remove version numbers from
11127 mentions of build tools, since they change so often. Mention Flex.
11129 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
11130 (gl_USE_SYSTEM_EXTENSIONS): Add.
11131 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
11132 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
11134 (AC_ISC_POSIX): Remove; we no longer support this
11135 ancient OS, as it gets in the way of latest Autoconf & gnulib.
11136 (AC_HEADER_STDC): Remove: we now assume C89 or better.
11137 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
11138 Do not check for C89 headers, except for locale.h which is used
11139 by the Yacc library and must port to K&R hosts.
11140 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
11141 Do not check for C89 functions, except for setlocale which is
11142 used by the Yacc library.
11143 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
11144 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
11145 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
11146 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
11147 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
11148 AM_GNU_GETTEXT): Remove; now done by:
11149 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
11150 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
11153 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
11154 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
11155 Define to empty, as gnulib.mk will do the rest for us.
11156 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
11158 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
11159 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
11161 * src/files.c: Include gnulib's xstrndup.h.
11163 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
11164 (REALLOC): Use xnrealloc, for likewise.
11165 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
11166 (strnlen, memrchr): Remove decls; functions no longer used.
11167 Include <stpcpy.h>.
11169 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
11170 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
11171 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
11172 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
11173 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
11174 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
11175 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
11176 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
11177 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
11178 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
11179 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
11180 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
11181 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
11182 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
11183 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
11184 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
11185 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
11186 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
11187 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
11188 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
11189 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
11190 Remove, as these files are now generated automatically
11191 by bootstrap or automake.
11193 * po/ChangeLog: Remove: all but one entry was a duplicate
11194 of this file, and I moved that 2000-11-02 entry here.
11196 * config/.cvsignore: Add Makefile, depcomp, install-sh.
11197 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
11198 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
11199 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
11200 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
11201 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
11202 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
11203 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
11204 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
11205 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
11206 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
11208 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
11209 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
11210 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
11211 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
11212 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
11213 * src/.cvsignore: Remove *_.c.
11216 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
11217 support it. (The latest stable gzip doesn't.)
11219 2004-04-27 Paul Eggert <eggert@twinsun.com>
11221 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
11222 case, as stos_ is now used by destructors due to the 2004-02-09
11225 Remove more K&R C support.
11226 * lib/libiberty.y (PARAMS): Remove. All uses removed.
11227 * lib/subpipe.c (errno): Remove decl.
11228 Include <stdlib.h> unconditionally.
11229 (EXIT_FAILURE): Remove macro.
11230 * src/complain.c (vfprintf, strerror): Remove.
11231 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
11233 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
11234 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
11235 (strchr, strspn, memchr): Remove decls.
11236 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
11237 unconditionally. Do not declare perror.
11238 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
11241 * src/complain.c (_): Remove useless defn, as system.h defines this.
11243 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
11244 with latest obstack.h.
11245 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
11246 to procedure types, as obstack.h now does that for us.
11247 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
11249 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
11250 so that this include file can stand alone.
11251 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
11252 does this now. Include subpipe.h first after config.h, to
11253 test whether it can stand alone.
11255 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
11256 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
11257 unused declaration.
11259 * tests/synclines.at (%union synch line): Put a dummy member in
11260 the union, because empty unions aren't allowed in C. Caught
11263 2004-04-13 Jim Meyering <jim@meyering.net>
11265 * src/conflicts.c (conflicts_print): Correct format string typo:
11266 use `%%' to produce literal `%'. (trivial change)
11268 2004-03-30 Paul Eggert <eggert@twinsun.com>
11270 * src/getargs.c (version): Update copyright year to 2004.
11272 * data/c.m4 (b4_int_type): Use 'short int' rather than
11273 'short', and similarly for 'long', 'unsigned', etc.
11274 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
11275 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
11276 yy_yypstack, yydumpstack): Likewise.
11277 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
11278 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
11280 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
11281 yy_stack_print, yyparse): Likewise.
11282 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
11283 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
11284 * lib/bitset.c (bitset_print): Likewise.
11285 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
11286 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
11287 * lib/bitsetv.c (bitsetv_dump): Likewise.
11288 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
11289 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
11291 * src/LR0.c (allocate_itemsets): Likewise.
11292 * src/gram.h (rule_number, rule): Likewise.
11293 * src/lalr.h (goto_number): Likewise.
11294 * src/nullable.c (nullable_compute): Likewise.
11295 * src/output.c (prepare_rules): Likewise.
11296 * src/relation.c (relation_print, relation_digraph): Likewise.
11297 * src/relation.h (relation_node): Likewise.
11298 * src/state.h (state_number, transitions, errs, reductions,
11299 struct state): Likewise.
11300 * src/symtab.h (symbol_number, struct symbol): Likewise.
11301 * src/tables.c (vector_number, tally, action_number,
11302 default_goto, goto_actions): Likewise.
11303 * tests/existing.at (GNU Cim Grammar): Likewise.
11304 * tests/regression.at (Web2c Actions): Likewise.
11306 * src/output.c (muscle_insert_short_int_table): Renamed from
11307 muscle_insert_short_table. All uses changed.
11309 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11311 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
11312 (declaration): Replace expected_conflicts with expected_sr_conflicts.
11313 Add %expect-rr rule.
11315 * src/scan-gram.l: Recognize %expect-rr.
11317 * src/conflicts.h (expected_sr_conflicts): Rename from
11318 expected_conflicts.
11319 (expected_rr_conflicts): Declare.
11321 * src/conflicts.c (expected_sr_conflicts): Rename from
11322 expected_conflicts.
11323 (expected_rr_conflicts): Define.
11324 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
11326 Use expected_sr_conflicts in place of expected_conflicts.
11327 Warn if expected_rr_conflicts used in non-GLR parser.
11329 * doc/bison.texinfo: Add documentation for %expect-rr.
11331 2004-03-08 Paul Eggert <eggert@gnu.org>
11333 Add support for hex token numbers. Suggested by Odd Arild Olsen in
11334 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
11336 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
11338 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
11339 * src/scan-gram.l (scan_integer): New function.
11341 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
11342 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
11343 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
11344 Say "long int", not "long", for uniformity with GNU style.
11346 2004-02-25 Paul Eggert <eggert@twinsun.com>
11348 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
11349 compilers. This fixes a problem with Intel's C++ compiler being
11350 chatty, reported by Guido Trentalancia in
11351 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
11353 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
11355 Support %destructor and merge error locations in lalr1.cc.
11357 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
11358 (Parser::stos_): Define unconditionally.
11359 (Parser::destruct_): New method. Generate its body with
11360 b4_yydestruct_generate.
11361 (Parser::error_start_): New attribute.
11362 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
11363 token which are discarded.
11364 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
11365 error_start_ when erroneous token are discarded.
11366 (Parser::parse) <yyerrlab1>: Compute the location of the error
11367 token so that it covers all the discarded tokens.
11368 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
11369 it can be called with `%skeleton "lalr1.cc"', and do that.
11371 2004-02-02 Paul Eggert <eggert@twinsun.com>
11373 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
11374 $(top_srcdir)/lib and ../lib. This fixes a bug reported
11375 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
11376 There's no need to mention top_builddir since Automake does that
11378 (INCLUDES): Remove, as Automake says it's obsolescent.
11379 Contents migrated into AM_CPPFLAGS as described above.
11380 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
11382 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11384 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
11385 (yyreportSyntaxError): Handle case where lookahead token is
11388 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11390 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
11391 resulting parsers are compilable with C++.
11393 2003-12-23 Paul Eggert <eggert@twinsun.com>
11395 * config/depcomp, config/install-sh: Sync with Automake 1.8.
11396 * src/output.c (output_skeleton): Rename local var.
11397 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
11398 Bison tokens, as this runs afoul of the 2003-10-07 change that
11399 disallowed NUL bytes in character constants or string literals.
11401 * tests/local.at: Require Autoconf 2.59's Autotest.
11402 * tests/testsuite.at: Don't include local.at, since we now assume
11403 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
11405 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
11406 multiple inclusion warnings.
11408 2003-12-02 Akim Demaille <akim@epita.fr>
11410 * doc/bison.texinfo (How Can I Reset the Parser): More about start
11414 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
11416 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
11418 2003-10-07 Paul Eggert <eggert@twinsun.com>
11420 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
11421 if testsuite doesn't exist.
11423 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
11424 literals, unfortunately.
11425 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
11426 Complain about NUL bytes in character constants or string literals.
11428 2003-10-05 Paul Eggert <eggert@twinsun.com>
11430 * NEWS: Don't document %no-default-prec, as it's still
11432 * doc/bison.texinfo: Document %no-default-prec only if
11433 the defaultprec flag is set. Normally it's not.
11435 2003-10-04 Paul Eggert <eggert@twinsun.com>
11437 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
11438 non-modifiable lvalue, instead of a modifiable one.
11439 * doc/bison.texinfo (Actions): Document that $$ can
11440 be assigned to. Do not claim that $$ and $N are
11441 array element references: user code should not rely on this.
11443 2003-10-01 Paul Eggert <eggert@twinsun.com>
11445 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
11446 (grammar_declaration): Use it.
11447 * src/scan-gram.l: New token %no-default-prec.
11448 * tests/conflicts.at: Revamp tests to use %no-default-prec.
11449 * NEWS, doc/bison.texinfo: Document the above.
11451 2003-10-01 Akim Demaille <akim@epita.fr>
11453 VCG no longer supports long_straight_phase.
11455 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
11456 * src/print_graph.c (print_graph): Adjust.
11458 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
11459 and Paul Eggert <eggert@twinsun.com>
11461 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
11462 Table of Symbols): Document %default-prec.
11463 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
11464 (grammar_declaration): Set default_prec on %default-prec.
11465 * src/scan-gram.l (%default-prec): New token.
11466 * src/reader.h (default_prec): New flag.
11467 * src/reader.c: Likewise.
11468 (packgram): Handle it.
11469 * tests/conflicts.at (%default-prec without %prec,
11470 %default-prec with %prec, %default-prec 1): New tests.
11472 2003-09-30 Paul Eggert <eggert@twinsun.com>
11474 * tests/testsuite.at: Include local.at, not input.at, fixing
11475 a typo in the 2003-08-25 patch.
11477 2003-08-27 Akim Demaille <akim@epita.fr>
11479 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
11482 2003-08-26 Akim Demaille <akim@epita.fr>
11484 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
11485 "<\#" to avoid magic from Gnus when posting parts of this script.
11487 2003-08-26 Akim Demaille <akim@epita.fr>
11489 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
11490 (Parser::parse): here.
11491 Adjust: nerrs and errstatus is now replaced by...
11492 (Parser::nerrs_, Parser::errstatus_): New.
11494 2003-08-25 Akim Demaille <akim@epita.fr>
11496 * config/announce-gen, Makefile.cfg: New.
11497 * Makefile.am: Adjust.
11498 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
11499 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
11501 2003-08-25 Akim Demaille <akim@epita.fr>
11503 When reducing initial empty rules, Bison parser read an initial
11504 location that is not defined. This results in garbage, and that
11505 affects Bison's own parser. Therefore we need (i) to extend Bison
11506 to support a means to initialize this location, and (ii) to use
11507 this CVS Bison to fix CVS Bison's parser.
11509 * src/reader.h, reader.c (epilogue_augment): Remove, replace
11511 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
11512 * src/parse-gram.y: Adjust.
11513 (%initial-action): New.
11514 (%error-verbose): Since we require CVS Bison, there is no reason
11516 * src/scan-gram.l: Adjust.
11517 * src/Makefile.am (YACC): New, to make sure we use our own parser.
11518 * data/yacc.c (yyparse): Use b4_initial_action.
11520 2003-08-25 Akim Demaille <akim@epita.fr>
11522 * doc/bison.texinfo: Don't promote stdout for error messages.
11524 2003-08-25 Akim Demaille <akim@epita.fr>
11526 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
11527 From Alexandre Duret-Lutz.
11529 2003-08-25 Akim Demaille <akim@epita.fr>
11533 2003-08-25 Akim Demaille <akim@epita.fr>
11535 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
11538 2003-08-25 Akim Demaille <akim@epita.fr>
11540 * data/lalr1.cc (Parser::reduce_print_): New.
11543 2003-08-25 Akim Demaille <akim@epita.fr>
11545 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
11546 error recovery loops. This patch is based on
11547 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
11548 Also, augment the similarity between lalr1.cc and yacc.c.
11549 Note: the locations of error recovery rules are not correct yet.
11551 * data/lalr1.cc: Comment changes to augment the similarity between
11552 lalr1.cc and yacc.c.
11553 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
11554 (yyerrlab1): Remove, but where it used to be (now the bottom part of
11555 yyerrlab), when hitting EOF, pop the whole stack here instead of
11556 merely falling thru the default error handling mechanism.
11557 (yyerrorlab): New label, with the old contents of YYERROR,
11558 plus the following change: pop the stack of rhs corresponding
11559 to the production that invoked YYERROR. That is how Yacc
11560 behaves (required by POSIX).
11561 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
11564 2003-08-25 Akim Demaille <akim@epita.fr>
11566 Tune local.at so that people can "autom4te -l autotest calc.at -o
11567 calc" for instance, to extract a sub test suite.
11569 * tests/testsuite.at: Move the initialization, Autotest version
11570 requirement, and AT_TESTED invocation into...
11571 * tests/local.at: here.
11572 * tests/testsuite.at: Include it for compatibility with Autoconf
11574 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
11577 2003-08-04 Paul Eggert <eggert@twinsun.com>
11579 Rework code slightly to avoid gcc -Wtraditional warnings.
11580 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
11581 The returned value is now stored in *YY0. All callers changed.
11582 * src/output.c (merge_output): Adjust to the above change.
11584 2003-07-26 Paul Eggert <eggert@twinsun.com>
11586 * data/glr.c (YYASSERT): New macro.
11587 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
11588 yyresolveStates, yyprocessOneStack):
11589 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
11590 Derived from a suggestion by Frank Heckenbach.
11592 2003-07-25 Paul Eggert <eggert@twinsun.com>
11594 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
11595 for portability to K&R C (after ansi2knr, presumably). See
11596 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
11597 by Frank Heckenbach, though I have omitted the structure-initialization
11598 part of his glr-knr.diff patch since I recall that the Portable
11599 C Compiler didn't require that change.
11601 Let the user specify how to allocate and free memory.
11602 Derived from a suggestion by Frank Heckenbach in
11603 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
11604 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
11605 All uses of free, malloc, realloc changed to use these macros,
11606 and unnecessary casts removed.
11607 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
11609 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
11611 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
11612 use s.empty() rather than s == "" to test for empty string; see
11613 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
11616 2003-06-25 Akim Demaille <akim@epita.fr>
11618 * config/depcomp, config/install-sh: Update from masters.
11620 2003-06-20 Paul Eggert <eggert@twinsun.com>
11622 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
11623 and return properly parenthesized result.
11624 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
11625 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
11626 Remove unnecessary parentheses from uses.
11627 * doc/bison.texinfo (Location Default Action): Describe the
11628 conventions for parentheses.
11630 2003-06-19 Paul Eggert <eggert@twinsun.com>
11632 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
11633 yyreportTree): Do not assume that size_t is the same width as int,
11634 when printing sizes. Print sizes using an unsigned format.
11635 Problem reported by Frank Heckenbach in
11636 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
11638 Port to Forte Developer 7 C compiler.
11639 * data/glr.c (struct YYLTYPE): If locations are not being used,
11640 declare a single dummy member, as empty structs do not conform
11642 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
11643 the Forte Developer 7 C compiler complains that end-of-loop
11644 code is not reached.
11646 2003-06-17 Paul Eggert <eggert@twinsun.com>
11648 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
11649 avoid warnings from picky compilers about redefinition of PARAMS.
11651 2003-06-17 Paul Eggert <eggert@twinsun.com>
11655 * NEWS: Document 1.875b.
11657 * lib/bbitset.h: Do not include config.h; that's the includer's job.
11658 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
11659 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
11660 Don't use 'index' in comments, as it's a builtin fn on some hosts.
11661 * lib/bitset_stats.c: Include gettext.h unconditionally, as
11662 per recent gettext manual's suggestion.
11663 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
11664 Use prototypes, not old-style definitions.
11665 * lib/lbitset.c (lbitset_unused_clear): Likewise.
11666 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
11667 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
11668 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
11669 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
11670 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
11671 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
11672 vbitset_or_and_cmp, vbitset_copy): Likewise.
11674 * lib/libiberty.h: Do not include config.h; that's the includer's job.
11675 Do not include <stdlib.h>.
11676 (PARAMS): Define unconditionally for C89.
11677 (ATTRIBUTE_NORETURN): Remove.
11678 (ATTRIBUTE_UNUSED): Define unconditionally.
11680 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
11681 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
11682 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
11683 * lib/vbitset.c, lib/vbitset.h: New files.
11684 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
11685 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
11688 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
11689 `How Can I Reset @code{yyparse}', since texinfo does not allow
11690 arbitrary @ in node names.
11692 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
11693 shouldn't be needed according to the gettext 0.12.1 documentation
11694 but which seem to be needed anyway: codeset.m4 glibc21.m4
11695 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
11696 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
11697 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
11699 * lib/.cvsignore: Add stdbool.h.
11700 * m4/.cvsignore: Add nls.m4, po.m4.
11702 Upgrade to CVS gnulib.
11703 * stdbool_.h: File renamed from stdbool.h.in.
11704 * configure.ac (AM_STDBOOL_H): Invoke this instead of
11706 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
11707 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
11708 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
11709 (MOSTLYCLEANFILES): New var.
11710 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
11711 (stdbool.h): New rule.
11712 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
11713 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
11714 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
11715 m4/quote.m4: Upgrade to today's gnulib.
11717 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
11718 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
11719 the tests right now.
11720 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
11721 yyerror are declared before use; C99 requires this.
11723 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11725 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
11727 (yyrecoverSyntaxError): Correct the logic for setting and testing
11729 Correct comment on handling EOF.
11730 Allow states with only a default reduction, rather than failing
11731 (I can't quite reconstruct why these were not allowed before).
11733 Fixes to avoid problem that $-N rules in GLR parsers can cause
11734 buffer overruns, corrupting state.
11736 * src/output.c (prepare_rules): Output max_left_semantic_context
11738 * src/reader.h (max_left_semantic_context): New variable declaration.
11739 * src/scan-gram.l (max_left_semantic_context): Define.
11740 (handle_action_dollar): Update max_left_semantic_context.
11741 * data/glr.c (YYMAXLEFT): New definition.
11742 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
11743 (yyresolveAction): Ditto.
11745 Fixes to problems with location handling in GLR parsers reported by
11746 Frank Heckenbach (2003/06/05).
11748 * data/glr.c (YYLTYPE): Make trivial if locations not used.
11749 (YYRHSLOC): Add parentheses, and define only if locations used.
11750 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
11751 locations not used.
11752 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
11753 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
11755 * tests/cxx-type.at: Exercise location information; update tests
11756 to differentiate output with and without locations.
11757 Remove forward declarations of yylex and yyerror---caused errors
11758 because default YYLTYPE not yet defined.
11759 Change semantic actions to compute strings, rather than printing
11760 them directly (to test proper passing of semantics values). Change
11761 output to prefix notation and update test data and expected results.
11762 (yylex): Track locations.
11763 (stmtMerge): Return value rather than printing, and include arguments
11766 2003-06-03 Paul Eggert <eggert@twinsun.com>
11768 Avoid warnings generated by GCC 2.95.4 when Bison is
11769 configured with --enable-gcc-warnings.
11770 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
11771 yy::]b4_parser_class_name[::translate_,
11772 yy::Stack::operator[] (unsigned),
11773 yy::Stack::operator[] (unsigned) const,
11774 yy::Slice::operator[] (unsigned),
11775 yy::Slice::operator[] (unsigned) const):
11776 Rename local vars to avoid warnings.
11777 * tests/glr-regression.at (Improper handling of embedded actions
11778 and $-N in GLR parsers): Remove unused local variable from yylex.
11779 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
11780 (void) as arg when not pure, since we now assume C89 when building
11781 Bison. Pacify GCC by using parameter.
11783 2003-06-02 Paul Eggert <eggert@twinsun.com>
11785 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
11786 yy::Location::lines, yy::Location::columns): Rename arguments
11787 to avoid shadowing; this removes a warning generated by GCC 3.3.
11789 2003-06-01 Paul Eggert <eggert@twinsun.com>
11791 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
11792 to g++, as GCC 3.3 complains if you do it.
11793 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
11794 everything that WARNING_CFLAGS has, except omit warnings
11795 not suitable for C++.
11796 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
11797 * tests/atlocal.in (CXXFLAGS): New var.
11798 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
11800 Fix a GLR parser bug I reported in February; see
11801 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
11802 The problem was that GLR parsers did not conform to the C standard,
11803 because actions like { $1 = $2 + $3; } expanded to expressions
11804 that invoked YYFILL in separate subexpressions, and YYFILL assigned
11805 to a local variable. The C standard says that expressions
11806 like (var = f ()) + (var = f ()) have undefined behavior.
11807 Another problem was that GCC sometimes issues warnings that
11808 yyfill and its parameters are unused.
11810 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
11811 as possibly unused.
11812 (yyfill): New function.
11814 (yyuserAction): Change type of yynormal to bool, so that it matches
11815 the new yyfill signature. Mark it as possibly unused.
11818 Follow up on a bug I reported in February, where a Bison-generated
11819 parser can loop. Provide a test case and a fix for yacc.c. I
11820 don't have a fix for lalr1.cc or for glr.c, unfortunately.
11821 The original bug report is in:
11822 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
11824 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
11825 macro's size was becoming unwieldy.
11826 (yyerrlab): Do not discard an empty lookahead symbol, as this
11827 might destroy garbage.
11828 (yyerrorlab): New label, with the old contents of YYERROR,
11829 plus the following change: pop the stack of rhs corresponding
11830 to the production that invoked YYERROR. That is how Yacc
11831 behaves, and POSIX requires this behavior.
11832 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
11833 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
11834 Define 'alarm' to do nothing if unistd.h is not available.
11835 Add a new rule "exp: '-' error;" to test the above change to
11836 data/yacc.c. Use 'alarm' to abort any test taking longer than
11837 10 seconds, as it's probably looping.
11838 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
11839 Also, the new yacc.c generates two fewer diagnostics for an
11842 2003-05-24 Paul Eggert <eggert@twinsun.com>
11844 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
11845 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
11846 This fixes a problem reported by John Bowman when the Compaq/HP
11847 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
11848 -ansi -Wall -gall).
11849 * data/yacc.c (union yyalloc): Likewise.
11850 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
11852 Switch from 'int' to 'bool' where that makes sense.
11854 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
11855 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
11856 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
11857 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
11858 Return or accept bool, not int. All callers changed.
11859 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
11860 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
11861 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
11862 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
11863 bitset_or_and_cmp_): Likewise.
11864 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
11865 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
11866 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
11867 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
11868 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
11869 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
11870 bitset_stats_or_and_cmp): Likewise.
11871 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
11872 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
11873 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
11874 ebitset_xor_cmp): Likewise.
11875 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
11876 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
11877 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
11878 lbitset_xor_cmp): Likewise.
11879 * lib/bbitset.h: Include <stdbool.h>.
11880 (struct bitset_vtable): The following members now return bool, not
11881 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
11882 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
11884 * src/conflicts.c (count_rr_conflicts): Likewise.
11885 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
11887 * lib/ebitset.c (ebitset_obstack_init): Likewise.
11888 * lib/lbitset.c (lbitset_obstack_init): Likewise.
11889 * src/getargs.c (debug_flag, defines_flag, locations_flag,
11890 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
11891 graph_flag): Likewise.
11892 * src/getargs.h (debug_flag, defines_flag, locations_flag,
11893 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
11894 graph_flag): Likewise.
11895 * src/output.c (error_verbose): Likewise.
11896 * src/output.h (error_verbose): Likewise.
11897 * src/reader.c (start_flag, typed): Likewise.
11898 * src/reader.h (typed): Likewise.
11899 * src/getargs.c (LOCATIONS_OPTION): New constant.
11900 (long_options, getargs): Use it.
11901 * src/lalr.c (build_relations): Use bool, not int.
11902 * src/nullable.c (nullable_compute): Likewise.
11903 * src/print.c (print_reductions): Likewise.
11904 * src/tables.c (action_row, pack_vector): Likewise.
11905 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
11906 * src/output.c (prepare): Use it.
11907 * src/output.c (token_definitions_output,
11908 symbol_destructors_output, symbol_destructors_output): Use string,
11909 not boolean integer, to keep track of whether to output separator.
11910 * src/print_graph.c (print_core): Likewise.
11911 * src/state.c (state_rule_lookaheads_print): Likewise.
11913 * config/install-sh: Sync from automake 1.7.5.
11915 2003-05-14 Paul Eggert <eggert@twinsun.com>
11917 * src/parse-gram.y (rules_or_grammar_declaration): Require a
11918 semicolon after a grammar declaration, in the interest of possible
11919 future changes to the Bison input language.
11920 Do not allow a stray semicolon at the start of the grammar.
11921 (rhses.1): Allow one or more semicolons after any rule, including
11922 just before "|" as required by POSIX.
11923 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
11926 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
11928 %parse-param support for lalr1.cc.
11930 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
11931 b4_cc_constructor_calls, b4_cc_constructor_call,
11932 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
11934 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
11935 parse-param arguments.
11936 (yy::b4_parser_class_name): Declare instance variables to
11937 hold parse-param arguments.
11938 * tests/calc.at: s/value/semantic_value/ because value clashes
11939 with a member of yy::b4_parser_class_name. Adjust C++ code
11940 to handle %parse-param. Enable %parse-param test in C++.
11942 2003-05-12 Paul Eggert <eggert@twinsun.com>
11944 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
11945 English a bit. Fix fclose typo. Change "const char" to "char
11946 const", and use ANSI C rather than K&R for "main". Suggest
11947 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
11948 and suggest yy_switch_to_buffer.
11950 2003-05-05 Paul Eggert <eggert@twinsun.com>
11952 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
11953 C89. This avoids a diagnostic on compilers that define __STDC__
11954 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
11955 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
11957 2003-05-03 Paul Eggert <eggert@twinsun.com>
11959 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
11960 Do not overrun array bounds.
11961 This should fix a bug reported today by Olatunji Oluwabukunmi in
11962 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
11964 2003-04-29 Akim Demaille <akim@epita.fr>
11966 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
11967 * src/getargs.c, src/getargs.h: here, as bool, not int.
11968 (nondeterministic_parser): New.
11969 * src/parse-gram.y, src/scan-gram.l: Support
11970 %nondeterministic-parser.
11971 * src/output.c (prepare): Use nondeterministic_parser instead
11972 of glr_parser where appropriate.
11973 * src/tables.c (conflict_row, action_row, save_row)
11974 (token_actions, token_actions, pack_vector): Ditto.
11976 2003-04-29 Akim Demaille <akim@epita.fr>
11978 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
11980 2003-04-29 Akim Demaille <akim@epita.fr>
11982 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
11983 with %pure-parser and %locations to exercise the patch from Yakov
11986 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
11988 * data/yacc.c: (b4_lex_param): Corrected for the case where
11989 %lex-param is provided and %pure-parser isn't.
11991 2003-04-27 Paul Eggert <eggert@twinsun.com>
11993 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
11994 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
11995 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
11996 if it is not defined.
11997 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
11999 2003-04-26 Paul Eggert <eggert@twinsun.com>
12001 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
12002 Declare to be of type suitable for the ninf value itself, not of
12003 type suitable for the corresponding table, since the latter might
12004 be unsigned but the ninf value might be negative. This fixes a
12005 bug reported by Alexandre Duret-Lutz in
12006 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
12008 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
12009 invokes it. We shouldn't invoke it twice because it will attempt
12010 to put error.o in the archive twice. This fixes a glitch reported
12011 by Martin Mokrejs in
12012 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
12014 2003-04-21 Paul Eggert <eggert@twinsun.com>
12016 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
12019 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
12021 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
12022 Fix obvious typo that results in uncompilable GLR parsers
12023 when both %pure-parser and %locations are used. (trivial change)
12025 2003-04-17 Paul Eggert <eggert@twinsun.com>
12027 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
12028 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
12029 Do not insert the expected token via unput, as this runs afoul
12030 of a POSIX-compatibility bug in flex 2.5.31.
12031 All uses changed to BEGIN the parent state,
12032 since we no longer insert the expected token via unput.
12033 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
12034 that is no longer emitted after the above change.
12036 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
12037 the first one. This change is from Paul Hilfinger, and it fixes
12038 regression reported by Werner Lemberg in
12039 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
12041 (resolve_sr_conflict): Don't invoke state_errs_set
12042 unless one or more tokens have been explicitly made errors.
12043 Otherwise, the above change causes Bison to abort.
12045 * tests/existing.at (GNU pic Grammar): New test case, taken from
12048 2003-03-31 Akim Demaille <akim@epita.fr>
12050 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
12052 2003-03-31 Akim Demaille <akim@epita.fr>
12054 * src/output.c (prepare_symbols): Avoid trailing spaces in the
12057 2003-03-31 Akim Demaille <akim@epita.fr>
12059 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
12060 From Paul Hilfinger.
12062 2003-03-29 Akim Demaille <akim@epita.fr>
12064 * m4/error.m4: Do not put under dynamic conditions some code which
12065 expansion is under static control.
12067 2003-03-29 Akim Demaille <akim@epita.fr>
12069 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
12071 2003-03-29 Akim Demaille <akim@epita.fr>
12073 * doc/bison.texinfo (Strings are Destroyed): New.
12075 2003-03-13 Paul Eggert <eggert@twinsun.com>
12077 * .cvsignore: Add configure.lineno.
12078 * src/.cvsignore: Add yacc.
12079 * tests/.cvsignore: Add testsuite.log.
12080 * doc/fdl.texi: Sync with latest FSF version.
12082 2003-03-12 Paul Eggert <eggert@twinsun.com>
12084 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
12085 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
12086 cursor, instead of leaving it undefined. This fixes a bug
12087 reported by Tim Van Holder in
12088 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
12089 * tests/input.at (Torturing the Scanner): Test the scanner on
12090 an empty input file, which was Tim Van Holder's test case.
12092 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
12093 <sys/resource.h> can be included, include sys/time.h and
12094 sys/times.h first, if available. This works around the SunOS
12095 4.1.4 porting bug reported by Bruce Becker in
12096 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
12098 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
12099 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
12100 AC_HEADER_SYS_WAIT.
12102 Merge changes from gnulib. This was prompted because the CVS
12103 snapshot didn't build on Solaris 7 due to strnlen problems.
12105 These changes need to be merged back into gnulib:
12106 * lib/hash.c: Include <stdbool.h> unconditionally.
12107 * m4/onceonly.m4 (m4_quote): New macro.
12108 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
12109 Quote AC_FOREACH variable-expansions properly.
12110 The 2003-01-03 obstack.h change also needs merging.
12111 {end of changes requiring merging}
12113 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
12114 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
12115 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
12116 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
12117 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
12118 New files, imported from gnulib.
12119 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
12122 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
12123 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
12126 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
12128 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
12129 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
12130 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
12131 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
12132 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
12133 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
12134 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
12135 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
12136 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
12137 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
12138 (jm_PREREQ_ARGMATCH): Remove.
12139 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
12140 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
12142 * src/system.h: Include <stdbool.h> unconditionally.
12144 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
12145 assuming at least C89 in the bitset code for some time now.
12147 2003-03-03 Akim Demaille <akim@epita.fr>
12151 2003-03-02 Akim Demaille <akim@epita.fr>
12153 * doc/bison.texinfo (Table of Symbols): Reactivate the
12154 documentation for %lex-param, and %parse-param.
12156 2003-03-02 Akim Demaille <akim@epita.fr>
12158 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
12159 generate verbose error messages.
12160 Use the number of tokens as an upper bound in yytname, as it
12161 cannot be a non terminal.
12163 2003-03-02 Akim Demaille <akim@epita.fr>
12165 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
12168 2003-03-02 Akim Demaille <akim@epita.fr>
12170 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
12171 Use them to exercise yycheck overrun.
12172 Based on Andrew Suffield's grammar.
12174 2003-03-02 Akim Demaille <akim@epita.fr>
12176 Create tests/local.at for Bison generic testing macros.
12178 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
12179 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
12181 * tests/calc.at (AT_CHECK_CALC): Adjust.
12182 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
12183 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
12184 * tests/local.at: here.
12185 (AT_COMPILE_CXX): Tags the tests using it as c++.
12186 Ignore the test if CXX is not functional.
12188 2003-03-01 Paul Eggert <eggert@twinsun.com>
12190 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
12191 not loc->end, since loc->end might contain garbage and this leads
12192 to undefined behavior on some platforms.
12193 (id_loc, token_start): Use (IF_LINTed) initial values that do not
12194 depend on *loc, so that the reader doesn't give the the false
12195 impression that *loc is initialized.
12196 (<INITIAL>"%%"): Do not bother setting code_start, since its value
12197 does not survive the return.
12199 2003-03-01 Akim Demaille <akim@epita.fr>
12201 * src/scan-gram.l (code_start): Always initialize it when entering
12202 into yylex, as SC_EPILOGUE is activated *before* the corresponding
12203 yylex invocation. An alternative would be making it static, but
12204 then it starts with the second %%'s beginning, instead of its end.
12206 2003-02-28 Paul Eggert <eggert@twinsun.com>
12208 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
12209 around a UnixWare 7.1.1 porting bug reported by John Hughes in
12210 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
12212 2003-02-26 Paul Eggert <eggert@twinsun.com>
12214 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
12215 Remove Sequent/Pyramid discussion (nobody uses them any more).
12216 Merge VMS and MS-DOS discussion; these ports may well be dead
12217 but let's keep mentioning them for now. Put <> around email
12218 addresses. Add copyright notice.
12220 2003-02-24 Paul Eggert <eggert@twinsun.com>
12222 * data/glr.c (yy_reduce_print): yylineno -> yylno,
12223 to avoid collision with flex use of yylineno.
12224 Problem reported by Bruce Lilly in
12225 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
12226 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
12227 * data/yacc.c (yy_reduce_print): Likewise.
12229 * config/depcomp: Sync with Automake 1.7.3.
12231 2003-02-21 Akim Demaille <akim@epita.fr>
12233 * data/lalr1.cc: Use temporary variables instead of casts to
12234 change integer types.
12235 Suggested by Paul Eggert.
12237 2003-02-21 Akim Demaille <akim@epita.fr>
12239 * doc/bison.texinfo: Use "location" consistently to refer to @n,
12240 to avoid confusions with lalr1.cc's notion of Position.
12241 Suggested by Paul Eggert.
12243 2003-02-20 Akim Demaille <akim@epita.fr>
12245 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
12246 before initial_columns.
12247 (location.hh): Use consistent variable names when defining the
12249 Use "last" so that we subtract from Positions, not from unsigned.
12251 2003-02-20 Akim Demaille <akim@epita.fr>
12253 * data/lalr1.cc (position.hh): New subfile, including the extended
12254 and Doxygen'ed documentation of class Position.
12255 (location.hh): Use it.
12256 Document a` la Doxygen.
12257 With the help of Benoit Perrot.
12259 2003-02-20 Akim Demaille <akim@epita.fr>
12261 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
12263 Redefine AT_YYERROR_SEES_LOC_IF using it.
12264 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
12266 Don't use the location in yy::Parser::error_ and
12267 yy::Parser::print_ when not %locations.
12268 Activate more lalr1.cc tests.
12270 2003-02-19 Akim Demaille <akim@epita.fr>
12272 * data/lalr1.cc: When displaying a line number, be sure to make it
12275 2003-02-19 Akim Demaille <akim@epita.fr>
12277 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
12279 (YYABORT, YYACCEPT, YYERROR): New.
12280 * tests/calc.at: Renable the lalr1.cc test.
12282 2003-02-19 Akim Demaille <akim@epita.fr>
12284 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
12285 error recovery, mixing with/without pops and discarding of the
12288 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
12290 2003-02-17 Paul Eggert <eggert@twinsun.com>
12292 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
12293 * tests/testsuite.at (AT_COMPILE): Use them.
12294 This fixes the testsuite problem reported by Robert Lentz in
12295 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
12297 2003-02-12 Paul Eggert <eggert@twinsun.com>
12299 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
12300 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
12301 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
12302 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
12303 Check for malloc failure, for consistency with yacc.c.
12304 (yytname_size): Remove, for consistency with yacc.c.
12306 The bug still remains in data/lalr1.cc, as I didn't have time
12309 2003-02-06 Akim Demaille <akim@epita.fr>
12311 * configure.ac (GXX): Rename as...
12312 (CXX): this, to keep the original Autoconf semantics.
12314 * data/lalr1.cc: Fix b4_copyright invocations.
12315 If YYDEBUG is not defined, don't depend upon name_ being defined.
12316 (location.hh): Include string and iostream.
12317 (Position::filename): New member.
12318 (Position::Position ()): New.
12319 (operator<< (Position)): New.
12320 (operator- (Position, int)): New.
12321 (Location::first, Location::last): Rename as...
12322 (Location::begin, Location::end): these, to mock the conventional
12324 (operator<< (Location)): New.
12325 * tests/atlocal.in (CXX): New.
12326 * tests/testsuite.at (AT_COMPILE_CXX): New.
12327 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
12328 locations in a more synthetic way.
12329 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
12331 Adjust the C locations to match those from Emacs: first column is
12333 Change all the expected results.
12334 Conform to the GCS: simplify the locations when applicable.
12335 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
12336 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
12337 these CPP macros with the m4 macros new defined by...
12338 (AT_CHECK_PUSHDEFS): this, i.e.:
12339 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
12340 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
12342 (AT_CHECK_POPDEFS): Undefine them.
12343 (AT_CHECK_CALC_LALR1_CC): New.
12344 Use it for the first lalr1.cc test.
12346 2003-02-04 Akim Demaille <akim@epita.fr>
12348 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
12349 Location as is defined.
12351 2003-02-04 Akim Demaille <akim@epita.fr>
12353 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
12354 name_ being defined.
12356 2003-02-03 Paul Eggert <eggert@twinsun.com>
12358 * src/gram.h (start_symbol): Remove unused decl.
12360 Use more-consistent naming conventions for local vars.
12362 * src/derives.c (derives_compute): Change type of local var from
12363 int to rule_number.
12364 * src/gram.c (grammar_rules_partial_print): Likewise.
12365 * src/print.c (print_core): Likewise.
12366 * src/reduce.c (reduce_grammar_tables): Likewise.
12368 * src/gram.c (grammar_dump): Change name of item_number *
12369 local var from r to rp.
12370 * src/nullable.c (nullable_compute): Likewise.
12372 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
12374 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
12375 for symbol or symbol_number var.
12376 * src/reader.c (grammar_start_symbol_set): Likewise.
12377 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
12379 * src/state.c (transitions_to): Likewise.
12380 * src/state.h: Likewise.
12381 * src/tables.c (symbol_number_to_vector_number): Likewise.
12383 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
12386 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
12389 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
12392 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
12393 Use str, not s, for char * var. Use ch, not c, for character var.
12394 Use size for size var.
12396 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
12398 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
12400 * src/uniqstr.h: Likewise.
12402 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
12403 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
12404 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
12405 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
12406 param to have same name as that of enum, so that we don't use
12407 "s" to stand for a non-state.
12409 2003-02-02 Akim Demaille <akim@epita.fr>
12411 * src/scan-skel.l: Scan more than one inert character per yylex
12414 2003-02-01 Paul Eggert <eggert@twinsun.com>
12418 * po/LINGUAS: Add ms.
12420 2003-01-30 Akim Demaille <akim@epita.fr>
12422 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
12424 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12426 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
12429 Changes in response to error report by S. Eken: GLR mode does not
12430 handle negative $ indices or $ indices in embedded rules correctly.
12431 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
12433 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
12434 (b4_rhs_location): Ditto.
12435 (yyfill): New function to copy from stack tree into array
12437 (yyuserAction): Modify to allow incremental move of semantic values
12438 to rhs array when in GLR mode.
12439 Define YYFILL to use in user-defined actions to fill semantic array
12441 Remove dummy use of yystack, as there is now a guaranteed use.
12442 (yydoAction): Modify to allow incremental move of semantic values
12443 to rhs array when in GLR mode.
12444 (yyresolveAction): Ditto.
12445 (yyglrShiftDefer): Update comment.
12446 (yyresolveStates): Use X == NULL for pointers, not !X.
12447 (yyglrReduce): Ditto.
12448 (yydoAction): Ditto
12450 * tests/glr-regr1.at: Rename to ...
12451 * tests/glr-regression.at: Add new regression test for the problems
12452 described above (adapted from S. Eken).
12453 Update copyright notice.
12454 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
12455 * tests/Makefile.am: Ditto.
12457 2003-01-28 Paul Eggert <eggert@twinsun.com>
12459 * data/lalr1.cc: Do not use @output_header_name@ unless
12460 b4_defines_flag is set. This fixes two bugs reported by
12462 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
12463 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
12465 2003-01-21 Paul Eggert <eggert@twinsun.com>
12467 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
12468 we don't need to worry about yyerrlab1 being reported as an
12469 "unused label" by non-GCC C compilers. The downside is that if
12470 locations are used then a couple of statements are duplicated each
12471 time YYERROR is invoked, but the upside is that the warnings
12473 (yyerrlab1): Move code to YERROR.
12474 (yyerrlab2): Remove. Change uses back to yyerrlab1.
12475 This reverts some of the 2002-12-27 change.
12477 2003-01-17 Paul Eggert <eggert@twinsun.com>
12479 * src/output.c (symbol_printers_output): Fix typo that led
12480 to core dump. Problem reported by Antonio Rus in
12481 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
12483 2003-01-13 Akim Demaille <akim@epita.fr>,
12484 Quoc Peyrot <chojin@lrde.epita.fr>,
12485 Robert Anisko <anisko_r@lrde.epita.fr>
12487 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
12488 when the stacks contain one element, as the loop would otherwise
12489 free the last state, and then use the top state (the one we just
12490 popped). This means that the initial elements will not be freed
12491 explicitly, as is the case in yacc.c; it is not a problem, as
12492 these elements have fake values.
12494 2003-01-11 Paul Eggert <eggert@twinsun.com>
12496 * NEWS: %expect-violations are now just warnings, reverting
12497 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
12498 bootstrapping problem reported by Matthias Klose; see
12499 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
12500 * src/conflicts.c (conflicts_print): Likewise.
12501 * tests/conflicts.at (%expect not enough, %expect too much,
12502 %expect with reduce conflicts): Likewise.
12503 * doc/bison.texinfo (Expect Decl): Document this. Also mention
12504 that the warning is enabled if the number of conflicts changes
12505 (not necessarily increases).
12507 * src/getargs.c (version): Update copyright year.
12509 2003-01-09 Akim Demaille <akim@epita.fr>
12511 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
12513 2003-01-08 Paul Eggert <eggert@twinsun.com>
12515 * Makefile.maint (WGETFLAGS):
12516 New macro, containing "-C off" to disable proxy caches.
12517 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
12518 (rel-check): Use $(WGET) instead of wget.
12520 2003-01-06 Paul Eggert <eggert@twinsun.com>
12522 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
12523 the GLR paper of Scott, Johnstone and Hussain.
12525 2003-01-04 Paul Eggert <eggert@twinsun.com>
12527 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
12528 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
12529 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
12530 (EXTRA_LIBRARIES): New var, for liby.a.
12531 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
12532 (EXTRA_SCRIPTS): New var, for yacc.
12534 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
12535 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
12536 Problem reported by Nelson H. F. Beebe.
12538 2003-01-03 Paul Eggert <eggert@twinsun.com>
12540 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
12541 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
12542 when compiling Bison 1.875's `bitset bset = obstack_alloc
12543 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
12545 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
12546 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
12547 grow to a huge size with typical invocation.
12549 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
12550 Use the pattern recommended by Autoconf 2.57, except also protect
12551 against double-definition.
12552 * src/system.h: Likewise.
12553 Portability issues reported by Nelson H. F. Beebe.
12555 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
12556 All uses changed. Provide a definition in both C and C++.
12557 (yytrue, yyfalse): Define even if defined (__cplusplus).
12559 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
12560 Reported by Nelson H. F. Beebe.
12562 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
12564 2003-01-02 Paul Eggert <eggert@twinsun.com>
12566 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
12567 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
12568 Bug reported by Nelson H. F. Beebe.
12570 2003-01-01 Paul Eggert <eggert@twinsun.com>
12574 2002-12-30 Paul Eggert <eggert@twinsun.com>
12576 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
12578 (<INITIAL>","): Here. This causes stray "," to be treated
12581 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
12582 last brace in braced code when not in Yacc mode, for compatibility
12583 with Bison 1.35. This resurrects the 2001-12-15 patch to
12586 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
12587 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
12589 2002-12-28 Paul Eggert <eggert@twinsun.com>
12591 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
12592 that of SYM's type. This fixes Debian bug 168069, reported by
12595 2002-12-28 Paul Eggert <eggert@twinsun.com>
12599 Switch back to the Yacc style of conflict reports, undoing some
12600 of the 2002-07-30 change.
12601 * doc/bison.texinfo (Understanding): Use Yacc style for
12602 conflict reports. Also, use new way of locating rules.
12603 * src/conflicts.c (conflict_report):
12604 Renamed from conflict_report_yacc, removing the old
12605 'conflict_report'. Translate the entire conflict report at once,
12606 so that we don't assume that "," has the same interpretation in
12608 (conflicts_output): Use Yacc-style conflict report for each state,
12609 instead of our more-complicated style.
12610 (conflicts_print): Use Yacc-style conflict report, except print
12611 the input file name when not emulating Yacc.
12612 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
12613 Conflicted Reduction, %expect not enough, %expect too much,
12614 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
12615 * tests/existing.at (GNU Cim Grammar): Likewise.
12616 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
12618 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
12619 fatal): Don't invoke fflush; it's not needed and it might even be
12620 harmful for stdout, as stdout might not be open.
12621 * src/reduce.c (reduce_print): Likewise.
12623 2002-12-27 Paul Eggert <eggert@twinsun.com>
12625 Fix a bug where error locations were not being recorded correctly.
12626 This problem was originally reported by Paul Hilfinger in
12627 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
12629 * data/yacc.c (yyparse): New local var yylerrsp, to record the
12630 top of the location stack's error locations.
12631 (yyerrlab): Set it. When discarding a token, push its location
12632 onto yylerrsp so that we don't lose track of the error's end.
12633 (yyerrlab1): Now is only the target of YYERROR, so that we can
12634 properly record the location of the action that failed. For GCC
12635 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
12636 GCC warning about yyerrlab1 being unused if YYERROR is unused.
12637 (yyerrlab2): New label, which yyerrlab now falls through to.
12638 Compute the error's location by applying YYLLOC_DEFAULT to
12639 the locations of all the symbols that went into the error.
12640 * doc/bison.texinfo (Location Default Action): Mention that
12641 YYLLOC_DEFAULT is also invoked for syntax errors.
12642 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
12643 Error locations include the locations of all the tokens that were
12644 discarded, not just the last token.
12646 2002-12-26 Paul Eggert <eggert@twinsun.com>
12648 * src/files.c: Include quote.h.
12649 (compute_output_file_names): Warn if we detect conflicting
12650 outputs to the same file. This should catch the misunderstanding
12651 exemplified by Debian Bug 165349, reported by Bruce Stephens..
12653 * src/conflicts.c (conflicts_print): If the user specifies
12654 "%expect N", report an error if there are any reduce/reduce
12655 conflicts. This is what the manual says should happen.
12656 This fixes Debian bug 130890, reported by Anthony DeRobertis.
12657 * tests/conflicts.at (%expect with reduce conflicts): New test.
12659 Don't use m4_include on relative file names, as it doesn't work as
12660 desired if there happens to be a file with that name under ".".
12662 * m4sugar/version.m4: Remove; it was included but it wasn't used.
12663 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
12664 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
12665 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
12666 * src/output.c (output_skeleton): Use full path names when
12667 specifying a file to include; don't rely on include path, as
12668 it's unreliable when the working file contains a file with
12671 2002-12-25 Paul Eggert <eggert@twinsun.com>
12673 Remove obsolete references to bison.simple and bison.hairy.
12674 Problem mentioned by Aubin Mahe in
12675 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
12676 * data/glr.c: Comment fix.
12677 * doc/bison.1: Remove references. Also, mention "yacc".
12679 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
12682 * src/parse-gram.y (declaration): Use enum "report_states" rather
12683 than its numeric value 1.
12685 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
12686 opening a new one. This fixes Debian bug 165349, reported by
12689 2002-12-24 Paul Eggert <eggert@twinsun.com>
12693 * Makefile.maint (cvs-update): Don't assume that the shell
12694 supports $(...), as Solaris sh doesn't.
12696 * src/parse-gram.y (lloc_default): Remove test for empty
12697 nonterminals at the end, since it didn't change the result.
12699 2002-12-24 Paul Eggert <eggert@twinsun.com>
12701 If the user does not define YYSTYPE as a macro, Bison now declares it
12702 using typedef instead of defining it as a macro. POSIX requires this.
12703 For consistency, YYLTYPE is also declared instead of defined.
12705 %union directives can now have a tag before the `{', e.g., the
12706 directive `%union foo {...}' now generates the C code
12707 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
12708 The default union tag is `YYSTYPE', for compatibility with Solaris 9
12709 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
12710 instead of `yyltype'.
12712 `yystype' and `yyltype' are now obsolescent macros instead of being
12713 typedefs or tags; they are no longer documented and will be
12714 withdrawn in a future release.
12716 * data/glr.c (b4_location_type): Remove.
12717 (YYSTYPE): Renamed from yystype.
12718 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
12719 (struct YYLTYPE): Renamed from struct yyltype.
12720 (YYLTYPE): Renamed from yyltype.
12721 (yyltype, yystype): New (and obsolescent) macros,
12722 for backward compatibility.
12723 * data/yacc.c: Likewise.
12725 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
12726 does not specify a union tag. This is for compatibility with
12729 * src/parse-gram.y (add_param): 2nd arg is now char * not char
12730 const *, since it is now modified by stripping surrounding { }.
12731 (current_braced_code): Remove.
12732 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
12733 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
12734 trailing " {...}". Now of type <chars>.
12735 (grammar_declaration): Adjust to bundled tokens.
12736 (code_content): Remove; stripping is now done by add_param.
12737 (print_token_value): Print contents of bundled tokens.
12738 (token_name): New function.
12740 * src/reader.h (braced_code, current_braced_code): Remove.
12741 (token_name): New decl.
12743 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
12744 token_type, not braced_code code_kind. All uses changed.
12745 (SC_PRE_CODE): New state, for scanning after a keyword that
12746 has (or usually has) an immediately-following braced code.
12747 (token_type): New local var, to keep track of which token type
12748 to return when scanning braced code.
12749 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
12750 <INITIAL>"%parse-param", <INITIAL>"%printer",
12751 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
12752 instead of returning a token type immediately.
12753 (<INITIAL>"{"): Set token type.
12754 (<SC_BRACED_CODE>"}"): Use it.
12755 (handle_action_dollar, handle_action_at): Now returns bool
12756 indicating success. Fail if ! current_rule; this prevents a core dump.
12757 (handle_symbol_code_dollar, handle_symbol_code_at):
12758 Remove; merge body into caller.
12759 (handle_dollar, handle_at): Complain in invalid contexts.
12761 * NEWS, doc/bison.texinfo: Document the above.
12762 * NEWS: Fix years and program names in copyright notice.
12764 2002-12-17 Paul Eggert <eggert@twinsun.com>
12766 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
12767 Reporting, Table of Symbols): Omit mentions of %lex-param and
12768 %parse-param from the documentation for now.
12770 2002-12-15 Paul Eggert <eggert@twinsun.com>
12772 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
12773 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
12774 lookahead symbol, and which sets yychar in parser actions) and it
12775 disagreed with the Bison documentation. Bug
12776 reported by Andrew Walrond.
12778 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
12779 as the caller now does that.
12780 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
12781 (YYEMPTY): Parenthesize right hand side, since others use it.
12782 (yyparse): Don't assume that our generated code is the only code
12785 2002-12-13 Paul Eggert <eggert@twinsun.com>
12789 POSIX requires a "yacc" command.
12790 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
12791 (MOSTLYCLEANFILES): Add yacc.
12793 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
12794 as an alias for bison y.
12796 * po/LINGUAS: Add da.
12798 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
12799 problem with latest <getopt.h>.
12800 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
12802 * doc/fdl.texi: Upgrade to 1.2.
12803 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
12804 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
12805 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
12807 * config/install-sh: Sync with autotools.
12809 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
12810 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
12811 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
12812 locations are requested.
12813 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
12814 locations are requested.
12816 2002-12-12 Paul Eggert <eggert@twinsun.com>
12818 Remove unportable casts and storage allocation tricks.
12819 While we're at it, remove almost all casts, since they
12820 usually aren't needed and are a sign of trouble.
12822 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
12824 * src/derives.c (derives_compute): Do not subtract NTOKENS from
12825 the pointer DSET returned by malloc; this isn't portable.
12826 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
12827 Similarly for DERIVES.
12828 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
12829 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
12830 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
12832 * src/derives.c (derives_compute): Do not bother invoking
12833 int_of_rule_number, since rule numbers are integers.
12835 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
12836 rather than XMALLOC (char, N).
12838 * src/files.c (filename_split): Rewrite to avoid cast.
12840 * src/gram.h (symbol_number_as_item_number,
12841 item_number_as_symbol_number, rule_number_as_item_number,
12842 item_number_as_rule_number):
12843 Now inline functions rather than macros, to avoid casts.
12844 * src/state.h (state_number_as_int): Likewise.
12845 * src/tables.c (state_number_to_vector_number,
12846 symbol_number_to_vector_number): Likewise.
12848 * src/gram.h (int_of_rule_number): Remove; no longer used.
12850 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
12851 since the resulting storage is always stored into.
12853 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
12856 * src/muscle_tab.c (muscle_m4_output):
12857 Now inline. Return bool, not int.
12858 * src/state.c (state_compare): Likewise.
12859 * src/symtab.c (symbol_check_defined,
12860 symbol_check_alias_consistency, symbol_pack, symbol_translation,
12861 hash_compare_symbol, hash_symbol):
12863 * src/uniqstr.c (uniqstr_print): Likewise.
12864 * src/muscle_tab.c (muscle_m4_output_processor):
12865 New function, to avoid casts.
12866 * src/state.c (state_comparator, stage_hasher): Likewise.
12867 * src/symtab.c (symbol_check_defined_processor,
12868 symbol_check_alias_consistency_processor, symbol_pack_processor,
12869 symbol_translation_processor, hash_symbol_comparator,
12870 hash_symbol_hasher): Likewise.
12871 * src/uniqstr.c (uniqstr_print_processor): Likewise.
12872 * src/muscle_tab.c (muscles_m4_output):
12873 Use new functions instead of casting old functions unportably.
12874 * src/state.c (state_hash_new): Likewise.
12875 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
12876 symbols_token_translations_init):
12878 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
12880 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
12881 var instead of casting to long, to avoid casts.
12882 (prepare_states): Use MALLOC rather than alloca, so that we don't
12883 have to worry about alloca.
12884 * src/state.c (state_hash_lookup): Likewise.
12886 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
12887 local var instead of casting to unsigned char, to avoid casts.
12889 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
12890 STATE_ALLOC): Remove.
12891 (transitions_new, errs_new, reductions_new, state_new): Use malloc
12892 rather than calloc, and use offsetof to avoid allocating slightly
12894 (state_new): Initialize all members.
12896 * src/state.c (state_hash): Use unsigned accumulator, not signed.
12898 * src/symtab.c (symbol_free): Remove; unused.
12899 (symbol_get): Remove cast in lhs of assignment.
12900 (symbols_do): Now static. Accept generic arguments, not
12901 hashing-related ones.
12903 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
12904 (symbol_processor): Remove.
12905 (symbols_do): Remove decl; now static.
12907 * src/system.h (alloca): Remove; decl no longer needed.
12908 (<stddef.h>): Include, for offsetof.
12909 (<inttypes.>, <stdint.h>): Include if available.
12910 (uintptr_t): New type, if system lacks it.
12911 (CALLOC, MALLOC, REALLOC): New macros.
12912 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
12915 * src/tables.c (table_size): Now int, to pacify GCC.
12916 (table_grow, table_ninf_remap): Use signed table size.
12917 (save_row): Don't bother initializing locals when not needed.
12918 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
12919 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
12921 * src/vcg.h: Correct misspellings.
12923 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
12926 * src/getargs.c (getargs): Don't assume EOF == -1.
12928 2002-12-09 Paul Eggert <eggert@twinsun.com>
12930 Change identifier spellings to avoid collisions with names
12931 that are reserved by POSIX.
12933 Don't use names ending in _t, since POSIX reserves them.
12934 For consistency, remove _e and _s endings -- they're weren't
12935 needed to remove ambiguity. All uses changed.
12936 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
12937 turn was just renamed from struniq_t.
12938 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
12939 which in turn was just renamed from struniq_processor_t.
12940 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
12941 in turn was renamed from hash_compare_struniq_t.
12942 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
12943 (state_list): Renamed from state_list_t.
12944 * src/assoc.h (assoc): Renamed from assoc_t.
12945 * src/conflicts.c (enum conflict_resolution): Renamed from
12946 enum conflict_resolution_e.
12947 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
12948 (rule_list): Renamed from rule_list_t.
12949 * src/getargs.h (enum trace): Renamed from enum trace_e.
12950 (enum report): Renamed from enum report_e.
12951 * src/gram.h (item_number): Renamed from item_number_t.
12952 (rule_number): Renamed from rule_number_t.
12953 (struct rule_s): Remove the "rule_s" part; not used.
12954 (rule): Renamed from rule_t.
12955 (rule_filter): Renamed from rule_filter_t.
12956 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
12957 (goto_list): Renamed from goto_list_t.
12958 * src/lalr.h (goto_number): Renamed from goto_number_t.
12959 * src/location.h (location): Renamed from location_t.
12960 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
12961 and moved here from:
12962 * src/muscle_tab.h (muscle_entry_t): here.
12963 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
12964 (rule_list): Renamed from rule_list_t.
12965 * src/print_graph.c (static_graph): Renamed from graph.
12966 * src/reader.h (braced_code): Renamed from braced_code_t.
12967 Remove brace_code_e tag.
12968 * src/relation.h (relation_node): Renamed from relation_node_t.
12969 (relation_nodes): Renamed from relation_nodes_t.
12970 (relation): Renamed from relation_t.
12971 * src/state.h (state_number): Renamed from state_number_t.
12972 (struct state): Renamed from struct state_s.
12973 (state): Renamed from state_t.
12974 (transitions): Renamed from transitions_t. Unused (and
12975 misspelled) transtion_s tag removed.
12976 (errs): Renamed from errs_t. Unused errs_s tag removed.
12977 (reductions): Renamed from reductions_t. Unused tag
12978 reductions_s removed.
12979 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
12980 (struct symbol_list): Renamed from struct symbol_list_s.
12981 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
12982 (struct symbol): Renamed from struct symbol_s.
12983 (symbol): Renamed from symbol_t.
12984 * src/tables.c (vector_number): Renamed from vector_number_t.
12985 (action_number): Renamed from action_t.
12986 * src/tables.h (base_number): Renamed from base_t.
12987 * src/vcg.h (enum color): Renamed from enum color_e.
12988 (enum textmode): Renamed from enum textmode_e.
12989 (enum shape): Renamed from enum shape_e.
12990 (struct colorentry): Renamed from struct colorentry_s.
12991 (struct classname): Renamed from struct classname_s.
12992 (struct infoname): Renamed from struct infoname_s.
12993 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
12994 (enum decision): Renamed from enum decision_e.
12995 (enum orientation): Renamed from enum orientation_e.
12996 (enum alignment): Renamed from enum alignment_e.
12997 (enum arrow_mode): Renamed from enum arrow_mode_e.
12998 (enum crossing_type): Renamed from enum crossing_type_e.
12999 (enum view): Renamed from enum view_e.
13000 (struct node): Renamed from struct node_s.
13001 (node): Renamed from node_t.
13002 (enum linestyle): Renamed from enum linestyle_e.
13003 (enum arrowstyle): Renamed from enum arrowstyle_e.
13004 (struct edge): Renamed from struct edge.
13005 (edge): Renamed from edge_t.
13006 (struct graph): Renamed from struct graph_s.
13007 (graph): Renamed from graph_t.
13008 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
13009 Rename value_t -> value.
13010 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
13011 value_t_as_yystype -> value_as_yystype.
13013 Don't include <errno.h> in the mainstream code, since it
13014 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
13015 * lib/get-errno.c, lib/get-errno.h: New files.
13016 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
13018 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
13019 * src/output.c (output_skeleton): Likewise.
13020 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
13022 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
13024 (handle_action_dollar, handle_action_at): Likewise.
13025 * src/system.h: Do not include <errno.h>.
13026 (TAB_EXT): Renamed from EXT_TAB.
13027 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
13029 Avoid str[a-z]*, since <string.h> reserves that name space.
13030 Change all instances of "struniq" in names to "uniqstr", and
13031 likewise for "STRUNIQ" and "UNIQSTR".
13032 * src/uniqstr.c: Renamed from src/struniq.c.
13033 * src/uniqstr.h: Renamed from src/struniq.h.
13034 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
13035 * src/files.c (strsuffix): Remove; unused.
13036 (concat2): Renamed from stringappend. Now static.
13037 * src/files.h (strsuffix, stringappend): Remove; unused.
13038 * src/parse-gram.y (<chars>): Renamed from <string>.
13039 (<uniqstr>): Renamed from <struniq>.
13040 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
13041 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
13042 (struct graph_s.expand): Renamed from struct graph_s.stretch.
13043 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
13044 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
13045 (N_EXPAND): Renamed from N_STRETCH.
13047 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
13048 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
13049 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
13051 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
13052 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
13053 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
13054 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
13055 (BASE_MAXIMUM): Renamed from BASE_MAX.
13056 (BASE_MINIMUM): Renamed from BASE_MIN.
13057 (ACTION_MAX): Remove; unused.
13058 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
13059 Unnecessary casts removed from above defines.
13062 Fix misspelling in names.
13063 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
13064 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
13068 * lib/timevar.c (timevar_report): Renamed from time_report,
13069 for consistency with other names.
13070 * lib/timevar.h (timevar_report): New decl.
13071 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
13074 Sort include-file uses.
13076 Reorder all include files under src to be in the order "system.h".
13077 then the ../lib include files in angle brackets (alphabetized),
13078 then the . include files in double-quotes (alphabetized). Fix
13079 dependency breakages encountered in this process, as follows:
13080 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
13081 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
13082 * src/state.h: Include "symtab.h".
13084 2002-12-08 Paul Eggert <eggert@twinsun.com>
13086 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
13087 since this causes problems when __file__ contains character
13088 sequences like "@" that are treated specially by src/scan-skel.l.
13089 Instead, just use the file's basename. This fixes the bug
13090 reported by Martin Mokrejs in
13091 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
13093 2002-12-06 Paul Eggert <eggert@twinsun.com>
13095 Add support for rules that do not have trailing semicolons, as
13096 POSIX requires. Improve the quality of locations in Bison
13099 * src/location.c: Include <quotearg.h>.
13100 (empty_location): Now const.
13101 (location_print): New function. Follow the recommendation of the
13102 GNU Coding Standards for locations that span file boundaries.
13103 * src/location.h: Do not include <quotearg.h>; no longer needed.
13104 (boundary): New type.
13105 (location_t): Use it. This allows locations to span file boundaries.
13106 All member uses changed: file -> start.file or end.file (as needed),
13107 first_line -> start.line, first_column -> start.column,
13108 last_line -> end.line, last_column -> end.column.
13109 (equal_boundaries): New function.
13110 (LOCATION_RESET, LOCATION_STEP): Remove.
13111 (LOCATION_PRINT): Remove. All callers changed to use location_print.
13112 (empty_location): Now const.
13113 (location_print): New decl.
13114 * src/parse-gram.y (lloc_default): New function, which handles
13115 empty locations more accurately.
13116 (YYLLOC_DEFAULT): Use it.
13117 (%token COLON): Remove.
13118 (%token ID_COLON): New token.
13120 (declarations, rules): Remove trailing semicolon.
13121 (declaration, rules_or_grammar_declaration):
13122 Allow empty (";") declaration.
13123 (symbol_def): Remove empty actions; no longer needed.
13124 (rules_or_grammar_declaration): Remove trailing semicolon.
13125 (semi_colon.opt): Remove.
13126 * src/reader.h: Include location.h.
13127 (scanner_cursor): New decl.
13128 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
13130 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
13132 (STEP): Remove. No longer needed, now that adjust_location does
13133 the work. All uses removed.
13134 (scanner_cursor): New var.
13135 (adjust_location): Renamed from extend_location. It now sets
13136 *loc and adjusts the scanner cursor. All uses changed.
13137 Don't bother testing for CR.
13138 (handle_syncline): Remove location arg; now updates scanner cursor.
13139 All callers changed.
13140 (unexpected_end_of_file): Now accepts start boundary of token or
13141 comment, not location. All callers changed. Update scanner cursor,
13143 (SC_AFTER_IDENTIFIER): New state.
13144 (context_state): Renamed from c_context. All uses changed.
13145 (id_loc, code_start, token_start): New local vars.
13146 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
13147 processing of Yacc white space and equivalents here.
13148 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
13149 instead of returning ID immediately, since we need to search for
13150 a subsequent colon.
13151 (<INITIAL>"'", "\""): Save token_start.
13152 (<INITIAL>"%{", "{", "%%"): Save code_start.
13153 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
13154 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
13155 BEGIN context_state at end, not INITIAL.
13156 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
13157 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
13158 Return correct token start.
13159 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
13160 the start of a character, string or multiline comment is found.
13161 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
13162 Reduction): Adjust reported locations to match the more-precise
13163 results now expected.
13164 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
13165 * tests/reduce.at (Useless Rules, Reduced Automaton,
13166 Underivable Rules): Likewise.
13167 * tests/regression.at (Invalid inputs): No longer `expecting ";"
13168 or "|"' now that so many other tokens are allowed by the new grammar.
13170 * src/complain.h (current_file): Remove duplicate decl;
13171 current_file is now owned by files.h.
13172 * src/complain.c, src/scan-gram.l: Include files.h.
13174 2002-12-06 Paul Eggert <eggert@twinsun.com>
13176 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
13177 promotes to int; it might be unsigned int.
13178 * data/yacc.c (yy_reduce_print): Likewise.
13180 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
13181 be #defined in the prologue, not in the Bison declarations.
13182 This fixes Debian Bug 102878, reported by Shaul Karl.
13184 2002-12-02 Paul Eggert <eggert@twinsun.com>
13186 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
13187 * lib/strtoul.c: New file, from gnulib.
13188 This fixes a porting bug reported by Peter Klein in
13189 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
13191 2002-11-30 Paul Eggert <eggert@twinsun.com>
13193 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
13194 and put only a forward declaration in the prologue. This is for
13195 consistency with the other scanner helper functions.
13197 Type clashes now generate warnings, not errors, since it
13198 appears that POSIX may allow some grammars with type clashes.
13199 * src/reader.c (grammar_current_rule_check): Warn about
13200 type clashes instead of complaining.
13201 * tests/input.at (Type Clashes): Expect warnings, not complaints.
13203 Add Yacc library, since POSIX requires it.
13204 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
13205 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
13206 * lib/main.c, lib/yyerror.c: New files.
13208 gram_error can be static; it need not be extern.
13209 * src/reader.h (gram_error): Remove decl.
13210 * src/parse-gram.y (gram_error): Now static. Add static decl.
13211 (print_token_value): Omit parameter names from forward decl,
13214 2002-11-29 Paul Eggert <eggert@twinsun.com>
13216 * doc/bison.texinfo: Emphasize that yylex and yyerror must
13217 be declared before being used. E.g., one should typically
13218 declare them in the prologue. Use GNU coding style in examples.
13219 Put "const" consistently after the type it modifies. Mention
13220 that C99 supports "inline". Mention that yyerror traditionally
13223 %parse-param and %lex-param now take just one argument, the
13224 declaration; the argument name is deduced from the declaration.
13226 * doc/bison.texinfo (Parser Function, Pure Calling, Error
13227 Reporting, Table of Symbols): Document this.
13228 * src/parse-gram.y (add_param): New function.
13230 (declaration): Implement new rule for %parse-param and %lex-param.
13231 * src/scan-gram.l: "," now elicits a warning, rather than being
13232 a token; this is more compatible with byacc.
13233 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
13235 2002-11-27 Paul Eggert <eggert@twinsun.com>
13237 Rename identifiers to avoid real and potential collisions.
13239 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
13240 to avoid collision with lex macro described by Bruce Lilly in
13241 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
13242 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
13243 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
13244 * src/parse-gram.y (print_token_value): Renamed from yyprint.
13246 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
13247 The name "yycontrol" violates the name space rules, and this stuff
13248 wasn't being used anyway.
13249 (input): Remove action; this stuff wasn't being used.
13250 (gram_error): Rename local variable yylloc -> loc.
13251 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
13252 (YY_DECL): Don't use "yy" at start of local variables.
13253 All uses changed, e.g., yylloc -> loc.
13254 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
13255 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
13256 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
13257 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
13259 * src/parse-gram.y (gram_error): loc is now const *.
13260 * src/reader.h (gram_error): Likewise.
13262 2002-11-24 Paul Eggert <eggert@twinsun.com>
13266 * tests/actions.at (Actions after errors): Use an output format
13267 more similar to that of the Printers and Destructors test.
13268 Test the position of the ';' token too.
13269 (Printers and Destructors): Likewise.
13270 (Printers and Destructors: %glr-parser): Remove for now, to avoid
13271 unnecessarily alarming people when the test fails.
13273 * data/yacc.c (yyerrlab1): Move this label down, so that the
13274 parser does not discard the lookahead token if the user code
13275 invokes YYERROR. This change is required for POSIX conformance.
13277 * lib/error.c: Sync with gnulib.
13279 2002-11-22 Paul Eggert <eggert@twinsun.com>
13281 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
13282 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
13283 * lib/xmalloc.c: Likewise.
13285 2002-11-20 Paul Eggert <eggert@twinsun.com>
13287 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
13289 2002-11-20 Paul Eggert <eggert@twinsun.com>
13291 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
13292 should use `if (! x) abort ();' rather than `assert (x);', and
13293 anyway it's one less thing to worry about configuring.
13295 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
13296 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
13297 and replace all instances of assert with abort.
13298 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
13299 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
13301 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
13302 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
13303 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
13304 hash_find_entry, hash_rehash, hash_insert): Likewise.
13305 * src/conflicts.c (resolve_sr_conflict): Likewise.
13306 * src/lalr.c (set_goto_map, map_goto): Likewise.
13307 * src/nullable.c (nullable_compute): Likewise.
13308 * src/output.c (prepare_rules, token_definitions_output): Likewise.
13309 * src/reader.c (packgram, reader): Likewise.
13310 * src/state.c (state_new, state_free, state_transitions_set,
13311 state_reduction_find): Likewise.
13312 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
13313 symbol_pack): Likewise.
13314 * src/tables.c (conflict_row, pack_vector): Likewise.
13315 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
13316 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
13317 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
13318 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
13320 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
13321 (ARGMATCH_CONSTRAINT): New macro.
13322 (ARGMATCH_ASSERT): Use it.
13324 * src/system.h (verify): New macro.
13325 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
13326 rather than assert.
13327 * src/tables.c (tables_generate): Likewise.
13329 * src/struniq.c (struniq_assert): Now returns void, and aborts
13330 if the assertion is false.
13331 (struniq_assert_p): Remove.
13332 * src/struniq.h: Likewise.
13334 2002-11-18 Paul Eggert <eggert@twinsun.com>
13336 * data/glr.c (yygetLRActions): Replace `yyindex' with
13337 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
13338 This fixes the regression with Sun ONE Studio 7 cc that I reported in
13339 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
13341 2002-11-18 Akim Demaille <akim@epita.fr>
13343 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
13345 From Tim Van Holder.
13347 2002-11-17 Paul Eggert <eggert@twinsun.com>
13349 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
13350 to "SyntaxError" for consistency with my 2002-11-15 change.
13352 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
13353 not define to {}, since this breaks the common use of `YYDPRINTF
13354 ((...));' if a single statement is desired (e.g. before `else').
13355 Work around GCC warnings by surrounding corresponding calls with
13357 (yyhasResolvedValue): Remove unused function.
13358 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
13360 (yyreportSyntaxError): Renamed from yyreportParseError.
13361 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
13363 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
13364 extern when possible. Remove unused initializations.
13366 2002-11-16 Akim Demaille <akim@epita.fr>
13368 Augment the similarity between GLR and LALR traces.
13370 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
13371 (YY_REDUCE_PRINT): New.
13372 (yyparse): Use them.
13373 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
13375 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
13376 state reached after the reduction/recovery, since...
13377 (yyparse, yyprocessOneStack): Report the state we are entering in.
13379 2002-11-16 Akim Demaille <akim@epita.fr>
13381 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
13382 Add support for --trace=skeleton.
13383 * src/scan-skel.l: %option debug.
13384 Scan strings of non-@ or \n instead of character by character.
13385 (scan_skel): Handle trace_skeleton.
13387 (@output_parser_name@, @output_header_name@): ``Restore'' their
13388 support (used to be M4 macros).
13389 * data/yacc.c: Quote larger chunks, a la glr.c.
13390 * data/lalr1.cc: Likewise.
13391 The header guards are no longer available, so use some other
13392 string than `YYLSP_NEEDED'.
13394 2002-11-16 Akim Demaille <akim@epita.fr>
13396 Make the ``Printers and Destructors'' test more verbose, taking
13397 `yacc.c''s behavior as (possibly wrong) reference.
13399 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
13400 instead of fprint on stdout.
13401 Set and report the last_line of the symbols.
13402 Consistently display values and locations.
13404 2002-11-16 Paul Eggert <eggert@twinsun.com>
13406 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
13408 2002-11-15 Paul Eggert <eggert@twinsun.com>
13410 * tests/actions.at (Actions after errors): New test case.
13412 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
13413 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
13414 tests/action.at, tests/calc.at, tests/conflicts.at,
13415 tests/cxx-type.at, tests/regression.at:
13416 "parse error" -> "syntax error" for POSIX compatibility.
13417 "parsing stack overflow..." -> "parser stack overflow" so
13418 that code matches Bison documentation.
13420 2002-11-15 Akim Demaille <akim@epita.fr>
13422 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
13423 take two BRACED_CODE, not two string_content.
13424 Free the scanner's obstack when we are done.
13425 (code_content): New.
13426 * tests/calc.at: Adjust.
13427 * doc/bison.texinfo: Adjust.
13428 Also, make sure to include the `,' for these declarations.
13430 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
13432 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
13433 definition; avoids potential autoreconf problems.
13435 2002-11-15 Akim Demaille <akim@epita.fr>
13437 Always check the value returned by yyparse.
13439 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
13440 returned by yyparse.
13441 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
13443 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
13444 returned by yyparse.
13446 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13448 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
13451 2002-11-14 Paul Eggert <eggert@twinsun.com>
13453 * src/output.c (output_skeleton): Call xfopen instead of
13454 duplicating xfopen's body.
13456 Fix bugs reported by Nelson H. F. Beebe in
13457 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
13459 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
13460 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
13461 Group compiler. Instead, use "$CC -E bar.c". Include the .h
13462 file twice in the grammar, as an extra check.
13464 * tests/input.at (Torturing the Scanner): Surround the
13465 backslash-newline tests with "#if 0", to make it less likely that
13466 we'll run into compiler bugs. Bring back solitary \ inside
13467 comment, but add a closing comment to work around HP C bug. Don't
13468 test backslash-newline in C character constant.
13470 2002-11-14 Akim Demaille <akim@epita.fr>
13472 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
13473 status of the compiler.
13474 Calling `exit 1' is no longer needed.
13475 Reported by Nelson H. F. Beebe.
13477 2002-11-14 Akim Demaille <akim@epita.fr>
13479 * tests/atlocal.in (CPPFLAGS): We have config.h.
13480 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
13482 * tests/actions.at, tests/calc.at, tests/conflicts.at,
13483 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
13484 * tests/regression.at, tests/torture.at: Use them for all the
13485 grammars that are to be compiled.
13486 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
13487 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
13488 * doc/bison.texinfo (GLR Parsers): Document `inline'.
13490 2002-11-14 Akim Demaille <akim@epita.fr>
13492 * doc/bison.texinfo: Various formatting changes (alignments in
13493 samples, additional @group/@end group, GCS in samples.
13494 Use @deffn instead of simple @table to define the directives,
13495 macros, variables etc.
13497 2002-11-13 Paul Eggert <eggert@twinsun.com>
13499 Fix some bugs reported by Albert Chin-A-Young in
13500 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
13502 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
13503 -o c"; the HP C compiler chatters during compilation.
13504 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
13505 * tests/headers.at (export YYLTYPE): Likewise.
13507 * tests/input.at (Torturing the Scanner): Remove lines containing
13508 solitary backslashes, as they tickle a bug in the HP C compiler.
13510 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
13511 comments, since they're not portable. Use GNU coding style.
13513 2002-11-13 Akim Demaille <akim@epita.fr>
13515 * data/yacc.c: Leave bigger chunks of quoted text.
13516 (YYDSYMPRINTF): New.
13517 Use it to report symbol activities.
13518 * data/glr.c (YYDSYMPRINTF): New.
13521 2002-11-12 Paul Eggert <eggert@twinsun.com>
13525 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
13526 (yyglrReduce): Return yyok, not 0.
13527 This should avoid the enumerated-type warnings reported
13528 by Nelson H. F. Beebe in
13529 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
13531 * lib/bbitset.h (BITSET_INLINE): Remove.
13532 * lib/bitset.h [! BITSET_INLINE]: Remove.
13533 (bitset_set, bitset_reset, bitset_test): Rename local vars
13534 to avoid shadowing warnings by GCC.
13536 * data/glr.c (inline): Remove #define. It's the user's
13537 responsibility to #define it away, just like 'const'.
13538 This fixes one of the bugs reported by Nelson H. F. Beebe in
13539 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
13541 * Makefile.maint (po-check): Scan .l and .y files instead of the
13542 .c and the .h files that they generate. This fixes the bug
13543 reported by Tim Van Holder in:
13544 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
13545 Look for N_ as well as for _. Try to avoid matching #define for
13547 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
13548 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
13549 * src/scan-gram.l: Revamp regular expressions so that " and '
13550 do not confuse xgettext.
13552 * src/struniq.h (struniq_new): Do not declare the return type
13553 to be 'const'; this violates the C standard.
13554 * src/struniq.c (struniq_new): Likewise.
13556 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
13558 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
13559 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
13562 2002-11-12 Akim Demaille <akim@epita.fr>
13564 * Makefile.maint: Sync with Autoconf:
13565 (local_updates): New.
13567 2002-11-12 Akim Demaille <akim@epita.fr>
13569 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
13571 2002-11-12 Akim Demaille <akim@epita.fr>
13573 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
13576 2002-11-12 Akim Demaille <akim@epita.fr>
13578 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
13581 2002-11-12 Akim Demaille <akim@epita.fr>
13583 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
13584 Use it to test the GLR parser.
13586 2002-11-12 Akim Demaille <akim@epita.fr>
13588 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
13590 * data/glr.c (yystos): New.
13591 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
13592 (YYDSYMPRINT): New.
13593 (yyval): Don't define it, it is handled via M4.
13594 (yyrecoverParseError): Free verbosely the discarded symbols.
13595 * data/yacc.c (yysymprint): Remove, rather...
13596 (b4_yysymprint_generate): invoke.
13597 * data/c.m4 (b4_yysymprint_generate): New.
13598 Accept pointers as arguments, as opposed to the version from
13600 (b4_yydestruct_generate): Likewise.
13601 * tests/cations.at (Printers and Destructors): Use Bison directives
13602 instead of CPP macros.
13603 Don't rely on internal details.
13605 2002-11-12 Akim Demaille <akim@epita.fr>
13607 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
13608 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
13609 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
13610 it against YYEMPTY and so forth), work on yytoken (i.e., set
13611 it to YYEMPTY etc.).
13612 (yydestruct): Replace with a b4_yydestruct_generate invocation.
13613 (b4_symbol_actions): Remove.
13614 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
13615 for 0, end-of-input.
13617 2002-11-12 Akim Demaille <akim@epita.fr>
13619 * doc/bison.texinfo (Destructor Decl): New.
13621 2002-11-12 Akim Demaille <akim@epita.fr>
13623 * src/tables.c (tables_generate): Use free for pointers that
13624 cannot be NULL, not XFREE.
13625 (pack_vector): Use assert, not fatal, for bound violations.
13626 * src/state.c (state_new): Likewise.
13627 * src/reader.c (reader): Likewise.
13628 * src/lalr.c (set_goto_map): Likewise.
13629 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
13632 2002-11-12 Akim Demaille <akim@epita.fr>
13634 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
13636 * src/scan-gram.l (last_string): Is global to the file, not to
13638 * src/parse-gram.y (input): Don't append the epilogue here,
13639 (epilogue.opt): do it here, and free the scanner's obstack.
13640 * src/reader.c (epilogue_set): Rename as...
13641 (epilogue_augment): this.
13642 * data/c.m4 (b4_epilogue): Defaults to empty.
13644 2002-11-12 Akim Demaille <akim@epita.fr>
13646 * src/getargs.c (long_options): Remove duplicates.
13647 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
13649 * doc/bison.rnh: Remove.
13650 * doc/bison.texinfo (VMS Invocation): Remove.
13652 2002-11-12 Akim Demaille <akim@epita.fr>
13654 * src/struniq.h, src/struniq.c (struniq_t): Is const.
13655 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
13657 Use struniq for symbols.
13659 * src/symtab.h (symbol_t): The tag member is a struniq.
13660 (symbol_type_set): Adjust.
13661 * src/symtab.c (symbol_new): Takes a struniq.
13662 (symbol_free): Don't free the tag member.
13663 (hash_compare_symbol_t, hash_symbol_t): Rename as...
13664 (hash_compare_symbol, hash_symbol): these.
13665 Use the fact that tags as struniqs.
13666 (symbol_get): Use struniq_new.
13667 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
13669 * src/reader.h (merger_list, grammar_currentmerge_set): The name
13670 and type members are struniqs.
13671 * src/reader.c (get_merge_function)
13672 (grammar_current_rule_merge_set): Adjust.
13673 (TYPE, current_type): Are struniq.
13675 Use struniq for file names.
13677 * src/files.h, src/files.c (infile): Split into...
13678 (grammar_file, current_file): these.
13679 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
13680 * src/reduce.c (reduce_print): Likewise.
13681 * src/getargs.c (getargs): Likewise.
13682 * src/complain.h, src/complain.c: Likewise.
13683 * src/main.c (main): Call struniqs_new early enough to use it for
13685 Don't free the input file name.
13687 2002-11-12 Akim Demaille <akim@epita.fr>
13689 * src/symtab.c (symbol_free): Remove dead deactivated code:
13690 type_name are properly removed.
13691 Don't use XFREE to free items that cannot be NULL.
13692 * src/struniq.h, src/struniq.c: New.
13693 * src/main.c (main): Initialize/free struniqs.
13694 * src/parse-gram.y (%union): Add astruniq member.
13696 * src/scan-gram.l (<{tag}>): Return a struniq.
13697 Free the obstack bit that used to store it.
13698 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
13700 2002-11-11 Paul Eggert <eggert@twinsun.com>
13702 Revamp to fix many (but not all) of the C- and M4-related quoting
13703 problems. Among other things, this fixes the Bison bug reported
13704 by Jan Hubicka when processing the Bash grammar; see:
13705 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
13707 Use new @ escapes consistently. Represent brackets with @{ and @}
13708 rather than @<:@ and @:>@, since this works a bit better with dumb
13709 editors like vi. Represent @ with @@, since @ is now consistently
13710 an escape. Use @oline@ and @ofile@ rather than __oline__ and
13711 __ofile__, to avoid unexpected expansions. Similarly, use @output
13712 rather than #output.
13714 * data/c.m4 (b4_copyright): Omit file name from comment, since
13715 the file name could contain "*/".
13716 (b4_synclines_flag): Don't quote the 2nd argument; it should already
13717 be quoted. All uses changed.
13719 * data/glr.c: Use new @ escapes consistently.
13720 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
13721 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
13722 Remove, since they couldn't handle arbitrary characters in file
13724 * data/lalr1.cc: Likewise.
13725 * data/yacc.c: Likewise.
13727 * src/files.c (output_infix): Remove; all uses removed.
13728 * src/files.h: Likewise.
13730 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
13731 mishandled funny characters in file names, and anyway it isn't
13733 * data/yacc.c: Likewise.
13734 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
13736 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
13737 * data/yacc.c: Likewise.
13739 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
13741 (muscle_init): Quote filename as a C string.
13742 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
13743 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
13744 * src/output.c (escaped_file_name_output): New function.
13745 (prepare_symbols): Quote tokens for M4.
13746 (prepare): Don't insert output_infix, output_prefix,
13747 output_parser_name, output_header_name; this is now down by scan-skel.
13748 Insert skeleton as a C string.
13750 * src/output.c (user_actions_output, symbol_destructors_output,
13751 symbol_printers_output): Quote filenames for C and M4.
13752 * src/reader.c (prologue_augment, epilogue_set): Likewise.
13754 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
13755 escapes other than \\ and \'; this simplifies the code.
13756 (<SC_STRING>): Likewise, for \\ and \".
13757 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
13758 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
13759 Use new escapes @{ and @} for [ and ].
13761 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
13762 them with auto vars.
13763 Switch to new escape scheme, where @ is the escape character uniformly.
13764 Abort if a stray escape character is found. Avoid unbounded input
13765 buffer when parsing non-escaped text.
13767 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
13768 __oline__, #output, $@, and @{ do not have unintended meanings.
13770 2002-11-09 Paul Eggert <eggert@twinsun.com>
13772 Fix the test failure due to GCC warnings described in
13773 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
13774 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
13775 evaluate to 0 if it's impossible for NINF to be in the respective
13777 (yygetLRActions, yyrecoverParseError): Use them.
13779 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
13780 counted in the token inserted at end of file. Now takes
13781 location_t *, not location_t, so that the location can be
13782 adjusted. All uses changed.
13784 * tests/regression.at (Invalid inputs): Adjust wording in
13785 diagnostic to match the new behavior.
13787 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
13788 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
13789 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
13790 abort ();'. This reduces the runtime of the "Many lookaheads"
13791 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
13794 2002-11-07 Paul Eggert <eggert@twinsun.com>
13796 * src/parse-gram.y (CHARACTER): Remove unused token.
13799 * src/scan-gram.l: Remove stack option. We no longer use the
13800 stack, since the stack was never deeper than 1; instead, use the
13801 new auto var c_context to record the stacked value.
13803 Remove nounput option. At an unexpected end of file, we now unput
13804 the minimal input necessary to end cleanly; this simplifies the
13807 Avoid unbounded token sizes where this is easy.
13809 (unexpected_end_of_file): New function.
13810 Use it to systematize the error message on unexpected EOF.
13811 (last-string): Now auto, not static.
13812 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
13813 (scanner_last_string_free): Remove; not used.
13814 (percent_percent_count): Move decl to just before use.
13815 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
13816 not the (never otherwised-used) CHARACTER.
13818 2002-11-07 Akim Demaille <akim@epita.fr>
13820 Let yyerror always receive the msg as last argument, so that
13821 yyerror can be variadic.
13823 * data/yacc.c (b4_yyerror_args): New.
13824 Use it when calling yyerror.
13825 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
13826 Use it when calling yyerror.
13827 * doc/bison.texinfo (Error Reporting): Adjust.
13828 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
13829 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
13831 2002-11-06 Akim Demaille <akim@epita.fr>
13833 #line should have quoted strings.
13834 Ideally, this should be done by m4_quotearg.
13836 * src/scan-skel.l: Include quotearg.h.
13838 * src/output.c (symbol_printers_output)
13839 (symbol_destructors_output): Quote the file name.
13841 2002-11-06 Akim Demaille <akim@epita.fr>
13843 * tests/regression.at (Invalid inputs): Adjust to the recent
13846 2002-11-06 Akim Demaille <akim@epita.fr>
13848 Restore --no-lines.
13849 Reported by Jim Kent.
13851 * data/c.m4 (b4_syncline): New.
13852 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
13853 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
13854 * src/output.c (user_actions_output): Likewise.
13855 (prepare): Define 'b4_synclines_flag'.
13856 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
13858 2002-11-06 Akim Demaille <akim@epita.fr>
13860 * src/main.c (main): Free `infile'.
13861 * src/scan-gram.l (handle_syncline): New.
13863 * src/output.c (user_actions_output, symbol_destructors_output)
13864 (symbol_printers_output): Use the location's file name, not
13866 * src/reader.c (prologue_augment, epilogue_set): Likewise.
13868 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13870 * src/tables.c (matching_state): Don't allow states to match if
13871 either has GLR conflict entries.
13873 2002-11-05 Paul Eggert <eggert@twinsun.com>
13875 * src/scan-gram.l: Use more accurate diagnostics, e.g.
13876 "integer out of range" rather than "invalid value".
13877 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
13880 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
13881 Also, remove one static variable in the scanner.
13883 * src/scan-gram.l (braces_level): Now auto, not static.
13884 Initialize to zero if the compiler is being picky.
13885 (INITIAL): Clear braces_level instead of incrementing it.
13886 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
13887 as POSIX 1003.1-2001 requires.
13888 * src/system.h (IF_LINT): New macro, taken from coreutils.
13889 * configure.ac: Define "lint" if --enable-gcc-warnings.
13891 2002-11-05 Akim Demaille <akim@epita.fr>
13893 * src/scan-gram.l: When it starts with `%', complain about the
13894 whole directive, not just that `invalid character: %'.
13896 2002-11-04 Akim Demaille <akim@epita.fr>
13898 * Makefile.maint: Update from Autoconf.
13899 (update, cvs-update, po-update, do-po-update): New.
13901 2002-11-04 Akim Demaille <akim@epita.fr>
13903 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
13905 Have yyerror `use' its arguments.
13906 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
13907 returns true when location & yacc & pure & parse-param.
13908 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
13910 2002-11-04 Akim Demaille <akim@epita.fr>
13912 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
13914 * src/scan-gram.l: Use [\'] instead of ['] to pacify
13917 Use quote, not quote_n since LOCATION_PRINT no longer uses the
13920 2002-11-03 Paul Eggert <eggert@twinsun.com>
13922 * src/reader.c (get_merge_function, grammar_current_rule_check):
13923 Use consistent diagnostics for reporting type name clashes.
13924 Quote the types with <>, for consistency with Yacc.
13925 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
13927 2002-11-03 Akim Demaille <akim@epita.fr>
13929 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
13931 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
13932 (b4_parse_param): Remove.
13933 Use b4_identification.
13934 Propagate b4_pure_args where needed to pass them to yyerror.
13935 * data/glr.m4 (b4_parse_param): Remove.
13936 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
13937 (b4_lpure_formals): New.
13938 Use b4_identification.
13939 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
13940 b4_user_formals and b4_user_args.
13941 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
13942 (yyreportAmbiguity): When using a pure parser, also need
13943 the location, and the parse-params.
13945 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
13946 When using a pure parser, also need the parse-params.
13948 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
13949 (%pure-parser + %parse-param) LALR and GLR parsers.
13950 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
13951 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
13952 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
13953 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
13954 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
13955 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
13956 * doc/bison.texinfo: Untabify the whole file.
13957 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
13958 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
13959 (Error Reporting): Adjust to these new directives.
13960 Document %error-verbose, deprecate YYERROR_VERBOSE.
13962 2002-11-03 Akim Demaille <akim@epita.fr>
13964 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
13965 AT_CHECK_CALC_GLR invocations to use % directives, instead of
13966 command line options.
13967 * tests/cxx-type.at: Formatting changes.
13969 2002-11-03 Paul Eggert <eggert@twinsun.com>
13971 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
13972 to count columns correctly, and to check for invalid inputs.
13974 Use mbsnwidth to count columns correctly. Account for tabs, too.
13975 Include mbswidth.h.
13976 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
13977 (extend_location): New function.
13978 (YY_LINES): Remove.
13980 Handle CRLF in C code rather than in Lex code.
13981 (YY_INPUT): New macro.
13982 (no_cr_read): New function.
13984 Scan UCNs, even though we don't fully handle them yet.
13985 (convert_ucn_to_byte): New function.
13987 Handle backslash-newline correctly in C code.
13988 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
13989 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
13991 (tag, splice): New EREs. Do not allow NUL or newline in tags.
13992 Use {splice} wherever C allows backslash-newline.
13993 YY_STEP after space, newline, vertical-tab.
13994 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
13996 (letter, id): Don't assume ASCII; e.g., spell out a-z.
13998 ({int}, handle_action_dollar, handle_action_at): Check for integer
14001 (YY_STEP): Omit trailing semicolon, so that it's more like C.
14003 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
14004 as well as \000. Check for UCHAR_MAX, not 255.
14005 Allow \x with an arbitrary positive number of digits, as in C.
14006 Check for overflow here.
14007 Allow \? and UCNs, for compatibility with C.
14009 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
14010 with quote slot used by complain_at.
14012 * tests/input.at: Add tests for backslash-newline, m4 quotes
14013 in symbols, long literals, and funny escapes in strings.
14015 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
14016 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
14017 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
14018 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
14019 * m4/mbswidth.m4: New file, from GNU coreutils.
14021 * doc/bison.texinfo (Grammar Outline): Document // comments.
14022 (Symbols): Document that trigraphs have no special meaning in Bison,
14023 nor is backslash-newline allowed.
14024 (Actions): Document that trigraphs have no special meaning.
14026 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
14029 2002-11-02 Paul Eggert <eggert@twinsun.com>
14031 * src/reader.c: Don't include quote.h; not needed.
14032 (get_merge_function): Reword warning to be consistent with
14033 type clash diagnostic in grammar_current_rule_check.
14035 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
14036 bug in trigraph handling.
14038 * src/output.c (prepare_symbols): When printing token names,
14039 escape "[" as "@<:@" and likewise for "]".
14041 * src/system.h (errno): Remove declaration, as we are now
14042 assuming C89 or better, and C89 guarantees errno.
14044 2002-10-30 Paul Eggert <eggert@twinsun.com>
14046 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
14047 Check for close failures.
14048 * src/files.h (xfclose): Return void, not int, since it always
14050 * src/files.c (xfclose): Likewise. Report I/O error if ferror
14052 * src/output.c (output_skeleton): Use xfclose rather than fclose
14053 and ferror. xfclose now checks ferror.
14055 * data/glr.c (YYLEFTMOST_STATE): Remove.
14056 (yyreportTree): Use a stack-based leftmost state. This avoids
14057 our continuing battles with bogus warnings about initializers.
14059 2002-10-30 Akim Demaille <akim@epita.fr>
14061 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
14064 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14066 * tests/glr-regr1.at: New test for reported regressions.
14067 * tests/testsuite.at: Add glr-regr1.at test.
14068 * tests/Makefile.am: Add glr-regr1.at test.
14070 2002-10-24 Paul Eggert <eggert@twinsun.com>
14074 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
14075 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
14076 we use malloc. Don't assume 'A' through 'Z' are contiguous.
14077 Don't assume strdup exists; POSIX says its an XSI extension.
14078 Check for buffer overflow on input.
14080 2002-10-24 Akim Demaille <akim@epita.fr>
14082 * src/output.c (output_skeleton): Don't disable M4sugar comments
14083 too soon: it results in comments being expanded.
14084 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
14087 2002-10-24 Akim Demaille <akim@epita.fr>
14089 * data/yacc.c (m4_int_type): New.
14090 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
14091 char' as only yacc.c wants K&R portability.
14092 * data/glr.c (yysigned_char): Remove.
14093 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
14094 Reported by Quoc Peyrot.
14096 2002-10-23 Paul Eggert <eggert@twinsun.com>
14098 * src/main.c (main): With --trace=time, report times even if a
14099 non-fatal error occurs. Formerly, the times were reported in some
14100 such cases but not in others.
14101 * src/reader.c (reader): Just return if a complaint has been issued,
14102 instead of exiting, so that 'main' can report times.
14104 2002-10-22 Akim Demaille <akim@epita.fr>
14106 * src/system.h: Include sys/types.
14107 Reported by Bert Deknuydt.
14109 2002-10-23 Paul Eggert <eggert@twinsun.com>
14111 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
14112 Suggested by Art Haas.
14114 2002-10-22 Paul Eggert <eggert@twinsun.com>
14116 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
14117 decl; not needed any more.
14118 * src/main.c (main): Use return to exit, undoing yesterday's change.
14119 The last OS that we could find where this wouldn't work is
14120 SunOS 3.5, and that's too old to worry about now.
14122 * data/glr.c (struct yyltype): Define members even when not
14123 doing locations. This is more consistent with yacc.c, and it
14124 works around the following bug reports:
14125 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
14126 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
14128 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
14129 @acronym consistently. Standardize on "Yacc" instead of "YACC",
14130 "Algol" instead of "ALGOL". Give a bit more history about BNF.
14132 2002-10-22 Akim Demaille <akim@epita.fr>
14134 * data/README: New.
14136 2002-10-21 Paul Eggert <eggert@twinsun.com>
14138 Be consistent about 'bool'; the old code used an enum in one
14139 module and an int in another, and this violates the C standard.
14140 * m4/stdbool.m4: New file, from coreutils 4.5.3.
14141 * configure.ac (AC_HEADER_STDBOOL): Add.
14142 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
14143 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
14144 * src/symtab.c (hash_compare_symbol_t): Likewise.
14145 * src/system.h (bool, false, true): Use a definition consistent
14146 with ../lib/hash.c. All uses changed.
14148 * src/complain.c (warning_issued): Renamed from warn_message_count,
14149 so that we needn't worry about integer overflow (!).
14150 Now of type bool. All uses changed.
14151 (complaint_issued): Renamed from complain_message_count; likewise.
14153 * src/main.c (main): Use exit to exit with failure.
14155 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
14156 rather than 1 and 0.
14157 * src/main.c (main): Likewise.
14158 * src/getargs.c (getargs): Likewise.
14159 * src/reader.c (reader): Likewise.
14161 * src/getarg.c (getargs): Remove duplicate code for
14162 "Try `bison --help'".
14164 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
14165 What was that "2" for?
14167 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
14168 * src/getargs.c (usage): Likewise.
14170 * src/getargs.c (getargs): When there are too few operands, report
14171 the last one. When there are too many, report the first extra
14172 one. This is how diffutils does it.
14174 2002-10-20 Paul Eggert <eggert@twinsun.com>
14176 Remove K&R vestiges.
14177 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
14178 * src/complain.c (VA_START): Remove. Assume prototypes.
14179 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
14180 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
14181 fatal): Assume prototypes.
14182 * src/complain.h: Assume prototypes.
14183 * src/system.h (PARAMS): Remove.
14184 Include <limits.h> unconditionally, since it's guaranteeed even
14185 for a freestanding C89 compiler.
14186 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
14187 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
14189 2002-10-20 Akim Demaille <akim@epita.fr>
14191 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
14192 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
14193 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
14194 (yyresolveStates, yyresolveAction, yyresolveStack)
14195 (yyprocessOneStack): Use them.
14196 (yy_reduce_print): New.
14197 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
14199 2002-10-20 Akim Demaille <akim@epita.fr>
14201 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
14202 arguments and output `void'.
14203 (b4_c_function): Rename as...
14204 (b4_c_function_def): this.
14205 (b4_c_function_decl, b4_c_ansi_function_def)
14206 (b4_c_ansi_function_decl): New.
14207 Change the interpretation of the arguments: before `int, foo', now
14209 * data/yacc.c (yyparse): Prototype and define thanks to these.
14210 Adjust b4_c_function_def uses.
14211 * data/glr.c (yyparse): Likewise, but ANSI only.
14213 2002-10-20 Akim Demaille <akim@epita.fr>
14215 * src/output.c (prepare): Move the definition of `tokens_number',
14216 `nterms_number', `undef_token_number', `user_token_number_max'
14218 (prepare_tokens): Here.
14219 (prepare_tokens): Rename as...
14220 (prepare_symbols): this.
14221 (prepare): Move the definition of `rules_number' to...
14222 (prepare_rules): here.
14223 (prepare): Move the definition of `last', `final_state_number',
14224 `states_number' to...
14225 (prepare_states): here.
14226 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
14228 2002-10-20 Akim Demaille <akim@epita.fr>
14230 * src/tables.h, src/tables.c, src/output.c: Comment changes.
14232 2002-10-20 Akim Demaille <akim@epita.fr>
14234 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
14237 2002-10-20 Akim Demaille <akim@epita.fr>
14239 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
14240 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
14242 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
14244 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
14245 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
14248 2002-10-19 Paul Eggert <eggert@twinsun.com>
14250 Do not create a temporary file, as that involves security and
14251 cleanup headaches. Instead, use a pair of pipes.
14252 Derived from a suggestion by Florian Krohm.
14253 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
14254 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
14255 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
14256 (BISON_PREREQ_SUBPIPE): Add.
14257 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
14258 Add subpipe.h, subpipe.c.
14259 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
14260 * po/POTFILES.in: Add lib/subpipe.c.
14261 * src/output.c: Include "subpipe.h".
14262 (m4_invoke): Remove decl.
14263 (scan_skel): New decl.
14264 (output_skeleton): Use pipe rather than temporary file for m4 input.
14265 Check that m4sugar.m4 is readable, to avoid deadlock.
14266 Check for pipe I/O error.
14267 * src/scan-skel.l (readpipe): Remove decl.
14268 (scan_skel): New function, to be used in place of m4_invoke.
14269 Read from stream rather than file.
14271 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
14272 float, as this generates a warning on Solaris 8 + GCC 3.2 with
14273 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
14274 this generates a more-accurate value anyway.
14276 * lib/timevar.c (timervar_accumulate): Rename locals to
14277 avoid confusion with similarly-named more-global.
14278 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
14280 * src/output.c (prepare): Use xstrdup to convert char const *
14281 to char *, to avoid GCC warning.
14283 2002-10-19 Akim Demaille <akim@epita.fr>
14285 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
14286 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
14287 Use them to have `calc.y' ready for %pure-parser.
14288 * data/yacc.c (YYLEX): Pass a yylex return type to
14289 b4_c_function_call.
14291 2002-10-19 Akim Demaille <akim@epita.fr>
14293 Prototype support of %lex-param and %parse-param.
14295 * src/parse-gram.y: Add the definition of the %lex-param and
14296 %parse-param tokens, plus their rules.
14297 Drop the `_' version of %glr-parser.
14299 * src/scan-gram.l (INITIAL): Scan them.
14300 * src/muscle_tab.c: Comment changes.
14301 (muscle_insert, muscle_find): Rename `pair' as `probe'.
14302 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
14303 (muscle_entry_s): The `value' member is no longer const.
14304 Adjust all dependencies.
14305 * src/muscle_tab.c (muscle_init): Adjust: use
14306 MUSCLE_INSERT_STRING.
14307 Initialize the obstack earlier.
14308 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
14309 (muscle_pair_list_grow): New.
14310 * data/c.m4 (b4_c_function_call, b4_c_args): New.
14311 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
14312 * tests/calc.at: Use %locations, not --locations.
14313 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
14315 2002-10-19 Akim Demaille <akim@epita.fr>
14317 * src/getargs.c (usage): Take status as argument and exit
14319 Report the traditional `Try ... --help' message when status != 0.
14320 (usage, version): Don't take a FILE * as arg, it is pointless.
14321 (getargs): When there is an incorrect number of arguments, make it
14322 an error, and report it GNUlically thanks to `usage ()'.
14324 2002-10-18 Paul Eggert <eggert@twinsun.com>
14326 * data/glr.c (yyreportParseError): Don't assume that sprintf
14327 yields the length of the printed string, as this is not true
14328 on SunOS 4.1.4. Reported by Peter Klein.
14330 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
14331 * tests/conflicts.at (%nonassoc and eof): Likewise.
14332 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
14334 2002-10-17 Akim Demaille <akim@epita.fr>
14336 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
14337 * src/getargs.c (trace_types, trace_args): Adjust.
14338 * src/reader.c (grammar_current_rule_prec_set)
14339 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
14340 Standardize error messages.
14341 And s/@prec/%prec/!
14342 (reader): Use trace_flag to enable scanner/parser debugging,
14343 instead of an adhoc scheme.
14344 * src/scan-gram.l: Remove trailing debugging code.
14346 2002-10-16 Paul Eggert <eggert@twinsun.com>
14348 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
14351 * NEWS: Officially drop support for building Bison with K&R C,
14352 since it didn't work anyway and it's not worth worrying about.
14353 * Makefile.maint (wget_files): Remove ansi2knr.c.
14354 (ansi2knr.c-url_prefix): Remove.
14355 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
14356 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14357 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14359 2002-10-15 Paul Eggert <eggert@twinsun.com>
14361 Stop using the "enum_" trick for K&R-style function definitions;
14362 it confused me, and I was the author! Instead, assume that people
14363 who want to use K&R C compilers (when using these modules in GCC,
14364 perhaps?) will run ansi2knr.
14366 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
14367 All uses of "enum_" changed to "enum ".
14368 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
14369 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
14371 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
14372 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
14373 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
14374 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
14375 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
14376 abitset_not, abitset_ones, abitset_or, abitset_or_and,
14377 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
14378 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
14379 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
14380 Use function prototypes; this removes the need for declaring
14381 static functions simply to provide their prototypes.
14382 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
14383 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
14384 bitset_count_, bitset_create, bitset_dump, bitset_first,
14385 bitset_free, bitset_init, bitset_last, bitset_next,
14386 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
14387 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
14388 bitset_print, bitset_release_memory, bitset_toggle_,
14389 bitset_type_choose, bitset_type_get, bitset_type_name_get,
14390 debug_bitset): Likewise.
14391 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
14392 * lib/bitset_stats.c (bitset_log_histogram_print,
14393 bitset_percent_histogram_print, bitset_stats_and,
14394 bitset_stats_and_cmp, bitset_stats_and_or,
14395 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
14396 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
14397 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
14398 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
14399 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
14400 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
14401 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
14402 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
14403 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
14404 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
14405 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
14406 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
14407 bitset_stats_zero): Likewise.
14408 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
14409 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
14410 bitsetv_dump, debug_bitsetv): Likewise.
14411 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
14412 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
14413 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
14414 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
14415 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
14416 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
14417 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
14418 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
14419 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
14420 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
14421 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
14423 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
14424 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
14425 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
14426 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
14427 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
14428 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
14429 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
14430 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
14431 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
14432 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
14433 lbitset_xor_cmp, lbitset_zero): Likewise.
14435 2002-10-14 Akim Demaille <akim@epita.fr>
14439 2002-10-14 Akim Demaille <akim@epita.fr>
14441 * tests/Makefile.am (maintainer-check-posix): New.
14443 2002-10-14 Akim Demaille <akim@epita.fr>
14445 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
14448 2002-10-14 Akim Demaille <akim@epita.fr>
14450 * src/tables.c (table_ninf_remap): base -> tab.
14451 Reported by Matt Rosing.
14453 2002-10-14 Paul Eggert <eggert@twinsun.com>
14455 * tests/action.at, tests/calc.at, tests/conflicts.at,
14456 tests/cxx-type.at, tests/headers.at, tests/input.at,
14457 tests/regression.at, tests/synclines.at, tests/torture.at:
14458 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
14459 so that the tests still work even if POSIXLY_CORRECT is set.
14460 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
14462 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
14463 for portability to K&R hosts. Fix typo: signed char is guaranteed
14464 only to 127, not to 128.
14465 * data/glr.c (yysigned_char): New type.
14466 * data/yacc.c (yysigned_char): Likewise.
14467 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
14469 2002-10-13 Paul Eggert <eggert@twinsun.com>
14471 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
14472 true due to limited range of data type" warning from GCC.
14474 * data/c.m4 (b4_token_defines): Protect against double-inclusion
14475 by wrapping enum yytokentype's definition inside #ifndef
14476 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
14478 2002-10-13 Akim Demaille <akim@epita.fr>
14480 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
14481 Un yy- yyrhs to avoid the name clash with the global YYRHS.
14483 2002-10-13 Akim Demaille <akim@epita.fr>
14485 * Makefile.maint: Update from Autoconf 2.54.
14486 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
14488 2002-10-13 Akim Demaille <akim@epita.fr>
14490 * src/print.c (print_state): Separate the list of solved conflicts
14491 from the other items.
14492 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
14494 2002-10-13 Akim Demaille <akim@epita.fr>
14496 Let nondeterministic skeletons be usable with deterministic
14499 With the patch, GAWK compiled by GCC without -O2 passes its test
14500 suite using a GLR parser driven by LALR tables. It fails with -O2
14501 because `struct stat' gives two different answers on my machine:
14502 88 (definition of an auto var) and later 96 (memset on this var).
14503 Hence the stack is badly corrumpted. The headers inclusion is to
14504 blame: if I move the awk.h inclusion before GLR's system header
14505 inclusion, the two struct stat have the same size.
14507 * src/tables.c (pack_table): Always create conflict_table.
14508 (token_actions): Always create conflict_list.
14509 * data/glr.c (YYFLAG): Remove, unused.
14511 2002-10-13 Akim Demaille <akim@epita.fr>
14513 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
14515 (VALGRIND, GXX): New.
14516 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
14517 * tests/bison.in: Run $PREBISON a pre-command.
14518 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
14519 (maintainer-check-g++): New.
14520 * Makefile.am (maintainer-check): New.
14522 2002-10-13 Akim Demaille <akim@epita.fr>
14524 * data/glr.c: Formatting changes.
14525 Tweak some trace messages to match yacc.c's.
14527 2002-10-13 Akim Demaille <akim@epita.fr>
14529 GLR parsers sometimes raise parse errors instead of performing the
14531 Reported by Charles-Henry de Boysson.
14533 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
14534 check the length of the traces when %glr.
14535 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
14537 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
14539 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
14540 (yyltype): Remove the yy prefix from the member names.
14541 (yytable): Complete its comment.
14542 (yygetLRActions): Map error action number from YYTABLE from
14544 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
14545 (which was a bug: it should have been YYTABEL_NINF, and yet it was
14546 not satisfying as we could compare an YYACTION computed from
14547 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
14548 only value for error actions.
14549 (yyreportParseError): In verbose parse error messages, don't issue
14550 `error' in the list of expected tokens.
14551 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
14552 next action to perform to match glr.c's decoding.
14553 (yytable): Complete its comment.
14555 2002-10-13 Paul Eggert <eggert@twinsun.com>
14557 Fix problem reported by Henrik Grubbstroem in
14558 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
14559 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
14560 because the Bison parser reads the second action before reducing
14562 * src/scan-gram.l (rule_length): New static var.
14563 Use it to keep track of the rule length in the scanner, since
14564 we can't expect the parser to be in lock-step sync with the scanner.
14565 (handle_action_dollar, handle_action_at): Use this var.
14566 * tests/actions.at (Exotic Dollars): Test for the problem.
14568 2002-10-12 Paul Eggert <eggert@twinsun.com>
14570 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
14571 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
14572 Include <sys/time.h> when checking for clock_t and struct tms.
14573 Use same include order as source.
14574 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
14575 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
14577 * lib/timevar.c: Update copyright date and clarify comments.
14578 (get_time) [IN_GCC]: Keep the GCC version for reference.
14580 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
14581 GCC version as of today, then merge Bison's changes.
14582 Change "GCC" to "Bison" in copyright notice. timevar.def's
14583 author is Akim, so change that too.
14585 * src/reader.c (grammar_current_rule_check):
14586 Don't worry about the default action if $$ is untyped.
14587 Prevents bogus warnings reported by Jim Gifford in
14588 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
14590 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
14591 * data/glr.c, data/lalr1.cc, data/yacc.c:
14592 Output token definitions before the first part of user declarations.
14593 Fixes compatibility problem reported by Jim Gifford for kbd in
14594 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14596 2002-10-11 Paul Eggert <eggert@twinsun.com>
14598 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
14599 (yyparse): here. This undoes some of the 2002-07-25 change.
14600 Compatibility problem reported by Ralf S. Engelschall with
14601 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
14603 2002-10-11 Akim Demaille <akim@epita.fr>
14605 * tests/regression.at Characters Escapes): New.
14606 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
14608 Reported by Jan Nieuwenhuizen.
14610 2002-10-11 Akim Demaille <akim@epita.fr>
14614 2002-10-10 Paul Eggert <eggert@twinsun.com>
14616 Portability fixes for bitsets; this also avoids several GCC
14619 * lib/abitset.c: Include <stddef.h>, for offsetof.
14620 * lib/lbitset.c: Likewise.
14622 * lib/abitset.c (abitset_bytes): Return a size that is aligned
14623 properly for vectors of objects. Do not assume that adding a
14624 header size to a multiple of a word size yields a value that is
14625 properly aligned for the whole union.
14626 * lib/bitsetv.c (bitsetv_alloc): Likewise.
14628 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
14629 unique names for structures.
14630 * lib/ebitset.c (ebitset_bytes): Likewise.
14631 * lib/lbitset.c (lbitset_bytes): Likewise.
14633 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
14634 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
14635 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
14636 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
14637 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
14638 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
14639 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
14640 to improve the type-checking that GCC can do.
14641 * lib/bitset.c (bitset_op4_cmp): Likewise.
14642 * lib/bitset_stats.c (bitset_stats_count,
14643 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
14644 bitset_stats_copy, bitset_stats_disjoint_p,
14645 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
14646 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
14647 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
14648 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
14649 bitset_stats_and_or_cmp, bitset_stats_andn_or,
14650 bitset_stats_andn_or_cmp, bitset_stats_or_and,
14651 bitset_stats_or_and_cmp): Likewise.
14652 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
14653 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
14654 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
14655 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
14657 * lib/abitset.h: Include bitset.h, not bbitset.h.
14658 * lib/ebitset.h: Likewise.
14659 * lib/lbitset.h: Likewise.
14661 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
14662 All instances of parameters of type enum bitset_opts are now of
14663 type enum_bitset_opts, to conform to the C Standard, and similarly
14664 for enum_bitset_type.
14665 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
14666 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
14668 Do not use "struct bitset_struct" to mean different things in
14669 different modules. Not only is this confusing, it violates
14670 the C Standard, which requires that structure types in different
14671 modules must be compatible if one is to be passed to the other.
14672 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
14673 All instances of "struct bitset_struct *" replaced with "bitset".
14674 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
14675 (union bitset_union, struct abitset_struct, struct ebitset_struct,
14676 struct lbitset_struct, struct bitset_stats_struct): New types.
14677 All uses of struct bitset_struct changed to union bitset_union,
14679 * lib/abitset.c (struct abitset_struct, abitset,
14680 struct bitset_struct): Remove.
14681 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
14682 struct bitset_struct): Remove.
14683 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
14684 bitset_struct): Remove.
14685 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
14688 Do not call a function of type T using a call that assumes the
14689 function is of a different type U. Standard C requires that a
14690 function must be called with a type that is compatible with its
14692 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
14694 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
14696 * lib/ebitset.c (PFV): Remove.
14697 * lib/lbitset.c (PFV): Likewise.
14698 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
14699 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
14701 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
14702 (ebitset_vtable): Use them.
14703 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
14704 lbitset_xor): New functions.
14705 (lbitset_vtable): Use them.
14707 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
14710 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
14712 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
14713 Use offsetof, for simplicity.
14715 2002-10-06 Paul Eggert <eggert@twinsun.com>
14717 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
14718 the same width as int. This reapplies a hunk of the 2002-08-12 patch
14719 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
14720 which was inadvertently undone by the 2002-09-30 patch.
14721 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
14722 the same width as int.
14724 2002-10-04 Paul Eggert <eggert@twinsun.com>
14728 * configure.ac (AC_INIT), NEWS: Increment version number.
14730 * doc/bison.texinfo: Minor spelling, grammar, and white space
14732 (Symbols): Mention that any negative value returned from yylex
14733 signifies end-of-input. Warn about negative chars. Mention
14734 the portable Standard C character set.
14736 The GNU coding standard says CFLAGS and YFLAGS are reserved
14737 for the installer to set.
14738 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
14739 * src/Makefile.am (AM_CFLAGS): Likewise.
14740 (AM_YFLAGS): Renamed from YFLAGS.
14742 Fix some MAX and MIN problems.
14743 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
14744 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
14745 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
14746 * src/reader.c (reader): Use it.
14748 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
14749 POSIX 1003.1-2001 has removed fgrep.
14751 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
14753 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
14754 interpreted as signed.
14755 * lib/ebitset.c (ebitset_list): Fix bug.
14757 2002-10-01 Paul Eggert <eggert@twinsun.com>
14759 More fixes for 64-bit hosts and large bitsets.
14761 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
14762 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
14763 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
14764 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
14765 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
14766 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
14767 bitset_count_): Likewise.
14768 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
14769 bitset_first, bitset_last): Likewise.
14770 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
14771 bitset_stats_list_reverse, bitset_stats_size,
14772 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
14774 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
14775 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
14776 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
14777 bitsetv_reflexive_transitive_closure): Likewise.
14778 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
14779 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
14781 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
14784 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
14785 Use size_t, not unsigned int, to count bytes.
14786 * lib/abitset.h (abitset_bytes): Likewise.
14787 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
14789 * lib/bitset.h (bitset_bytes): Likewise.
14790 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
14791 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
14792 * lib/bitsetv.c (bitsetv_alloc): Likewise.
14793 * lib/ebitset.c (ebitset_bytes): Likewise.
14794 * lib/ebitset.h (ebitset_bytes): Likewise.
14795 * lib/lbitset.c (lbitset_bytes): Likewise.
14796 * lib/lbitset.h (lbitset_bytes): Likewise.
14798 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
14799 abitset_subset_p, abitset_disjoint_p, abitset_and,
14800 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
14801 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
14802 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
14803 abitset_or_and, abitset_or_and_cmp):
14804 Use bitset_windex instead of unsigned int.
14805 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
14806 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
14807 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
14808 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
14810 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
14812 * lib/bitset.c (bitset_print):
14813 Use proper printf formats for widths of integer types.
14814 * lib/bitset_stats.c (bitset_percent_histogram_print,
14815 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
14816 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
14817 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
14818 * lib/lbitset.c (lbitset_bytes): Likewise.
14820 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
14821 BITSET_SIZE_MAX): New macros.
14822 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
14823 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
14824 to BITSET_WINDEX_MAX.
14826 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
14827 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
14828 since we now return the bitset_bindex type (not int).
14830 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
14831 when computing sizes.
14832 * lib/ebitset.c (ebitset_elts_grow): Likewise.
14834 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
14835 and avoid cast to unsigned.
14837 2002-09-30 Akim Demaille <akim@epita.fr>
14839 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
14840 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
14841 Updates from Michael Hayes.
14843 2002-09-30 Art Haas <ahaas@neosoft.com>
14845 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
14847 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
14850 2002-09-27 Akim Demaille <akim@epita.fr>
14854 2002-09-27 Akim Demaille <akim@epita.fr>
14856 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
14857 (Because of AC_LIBSOURCE).
14859 2002-09-27 Akim Demaille <akim@epita.fr>
14861 Playing with Autoscan.
14863 * configure.ac: Remove the old LIBOBJ tweaks.
14864 (AC_REPLACE_FUNCS): Add strrchr and strtol.
14865 * lib/strrchr.c: New.
14866 * lib/strtol.c: New, from the Coreutils 4.5.1.
14868 2002-09-27 Akim Demaille <akim@epita.fr>
14870 Playing with Autoscan.
14872 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
14873 * lib/Makefile.am (libbison_a_SOURCES): No longer include
14874 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
14875 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
14878 2002-09-24 Akim Demaille <akim@epita.fr>
14880 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
14881 (Frequently Asked Questions, Parser Stack Overflow): New.
14883 2002-09-13 Akim Demaille <akim@epita.fr>
14885 Playing with autoscan.
14887 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
14888 * src/files.c (skeleton_find): Remove, unused.
14889 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
14890 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
14892 2002-09-13 Akim Demaille <akim@epita.fr>
14894 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
14895 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
14897 2002-09-13 Akim Demaille <akim@epita.fr>
14899 * configure.ac: Require 2.54.
14900 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
14901 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
14902 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
14903 Remove, provided by Autoconf macros.
14905 2002-09-12 Akim Demaille <akim@epita.fr>
14907 * m4/prereq.m4: Update, from Coreutils 4.5.1.
14909 2002-09-12 Akim Demaille <akim@epita.fr>
14911 * m4/prereq.m4: Update, from Fileutils 4.1.5.
14912 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
14913 Reported by Martin Mokrejs.
14915 2002-09-10 Akim Demaille <akim@epita.fr>
14917 * src/parse-gram.y: Associate a human readable string to each
14919 * tests/regression.at (Invalid inputs): Adjust.
14921 2002-09-10 Gary V. Vaughan <gary@gnu.org>
14923 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
14924 with an Autoconf-2.5x style configure.ac.
14926 2002-09-06 Paul Eggert <eggert@twinsun.com>
14928 * doc/bison.texinfo (Conditions): Make explicit that the GPL
14929 exception applies only to yacc.c. This is a modification of a
14930 patch originally suggested by Akim Demaille.
14932 2002-09-06 Akim Demaille <akim@epita.fr>
14934 * data/c.m4 (b4_copyright): Move the GPL exception comment from
14936 * data/yacc.c: here.
14938 * data/lalr1.cc (struct yyltype): Don't define it, since we use
14940 (b4_ltype): Default to yy::Location from location.hh.
14942 2002-09-04 Jim Meyering <jim@meyering.net>
14944 * data/yacc.c: Guard the declaration of yytoknum also with
14945 `#ifdef YYPRINT', so it is declared only when used.
14947 2002-09-04 Akim Demaille <akim@epita.fr>
14949 * configure.in: Rename as...
14950 * configure.ac: this.
14953 2002-09-04 Akim Demaille <akim@epita.fr>
14955 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
14956 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
14957 translate maintainer only messages.
14959 2002-08-12 Paul Eggert <eggert@twinsun.com>
14963 * Makefile.am (SUBDIRS): Remove intl.
14964 (DISTCLEANFILES): Remove.
14965 * NEWS: Mention that GNU M4 is now required. Clarify what is
14966 meant by "larger grammars". Mention the pt_BR translation.
14967 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
14968 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
14969 Bump version from 0.11.2 to 0.11.5.
14970 (BISON_PREREQ_STAGE): Remove.
14971 (AM_GNU_GETTEXT): Use external gettext.
14972 (AC_OUTPUT): Remove intl/Makefile.
14974 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
14976 * data/glr.c: Include string.h, for strlen.
14977 (yyreportParseError): Use size_t for yysize.
14978 (yy_yypstack): No longer nested inside yypstates, as nested
14979 functions are not portable. Do not assume size_t is the
14981 (yypstates): Do not assume that ptrdiff_t is the same width
14982 as int, and similarly for yyposn and YYINDEX.
14984 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
14986 * lib/Makefile.am (INCLUDES): Do not include from the intl
14987 directory, which has been removed.
14988 * src/Makefile.am (INCLUDES): Likewise.
14990 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
14991 (bitsets_sources, additional_bitsets_sources, timevars_sources):
14994 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
14995 * tests/Makefile.am (EXTRA_DIST): Likewise.
14997 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
14998 Do not assume that bitset_windex is the same width as unsigned.
15000 * lib/abitset.c (abitset_unused_clear): Do not assume that
15001 bitset_word is the same width as int.
15002 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
15003 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
15004 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
15005 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
15006 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
15008 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
15009 portability to one's complement hosts!).
15010 * lib/ebitset.c (ebitset_op1): Likewise.
15011 * lib/lbitset.c (lbitset_op1): Likewise.
15013 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
15014 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
15015 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
15016 Sync with fileutils.
15017 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
15018 lib/gettext.h: Sync with diffutils.
15020 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
15021 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
15023 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
15024 PROTOTYPES to check for prototypes, and "defined __STDC__" to
15027 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
15028 size_t; the old version tried to do this but casted improperly.
15029 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
15030 (bitset_test): Now returns int, not unsigned long.
15032 * lib/bitset_stats.c: Include "gettext.h".
15034 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
15035 name locals "index", as it generates unnecessary warnings on some
15036 hosts that have an "index" function.
15038 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
15039 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
15040 they need translation.
15041 * src/LR0.c (state_list_append, new_itemsets, get_state,
15042 append_states, generate_states): Likewise.
15043 * src/assoc.c (assoc_to_string): Likewise.
15044 * src/closure.c (print_closure, set_firsts, closure): Likewise.
15045 * src/gram.c (grammar_dump): Likewise.
15046 * src/injections.c (injections_compute): Likewise.
15047 * src/lalr.c (lookaheads_print): Likewise.
15048 * src/relation.c (relation_transpose): Likewise.
15049 * src/scan-gram.l: Likewise.
15050 * src/tables.c (table_grow, pack_vector): Likewise.
15052 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
15053 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
15054 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
15055 * m4/mbstate_t.m4: Sync with fileutils.
15056 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
15058 * po/LINGUAS: Add pt_BR.
15059 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
15060 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
15062 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
15064 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
15066 * src/complain.c (strerror_r): Remove decl; not needed.
15067 (strerror): Use same pattern as ../lib/error.c.
15069 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
15071 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
15073 * src/main.c (main): Cast result of bindtextdomain and textdomain
15074 to void, to avoid a GCC warning when --disable-nls is in effect.
15076 * src/scan-gram.l: Use strings rather than escapes when possible,
15077 to minimize the number of warnings from xgettext.
15078 (handle_action_dollar, handle_action_at): Don't use isdigit,
15079 as it mishandles negative chars and it may not work as expected
15080 outside the C locale.
15082 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
15083 this is a GCC extension and is not portable to other compilers.
15085 * src/system.h (alloca): Use same pattern as ../lib/error.c.
15086 Do not include <ctype.h>; no longer needed.
15087 Do not include <malloc.h>; no longer needed (and generates
15088 warnings on OpenBSD 3.0).
15090 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
15093 * tests/regression.at: Do not use 'cc -c input.c -o input';
15094 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
15096 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
15097 exit status as failure, not just exit status 1. Sun C exits
15098 with status 2 sometimes.
15100 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
15101 Use it for the two large tests.
15103 2002-08-02 Akim Demaille <akim@epita.fr>
15105 * src/conflicts.c (conflicts_output): Don't output rules never
15106 reduced here, since anyway that computation doesn't work.
15107 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
15108 (rule_useless_p, rule_never_reduced_p): New.
15109 (grammar_rules_partial_print): Use a filter instead of a range.
15110 Display the title only if needed.
15111 (grammar_rules_print): Adjust.
15112 (grammar_rules_never_reduced_report): New.
15113 * src/tables.c (action_row): Move the computation of rules never
15115 (token_actions): here.
15116 * src/main.c (main): Make the parser before making the report, so
15117 that rules never reduced are computed.
15118 Call grammar_rules_never_reduced_report.
15119 * src/print.c (print_results): Report rules never reduced.
15120 * tests/conflicts.at, tests/reduce.at: Adjust.
15122 2002-08-01 Akim Demaille <akim@epita.fr>
15124 Instead of attaching lookaheads and duplicating the rules being
15125 reduced by a state, attach the lookaheads to the reductions.
15127 * src/state.h (state_t): Remove the `lookaheads',
15128 `lookaheads_rule' member.
15129 (reductions_t): Add a `lookaheads' member.
15130 Use a regular array for the `rules'.
15131 * src/state.c (reductions_new): Initialize the lookaheads member
15133 (state_rule_lookaheads_print): Adjust.
15134 * src/state.h, src/state.c (state_reductions_find): New.
15135 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
15136 (count_rr_conflicts): Adjust.
15137 * src/lalr.c (LArule): Remove.
15138 (add_lookback_edge): Adjust.
15139 (state_lookaheads_count): New.
15140 (states_lookaheads_initialize): Merge into...
15141 (initialize_LA): this.
15142 (lalr_free): Adjust.
15143 * src/main.c (main): Don't free nullable and derives too early: it
15144 is used by --verbose.
15145 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
15147 2002-08-01 Akim Demaille <akim@epita.fr>
15149 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
15151 (set_derives, free_derives): Rename as...
15152 (derives_compute, derives_free): this.
15153 Adjust all dependencies.
15154 * src/nullable.c (set_nullable, free_nullable): Rename as...
15155 (nullable_compute, nullable_free): these.
15156 (rule_list_t): Store rule_t *, not rule_number_t.
15157 * src/state.c (state_rule_lookaheads_print): Directly compare rule
15158 pointers, instead of their numbers.
15159 * src/main.c (main): Call nullable_free, and derives_free earlier,
15160 as they were lo longer used.
15162 2002-08-01 Akim Demaille <akim@epita.fr>
15164 * lib/timevar.c (get_time): Include children time.
15165 * src/lalr.h (LA, LArule): Don't export them: used with the
15167 * src/lalr.c (LA, LArule): Static.
15168 * src/lalr.h, src/lalr.c (lalr_free): New.
15169 * src/main.c (main): Call it.
15170 * src/tables.c (pack_vector): Check whether loc is >= to the
15172 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
15173 (tables_generate): do it, since that's also it which allocates
15175 Don't free LA and LArule, main does.
15177 2002-07-31 Akim Demaille <akim@epita.fr>
15179 Separate parser tables computation and output.
15181 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
15182 (conflict_list, conflict_list_cnt, table, check, table_ninf)
15183 (yydefgoto, yydefact, high): Move to...
15184 * src/tables.h, src/tables.c: here.
15185 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
15186 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
15187 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
15188 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
15189 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
15190 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
15191 (action_row, save_row, token_actions, save_column, default_goto)
15192 (goto_actions, sort_actions, matching_state, pack_vector)
15193 (table_ninf_remap, pack_table, prepare_actions): Move to...
15194 * src/tables.c: here.
15195 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
15196 * src/output.c (token_actions, output_base, output_conflicts)
15197 (output_check): Merge into...
15198 (prepare_actions): this.
15199 (actions_output): Rename as...
15200 (user_actions_output): this.
15201 * src/main.c (main): Call tables_generate and tables_free.
15203 2002-07-31 Akim Demaille <akim@epita.fr>
15205 Steal GCC's --time-report support.
15207 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
15208 stolen/adjusted from GCC.
15209 * m4/stage.m4: Remove time related checks.
15210 * m4/timevar.m4: New.
15211 * configure.in: Adjust.
15212 * src/system.h: Adjust to using timevar.h.
15213 * src/getargs.h, src/getargs.c: Support trace_time for
15215 * src/main.c (stage): Remove.
15216 (main): Replace `stage' invocations with timevar calls.
15217 * src/output.c: Insert pertinent timevar calls.
15219 2002-07-31 Akim Demaille <akim@epita.fr>
15221 Let --trace have arguments.
15223 * src/getargs.h (enum trace_e): New.
15224 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
15225 (long_options, short_options): --trace/-T takes an optional
15227 Change all the uses of trace_flag to reflect the new flags.
15228 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
15230 Strengthen `stage' portability.
15232 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
15233 * configure.in: Use it.
15234 Don't check for malloc.h and sys/times.h.
15235 * src/system.h: Include them when appropriate.
15236 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
15237 times and struct tms are available.
15239 2002-07-30 Akim Demaille <akim@epita.fr>
15241 In verbose parse error message, don't report `error' as an
15243 * tests/actions.at (Printers and Destructors): Adjust.
15244 * tests/calc.at (Calculator $1): Adjust.
15245 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
15246 error message, do not report the parser accepts the error token in
15249 2002-07-30 Akim Demaille <akim@epita.fr>
15251 Normalize conflict related messages.
15253 * src/complain.h, src/complain.c (warn, complain): New.
15254 * src/conflicts.c (conflicts_print): Use them.
15255 (conflict_report_yacc): New, extracted from...
15256 (conflicts_print): here.
15257 * tests/conflicts.at, tests/existing.at: Adjust.
15259 2002-07-30 Akim Demaille <akim@epita.fr>
15261 Report rules which are never reduced by the parser: those hidden
15264 * src/LR0.c (save_reductions): Don't make the final state too
15265 different: save its reduction (accept) instead of having a state
15266 without any action (no shift or goto, no reduce).
15267 Note: the final state is now a ``regular'' state, i.e., the
15268 parsers now contain `reduce 0' as default reduction.
15269 Nevertheless, since they decide to `accept' when yystate =
15270 final_state, they still will not reduce rule 0.
15271 * src/print.c (print_actions, print_reduction): Adjust.
15272 * src/output.c (action_row): Track reduced rules.
15273 (token_actions): Report rules never reduced.
15274 * tests/conflicts.at, tests/regression.at: Adjust.
15276 2002-07-30 Akim Demaille <akim@epita.fr>
15278 `stage' was accidently included in a previous patch.
15279 Initiate its autoconfiscation.
15281 * configure.in: Look for malloc.h and sys/times.h.
15282 * src/main.c (stage): Adjust.
15283 Report only when trace_flag.
15285 2002-07-29 Akim Demaille <akim@epita.fr>
15287 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
15289 (errs_t): symbol_t*, not symbol_number_t.
15290 (reductions_t): rule_t*, not rule_number_t.
15291 (FOR_EACH_SHIFT): New.
15292 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
15293 * src/print.c, src/print_graph.c: Adjust.
15295 2002-07-29 Akim Demaille <akim@epita.fr>
15297 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
15299 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
15300 (endtoken, accept): these.
15301 * src/reader.c (reader): Set endtoken's default tag to "$end".
15302 Set undeftoken's tag to "$undefined" instead of "$undefined.".
15303 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
15306 2002-07-29 Akim Demaille <akim@epita.fr>
15308 * src/reduce.c (reduce_grammar): When the language is empty,
15309 complain about the start symbol, not the axiom.
15311 * tests/reduce.at (Empty Language): New.
15313 2002-07-26 Akim Demaille <akim@epita.fr>
15315 * src/reader.h, src/reader.c (gram_error): ... can't get
15316 yycontrol without making too strong assumptions on the parser
15318 * src/output.c (prepare_tokens): Use the real 0th value of
15319 token_translations instead of `0'.
15320 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
15322 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
15323 for the time being: %locations ought to provide it to yyerror.
15325 2002-07-25 Akim Demaille <akim@epita.fr>
15327 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
15328 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
15329 * tests/regression.at (Web2c Actions): Adjust.
15331 2002-07-25 Akim Demaille <akim@epita.fr>
15333 Stop storing rules from 1 to nrules + 1.
15335 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
15336 * src/nullable.c, src/output.c, src/print.c, src/reader.c
15337 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
15338 Iterate from 0 to nrules.
15339 Use rule_number_as_item_number and item_number_as_rule_number.
15340 Adjust to `derive' now containing possibly 0.
15341 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
15342 Handle the `- 1' part in rule numbers from/to item numbers.
15343 * src/conflicts.c (log_resolution): Fix the message which reversed
15345 * src/output.c (action_row): Initialize default_rule to -1.
15346 (token_actions): Adjust.
15347 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
15349 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
15351 2002-07-25 Akim Demaille <akim@epita.fr>
15353 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
15354 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
15355 (b4_c_knr_arg_decl): New.
15356 * data/yacc.c: Use it to define yysymprint, yydestruct, and
15357 yyreport_parse_error.
15359 2002-07-25 Akim Demaille <akim@epita.fr>
15361 * data/yacc.c (yyreport_parse_error): New, extracted from...
15363 (yydestruct, yysymprint): Move above yyparse.
15366 2002-07-25 Akim Demaille <akim@epita.fr>
15368 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
15370 (b4_sint_type, b4_uint_type): these.
15371 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
15372 * tests/regression.at (Web2c Actions): Adjust.
15374 2002-07-25 Akim Demaille <akim@epita.fr>
15376 * src/gram.h (TIEM_NUMBER_MAX): New.
15377 (item_number_of_rule_number, rule_number_of_item_number): Rename
15379 (rule_number_as_item_number, item_number_as_rule_number): these.
15380 Adjust dependencies.
15381 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
15382 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
15383 (symbol_number_to_vector_number): New.
15384 (order): Of vector_number_t* type.
15385 (base_t, BASE_MAX, BASE_MIN): New.
15386 (froms, tos, width, pos, check): Of base_t type.
15387 (action_number_t, ACTION_MIN, ACTION_MAX): New.
15388 (actrow): Of action_number_t type.
15389 (conflrow): Of unsigned int type.
15390 (table_ninf, base_ninf): New.
15391 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
15392 (muscle_insert_int_table, muscle_insert_base_table)
15393 (muscle_insert_rule_number_table): New.
15394 (prepare_tokens): Output `toknum' as int_table.
15395 (action_row): Returns a rule_number_t.
15396 Use ACTION_MIN, not SHRT_MIN.
15397 (token_actions): yydefact is rule_number_t*.
15398 (table_ninf_remap): New.
15399 (pack_table): Use it for `base' and `table'.
15400 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
15402 (YYPACT_NINF, YYTABLE_NINF): these.
15403 (yypact, yytable): Compute their types instead of hard-coded
15405 * tests/regression.at (Web2c Actions): Adjust.
15407 2002-07-19 Akim Demaille <akim@epita.fr>
15409 * src/scan-gram.l (id): Can start with an underscore.
15411 2002-07-16 Akim Demaille <akim@epita.fr>
15413 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
15414 Adjust all former `associativity' dependencies.
15415 * src/symtab.c (symbol_new): Default associativity is `undef', not
15417 (symbol_check_alias_consistence): Adjust.
15419 2002-07-09 Akim Demaille <akim@epita.fr>
15421 * doc/bison.texinfo: Properly set the ``header'' part.
15422 Use @dircategory ``GNU programming tools'' as per Texinfo's
15426 2002-07-09 Akim Demaille <akim@epita.fr>
15428 * lib/quotearg.h: Protect against multiple inclusions.
15429 * src/location.h (location_t): Add a `file' member.
15430 (LOCATION_RESET, LOCATION_PRINT): Adjust.
15431 * src/complain.c (warn_at, complain_at, fatal_at): Drop
15432 `error_one_per_line' support.
15434 2002-07-09 Akim Demaille <akim@epita.fr>
15436 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
15437 * src/reader.c (lineno): Remove.
15438 Adjust all dependencies.
15439 (get_merge_function): Take a location and use complain_at.
15440 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
15441 * tests/regression.at (Invalid inputs, Mixing %token styles):
15444 2002-07-09 Akim Demaille <akim@epita.fr>
15446 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
15447 recovery rule, and forbid extensions when --yacc.
15448 (gram_error): Use complain_at.
15449 * src/reader.c (reader): Exit if there were parse errors.
15451 2002-07-09 Akim Demaille <akim@epita.fr>
15453 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
15454 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
15455 Reported by R Blake <blakers@mac.com>.
15457 2002-07-09 Akim Demaille <akim@epita.fr>
15459 * data/yacc.c: Output the copyright notive in the header.
15461 2002-07-03 Akim Demaille <akim@epita.fr>
15463 * src/output.c (froms, tos): Are state_number_t.
15464 (save_column): sp, sp1, and sp2 are state_number_t.
15465 (prepare): Rename `final' as `final_state_number', `nnts' as
15466 `nterms_number', `nrules' as `rules_number', `nstates' as
15467 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
15469 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
15470 * data/lalr1.cc (nsym_): Remove, unused.
15472 2002-07-03 Akim Demaille <akim@epita.fr>
15474 * src/lalr.h, src/lalr.c (goto_number_t): New.
15475 * src/lalr.c (goto_list_t): New.
15477 * src/nullable.c (rule_list_t): New.
15479 * src/types.h: Remove.
15481 2002-07-03 Akim Demaille <akim@epita.fr>
15483 * src/closure.c (print_fderives): Use rule_rhs_print.
15484 * src/derives.c (print_derives): Use rule_rhs_print.
15485 (rule_list_t): New, replaces `shorts'.
15486 (set_derives): Add comments.
15487 * tests/sets.at (Nullable, Firsts): Adjust.
15489 2002-07-03 Akim Demaille <akim@epita.fr>
15491 * src/output.c (prepare_actions): Free `tally' and `width'.
15492 (prepare_actions): Allocate and free `order'.
15493 * src/symtab.c (symbols_free): Free `symbols'.
15494 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
15495 * src/output.c (m4_invoke): Move to...
15496 * src/scan-skel.l: here.
15497 (<<EOF>>): Close yyout, and free its name.
15499 2002-07-03 Akim Demaille <akim@epita.fr>
15501 Fix some memory leaks, and fix a bug: state 0 was examined twice.
15503 * src/LR0.c (new_state): Merge into...
15504 (state_list_append): this.
15505 (new_states): Merge into...
15506 (generate_states): here.
15507 (set_states): Don't ensure a proper `errs' state member here, do it...
15508 * src/conflicts.c (conflicts_solve): here.
15509 * src/state.h, src/state.c: Comment changes.
15510 (state_t): Rename member `shifts' as `transitions'.
15511 Adjust all dependencies.
15512 (errs_new): For consistency, also take the values as argument.
15513 (errs_dup): Remove.
15514 (state_errs_set): New.
15515 (state_reductions_set, state_transitions_set): Assert that no
15516 previous value was assigned.
15518 (states_free): Use it.
15519 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
15520 temporary storage: use `errs' and `nerrs' as elsewhere.
15521 (set_conflicts): Allocate and free this `errs'.
15523 2002-07-02 Akim Demaille <akim@epita.fr>
15525 * lib/libiberty.h: New.
15526 * lib: Update the bitset implementation from upstream.
15527 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
15528 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
15529 * src/main.c: Adjust bitset stats calls.
15531 2002-07-01 Paul Eggert <eggert@twinsun.com>
15533 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
15534 char, so that negative chars don't collide with $.
15536 2002-06-30 Akim Demaille <akim@epita.fr>
15538 Have the GLR tests be `warning' checked, and fix the warnings.
15540 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
15541 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
15542 (yyremoveDeletes): `yyi' and `yyj' are size_t.
15543 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
15544 (yyaddDeferredAction): static.
15545 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
15546 (yyreportParseError): yyprefix is const.
15547 yytokenp is used only when verbose.
15548 (yy__GNUC__): Replace with __GNUC__.
15549 (yypdumpstack): yyi is size_t.
15550 (yypreference): Un-yy local variables and arguments, to avoid
15551 clashes with `yyr1'. Anyway, we are not in the user name space.
15552 (yytname_size): be an int, as is compared with ints.
15553 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
15555 * tests/cxx-gram.at: Use quotation to protect $1.
15556 Use AT_COMPILE to enable warnings hunts.
15557 Prototype yylex and yyerror.
15559 Include `string.h', not `strings.h'.
15560 Produce and prototype stmtMerge only when used.
15561 yylex takes a location.
15563 2002-06-30 Akim Demaille <akim@epita.fr>
15565 We spend a lot of time in quotearg, in particular when --verbose.
15567 * src/symtab.c (symbol_get): Store a quoted version of the key.
15568 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
15569 Adjust all callers.
15571 2002-06-30 Akim Demaille <akim@epita.fr>
15573 * src/state.h (reductions_t): Rename member `nreds' as num.
15574 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
15575 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
15577 2002-06-30 Akim Demaille <akim@epita.fr>
15579 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
15580 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
15581 (shifts_to): Rename as...
15582 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
15583 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
15584 (TRANSITION_IS_DISABLED, transitions_to): these.
15586 2002-06-30 Akim Demaille <akim@epita.fr>
15588 * src/print.c (print_shifts, print_gotos): Merge into...
15589 (print_transitions): this.
15590 (print_transitions, print_errs, print_reductions): Align the
15591 lookaheads columns.
15592 (print_core, print_transitions, print_errs, print_state,
15593 print_grammar): Output empty lines separator before, not after.
15594 (state_default_rule_compute): Rename as...
15595 (state_default_rule): this.
15596 * tests/conflicts.at (Defaulted Conflicted Reduction),
15597 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
15598 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
15600 2002-06-30 Akim Demaille <akim@epita.fr>
15602 Display items as we display rules.
15604 * src/gram.h, src/gram.c (rule_lhs_print): New.
15605 * src/gram.c (grammar_rules_partial_print): Use it.
15606 * src/print.c (print_core): Likewise.
15607 * tests/conflicts.at (Defaulted Conflicted Reduction),
15608 (Unresolved SR Conflicts): Adjust.
15609 (Unresolved SR Conflicts): Adjust and rename as...
15610 (Resolved SR Conflicts): this, as was meant.
15611 * tests/regression.at (Web2c Report): Adjust.
15613 2002-06-30 Akim Demaille <akim@epita.fr>
15615 * src/print.c (state_default_rule_compute): New, extracted from...
15616 (print_reductions): here.
15617 Pessimize, but clarify the code.
15618 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
15620 2002-06-30 Akim Demaille <akim@epita.fr>
15622 * src/output.c (action_row): Let default_rule be always a rule
15625 2002-06-30 Akim Demaille <akim@epita.fr>
15627 * src/closure.c (print_firsts, print_fderives, closure):
15628 Use BITSET_EXECUTE.
15629 * src/lalr.c (lookaheads_print): Likewise.
15630 * src/state.c (state_rule_lookaheads_print): Likewise.
15631 * src/print_graph.c (print_core): Likewise.
15632 * src/print.c (print_reductions): Likewise.
15633 * src/output.c (action_row): Likewise.
15634 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
15636 2002-06-30 Akim Demaille <akim@epita.fr>
15638 * src/print_graph.c: Use report_flag.
15640 2002-06-30 Akim Demaille <akim@epita.fr>
15642 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
15644 * src/relation.h, src/relation.c (traverse, relation_digraph)
15645 (relation_print, relation_transpose): New.
15647 2002-06-30 Akim Demaille <akim@epita.fr>
15649 * src/state.h, src/state.c (shifts_to): New.
15650 * src/lalr.c (build_relations): Use it.
15652 2002-06-30 Akim Demaille <akim@epita.fr>
15654 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
15655 (item_number_of_rule_number, rule_number_of_item_number): New.
15656 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
15657 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
15658 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
15659 Propagate their use.
15660 Much remains to be done, in particular wrt `shorts' from types.h.
15662 2002-06-30 Akim Demaille <akim@epita.fr>
15664 * src/symtab.c (symbol_new): Initialize the `printer' member.
15666 2002-06-30 Akim Demaille <akim@epita.fr>
15668 * src/LR0.c (save_reductions): Remove, replaced by...
15669 * src/state.h, src/state.c (state_reductions_set): New.
15670 (reductions, errs): Rename as...
15671 (reductions_t, errs_t): these.
15672 Adjust all dependencies.
15674 2002-06-30 Akim Demaille <akim@epita.fr>
15676 * src/LR0.c (state_list_t, state_list_append): New.
15677 (first_state, last_state): Now symbol_list_t.
15678 (this_state): Remove.
15679 (new_itemsets, append_states, save_reductions): Take a state_t as
15681 (set_states, generate_states): Adjust.
15682 (save_shifts): Remove, replaced by...
15683 * src/state.h, src/state.c (state_shifts_set): New.
15684 (shifts): Rename as...
15686 Adjust all dependencies.
15687 * src/state.h (state_t): Remove the `next' member.
15689 2002-06-30 Akim Demaille <akim@epita.fr>
15691 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
15694 2002-06-30 Akim Demaille <akim@epita.fr>
15696 Use hash.h for the state hash table.
15698 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
15699 (allocate_storage): Use state_hash_new.
15700 (free_storage): Use state_hash_free.
15701 (new_state, get_state): Adjust.
15702 * src/lalr.h, src/lalr.c (states): Move to...
15703 * src/states.h (state_t): Remove the `link' member, no longer
15705 * src/states.h, src/states.c: here.
15706 (state_hash_new, state_hash_free, state_hash_lookup)
15707 (state_hash_insert, states_free): New.
15708 * src/states.c (state_table, state_compare, state_hash): New.
15709 * src/output.c (output_actions): Do not free states now, since we
15710 still need to know the final_state number in `prepare', called
15711 afterwards. Do it...
15712 * src/main.c (main): here: call states_free after `output'.
15714 2002-06-30 Akim Demaille <akim@epita.fr>
15716 * src/state.h, src/state.c (state_new): New, extracted from...
15717 * src/LR0.c (new_state): here.
15718 * src/state.h (STATE_ALLOC): Move to...
15719 * src/state.c: here.
15720 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
15721 * src/state.h, src/state.c: here.
15723 2002-06-30 Akim Demaille <akim@epita.fr>
15725 * src/reader.c (gensym): Rename as...
15726 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
15727 (getsym): Rename as...
15728 (symbol_get): this.
15730 2002-06-30 Akim Demaille <akim@epita.fr>
15732 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
15733 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
15734 * src/output.c, src/print.c, src/print_graph.c: Propagate.
15735 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
15737 2002-06-30 Akim Demaille <akim@epita.fr>
15739 Make the test suite pass with warnings checked.
15741 * tests/actions.at (Printers and Destructors): Improve.
15742 Avoid unsigned vs. signed issues.
15743 * tests/calc.at: Don't exercise the scanner here, do it...
15744 * tests/input.at (Torturing the Scanner): here.
15746 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15748 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
15749 reorganize first lines parallel to yacc.c.
15751 2002-06-28 Akim Demaille <akim@epita.fr>
15753 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
15754 (b4_token_enum, b4_token_defines): New, factored from...
15755 * data/lalr1.cc, data/yacc.c, glr.c: here.
15757 2002-06-28 Akim Demaille <akim@epita.fr>
15759 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
15761 * src/output.c (merger_output): static.
15763 2002-06-28 Akim Demaille <akim@epita.fr>
15765 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
15766 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
15768 * src/output.c (save_row): Initialize all the variables to pacify GCC.
15770 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15772 Accumulated changelog for new GLR parsing features.
15774 * src/conflicts.c (count_total_conflicts): Change name to
15775 conflicts_total_count.
15776 * src/conflicts.h: Ditto.
15777 * src/output.c (token_actions): Use the new name.
15778 (output_conflicts): Change conflp => conflict_list_heads, and
15779 confl => conflict_list for better readability.
15780 * data/glr.c: Use the new names.
15781 * NEWS: Add self to GLR announcement.
15783 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
15785 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
15788 * data/bison.glr: Change name to glr.c
15789 * data/glr.c: Renamed from bison.glr.
15790 * data/Makefile.am: Add glr.c
15794 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
15795 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
15797 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15799 * data/bison.glr: Be sure to restore the
15800 current #line when returning to the skeleton contents after having
15801 exposed the input file's #line.
15803 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15805 * data/bison.glr: Bring up to date with changes to bison.simple.
15807 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15809 * data/bison.glr: Correct definitions that use b4_prefix.
15810 Various reformatting.
15811 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
15812 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
15813 yytokenp argument; now part of stack.
15814 (yychar): Define to behave as documented.
15815 (yyclearin): Ditto.
15817 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15819 * src/reader.h: Add declaration for free_merger_functions.
15821 * src/reader.c (merge_functions): New variable.
15822 (get_merge_function): New function.
15823 (free_merger_functions): New function.
15824 (readgram): Check for %prec that is not followed by a symbol.
15825 Handle %dprec and %merge declarations.
15826 (packgram): Initialize dprec and merger fields in rules array.
15828 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
15829 conflict_list_cnt, conflict_list_free): New variables.
15830 (table_grow): Also grow conflict_table.
15831 (prepare_rules): Output dprec and merger tables.
15832 (conflict_row): New function.
15833 (action_row): Output conflict lists for GLR parser. Don't use
15834 default reduction in conflicted states for GLR parser so that there
15835 are spaces for the conflict lists.
15836 (save_row): Also save conflict information.
15837 (token_actions): Allocate conflict list.
15838 (merger_output): New function.
15839 (pack_vector): Pack conflict table, too.
15840 (output_conflicts): New function to output yyconflp and yyconfl.
15841 (output_check): Allocate conflict_tos.
15842 (output_actions): Output conflict tables, also.
15843 (output_skeleton): Output b4_mergers definition.
15844 (prepare): Output b4_max_rhs_length definition.
15845 Use 'bison.glr' as default skeleton for GLR parsers.
15847 * src/gram.c (glr_parser): New flag.
15848 (grammar_free): Call free_merger_functions.
15850 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
15851 all pairs of conflicting reductions, rather than just all tokens
15852 causing conflicts. Needed to size conflict tables.
15853 (conflicts_output): Modify call to count_rr_conflicts for new
15855 (conflicts_print): Ditto.
15856 (count_total_conflicts): New function.
15858 * src/reader.h (merger_list): New type.
15859 (merge_functions): New variable.
15861 * src/lex.h (tok_dprec, tok_merge): New token types.
15863 * src/gram.h (rule_s): Add dprec and merger fields.
15864 (glr_parser): New flag.
15866 * src/conflicts.h (count_total_conflicts): New function.
15868 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
15870 * doc/bison.texinfo (Generalized LR Parsing): New section.
15871 (GLR Parsers): New section.
15872 (Language and Grammar): Mention GLR parsing.
15873 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
15874 Correct typo ("tge" -> "the").
15876 * data/bison.glr: New skeleton for GLR parsing.
15878 * tests/cxx-gram.at: New tests for GLR parsing.
15880 * tests/testsuite.at: Include cxx-gram.at.
15882 * tests/Makefile.am: Add cxx-gram.at.
15884 * src/parse-gram.y:
15886 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
15888 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
15890 2002-06-27 Akim Demaille <akim@epita.fr>
15892 * src/options.h, src/options.c: Remove.
15893 * src/getargs.c (short_options, long_options): New.
15895 2002-06-27 Akim Demaille <akim@epita.fr>
15897 * data/bison.simple, data/bison.c++: Rename as...
15898 * data/yacc.c, data/lalr1.cc: these.
15899 * doc/bison.texinfo (Environment Variables): Remove.
15901 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
15903 * src/getargs.c (report_argmatch): Initialize strtok().
15905 2002-06-20 Akim Demaille <akim@epita.fr>
15907 * data/bison.simple (b4_symbol_actions): New, replaces...
15908 (b4_symbol_destructor, b4_symbol_printer): these.
15909 (yysymprint): Be sure to call YYPRINT only for tokens, and using
15910 user token numbers.
15912 2002-06-20 Akim Demaille <akim@epita.fr>
15914 * data/bison.simple (yydestructor): Rename as...
15915 (yydestruct): this.
15917 2002-06-20 Akim Demaille <akim@epita.fr>
15919 * src/symtab.h, src/symtab.c (symbol_type_set)
15920 (symbol_destructor_set, symbol_precedence_set): The location is
15922 Adjust all callers.
15924 2002-06-20 Akim Demaille <akim@epita.fr>
15926 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
15928 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
15930 * src/symtab.h, src/symtab.c (symbol_class_set)
15931 (symbol_user_token_number_set): Likewise.
15932 Adjust all callers.
15933 Promote complain_at.
15934 * tests/input.at (Type Clashes): Adjust.
15936 2002-06-20 Akim Demaille <akim@epita.fr>
15938 * data/bison.simple (YYLEX): Fix the declaration when
15941 2002-06-20 Akim Demaille <akim@epita.fr>
15943 * data/bison.simple (yysymprint): Don't print the token number,
15945 * tests/actions.at (Destructors): Rename as...
15946 (Printers and Destructors): this.
15947 Also exercise %printer.
15949 2002-06-20 Akim Demaille <akim@epita.fr>
15951 * data/bison.simple (YYDSYMPRINT): New.
15952 Use it to remove many of the #if YYDEBUG/if (yydebug).
15954 2002-06-20 Akim Demaille <akim@epita.fr>
15956 * src/symtab.h, src/symtab.c (symbol_t): printer and
15957 printer_location are new members.
15958 (symbol_printer_set): New.
15959 * src/parse-gram.y (PERCENT_PRINTER): New token.
15960 Handle its associated rule.
15961 * src/scan-gram.l: Adjust.
15962 (handle_destructor_at, handle_destructor_dollar): Rename as...
15963 (handle_symbol_code_at, handle_symbol_code_dollar): these.
15964 * src/output.c (symbol_printers_output): New.
15965 (output_skeleton): Call it.
15966 * data/bison.simple (yysymprint): New. Cannot be named yyprint
15967 since there are already many grammar files with a user `yyprint'.
15968 Replace the calls to YYPRINT to calls to yysymprint.
15969 * tests/calc.at: Adjust.
15970 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
15971 taking advantage of parser very internal details (stack size!).
15973 2002-06-20 Akim Demaille <akim@epita.fr>
15975 * src/scan-gram.l: Complete the scanner with the missing patterns
15977 Use `quote' and `symbol_tag_get' where appropriate.
15979 2002-06-19 Akim Demaille <akim@epita.fr>
15981 * tests/actions.at (Destructors): Augment to test locations.
15982 * data/bison.simple (yydestructor): Pass it the current location
15983 if locations are enabled.
15984 Prototype only when __STDC__ or C++.
15985 Change the argument names to move into the yy name space: there is
15988 2002-06-19 Akim Demaille <akim@epita.fr>
15990 * data/bison.simple (b4_pure_if): New.
15991 Use it instead of #ifdef YYPURE.
15993 2002-06-19 Akim Demaille <akim@epita.fr>
15995 * data/bison.simple (b4_location_if): New.
15996 Use it instead of #ifdef YYLSP_NEEDED.
15998 2002-06-19 Akim Demaille <akim@epita.fr>
16000 Prepare @$ in %destructor, but currently don't bind it in the
16001 skeleton, as %location use is not cleaned up yet.
16003 * src/scan-gram.l (handle_dollar, handle_destructor_at)
16004 (handle_action_at): New.
16005 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
16006 a braced_code_t and a location as additional arguments.
16007 (handle_destructor_dollar): Instead of requiring `b4_eval', just
16008 unquote one when outputting `b4_dollar_dollar'.
16010 * data/bison.simple (b4_eval): Remove.
16011 (b4_symbol_destructor): Adjust.
16012 * tests/input.at (Invalid @n): Adjust.
16014 2002-06-19 Zack Weinberg <zack@codesourcery.com>
16016 * doc/bison.texinfo: Document ability to have multiple
16019 2002-06-18 Akim Demaille <akim@epita.fr>
16021 * src/files.c (compute_base_names): When computing the output file
16022 names from the input file name, strip the directory part.
16024 2002-06-18 Akim Demaille <akim@epita.fr>
16026 * data/bison.simple.new: Comment changes.
16027 Reported by Andreas Schwab.
16029 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
16031 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
16032 there are no `label `yyoverflowlab' defined but not used' warnings
16033 when yyoverflow is defined.
16035 2002-06-18 Akim Demaille <akim@epita.fr>
16037 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
16039 (symbol_destructor_set): Adjust.
16040 * src/output.c (symbol_destructors_output): Output the destructor
16042 Output the symbol name.
16043 * data/bison.simple (b4_symbol_destructor): Adjust.
16045 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
16046 and Akim Demaille <akim@epita.fr>
16048 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
16049 what's left on the stack when the error recovery hits EOF.
16050 * tests/actions.at (Destructors): Complete to exercise this case.
16052 2002-06-17 Akim Demaille <akim@epita.fr>
16054 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
16055 arguments is really empty, not only equal to `[]'.
16056 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
16058 (symbol_destructor_set): New.
16059 * src/output.c (symbol_destructors_output): New.
16060 * src/reader.h (brace_code_t, current_braced_code): New.
16061 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
16062 (handle_dollar): Rename as...
16063 (handle_action_dollar): this.
16064 (handle_destructor_dollar): New.
16065 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
16066 (grammar_declaration): Use it.
16067 * data/bison.simple (yystos): Is always defined.
16068 (yydestructor): New.
16069 * tests/actions.at (Destructors): New.
16070 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
16072 2002-06-17 Akim Demaille <akim@epita.fr>
16074 * src/symlist.h, src/symlist.c (symbol_list_length): New.
16075 * src/scan-gram.l (handle_dollar, handle_at): Compute the
16076 rule_length only when needed.
16077 * src/output.c (actions_output, token_definitions_output): Output
16079 * src/symtab.c: Don't access directly to the symbol tag, use
16081 * src/parse-gram.y: Use symbol_list_free.
16083 2002-06-17 Akim Demaille <akim@epita.fr>
16085 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
16086 (symbol_list_prepend, get_type_name): Move to...
16087 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
16088 (symbol_list_prepend, symbol_list_n_type_name_get): here.
16089 Adjust all callers.
16090 (symbol_list_free): New.
16091 * src/scan-gram.l (handle_dollar): Takes a location.
16092 * tests/input.at (Invalid $n): Adjust.
16094 2002-06-17 Akim Demaille <akim@epita.fr>
16096 * src/reader.h, src/reader.c (symbol_list_new): Export it.
16097 (symbol_list_prepend): New.
16098 * src/parse-gram.y (%union): `list' is a new member.
16099 (symbols.1): New, replaces...
16100 (terms_to_prec.1, nterms_to_type.1): these.
16101 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
16102 Take a location as additional argument.
16103 Adjust all callers.
16105 2002-06-15 Akim Demaille <akim@epita.fr>
16107 * src/parse-gram.y: Move %token in the declaration section so that
16108 we don't depend upon CVS Bison.
16110 2002-06-15 Akim Demaille <akim@epita.fr>
16112 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
16113 * src/print.c (print_core): Use it.
16115 2002-06-15 Akim Demaille <akim@epita.fr>
16117 * src/conflicts.c (log_resolution): Accept the rule involved in
16118 the sr conflicts instead of the lookahead number that points to
16120 (flush_reduce): Accept the current lookahead vector as argument,
16121 instead of the index in LA.
16122 (resolve_sr_conflict): Accept the current number of lookahead
16123 bitset to consider for the STATE, instead of the index in LA.
16124 (set_conflicts): Adjust.
16125 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
16127 2002-06-15 Akim Demaille <akim@epita.fr>
16129 * src/state.h (state_t): Replace the `lookaheadsp' member, a
16130 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
16131 Adjust all dependencies.
16132 * src/lalr.c (initialize_lookaheads): Split into...
16133 (states_lookaheads_count, states_lookaheads_initialize): these.
16136 2002-06-15 Akim Demaille <akim@epita.fr>
16138 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
16140 (grammar_rules_print): here.
16141 * src/reduce.c (reduce_output): Use it.
16142 * tests/reduce.at (Useless Rules, Reduced Automaton)
16143 (Underivable Rules): Adjust.
16145 2002-06-15 Akim Demaille <akim@epita.fr>
16147 Copy BYacc's nice way to report the grammar.
16149 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
16151 Don't print the rules' location, it is confusing and useless.
16152 (rule_print): Use grammar_rhs_print.
16153 * src/print.c (print_grammar): Use grammar_rules_print.
16155 2002-06-15 Akim Demaille <akim@epita.fr>
16157 Complete and rationalize `useless thing' warnings.
16159 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
16160 (symbol_tag_print): New.
16161 Use them everywhere in place of accessing directly the tag member.
16162 * src/gram.h, src/gram.c (rule_print): New.
16163 Use it where a rule used to be printed `by hand'.
16164 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
16165 (reduce_grammar_tables): Report the useless rules.
16166 (reduce_print): Useless things are a warning, not an error.
16168 * tests/reduce.at (Useless Nonterminals, Useless Rules):
16169 (Reduced Automaton, Underivable Rules): Adjust.
16170 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
16171 * tests/conflicts.at (Unresolved SR Conflicts)
16172 (Solved SR Conflicts): Adjust.
16174 2002-06-15 Akim Demaille <akim@epita.fr>
16176 Let symbols have a location.
16178 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
16180 Adjust all callers.
16181 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
16182 Use location_t, not int.
16183 * src/symtab.c (symbol_check_defined): Take advantage of the
16185 * tests/regression.at (Invalid inputs): Adjust.
16187 2002-06-15 Akim Demaille <akim@epita.fr>
16189 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
16190 (input): Don't try to initialize yylloc here, do it in the
16192 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
16193 * src/gram.h (rule_t): Change line and action_line into location
16194 and action_location, of location_t type.
16195 Adjust all dependencies.
16196 * src/location.h, src/location.c (empty_location): New.
16197 * src/reader.h, src/reader.c (grammar_start_symbol_set)
16198 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
16199 (grammar_current_rule_symbol_append)
16200 (grammar_current_rule_action_append): Expect a location as argument.
16201 * src/reader.c (grammar_midrule_action): Adjust to attach an
16202 action's location as dummy symbol location.
16203 * src/symtab.h, src/symtab.c (startsymbol_location): New.
16204 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
16207 2002-06-14 Akim Demaille <akim@epita.fr>
16209 Grammar declarations may be found in the grammar section.
16211 * src/parse-gram.y (rules_or_grammar_declaration): New.
16212 (declarations): Each declaration may end with a semicolon, not
16214 (grammar_declaration): `"%union"'.
16215 (grammar): Branch to rules_or_grammar_declaration.
16217 2002-06-14 Akim Demaille <akim@epita.fr>
16219 * src/main.c (main): Invoke scanner_free.
16221 2002-06-14 Akim Demaille <akim@epita.fr>
16223 * src/output.c (m4_invoke): Extracted from...
16224 (output_skeleton): here.
16227 2002-06-14 Akim Demaille <akim@epita.fr>
16229 * src/parse-gram.y (directives, directive, gram)
16230 (grammar_directives, precedence_directives, precedence_directive):
16232 (declarations, declaration, grammar, grammar_declaration)
16233 (precedence_declaration, precedence_declarator): these.
16234 (symbol_declaration): New.
16236 2002-06-14 Akim Demaille <akim@epita.fr>
16238 * src/files.c (action_obstack): Remove, unused.
16239 (output_obstack): Remove it, and all its dependencies, as it is no
16241 * src/reader.c (epilogue_set): Build the epilogue in the
16243 * src/output.h, src/output.c (muscle_obstack): Move to...
16244 * src/muscle_tab.h, src/muscle_tab.h: here.
16245 (muscle_init): Initialize muscle_obstack.
16246 (muscle_free): New.
16247 * src/main.c (main): Call it.
16249 2002-06-14 Akim Demaille <akim@epita.fr>
16251 * src/location.h: New, extracted from...
16252 * src/reader.h: here.
16253 * src/Makefile.am (noinst_HEADERS): Merge into
16254 (bison_SOURCES): this.
16256 * src/parse-gram.y: Use location_t instead of Bison's.
16257 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
16258 Use location_t instead of ints.
16260 2002-06-14 Akim Demaille <akim@epita.fr>
16262 * data/bison.simple, data/bison.c++: Be sure to restore the
16263 current #line when returning to the skeleton contents after having
16264 exposed the input file's #line.
16266 2002-06-12 Akim Demaille <akim@epita.fr>
16268 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
16270 * tests/actions.at (Exotic Dollars): New.
16272 2002-06-12 Akim Demaille <akim@epita.fr>
16274 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
16276 * tests/input.at (Torturing the Scanner): New.
16278 2002-06-11 Akim Demaille <akim@epita.fr>
16280 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
16281 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
16282 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
16283 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
16284 * src/reader.c (reader): Use it.
16286 2002-06-11 Akim Demaille <akim@epita.fr>
16288 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
16289 Adjust all callers.
16290 (scanner_last_string_free): New.
16292 2002-06-11 Akim Demaille <akim@epita.fr>
16294 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
16295 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
16296 (last_string, YY_OBS_FREE): New.
16297 Use them when returning an ID.
16299 2002-06-11 Akim Demaille <akim@epita.fr>
16301 Have Bison grammars parsed by a Bison grammar.
16303 * src/reader.c, src/reader.h (prologue_augment): New.
16304 * src/reader.c (copy_definition): Remove.
16306 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
16307 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
16308 (grammar_current_rule_prec_set, grammar_current_rule_check)
16309 (grammar_current_rule_symbol_append)
16310 (grammar_current_rule_action_append): Export.
16311 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
16312 (symbol_list_action_append): Remove.
16313 Hook the routines from reader.
16314 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
16315 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
16317 * src/reader.c (read_declarations): Remove, unused.
16319 * src/parse-gram.y: Handle the epilogue.
16320 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
16321 (grammar_start_symbol_set): this.
16322 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
16323 * src/reader.c (readgram): Remove, unused.
16324 (reader): Adjust to insert eoftoken and axiom where appropriate.
16326 * src/reader.c (copy_dollar): Replace with...
16327 * src/scan-gram.h (handle_dollar): this.
16328 * src/parse-gram.y: Remove `%thong'.
16330 * src/reader.c (copy_at): Replace with...
16331 * src/scan-gram.h (handle_at): this.
16333 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
16336 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
16339 * src/reader.h, src/reader.c (grammar_rule_end): New.
16341 * src/parse.y (current_type, current_class): New.
16342 Implement `%nterm', `%token' support.
16343 Merge `%term' into `%token'.
16344 (string_as_id): New.
16345 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
16348 * src/parse-gram.y: Be sure to handle properly the beginning of
16351 * src/parse-gram.y: Handle %type.
16352 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
16354 * src/parse-gram.y: More directives support.
16355 * src/options.c: No longer handle source directives.
16357 * src/parse-gram.y: Fix %output.
16359 * src/parse-gram.y: Handle %union.
16360 Use the prologue locations.
16361 * src/reader.c (parse_union_decl): Remove.
16363 * src/reader.h, src/reader.c (epilogue_set): New.
16364 * src/parse-gram.y: Use it.
16366 * data/bison.simple, data/bison.c++: b4_stype is now either not
16367 defined, then default to int, or to the contents of %union,
16368 without `union' itself.
16370 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
16372 * src/output.c (actions_output): Don't output braces, as they are
16373 already handled by the scanner.
16375 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
16376 characters to themselves.
16378 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
16379 that the epilogue has a proper #line.
16381 * src/parse-gram.y: Handle precedence/associativity.
16383 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
16385 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
16386 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
16387 at all to define terminals that cannot be emitted.
16389 * src/scan-gram.l: Escape M4 characters.
16391 * src/scan-gram.l: Working properly with escapes in user
16392 strings/characters.
16394 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
16395 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
16397 Use more modest sizes, as for the time being the parser does not
16398 release memory, and therefore the process swallows a huge amount
16401 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
16402 stricter %token grammar.
16404 * src/symtab.h (associativity): Add `undef_assoc'.
16405 (symbol_precedence_set): Do nothing when passed an undef_assoc.
16406 * src/symtab.c (symbol_check_alias_consistence): Adjust.
16408 * tests/regression.at (Invalid %directive): Remove, as it is now
16410 (Invalid inputs): Adjust to the new error messages.
16411 (Token definitions): The new grammar doesn't allow too many
16414 * src/lex.h, src/lex.c: Remove.
16415 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
16416 (copy_character, copy_string2, copy_string, copy_identifier)
16417 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
16418 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
16419 (parse_action): Remove.
16420 * po/POTFILES.in: Adjust.
16422 2002-06-11 Akim Demaille <akim@epita.fr>
16424 * src/reader.c (parse_action): Don't store directly into the
16425 rule's action member: return the action as a string.
16426 Don't require `rule_length' as an argument: compute it.
16427 (grammar_current_rule_symbol_append)
16428 (grammar_current_rule_action_append): New, eved out from
16430 Remove `action_flag', `rulelength', unused now.
16432 2002-06-11 Akim Demaille <akim@epita.fr>
16434 * src/reader.c (grammar_current_rule_prec_set).
16435 (grammar_current_rule_check): New, eved out from...
16437 Remove `xaction', `first_rhs': useless.
16438 * tests/input.at (Type clashes): New.
16439 * tests/existing.at (GNU Cim Grammar): Adjust.
16441 2002-06-11 Akim Demaille <akim@epita.fr>
16443 * src/reader.c (grammar_midrule_action): New, Eved out from
16446 2002-06-11 Akim Demaille <akim@epita.fr>
16448 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
16450 (readgram): Use them as replacement of inlined code, crule and
16453 2002-06-11 Akim Demaille <akim@epita.fr>
16455 * src/reader.c (grammar_end, grammar_symbol_append): New.
16456 (readgram): Use them.
16457 Make the use of `p' as local as possible.
16459 2002-06-10 Akim Demaille <akim@epita.fr>
16461 GCJ's parser requires the tokens to be defined before the prologue.
16463 * data/bison.simple: Output the token definition before the user's
16465 * tests/regression.at (Braces parsing, Duplicate string)
16466 (Mixing %token styles): Check the output from bison.
16467 (Early token definitions): New.
16469 2002-06-10 Akim Demaille <akim@epita.fr>
16471 * src/symtab.c (symbol_user_token_number_set): Don't complain when
16472 assigning twice the same user number to a token, so that we can
16474 * src/lex.c (lex): here.
16475 Also use `symbol_class_set' instead of hand written code.
16476 * src/reader.c (parse_assoc_decl): Likewise.
16478 2002-06-10 Akim Demaille <akim@epita.fr>
16480 * src/symtab.c, src/symtab.c (symbol_class_set)
16481 (symbol_user_token_number_set): New.
16482 * src/reader.c (parse_token_decl): Use them.
16483 Use a switch instead of ifs.
16484 Use a single argument.
16486 2002-06-10 Akim Demaille <akim@epita.fr>
16488 Remove `%thong' support as it is undocumented, unused, duplicates
16489 `%token's job, and creates useless e-mail traffic with people who
16490 want to know what it is, why it is undocumented, unused, and
16491 duplicates `%token's job.
16493 * src/reader.c (parse_thong_decl): Remove.
16494 * src/options.c (option_table): Remove "thong".
16495 * src/lex.h (tok_thong): Remove.
16497 2002-06-10 Akim Demaille <akim@epita.fr>
16499 * src/symtab.c, src/symtab.c (symbol_type_set)
16500 (symbol_precedence_set): New.
16501 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
16502 (value_components_used): Remove, unused.
16504 2002-06-09 Akim Demaille <akim@epita.fr>
16506 Move symbols handling code out of the reader.
16508 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
16509 (axiom): Move to...
16510 * src/symtab.h, src/symtab.c: here.
16512 * src/gram.c (start_symbol): Remove: use startsymbol->number.
16513 * src/reader.c (startval): Rename as...
16514 * src/symtab.h, src/symtab.c (startsymbol): this.
16515 * src/reader.c: Adjust.
16517 * src/reader.c (symbol_check_defined, symbol_make_alias)
16518 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
16519 (token_translations_init)
16521 * src/symtab.c: here.
16522 * src/reader.c (packsymbols): Move to...
16523 * src/symtab.h, src/symtab.c (symbols_pack): here.
16524 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
16527 2002-06-03 Akim Demaille <akim@epita.fr>
16529 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
16532 2002-06-03 Akim Demaille <akim@epita.fr>
16534 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
16535 structs with non literals.
16536 * src/scan-skel.l: never-interactive.
16537 * src/conflicts.c (enum conflict_resolution_e): No trailing
16539 * src/getargs.c (usage): Split long literal strings.
16540 Reported by Hans Aberg.
16542 2002-05-28 Akim Demaille <akim@epita.fr>
16544 * data/bison.c++: Use C++ ostreams.
16545 (cdebug_): New member.
16547 2002-05-28 Akim Demaille <akim@epita.fr>
16549 * src/output.c (output_skeleton): Be sure to allocate enough room
16550 for `/' _and_ for `\0' in full_skeleton.
16552 2002-05-28 Akim Demaille <akim@epita.fr>
16554 * data/bison.c++: Catch up with bison.simple:
16555 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16556 and Paul Eggert <eggert@twinsun.com>: `error' handing.
16557 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
16558 and popping traces.
16560 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16562 * src/output.c (output_skeleton): Put an explicit path in front of
16563 the skeleton file name, rather than relying on the -I directory,
16564 to partially alleviate effects of having a skeleton file lying around
16565 in the current directory.
16567 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16569 * src/conflicts.c (log_resolution): Correct typo:
16570 obstack_printf should be obstack_fgrow1.
16572 2002-05-26 Akim Demaille <akim@epita.fr>
16574 * src/state.h (state_t): `solved_conflicts' is a new member.
16575 * src/LR0.c (new_state): Set it to 0.
16576 * src/conflicts.h, src/conflicts.c (print_conflicts)
16577 (free_conflicts, solve_conflicts): Rename as...
16578 (conflicts_print, conflicts_free, conflicts_solve): these.
16580 * src/conflicts.c (enum conflict_resolution_e)
16581 (solved_conflicts_obstack): New, used by...
16582 (log_resolution): this.
16583 Adjust to attach the conflict resolution to each state.
16584 Complete the description with the precedence/associativity
16586 (resolve_sr_conflict): Adjust.
16587 * src/print.c (print_state): Output its solved_conflicts.
16588 * tests/conflicts.at (Unresolved SR Conflicts)
16589 (Solved SR Conflicts): Exercise --report=all.
16591 2002-05-26 Akim Demaille <akim@epita.fr>
16593 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
16594 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
16595 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
16596 (token_number_t, item_number_as_token_number)
16597 (token_number_as_item_number, muscle_insert_token_number_table):
16599 (symbol_number_t, item_number_as_symbol_number)
16600 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
16601 these, since it is more appropriate.
16603 2002-05-26 Akim Demaille <akim@epita.fr>
16605 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
16607 * data/bison.simple (yystos) [YYDEBUG]: New.
16608 (yyparse) [YYDEBUG]: Display the symbols which are popped during
16610 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
16612 2002-05-25 Akim Demaille <akim@epita.fr>
16614 * doc/bison.texinfo (Debugging): Split into...
16615 (Tracing): this new section, its former contents, and...
16616 (Understanding): this new section.
16617 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
16619 (report_flag): this.
16620 Adjust all dependencies.
16621 (report_args, report_types, report_argmatch): New.
16622 (usage, getargs): Report/support -r, --report.
16624 (struct option_table_struct): Rename as..,
16625 (struct option_table_s): this.
16626 Rename the `set_flag' member to `flag' to match with getopt_long's
16628 * src/options.c (option_table): Split verbose into an entry for
16629 %verbose, and another for --verbose.
16630 Support --report/-r, so remove -r from the obsolete --raw.
16631 * src/print.c: Attach full item sets and lookaheads reports to
16632 report_flag instead of trace_flag.
16633 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
16635 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16636 and Paul Eggert <eggert@twinsun.com>
16638 * data/bison.simple (yyparse): Correct error handling to conform to
16639 POSIX and yacc. Specifically, after syntax error is discovered,
16640 do not reduce further before shifting the error token.
16641 Clean up the code a bit by removing the labels yyerrdefault,
16642 yyerrhandle, yyerrpop.
16643 * NEWS: Document the above.
16645 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16647 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
16648 type; it isn't always big enough, since it doesn't necessarily
16649 include non-terminals.
16650 (yytranslate): Expand definition of yy_token_number_type, so that
16651 the latter can be removed.
16652 (yy_token_number_type): Remove, only one use.
16653 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
16654 don't use TokenNumberType as element type.
16656 * tests/regression.at: Modify expected output to agree with change
16657 to yyr1 and yytranslate.
16659 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
16661 * src/reader.c (parse_action): Use copy_character instead of
16664 2002-05-13 Akim Demaille <akim@epita.fr>
16666 * tests/regression.at (Token definitions): Prototype yylex and
16669 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16671 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
16672 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
16674 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
16676 2002-05-07 Akim Demaille <akim@epita.fr>
16678 * tests/synclines.at: Be sure to prototype yylex and yyerror to
16679 avoid GCC warnings.
16681 2002-05-07 Akim Demaille <akim@epita.fr>
16685 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
16686 over the RHS of each rule.
16687 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
16688 * src/state.h (state_t): Member `nitems' is unsigned short.
16689 * src/LR0.c (get_state): Adjust.
16690 * src/reader.c (packgram): Likewise.
16691 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
16693 (muscle_insert_int_table): Remove, unused.
16694 (prepare_rules): Remove `max'.
16696 2002-05-06 Akim Demaille <akim@epita.fr>
16698 * src/closure.c (print_firsts): Display of the symbol tags.
16699 (bitmatrix_print): Move to...
16700 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
16702 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
16704 2002-05-06 Akim Demaille <akim@epita.fr>
16706 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
16709 2002-05-06 Akim Demaille <akim@epita.fr>
16711 * src/LR0.c (new_state, get_state): Instead of using the global
16712 `kernel_size' and `kernel_base', have two new arguments:
16713 `core_size' and `core'.
16716 2002-05-06 Akim Demaille <akim@epita.fr>
16718 * src/reader.c (packgram): No longer end `ritem' with a 0
16719 sentinel: it is not used.
16721 2002-05-05 Akim Demaille <akim@epita.fr>
16723 New experimental feature: display the lookaheads in the report and
16726 * src/print (print_core): When --trace-flag, display the rules
16728 * src/print_graph.c (print_core): Likewise.
16729 Swap the arguments.
16732 2002-05-05 Akim Demaille <akim@epita.fr>
16734 * tests/torture.at (Many lookaheads): New test.
16736 2002-05-05 Akim Demaille <akim@epita.fr>
16738 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
16739 (GENERATE_MUSCLE_INSERT_TABLE): this.
16740 (output_int_table, output_unsigned_int_table, output_short_table)
16741 (output_token_number_table, output_item_number_table): Replace with...
16742 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
16743 (muscle_insert_short_table, muscle_insert_token_number_table)
16744 (muscle_insert_item_number_table): these.
16745 Adjust all callers.
16746 (prepare_tokens): Don't free `translations', since...
16747 * src/reader.h, src/reader.c (grammar_free): do it.
16749 * src/gram.h, src/gram.c (grammar_free): here.
16750 * data/bison.simple, data/bison.c++: b4_token_number_max is now
16753 2002-05-05 Akim Demaille <akim@epita.fr>
16755 * src/output.c (output_unsigned_int_table): New.
16756 (prepare_rules): `i' is unsigned.
16757 `prhs', `rline', `r2' are unsigned int.
16758 Rename muscle `rhs_number_max' as `rhs_max'.
16759 Output muscles `prhs_max', `rline_max', and `r2_max'.
16761 * data/bison.simple, data/bison.c++: Adjust to use these muscles
16762 to compute types instead of constant types.
16763 * tests/regression.at (Web2c Actions): Adjust.
16765 2002-05-04 Akim Demaille <akim@epita.fr>
16767 * src/symtab.h (SALIAS, SUNDEF): Rename as...
16768 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
16769 Adjust dependencies.
16770 * src/output.c (token_definitions_output): Be sure not to output a
16771 `#define 'a'' when fed with `%token 'a' "a"'.
16772 * tests/regression.at (Token definitions): New.
16774 2002-05-03 Paul Eggert <eggert@twinsun.com>
16776 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
16779 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
16781 * Makefile.am (SUBDIRS): Remove intl.
16782 (EXTRA_DIST): Add config/config.rpath.
16784 2002-05-03 Akim Demaille <akim@epita.fr>
16786 * data/bison.simple (m4_if): Don't output empty enums.
16787 And actually, output valid enum definitions :(.
16789 2002-05-03 Akim Demaille <akim@epita.fr>
16791 * configure.bat: Remove, completely obsolete.
16792 * Makefile.am (EXTRA_DIST): Adjust.
16793 Don't distribute config.rpath...
16794 * config/Makefile.am (EXTRA_DIST): Do it.
16796 2002-05-03 Akim Demaille <akim@epita.fr>
16798 * configure.in (GETTEXT_VERSION): New.
16799 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
16801 2002-05-03 Akim Demaille <akim@epita.fr>
16803 * data/bison.simple (b4_token_enum): New.
16804 (b4_token_defines): Use it to output tokens both as #define and
16806 Suggested by Paul Eggert.
16807 * src/output.c (token_definitions_output): Don't output spurious
16810 2002-05-03 Akim Demaille <akim@epita.fr>
16812 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
16814 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
16816 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
16817 Update the stack class, give a try to deque as the default container.
16819 2002-05-02 Akim Demaille <akim@epita.fr>
16821 * data/bison.simple (yyparse): Do not implement @$ = @1.
16822 (YYLLOC_DEFAULT): Adjust to do it.
16823 * doc/bison.texinfo (Location Default Action): Fix.
16825 2002-05-02 Akim Demaille <akim@epita.fr>
16827 * src/reader.c (parse_braces): Merge into...
16828 (parse_action): this.
16830 2002-05-02 Akim Demaille <akim@epita.fr>
16832 * configure.in (ALL_LINGUAS): Remove.
16833 * po/LINGUAS, hr.po: New.
16835 2002-05-02 Akim Demaille <akim@epita.fr>
16837 Remove the so called hairy (semantic) parsers.
16839 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
16840 * src/gram.h, src/gram.c (semantic_parser): Remove.
16841 (rule_t): Remove the guard and guard_line members.
16842 * src/lex.h (token_t): remove tok_guard.
16843 * src/options.c (option_table): Remove %guard and %semantic_parser
16845 * src/output.c, src/output.h (guards_output): Remove.
16847 (token_definitions_output): Don't output the `T'
16849 (output_skeleton): Don't output the guards.
16850 * src/files.c, src/files.c (attrsfile): Remove.
16851 * src/reader.c (symbol_list): Remove the guard and guard_line
16853 Adjust dependencies.
16854 (parse_guard): Remove.
16855 * data/bison.hairy: Remove.
16856 * doc/bison.texinfo (Environment Variables): Remove occurrences of
16859 2002-05-02 Akim Demaille <akim@epita.fr>
16861 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
16862 (parse_guard): Rename the formal argument `stack_offset' as
16863 `rule_length', which is more readable.
16865 (copy_at, copy_dollar): Instead of outputting the hard coded
16866 values of $$, $n and so forth, output invocation to b4_lhs_value,
16867 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
16868 Note: this patch partially drops `semantic-parser' support: it
16869 always does `rule_length - n', where semantic parsers ought to
16871 * data/bison.simple, data/bison.c++ (b4_lhs_value)
16872 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
16874 2002-05-02 Akim Demaille <akim@epita.fr>
16876 * configure.in (AC_INIT): Bump to 1.49b.
16877 (AM_INIT_AUTOMAKE): Short invocation.
16879 2002-05-02 Akim Demaille <akim@epita.fr>
16883 2002-05-01 Akim Demaille <akim@epita.fr>
16885 * src/skeleton.h: Remove.
16887 2002-05-01 Akim Demaille <akim@epita.fr>
16889 * src/skeleton.h: Fix the #endif.
16890 Reported by Magnus Fromreide.
16892 2002-04-26 Paul Eggert <eggert@twinsun.com>
16894 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
16895 Define if we define YYSTYPE and YYLTYPE, respectively.
16896 (YYCOPY): Fix [] quoting problem in the non-GCC case.
16898 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
16900 * src/scan-skel.l: Postprocess quadrigraphs.
16902 * src/reader.c (copy_character): New function, used to output
16903 single characters while replacing `[' and `]' with quadrigraphs, to
16904 avoid troubles with M4 quotes.
16905 (copy_comment): Output characters with copy_character.
16906 (read_additionnal_code): Likewise.
16907 (copy_string2): Likewise.
16908 (copy_definition): Likewise.
16910 * tests/calc.at: Exercise M4 quoting.
16912 2002-04-25 Akim Demaille <akim@epita.fr>
16914 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
16915 between `!' and the command.
16916 Reported by Paul Eggert.
16918 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
16920 * tests/calc.at: Exercise prologue splitting.
16922 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
16923 `b4_post_prologue' instead of `b4_prologue'.
16925 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
16927 (output): Free pre_prologue_obstack and post_prologue_obstack.
16928 * src/files.h, src/files.c (attrs_obstack): Remove.
16929 (pre_prologue_obstack, post_prologue_obstack): New.
16930 * src/reader.c (copy_definition): Add a parameter to specify the
16931 obstack to fill, instead of using attrs_obstack unconditionally.
16932 (read_declarations): Pass pre_prologue_obstack to copy_definition if
16933 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
16935 2002-04-23 Paul Eggert <eggert@twinsun.com>
16937 * data/bison.simple: Remove unnecessary commentary and white
16938 space differences from 1_29-branch.
16939 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
16941 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
16942 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
16943 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
16944 constructors or destructors.
16946 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
16948 2002-04-23 Akim Demaille <akim@epita.fr>
16950 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
16951 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
16952 location with columns.
16953 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
16954 All reported by Paul Eggert.
16956 2002-04-22 Akim Demaille <akim@epita.fr>
16958 * src/reduce.c (dump_grammar): Move to...
16959 * src/gram.h, src/gram.c (grammar_dump): here.
16960 Be sure to separate long item numbers.
16961 Don't read the members of a rule's prec if its nil.
16963 2002-04-22 Akim Demaille <akim@epita.fr>
16965 * src/output.c (table_size, table_grow): New.
16966 (MAXTABLE): Remove, replace uses with table_size.
16967 (pack_vector): Instead of dying when the table is too big, grow it.
16969 2002-04-22 Akim Demaille <akim@epita.fr>
16971 * data/bison.simple (yyr1): Its type is that of a token number.
16972 * data/bison.c++ (r1_): Likewise.
16973 * tests/regression.at (Web2c Actions): Adjust.
16975 2002-04-22 Akim Demaille <akim@epita.fr>
16977 * src/reader.c (token_translations_init): 256 is now the default
16978 value for the error token, i.e., it will be assigned another
16979 number if the user assigned 256 to one of her tokens.
16980 (reader): Don't force 256 to error.
16981 * doc/bison.texinfo (Symbols): Adjust.
16982 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
16983 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
16984 etc. instead of 10, 20, 30 (which was used to `jump' over error
16985 (256) and undefined (2)).
16987 2002-04-22 Akim Demaille <akim@epita.fr>
16989 Propagate more token_number_t.
16991 * src/gram.h (token_number_as_item_number)
16992 (item_number_as_token_number): New.
16993 * src/output.c (GENERATE_OUTPUT_TABLE): New.
16994 Use it to create output_item_number_table and
16995 output_token_number_table.
16996 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
16997 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
16998 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
16999 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
17001 2002-04-22 Akim Demaille <akim@epita.fr>
17003 * src/output.h, src/output.c (get_lines_number): Remove.
17005 2002-04-19 Akim Demaille <akim@epita.fr>
17007 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
17009 (Debugging): More details about enabling the debugging features.
17010 (Table of Symbols): Describe $$, $n, @$, and @n.
17011 Suggested by Tim Josling.
17013 2002-04-19 Akim Demaille <akim@epita.fr>
17015 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
17017 2002-04-10 Akim Demaille <akim@epita.fr>
17019 * src/system.h: Rely on HAVE_LIMITS_H.
17020 Suggested by Paul Eggert.
17022 2002-04-09 Akim Demaille <akim@epita.fr>
17024 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
17025 full stderr, and strip it according to the bison options, instead
17026 of composing the error message from different bits.
17027 This makes it easier to check for several error messages.
17028 Adjust all the invocations.
17029 Add an invocation exercising the error token.
17030 Add an invocation demonstrating a stupid error message.
17031 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
17033 Error message are for stderr, not stdout.
17035 2002-04-09 Akim Demaille <akim@epita.fr>
17037 * src/gram.h, src/gram.c (error_token_number): Remove, use
17039 * src/reader.c (reader): Don't specify the user token number (2)
17040 for $undefined, as it uselessly prevents using it.
17041 * src/gram.h (token_number_t): Move to...
17042 * src/symtab.h: here.
17043 (state_t.number): Is a token_number_t.
17044 * src/print.c, src/reader.c: Use undeftoken->number instead of
17046 (Even though this 2 is not the same as above: the number of the
17047 undeftoken remains being 2, it is its user token number which
17049 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
17050 `user_token_number_max'.
17051 Output `undef_token_number'.
17052 * data/bison.simple, data/bison.c++: Use them.
17053 Be sure to map invalid yylex return values to
17054 `undef_token_number'. This saves us from gratuitous SEGV.
17056 * tests/conflicts.at (Solved SR Conflicts)
17057 (Unresolved SR Conflicts): Adjust.
17058 * tests/regression.at (Web2c Actions): Adjust.
17060 2002-04-08 Akim Demaille <akim@epita.fr>
17062 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
17064 Remove the duplicate `typedefs'.
17065 (RhsNumberType): Fix the declaration and various other typos.
17067 * data/bison.simple: Use __ofile__.
17068 * src/scan-skel.l: Handle __ofile__.
17070 2002-04-08 Akim Demaille <akim@epita.fr>
17072 * src/gram.h (item_number_t): New, the type of item numbers in
17073 RITEM. Note that it must be able to code symbol numbers as
17074 positive number, and the negation of rule numbers as negative
17076 Adjust all dependencies (pretty many).
17077 * src/reduce.c (rule): Remove this `short *' pointer: use
17079 * src/system.h (MINSHORT, MAXSHORT): Remove.
17080 Include `limits.h'.
17081 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
17082 (shortcpy): Remove.
17083 (MAXTABLE): Move to...
17084 * src/output.c (MAXTABLE): here.
17085 (prepare_rules): Use output_int_table to output rhs.
17086 * data/bison.simple, data/bison.c++: Adjust.
17087 * tests/torture.at (Big triangle): Move the limit from 254 to
17089 * tests/regression.at (Web2c Actions): Ajust.
17091 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
17092 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
17093 passes, but produces negative #line number, once fixed, GCC is
17094 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
17096 * src/state.h (state_h): Code input lines on ints, not shorts.
17098 2002-04-08 Akim Demaille <akim@epita.fr>
17100 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
17101 and then the grammar.
17103 2002-04-08 Akim Demaille <akim@epita.fr>
17105 * src/system.h: No longer using strndup.
17107 2002-04-07 Akim Demaille <akim@epita.fr>
17109 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
17110 * src/output.c (output_table_data): Return the longest number.
17111 (prepare_tokens): Output `token_number_max').
17112 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
17114 Use them to define yy_token_number_type/TokenNumberType.
17115 Use this type for yytranslate.
17116 * tests/torture.at (Big triangle): Push the limit from 124 to
17118 * tests/regression.at (Web2c Actions): Adjust.
17120 2002-04-07 Akim Demaille <akim@epita.fr>
17122 * tests/torture.at (Big triangle): New.
17123 (GNU AWK Grammar, GNU Cim Grammar): Move to...
17124 * tests/existing.at: here.
17126 2002-04-07 Akim Demaille <akim@epita.fr>
17128 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
17130 Adjust dependencies.
17132 2002-04-07 Akim Demaille <akim@epita.fr>
17134 * src/reader.c: Normalize increments to prefix form.
17136 2002-04-07 Akim Demaille <akim@epita.fr>
17138 * src/reader.c, symtab.c: Remove debugging code.
17140 2002-04-07 Akim Demaille <akim@epita.fr>
17142 Rename all the `bucket's as `symbol_t'.
17144 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
17145 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
17146 * src/symtab.c, src/symtab.h (bucket): Rename as...
17148 (symbol_list_new, bucket_check_defined, bucket_make_alias)
17149 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
17150 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
17151 (buckets_new, buckets_free, buckets_do): Rename as...
17152 (symbol_list_new, symbol_check_defined, symbol_make_alias)
17153 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
17154 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
17155 (symbols_new, symbols_free, symbols_do): these.
17157 2002-04-07 Akim Demaille <akim@epita.fr>
17159 Use lib/hash for the symbol table.
17161 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
17163 * src/lex.c (lex): Set the `number' member of new terminals.
17164 * src/reader.c (bucket_check_defined, bucket_make_alias)
17165 (bucket_check_alias_consistence, bucket_translation): New.
17166 (reader, grammar_free, readgram, token_translations_init)
17167 (packsymbols): Adjust.
17168 (reader): Number the predefined tokens.
17169 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
17170 for predefined tokens.
17171 * src/symtab.h (bucket): Remove all the hash table related
17173 * src/symtab.c (symtab): Replace by...
17174 (bucket_table): this.
17175 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
17176 (buckets_new, buckets_do): New.
17178 2002-04-07 Akim Demaille <akim@epita.fr>
17180 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
17181 (start_symbol, max_user_token_number, semantic_parser)
17182 (error_token_number): Initialize.
17183 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
17186 (errtoken, eoftoken, undeftoken, axiom): Extern.
17188 2002-04-07 Akim Demaille <akim@epita.fr>
17190 * src/gram.h (rule_s): prec and precsym are now pointers
17191 to the bucket giving the priority/associativity.
17192 Member `associativity' removed: useless.
17193 * src/reduce.c, src/conflicts.c: Adjust.
17195 2002-04-07 Akim Demaille <akim@epita.fr>
17197 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
17198 Properly escape the symbols' TAG when outputting them.
17200 2002-04-07 Akim Demaille <akim@epita.fr>
17202 * src/lalr.h (LA): Is a bitsetv, not bitset*.
17204 2002-04-07 Akim Demaille <akim@epita.fr>
17206 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
17207 (LArule): this, which is an array to rule_t*.
17208 * src/print.c, src/conflicts.c: Adjust.
17210 2002-04-07 Akim Demaille <akim@epita.fr>
17212 * src/gram.h (rule_t): Rename `number' as `user_number'.
17213 `number' is a new member.
17214 Adjust dependencies.
17215 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
17217 2002-04-07 Akim Demaille <akim@epita.fr>
17219 As a result of the previous patch, it is no longer needed
17220 to reorder ritem itself.
17222 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
17224 2002-04-07 Akim Demaille <akim@epita.fr>
17226 Be sure never to walk through RITEMS, but use only data related to
17227 the rules themselves. RITEMS should be banished.
17229 * src/output.c (output_token_translations): Rename as...
17230 (prepare_tokens): this.
17231 In addition to `translate', prepare the muscles `tname' and
17232 `toknum', which were handled by...
17233 (output_rule_data): this.
17234 Remove, and move the remainder of its outputs into...
17235 (prepare_rules): this new routines, which also merges content from
17236 (output_gram): this.
17237 (prepare_rules): Be sure never to walk through RITEMS.
17238 (output_stos): Rename as...
17239 (prepare_stos): this.
17240 (output): Always invoke prepare_states, after all, just don't use it
17241 in the output if you don't need it.
17243 2002-04-07 Akim Demaille <akim@epita.fr>
17245 * src/LR0.c (new_state): Display `nstates' as the name of the
17246 newly created state.
17247 Adjust to initialize first_state and last_state if needed.
17248 Be sure to distinguish the initial from the final state.
17249 (new_states): Create the itemset of the initial state, and use
17251 * src/closure.c (closure): Now that the initial state has its
17252 items properly set, there is no need for a special case when
17253 creating `ruleset'.
17255 As a result, now the rule 0, reducing to $axiom, is visible in the
17256 outputs. Adjust the test suite.
17258 * tests/conflicts.at (Solved SR Conflicts)
17259 (Unresolved SR Conflicts): Adjust.
17260 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
17261 * tests/conflicts.at (S/R in initial): New.
17263 2002-04-07 Akim Demaille <akim@epita.fr>
17265 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
17266 the RHS of the rules.
17267 * src/output.c (output_gram): Likewise.
17269 2002-04-07 Akim Demaille <akim@epita.fr>
17271 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
17273 Adjust all dependencies.
17274 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
17275 `number' of the buckets too.
17276 * src/gram.h: Include `symtab.h'.
17277 (associativity): Move to...
17278 * src/symtab.h: here.
17279 No longer include `gram.h'.
17281 2002-04-07 Akim Demaille <akim@epita.fr>
17283 * src/gram.h, src/gram.c (rules_rhs_length): New.
17284 (ritem_longest_rhs): Use it.
17285 * src/gram.h (rule_t): `number' is a new member.
17286 * src/reader.c (packgram): Set it.
17287 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
17288 the end of `rules', and count them out of `nrules'.
17289 (reduce_output, dump_grammar): Adjust.
17290 * src/print.c (print_grammar): It is no longer needed to check for
17291 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
17292 * tests/reduce.at (Reduced Automaton): New test.
17294 2002-04-07 Akim Demaille <akim@epita.fr>
17296 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
17297 lacking `+ 1' to nrules, Bison reported as useless a token if it
17298 was used solely to set the precedence of the last rule...
17300 2002-04-07 Akim Demaille <akim@epita.fr>
17302 * data/bison.c++, data/bison.simple: Don't output the current file
17303 name in #line, to avoid useless diffs between two identical
17304 outputs under different names.
17306 2002-04-07 Akim Demaille <akim@epita.fr>
17308 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
17309 Normalize loops to using `< nrules + 1', not `<= nrules'.
17311 2002-04-07 Akim Demaille <akim@epita.fr>
17315 2002-04-07 Akim Demaille <akim@epita.fr>
17317 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
17318 bucket.value as bucket.number.
17320 2002-04-07 Akim Demaille <akim@epita.fr>
17322 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
17323 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
17324 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
17325 RHS, instead of being an index in RITEMS.
17327 2002-04-04 Paul Eggert <eggert@twinsun.com>
17329 * doc/bison.texinfo: Update copyright date.
17330 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
17331 (Symbols): Warn about running Bison in one character set,
17332 but compiling and/or running in an incompatible one.
17333 Warn about character code 256, too.
17335 2002-04-03 Paul Eggert <eggert@twinsun.com>
17337 * src/bison.data (YYSTACK_ALLOC): Depend on whether
17338 YYERROR_VERBOSE is nonzero, not whether it is defined.
17340 Merge changes from bison-1_29-branch.
17342 2002-03-20 Paul Eggert <eggert@twinsun.com>
17344 Merge fixes from Debian bison_1.34-1.diff.
17346 * configure.in (AC_PREREQ): 2.53.
17348 2002-03-20 Akim Demaille <akim@epita.fr>
17350 * src/conflicts.c (log_resolution): Argument `resolution' is const.
17352 2002-03-19 Paul Eggert <eggert@twinsun.com>
17354 * src/bison.simple (YYCOPY): New macro.
17355 (YYSTACK_RELOCATE): Use it.
17356 Remove Type arg; no longer needed. All callers changed.
17357 (yymemcpy): Remove; no longer needed.
17359 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
17360 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
17362 2002-03-19 Akim Demaille <akim@epita.fr>
17364 Test and fix the #line outputs.
17366 * tests/atlocal.at (GCC): New.
17367 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
17368 (Prologue synch line, %union synch line, Postprologue synch line)
17369 (Action synch line, Epilogue synch line): New tests.
17370 * src/reader.c (parse_union_decl): Define the muscle stype_line.
17371 * data/bison.simple, data/bison.c++: Use it.
17373 2002-03-19 Akim Demaille <akim@epita.fr>
17375 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
17376 (Solved SR Conflicts, %expect not enough, %expect right)
17377 (%expect too much): Move to...
17378 * tests/conflicts.at: this new file.
17380 2002-03-19 Akim Demaille <akim@epita.fr>
17382 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
17383 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
17384 that we can move to enums for instance.
17385 * src/output.c (token_definitions_output): Output a list of
17386 `token-name, token-number' instead of the #define.
17387 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
17389 2002-03-14 Akim Demaille <akim@epita.fr>
17391 Use Gettext 0.11.1.
17393 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
17395 * data/bison.c++: Make the user able to add members to the generated
17396 parser by subclassing.
17398 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
17400 * src/reader.c (read_additionnal_code): `c' should be an integer, not
17402 Reported by Nicolas Tisserand and Nicolas Burrus.
17404 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
17406 * src/reader.c: Warn about lacking semi-colons, do not complain.
17408 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
17410 * data/bison.c++: Remove a debug line.
17412 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
17414 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
17415 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
17416 provide a default implementation.
17418 2002-03-04 Akim Demaille <akim@epita.fr>
17420 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
17421 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
17422 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
17423 * tests/semantic.at (Parsing Guards): Similarly.
17424 * src/reader.at (readgram): Complain if the last rule is not ended
17427 2002-03-04 Akim Demaille <akim@epita.fr>
17429 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
17430 * src/closure.c: here.
17431 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
17433 * src/warshall.h, src/warshall.c: Remove.
17434 * tests/sets.at (Broken Closure): Adjust.
17436 2002-03-04 Akim Demaille <akim@epita.fr>
17438 * src/output.c (output_skeleton): tempdir is const.
17439 bytes_read is unused.
17441 2002-03-04 Akim Demaille <akim@epita.fr>
17443 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
17444 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
17446 From Michael Hayes.
17448 2002-03-04 Akim Demaille <akim@epita.fr>
17450 * src/closure.c (closure): `r' is unused.
17452 2002-03-04 Akim Demaille <akim@epita.fr>
17454 * tests/sets.at (Broken Closure): Add the ending `;'.
17455 * src/reader.at (readgram): Complain if a rule is not ended with a
17458 2002-03-04 Akim Demaille <akim@epita.fr>
17460 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
17461 (count_sr_conflicts): Use bitset_count.
17462 * src/reduce.c (inaccessable_symbols): Ditto.
17463 (bits_size): Remove.
17464 * src/warshall.h, src/warshall.c: Convert to bitsetv.
17466 2002-03-04 Akim Demaille <akim@epita.fr>
17468 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
17469 * src/reduce.c: Remove the `bitset_zero's following the
17470 `bitset_create's, as now it is performed by the latter.
17472 2002-03-04 Akim Demaille <akim@epita.fr>
17474 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
17475 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
17476 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
17477 latest sources from Michael.
17479 2002-03-04 Akim Demaille <akim@epita.fr>
17481 * src/output.c (output): Don't free the grammar.
17482 * src/reader.c (grammar_free): New.
17483 * src/main.c (main): Call it and don't free symtab here.
17485 2002-03-04 Akim Demaille <akim@epita.fr>
17487 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
17489 Reported by Benoit Perrot.
17491 2002-03-04 Akim Demaille <akim@epita.fr>
17493 Use bitset operations when possible, not loops over bits.
17495 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
17497 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
17498 * src/reduce.c (useless_nonterminals): Formatting changes.
17499 * src/warshall.c (TC): Use bitset_or.
17501 2002-03-04 Akim Demaille <akim@epita.fr>
17503 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
17504 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
17507 2002-03-04 Akim Demaille <akim@epita.fr>
17509 * src/lalr.c (F): Now a bitset*.
17510 Adjust all dependencies.
17512 2002-03-04 Akim Demaille <akim@epita.fr>
17514 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
17515 Adjust all dependencies.
17517 2002-03-04 Akim Demaille <akim@epita.fr>
17519 * src/L0.c, src/LR0.h (nstates): Be size_t.
17520 Adjust comparisons (signed vs unsigned).
17521 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
17523 Adjust all dependencies.
17525 2002-03-04 Akim Demaille <akim@epita.fr>
17527 * src/closure.c (firsts): Now, also a bitset.
17528 Adjust all dependencies.
17529 (varsetsize): Remove, now unused.
17530 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
17532 2002-03-04 Akim Demaille <akim@epita.fr>
17534 * src/print.c: Convert to use bitset.h, not hand coded iterations
17537 2002-03-04 Akim Demaille <akim@epita.fr>
17539 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
17541 2002-03-04 Akim Demaille <akim@epita.fr>
17543 * src/closure.c (ruleset): Be a bitset.
17544 (rulesetsize): Remove.
17546 2002-03-04 Akim Demaille <akim@epita.fr>
17548 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
17549 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
17550 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
17551 * src/closure.c (fderives): Be an array of bitsets.
17553 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
17555 * data/bison.c++: Merge the two generated headers. Insert a copyright
17556 notice in each output file.
17558 2002-02-28 Akim Demaille <akim@epita.fr>
17560 * data/bison.c++: Copy the prologue of bison.simple to fetch
17561 useful M4 definitions, such as b4_header_guard.
17563 2002-02-25 Akim Demaille <akim@epita.fr>
17565 * src/getargs.c (version): Give the name of the authors, and use a
17566 translator friendly scheme for the bgr
17569 2002-02-25 Akim Demaille <akim@epita.fr>
17571 * src/output.c (header_output): Remove, now handled completely via
17574 2002-02-25 Akim Demaille <akim@epita.fr>
17576 * m4/m4.m4: New, from CVS Autoconf.
17577 * configure.in: Invoke it.
17578 * src/output.c (output_skeleton): Use its result instead of the
17581 2002-02-25 Akim Demaille <akim@epita.fr>
17583 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
17585 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
17586 * src/output.c (output_skeleton): Use mkstemp to create a real
17588 Move the filling of `skeleton' and its muscle to...
17590 (output): Move the definition of the prologue muscle to...
17592 * src/system.h (DEFAULT_TMPDIR): New.
17594 2002-02-14 Paul Eggert <eggert@twinsun.com>
17596 Remove the support for C++ namespace cleanliness; it was
17597 causing more problems than it was curing, since it didn't work
17598 properly on some nonstandard C++ compilers. This can wait
17599 for a proper C++ parser.
17601 * NEWS: Document this.
17602 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
17603 of C++, as it's treated like C now.
17604 * src/bison.simple (YYSTD): Remove.
17605 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
17606 Treat C++ just like Standard C instead of trying to support
17607 namespace cleanliness.
17609 2002-02-14 Akim Demaille <akim@epita.fr>
17611 * tests/regression.at (else): Adjust to Andreas' change.
17613 2002-02-14 Akim Demaille <akim@epita.fr>
17615 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
17617 2002-02-13 Andreas Schwab <schwab@suse.de>
17619 * src/output.c (output_rule_data): Don't output NULL, it might
17620 not be defined yet.
17622 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
17624 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
17625 (Copyright notice): Update.
17627 2002-02-11 Akim Demaille <akim@epita.fr>
17629 * tests/regression.at (%nonassoc and eof): Don't include
17630 nonportable headers.
17632 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
17634 * data/bison.c++: Correct error recovery. Make the user able to
17635 initialize the starting location.
17637 2002-02-07 Akim Demaille <akim@epita.fr>
17639 * tests/input.at: New.
17641 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17643 * data/bison.c++: Replace some direct m4 expansions by constants. Be
17644 more consistent when naming methods and variables. Put preprocessor
17645 directives around tables only needed for debugging.
17647 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17649 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
17651 (yy::b4_name::parse): Use print_.
17653 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17655 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
17657 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
17659 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
17661 (yy::b4_name::parse): Build verbose error messages, and use error_.
17663 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
17665 * data/bison.c++: Fix m4 quoting in comments.
17667 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
17669 * data/bison.c++: Adjust the parser code. Fix some muscles that were
17670 not expanded by m4.
17672 2002-02-05 Akim Demaille <akim@epita.fr>
17674 * data/bison.c++: Adjust to the M4 back end.
17675 More is certainly needed.
17677 2002-02-05 Akim Demaille <akim@epita.fr>
17679 Give a try to M4 as a back end.
17681 * lib/readpipe.c: New, from wdiff.
17682 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
17684 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
17685 specific values. Now it is m4 that performs the lookup.
17686 * src/parse-skel.y: Remove.
17687 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
17688 * src/output.c (actions_output, guards_output)
17689 (token_definitions_output): No longer keeps track of the output
17690 line number, hence remove the second argument.
17691 (guards_output): Check against the guard member of a rule, not the
17694 (output_skeleton): Don't look for the skeleton location, let m4 do
17696 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
17698 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
17699 (prepare): Given that for the time being changesyntax is not
17700 usable in M4, rename the muscles using `-' to `_'.
17701 Define `defines_flag', `output_parser_name' and `output_header_name'.
17702 * src/output.h (actions_output, guards_output)
17703 (token_definitions_output): Adjust prototypes.
17704 * src/scan-skel.l: Instead of scanning the skeletons, it now
17705 processes the output of m4: `__oline__' and `#output'.
17706 * data/bison.simple: Adjust to be used by M4(sugar).
17707 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
17709 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
17710 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
17711 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
17712 shamelessly stolen from CVS Autoconf.
17714 2002-02-05 Akim Demaille <akim@epita.fr>
17716 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
17717 * configure.in: Check for the declarations of free and malloc.
17718 * src/muscle_tab.c: Adjust.
17720 2002-02-05 Akim Demaille <akim@epita.fr>
17722 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
17723 which have no values.
17725 2002-02-05 Akim Demaille <akim@epita.fr>
17727 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
17730 2002-01-29 Paul Eggert <eggert@twinsun.com>
17732 * src/bison.simple (YYSIZE_T): Do not define merely because
17733 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
17734 On some platforms, <alloca.h> does not declare YYSTD (size_t).
17736 2002-01-27 Akim Demaille <akim@epita.fr>
17738 Fix `%nonassoc and eof'.
17740 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
17741 which were not properly copied! Replace
17742 memcpy (res->errs, src->errs, src->nerrs);
17744 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
17746 * tests/regression.at (%nonassoc and eof): Adjust to newest
17747 Autotest: `.' is not in the PATH.
17749 2002-01-27 Akim Demaille <akim@epita.fr>
17751 * tests/sets.at (AT_EXTRACT_SETS): New.
17752 (Nullable): Use it.
17755 2002-01-26 Akim Demaille <akim@epita.fr>
17757 * tests/actions.at, tests/calc.at, tests/headers.at,
17758 * tests/torture.at: Adjust to the newest Autotest which no longer
17759 forces `.' in the PATH.
17761 2002-01-25 Akim Demaille <akim@epita.fr>
17763 * tests/regression.at (%nonassoc and eof): New.
17764 Suggested by Robert Anisko.
17766 2002-01-24 Akim Demaille <akim@epita.fr>
17768 Bison dumps core when trying to complain about broken input files.
17769 Reported by Cris van Pelt.
17771 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
17772 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
17774 (Invalid inputs): Strengthen: exercise parse_percent_token.
17776 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
17778 * src/Makefile.am: Add bison.c++.
17779 * src/bison.c++: New skeleton.
17781 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
17785 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
17787 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
17789 2002-01-20 Marc Autret <marc@gnu.org>
17791 * src/files.c (compute_output_file_names): Fix
17793 2002-01-20 Marc Autret <marc@gnu.org>
17795 * tests/output.at: New test.
17796 * src/files.c (compute_base_names): Don't map extensions when
17797 the YACC flag is set, use defaults.
17798 Reported by Evgeny Stambulchik.
17800 2002-01-20 Marc Autret <marc@gnu.org>
17802 * src/system.h: Need to define __attribute__ away for non-GCC
17803 compilers as well (i.e., the vendor C compiler).
17804 Suggested by Albert Chin-A-Young.
17806 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
17808 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
17809 canonical definition.
17810 * src/system.h: Use the canonical definition for PARAMS (avoids
17811 a conflict with the macro from lib/hash.h).
17813 2002-01-11 Akim Demaille <akim@epita.fr>
17815 * configure.in: Use AC_FUNC_STRNLEN.
17816 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
17818 2002-01-09 Akim Demaille <akim@epita.fr>
17820 * src/files.c, src/files.h (output_infix): New.
17821 (tab_extension): Remove.
17822 (compute_base_names): Compute the former, drop the latter.
17823 * src/output.c (prepare): Insert the muscles `output-infix', and
17825 * src/parse-skel.y (string, string.1): New.
17826 (section.header): Use it.
17827 (section.yacc): Remove.
17828 (prefix): Remove too.
17829 * src/scan-skel.l: Adjust.
17830 * src/bison.simple, src/bison.hairy: Adjust.
17832 2002-01-09 Akim Demaille <akim@epita.fr>
17834 * configure.in (WERROR_CFLAGS): Compute it.
17835 * src/Makefile.am (CFLAGS): Pass it.
17836 * tests/atlocal.in (CFLAGS): Idem.
17837 * src/files.c: Fix a few warnings.
17838 (get_extension_index): Remove, unused.
17840 2002-01-08 Akim Demaille <akim@epita.fr>
17842 * src/getargs.c (AS_FILE_NAME): New.
17843 (getargs): Use it to convert DOSish file names.
17844 * src/files.c (base_name): Rename as full_base_name to avoid
17845 clashes with `base_name ()'.
17846 (filename_split): New.
17847 (compute_base_names): N-th rewrite, using filename_split.
17849 2002-01-08 Akim Demaille <akim@epita.fr>
17851 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
17852 New, stolen from the Fileutils 4.1.
17853 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
17854 * configure.in: Check for the presence of memrchr, and of its
17857 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
17859 * lib/hash.h (__P): Added definition for this macro.
17860 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
17861 BUILT_SOURCES, to ensure they are generated first.
17862 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
17863 %error-verbose to allow bootstrapping with bison 1.30x.
17865 2002-01-06 Akim Demaille <akim@epita.fr>
17867 * src/reader.c (parse_braces): Don't fetch the next char, the
17868 convention is to fetch on entry.
17869 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
17870 'switch' without a following semicolon.
17871 * tests/regression.at (braces parsing): New.
17873 2002-01-06 Akim Demaille <akim@epita.fr>
17875 Bison is dead wrong in its RR conflict reports.
17877 * tests/torture.at (GNU Cim Grammar): New.
17878 * src/conflicts.c (count_rr_conflicts): Fix.
17880 2002-01-06 Akim Demaille <akim@epita.fr>
17882 Creating package.m4 from configure.ac causes too many problems.
17884 * tests/Makefile.am (package.m4): Create it by hand,
17885 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
17887 2002-01-06 Akim Demaille <akim@epita.fr>
17889 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
17892 2002-01-04 Paul Eggert <eggert@twinsun.com>
17894 * doc/bison.texinfo (Debugging):
17895 Remove YYSTDERR; it's no longer defined or used.
17896 Also, s/cstdio.h/cstdio/.
17898 2002-01-03 Akim Demaille <akim@epita.fr>
17900 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
17902 2002-01-03 Akim Demaille <akim@epita.fr>
17904 * src/parse-skel.y (process_skeleton): Don't bind the parser's
17905 tracing code to --trace, wait for a better --trace option, with
17908 2002-01-03 Akim Demaille <akim@epita.fr>
17910 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
17911 The ISO C++ standard is extremely clear about it: stderr is
17912 considered a macro, not a regular symbol (see table 94 `Header
17913 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
17914 Therefore std:: does not apply to it. It still does with fprintf.
17915 Also, s/cstdio.h/cstdio/.
17917 2002-01-03 Akim Demaille <akim@epita.fr>
17919 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
17920 for non system headers.
17922 2002-01-02 Akim Demaille <akim@epita.fr>
17924 Equip the skeleton chain with location tracking, runtime trace,
17925 pure parser and scanner.
17927 * src/parse-skel.y: Request a pure parser, locations, and prefix
17929 (%union): Having several members with the same type does not help
17930 type mismatches, simplify.
17931 (YYPRINT, yyprint): New.
17932 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
17933 (skel_error): this.
17935 * src/scan-skel.l: Adjust to these changes.
17936 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
17937 (LOCATION_PRINT, skel_control_t): New.
17939 2001-12-30 Akim Demaille <akim@epita.fr>
17941 * src/parse-skel.y: Get rid of the shift/reduce conflict:
17942 replace `gb' with BLANKS.
17943 * src/scan-skel.l: Adjust.
17945 2001-12-30 Akim Demaille <akim@epita.fr>
17947 * src/system.h: We don't need nor want bcopy.
17948 Throw away MS-DOS crap: we don't need getpid.
17949 * configure.in: We don't need strndup. It was even causing
17950 problems: because Flex includes the headers *before* us,
17951 _GNU_SOURCE is not defined by config.h, and therefore strndup was
17953 * lib/xstrndup.c: New.
17954 * src/scan-skel.l: Use it.
17955 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
17956 * src/parse-skel.y: Use %directives instead of #defines.
17958 2001-12-30 Akim Demaille <akim@epita.fr>
17960 * src/skeleton.h: New.
17961 * src/output.c (output_parser, output_master_parser): Remove, dead
17963 * src/output.h (get_lines_number, actions_output, guards_output)
17964 (token_definitions_output): Prototype them.
17965 * src/parse-skel.y: Add the license notice.
17966 Include output.h and skeleton.h.
17967 (process_skeleton): Returns void, and takes a single parameter.
17968 * src/scan-skel.l: Add the license notice.
17969 Include skeleton.h.
17970 Don't use %option yylineno: it seems that then Flex imagines
17971 REJECT has been used, and therefore it won't reallocate its
17972 buffers (which makes no other sense to me than a bug). It results
17973 in warnings for `unused: yy_flex_realloc'.
17975 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
17977 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
17978 (MUSCLE_INSERT_PREFIX): ...to there.
17979 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
17980 (MUSCLE_INSERT_PREFIX): Move from here...
17982 * src/bison.hairy: Add a section directive. Put braces around muscle
17983 names. This parser skeleton is still broken, but Bison should not
17984 choke on a bad muscle 'syntax'.
17985 * src/bison.simple: Add a section directive. Put braces around muscle
17988 * src/files.h (strsuffix, stringappend): Add declarations.
17989 (tab_extension): Add declaration.
17990 (short_base_name): Add declaration.
17992 * src/files.c (strsuffix, stringappend): No longer static. These
17993 functions are used in the skeleton parser.
17994 (tab_extension): New.
17995 (compute_base_names): Use the computations done in this function
17996 to guess if the generated parsers should have '.tab' in their
17998 (short_base_name): No longer static.
18000 * src/output.c (output_skeleton): New.
18001 (output): Disable call to output_master_parser, and give a try to
18002 a new skeleton handling system.
18003 (guards_output, actions_output): No longer static.
18004 (token_definitions_output, get_lines_number): No longer static.
18006 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
18008 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
18011 * src/parse-skel.y: New file.
18012 * src/scan-skel.l: New file.
18014 2001-12-29 Akim Demaille <akim@epita.fr>
18016 %name-prefix is broken.
18018 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
18019 Adjust all dependencies.
18020 * tests/headers.at (export YYLTYPE): Strengthen this test: use
18023 Renaming yylval but not yylloc is not consistent. Now we do.
18025 * src/bison.simple: Prefix yylloc if used.
18026 * doc/bison.texinfo (Decl Summary): Document that.
18028 2001-12-29 Akim Demaille <akim@epita.fr>
18030 * doc/bison.texinfo: Promote `%long-directive' over
18032 Remove all references to fixed-output-files, yacc is enough.
18034 2001-12-29 Akim Demaille <akim@epita.fr>
18036 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
18037 user prologue. These are defaults.
18038 * tests/actions.at (Mid-rule actions): Make sure the user can
18039 define YYDEBUG and YYERROR_VERBOSE.
18041 2001-12-29 Akim Demaille <akim@epita.fr>
18043 * src/output.c (header_output): Don't forget to export YYLTYPE and
18045 * tests/headers.at (export YYLTYPE): New, make sure it does.
18046 * tests/regression.at (%union and --defines, Invalid CPP headers):
18048 * tests/headers.at: here.
18050 2001-12-29 Akim Demaille <akim@epita.fr>
18052 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
18054 2001-12-29 Akim Demaille <akim@epita.fr>
18056 * tests/actions.at (Mid-rule actions): Output on a single line
18057 instead of several.
18059 2001-12-29 Akim Demaille <akim@epita.fr>
18061 * doc/bison.texinfo: Formatting changes.
18063 2001-12-29 Akim Demaille <akim@epita.fr>
18065 Don't store the token defs in a muscle, just be ready to output it
18066 on command. Now possible via `symbols'. Fixes a memory leak.
18068 * src/output.c (token_definitions_output): New.
18069 (output_parser, header_output): Use it.
18070 * src/reader.c (symbols_save): Remove.
18072 2001-12-29 Akim Demaille <akim@epita.fr>
18074 * src/bison.simple: Do not provide a default for YYSTYPE and
18075 YYLTYPE before the user's prologue. Otherwise it's hardly... a
18078 2001-12-29 Akim Demaille <akim@epita.fr>
18080 Mid-rule actions are simply... ignored!
18082 * src/reader.c (readgram): Be sure to attach mid-rule actions to
18083 the empty-rule associated to the dummy symbol, not to the host
18085 * tests/actions.at (Mid-rule actions): New.
18087 2001-12-29 Akim Demaille <akim@epita.fr>
18091 * src/reader.c (reader): Free grammar.
18093 2001-12-29 Akim Demaille <akim@epita.fr>
18097 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
18098 since it allocates it for each state, although only one is needed.
18099 (allocate_storage): Do it here.
18101 2001-12-29 Akim Demaille <akim@epita.fr>
18103 * src/options.h, src/options.c (create_long_option_table): Rename
18105 (long_option_table_new): this, with a clearer prototype.
18106 (percent_table): Remove, unused,
18107 * src/getargs.c (getargs): Adjust.
18109 2001-12-29 Akim Demaille <akim@epita.fr>
18111 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
18112 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
18115 2001-12-29 Akim Demaille <akim@epita.fr>
18117 * src/lalr.c (build_relations): Rename `states' as `states1'.
18118 Sorry, I don't understand exactly what it is, no better name...
18120 2001-12-29 Akim Demaille <akim@epita.fr>
18122 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
18123 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
18124 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
18127 2001-12-29 Akim Demaille <akim@epita.fr>
18129 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
18132 2001-12-29 Akim Demaille <akim@epita.fr>
18134 * src/reader.c, src/reader.h (user_toknums): Remove.
18135 Adjust all users to use symbols[i]->user_token_number.
18137 2001-12-29 Akim Demaille <akim@epita.fr>
18139 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
18140 Adjust all users to use symbols[i]->prec or ->assoc.
18142 2001-12-29 Akim Demaille <akim@epita.fr>
18144 * src/reader.c, src/reader.h (tags): Remove.
18145 Adjust all users to use symbols[i]->tag.
18147 2001-12-29 Akim Demaille <akim@epita.fr>
18149 * src/gram.h, src/gram.c (symbols): New, similar to state_table
18151 * src/reader.c (packsymbols): Fill this table.
18153 * src/conflicts.c (resolve_sr_conflict): Adjust.
18154 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
18156 Use symbols[i]->tag instead of tags[i].
18158 2001-12-29 Akim Demaille <akim@epita.fr>
18160 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
18161 In addition, put a comment in there, to replace...
18162 * tests/regression.at (%union and C comments): Remove.
18164 2001-12-29 Akim Demaille <akim@epita.fr>
18166 * tests/regression.at (Web2c Actions): Blindly move the actual
18167 output as expected output. The contents *seem* right to me, but I
18168 can't pretend reading perfectly parser tables... Nonetheless, all
18169 the other tests pass correctly, the table look OK, even though the
18170 presence of `$axiom' is to be noted: AFAICS it is useless (but
18173 2001-12-29 Akim Demaille <akim@epita.fr>
18175 * src/reader.c (readgram): Don't add the rule 0 if there were no
18176 rules read. In other words, add it _after_ having performed
18177 grammar sanity checks.
18178 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
18180 2001-12-29 Akim Demaille <akim@epita.fr>
18182 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
18183 visible, and some states have now a different number.
18185 2001-12-29 Akim Demaille <akim@epita.fr>
18187 * src/reader.c (readgram): Bind the initial rule's lineno to that
18189 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
18190 (Solved SR Conflicts): Adjust rule 0's line number.
18192 2001-12-29 Akim Demaille <akim@epita.fr>
18194 Fix the `GAWK Grammar' failure.
18196 * src/LR0.c (final_state): Initialize to -1 so that we do compute
18197 the reductions of the first state which was mistakenly confused
18198 with the final state because precisely final_state was initialized
18200 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
18201 now noticed by Bison.
18202 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
18203 have a reduction on $default.
18205 2001-12-29 Akim Demaille <akim@epita.fr>
18207 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
18209 * src/closure.c (print_closure): Likewise.
18210 * src/derives.c (print_derives): Likewise.
18211 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
18214 2001-12-29 Akim Demaille <akim@epita.fr>
18216 * src/lalr.c (lookaheads_print): New.
18217 (lalr): Call it when --trace-flag.
18218 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
18221 2001-12-29 Akim Demaille <akim@epita.fr>
18223 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
18224 when walking through ritem, even via rule->rhs.
18225 * src/reduce.c (dump_grammar, useful_production, reduce_output)
18226 (useful_production, useless_nonterminals): Likewise.
18227 (reduce_grammar_tables): Likewise, plus update nritems.
18228 * src/nullable.c (set_nullable): Likewise.
18229 * src/lalr.c (build_relations): Likewise.
18230 * tests/sets.at (Nullable): Adjust.
18231 Fortunately, now, the $axiom is no longer nullable.
18233 2001-12-29 Akim Demaille <akim@epita.fr>
18235 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
18237 * src/gram.c (ritem_longest_rhs): Likewise.
18238 * src/reduce.c (nonterminals_reduce): Likewise.
18239 * src/print_graph.c (print_graph): Likewise.
18240 * src/output.c (output_rule_data): Likewise.
18241 * src/nullable.c (set_nullable): Likewise.
18243 2001-12-29 Akim Demaille <akim@epita.fr>
18245 * src/output.c: Comment changes.
18247 2001-12-27 Paul Eggert <eggert@twinsun.com>
18249 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
18250 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
18251 Sparc, as they were causing more porting problems than the
18252 (minor) performance improvement was worth.
18254 Also, catch up with 1.31's YYSTD.
18256 2001-12-27 Akim Demaille <akim@epita.fr>
18258 * src/output.c (output_gram): Rely on nritems, not the
18259 0-sentinel. See below.
18260 Use -1 as separator, not 0.
18261 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
18262 Rely on -1 as separator in yyrhs, instead of 0.
18263 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
18264 twice `Now at end of input', therefore there are two lines less to
18267 2001-12-27 Akim Demaille <akim@epita.fr>
18269 * tests/regression.at (Unresolved SR Conflicts):
18270 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
18273 2001-12-27 Akim Demaille <akim@epita.fr>
18275 * src/LR0.c (new_state): Recognize the final state by the fact it
18276 is reached by eoftoken.
18277 (insert_start_shifting_state, insert_eof_shifting_state)
18278 (insert_accepting_state, augment_automaton): Remove, since now
18279 these states are automatically computed from the initial state.
18280 (generate_states): Adjust.
18281 * src/print.c: When reporting a rule number to the user, substract
18282 1, so that the axiom rule is rule 0, and the first user rule is 1.
18283 * src/reduce.c: Likewise.
18284 * src/print_graph.c (print_core): For the time being, just as for
18285 the report, depend upon --trace-flags to dump the full set of
18287 * src/reader.c (readgram): Once the grammar read, insert the rule
18288 0: `$axiom: START-SYMBOL $'.
18289 * tests/set.at: Adjust: rule 0 is now displayed, and since the
18290 number of the states has changed (the final state is no longer
18291 necessarily the last), catch up.
18293 2001-12-27 Akim Demaille <akim@epita.fr>
18295 Try to make the use of the eoftoken valid. Given that its value
18296 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
18297 is used instead of > 0 where appropriate, (ii), depend upon nritems
18298 instead of the 0-sentinel.
18300 * src/gram.h, src/gram.c (nritems): New.
18301 Expected to be duplication of nitems, but for the time being...
18302 * src/reader.c (packgram): Assert nritems and nitems are equal.
18303 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
18304 * src/closure.c (print_closure, print_fderives): Likewise.
18305 * src/gram.c (ritem_print): Likewise.
18306 * src/print.c (print_core, print_grammar): Likewise.
18307 * src/print_graph.c: Likewise.
18309 2001-12-27 Akim Demaille <akim@epita.fr>
18311 * src/main.c (main): If there are complains after grammar
18312 reductions, then output the report anyway if requested, then die.
18313 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
18314 * src/reader.c (eoftoken): New.
18315 (parse_token_decl): If the token being defined has value `0', it
18317 (packsymbols): No longer hack `tags' to insert `$' by hand.
18318 Be sure to preserve the value of the eoftoken.
18319 (reader): Make sure eoftoken is defined.
18320 Initialize nsyms to 0: now eoftoken is created just like the others.
18321 * src/print.c (print_grammar): Don't special case the eof token.
18322 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
18323 lie anyway, albeit pleasant.
18324 * tests/calc.at: Exercise error messages with eoftoken.
18325 Change the grammar so that empty input is invalid.
18326 Adjust expectations.
18327 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
18329 2001-12-27 Akim Demaille <akim@epita.fr>
18331 * configure.in: Check the protos of strchr ans strspn.
18332 Replace strchr if needed.
18333 * src/system.h: Provide the protos of strchr, strspn and memchr if
18335 * lib/strchr.c: New.
18336 * src/reader.c (symbols_save): Use strchr.
18338 2001-12-27 Akim Demaille <akim@epita.fr>
18340 * src/print.c, src/print_graph.c (escape): New.
18341 Use it to quote the TAGS outputs.
18342 * src/print_graph.c (print_state): Now errors are in red, and
18343 reductions in green.
18344 Prefer high to wide: output the state number on a line of its own.
18346 2001-12-27 Akim Demaille <akim@epita.fr>
18348 * src/state.h, src/state.c (reductions_new): New.
18349 * src/LR0.c (set_state_table): Let all the states have a
18350 `reductions', even if reduced to 0.
18351 (save_reductions): Adjust.
18352 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
18353 * src/print.c (print_reductions, print_actions): Adjust.
18354 * src/output.c (action_row): Adjust.
18356 2001-12-27 Akim Demaille <akim@epita.fr>
18358 * src/state.h, src/state.c (errs_new, errs_dup): New.
18359 * src/LR0.c (set_state_table): Let all the states have an errs,
18360 even if reduced to 0.
18361 * src/print.c (print_errs, print_reductions): Adjust.
18362 * src/output.c (output_actions, action_row): Adjust.
18363 * src/conflicts.c (resolve_sr_conflict): Adjust.
18365 2001-12-27 Akim Demaille <akim@epita.fr>
18367 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
18369 2001-12-27 Akim Demaille <akim@epita.fr>
18371 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
18372 * src/print.c: here.
18373 (lookaheadset, shiftset): New, used as additional storage by
18375 (print_results): Adjust.
18376 (print_shifts, print_gotos, print_errs): New, extracted from...
18377 (print_actions): here.
18378 * src/print_graph.c (print_actions): Remove dead code.
18380 2001-12-27 Akim Demaille <akim@epita.fr>
18382 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
18385 2001-12-27 Akim Demaille <akim@epita.fr>
18387 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
18388 (build_relations): Adjust.
18390 2001-12-27 Akim Demaille <akim@epita.fr>
18392 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
18395 2001-12-27 Akim Demaille <akim@epita.fr>
18397 * src/reader.c (packgram): Catch nitems overflows.
18399 2001-12-27 Akim Demaille <akim@epita.fr>
18401 * src/files.c, src/files.h (guard_obstack): Remove.
18402 * src/output.c (output): Adjust.
18403 * src/reader.c (parse_braces): New, factoring...
18404 (copy_action, copy_guard): these two which are renamed as...
18405 (parse_action, parse_guard): these.
18406 As a voluntary consequence, using braces around guards is now
18409 2001-12-27 Akim Demaille <akim@epita.fr>
18411 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
18412 * src/reader.c (symbol_list): `guard' and `guard_line' are new
18414 (symbol_list_new): Adjust.
18415 (copy_action): action_line is the first line, not the last.
18416 (copy_guard): Just as for actions, store the `action' only, not
18417 the switch/case/break flesh.
18418 Don't parse the user action that might follow the guard, let...
18419 (readgram): do it, i.e., now, there can be an action after a
18421 In other words the guard is just explicitly optional.
18422 (packgram): Adjust.
18423 * src/output.c (guards_output): New.
18424 (output_parser): Call it when needed.
18425 (output): Also free the guard and attrs obstacks.
18426 * src/files.c, src/files.h (obstack_save): Remove.
18427 (output_files): Remove.
18428 As a result, if one needs the former `.act' file, using an
18429 appropriate skeleton which requires actions and guards is now
18431 * src/main.c (main): Adjust.
18432 * tests/semantic.at: New.
18433 * tests/regression.at: Use `input.y' as input file name.
18434 Avoid 8+3 problems by requiring input.c when the test needs the
18437 2001-12-27 Akim Demaille <akim@epita.fr>
18439 * src/reader.c (symbol_list_new): Be sure to initialize all the
18442 2001-12-27 Akim Demaille <akim@epita.fr>
18444 All the hacks using a final pseudo state are now useless.
18446 * src/LR0.c (set_state_table): state_table holds exactly nstates.
18447 * src/lalr.c (nLA): New.
18448 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
18449 instead of lookaheadsp from the pseudo state (nstate + 1).
18451 2001-12-27 Akim Demaille <akim@epita.fr>
18453 * src/output.c (action_row, token_actions): Use a state_t instead
18454 of a integer, and nlookaheads instead of the following state's
18457 2001-12-27 Akim Demaille <akim@epita.fr>
18459 * src/conflicts.c (log_resolution, flush_shift)
18460 (resolve_sr_conflict, set_conflicts, solve_conflicts)
18461 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
18462 (conflicts_print, print_reductions): Use a state_t instead of an
18463 integer when referring to a state.
18464 As much as possible, depend upon nlookaheads, instead of the
18465 `lookaheadsp' member of the following state (since lookaheads of
18466 successive states are successive, the difference between state n + 1
18467 and n served as the number of lookaheads for state n).
18468 * src/lalr.c (add_lookback_edge): Likewise.
18469 * src/print.c (print_core, print_actions, print_state)
18470 (print_results): Likewise.
18471 * src/print_graph.c (print_core, print_actions, print_state)
18472 (print_graph): Likewise.
18473 * src/conflicts.h: Adjust.
18475 2001-12-27 Akim Demaille <akim@epita.fr>
18477 * src/bison.hairy: Formatting/comment changes.
18479 Remove `register' indications.
18480 Add plenty of `static'.
18482 2001-12-27 Akim Demaille <akim@epita.fr>
18484 * src/output.c (prepare): Drop the muscle `ntbase' which
18485 duplicates ntokens.
18486 * src/bison.simple: Formatting/comment changes.
18487 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
18488 is an undocumented synonym.
18490 2001-12-22 Akim Demaille <akim@epita.fr>
18492 * src/output.c (output_table_data): Change the prototype to use
18493 `int' for array ranges: some invocations do pass an int, not a
18495 Reported by Wayne Green.
18497 2001-12-22 Akim Demaille <akim@epita.fr>
18499 Some actions of web2c.y are improperly triggered.
18500 Reported by Mike Castle.
18502 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
18503 * tests/regression.at (Web2c): Rename as...
18504 (Web2c Report): this.
18505 (Web2c Actions): New.
18507 2001-12-22 Akim Demaille <akim@epita.fr>
18509 Reductions in web2c.y are improperly reported.
18510 Reported by Mike Castle.
18512 * src/conflicts.c (print_reductions): Fix.
18513 * tests/regression.at (Web2c): New.
18515 2001-12-18 Akim Demaille <akim@epita.fr>
18517 Some host fail on `assert (!"foo")', which expands to
18518 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
18519 Reported by Nelson Beebee.
18521 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
18522 `#define it_succeeded 0' and `assert (it_succeeded)'.
18524 2001-12-17 Marc Autret <autret_m@epita.fr>
18526 * src/bison.simple: Don't hard code the skeleton line and filename.
18527 * src/output.c (output_parser): Rename 'line' as 'output_line'.
18528 New line counter 'skeleton_line' (skeleton-line muscle).
18530 2001-12-17 Paul Eggert <eggert@twinsun.com>
18532 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
18533 YYDEBUG must be defined to a nonzero value.
18535 * src/bison.simple (yytname): Do not assume that the user defines
18536 YYDEBUG to a properly parenthesized expression.
18538 2001-12-17 Akim Demaille <akim@epita.fr>
18540 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
18541 nlookaheads is a new member.
18543 * src/lalr.h (nlookaheads): Remove this orphan declaration.
18544 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
18547 2001-12-17 Akim Demaille <akim@epita.fr>
18549 * src/files.h, src/files.c (open_files, close_files): Remove.
18550 * src/main.c (main): Don't open/close files, nor invoke lex_free,
18552 * src/reader.c (reader): Do it.
18554 2001-12-17 Akim Demaille <akim@epita.fr>
18556 * src/conflicts.c (print_reductions): Formatting changes.
18558 2001-12-17 Akim Demaille <akim@epita.fr>
18560 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
18561 (flush_reduce): New.
18562 (resolve_sr_conflict): Adjust.
18564 2001-12-17 Akim Demaille <akim@epita.fr>
18566 * src/output.c (output_obstack): Be static and rename as...
18567 (format_obstack): this, to avoid any confusion with files.c's
18569 * src/reader.h (muscle_obstack): Move to...
18570 * src/output.h: here, since it's defined in output.c.
18572 2001-12-17 Akim Demaille <akim@epita.fr>
18574 * src/output.c (action_row, save_column, default_goto)
18575 (sort_actions, matching_state, pack_vector): Better variable
18578 2001-12-17 Akim Demaille <akim@epita.fr>
18580 * src/output.c: Various formatting changes.
18582 2001-12-17 Akim Demaille <akim@epita.fr>
18584 * src/files.c (output_files): Free the output_obstack.
18585 * src/main.c (main): Call print and print_graph conditionally.
18586 * src/print.c (print): Work unconditionally.
18587 * src/print_graph.c (print_graph): Work unconditionally.
18588 * src/conflicts.c (log_resolution): Output only if verbose_flag.
18590 2001-12-16 Marc Autret <autret_m@epita.fr>
18592 * src/output.c (actions_output): Fix. When we use %no-lines,
18593 there is one less line per action.
18595 2001-12-16 Marc Autret <autret_m@epita.fr>
18597 * src/bison.simple: Remove a useless #line directive.
18598 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
18599 * src/output.c (get_lines_number): New.
18600 (output_parser): Adjust, now takes care about the lines of a
18602 Fix line numbering.
18603 (actions_output): Computes the number of lines taken by actions.
18604 (output_master_parser): Insert new skeleton which is the name of
18605 the output parser file name.
18607 2001-12-15 Marc Autret <autret_m@epita.fr>
18609 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
18611 2001-12-15 Marc Autret <autret_m@epita.fr>
18613 * src/output.c (output_gram): Keep track of the hairy one.
18615 2001-12-15 Akim Demaille <akim@epita.fr>
18617 Make `make distcheck' work.
18619 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
18620 system.h which uses libgettext.h.
18622 2001-12-15 Akim Demaille <akim@epita.fr>
18624 * src/nullable.c (set_nullable): Useless rules must be skipped,
18625 otherwise, since we range over their symbols, we might look at a
18626 nonterminal which no longer ``exists'', i.e., it is not counted in
18627 `nvars', hence we overflow our arrays.
18629 2001-12-15 Akim Demaille <akim@epita.fr>
18631 The header can also be produced directly, without any obstack!
18634 * src/files.c, src/files.h (defines_obstack): Remove.
18635 (compute_header_macro): Global.
18636 (defines_obstack_save): Remove.
18637 * src/reader.c (parse_union_decl): No longer output to
18638 defines_obstack: its content can be found in the `stype' muscle
18640 (output_token_translations): Merge into...
18641 (symbols_output): this.
18643 (symbols_save): this.
18645 * src/output.c (header_output): New.
18648 2001-12-15 Akim Demaille <akim@epita.fr>
18650 * src/reader.c (parse_union_decl): Instead of handling two obstack
18651 simultaneously, use one to define the `stype' muscle, and use the
18652 value of the latter to fill defines_obstack.
18653 (copy_comment): Remove.
18654 (copy_comment2): Work for a single obstack.
18656 (copy_comment): this.
18658 2001-12-15 Akim Demaille <akim@epita.fr>
18660 * src/lex.c, src/lex.h (xgetc): No longer static.
18661 * src/reader.c (parse_union_decl): Revamp.
18663 2001-12-15 Akim Demaille <akim@epita.fr>
18665 Still making progress in separating Bison into (i) input, (ii)
18666 process, (iii) output: now we can directly output the parser file
18667 without using table_obstack at all.
18669 * src/files.c, src/files.h (table_obstack): Bye bye.
18670 (parser_file_name): New.
18671 * src/files.c (compute_output_file_names): Compute it.
18672 * src/output.c (actions_output, output_parser)
18673 (output_master_parser): To a file instead of an obstack.
18675 2001-12-15 Akim Demaille <akim@epita.fr>
18677 Attach actions to rules, instead of pre-outputting them to
18680 * src/gram.h (rule_t): action and action_line are new members.
18681 * src/reader.c (symbol_list): Likewise.
18682 (copy_action): Save the actions within the rule.
18683 (packgram): Save them in rule_table.
18684 * src/output.c (actions_output): New.
18685 (output_parser): Use it on `%%actions'.
18686 (output_rule_data): Don't free rule_table.
18688 (prepare): Don't save the `action' muscle.
18689 * src/bison.simple: s/%%action/%%actions/.
18691 2001-12-15 Akim Demaille <akim@epita.fr>
18693 * src/reader.c (copy_action): When --yacc, don't append a `;'
18694 to the user action: let it fail if lacking.
18695 Suggested by Arnold Robbins and Tom Tromey.
18697 2001-12-14 Akim Demaille <akim@epita.fr>
18699 * src/lex.c (literalchar): Simply return the char you decoded, non
18700 longer mess around with obstacks and int pointers.
18701 Adjust all callers.
18703 2001-12-14 Akim Demaille <akim@epita.fr>
18705 * src/lex.c (literalchar): Don't escape the special characters,
18706 just decode them, and keep them as char (before, eol was output as
18707 the 2 char string `\n' etc.).
18708 * src/output.c (output_rule_data): Use quotearg to output the
18711 2001-12-13 Paul Eggert <eggert@twinsun.com>
18713 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
18714 Do not infringe on the global user namespace when using C++.
18715 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
18716 All uses of `fprintf' and `stderr' changed.
18718 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
18720 2001-12-13 Akim Demaille <akim@epita.fr>
18722 The computation of nullable is broken: it doesn't handle empty
18725 * tests/torture.at (GNU AWK Grammar): New.
18726 * tests/sets.at (Nullable): New.
18727 * src/nullable.c (set_nullable): Instead of blindly looping over
18728 `ritems', loop over the rules, and then over their rhs's.
18730 Work around Autotest bugs.
18732 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
18733 frame, because Autotest understand lines starting with a `+' as
18734 traces from the shell. Then, they are not processed properly.
18735 Admittedly an Autotest bug, but we don't have time to wait for
18736 Autotest to catch up.
18737 * tests/regression.at (Broken Closure): Adjust to the new table
18740 * tests/sets.at: here.
18742 2001-12-13 Akim Demaille <akim@epita.fr>
18744 * src/closure.c (closure): Use nrules instead of playing tricks
18745 with BITS_PER_WORD.
18747 2001-12-13 Akim Demaille <akim@epita.fr>
18749 * src/print.c (print_actions): Output the handling of `$' as the
18750 traces do: shifting the token EOF. Before EOF was treated as a
18752 * tests/regression.at: Adjust some tests.
18753 * src/print_graph.c (print_core): Complete the set of items via
18754 closure. The next-to-final and final states are still unsatisfying,
18755 but that's to be addressed elsewhere.
18756 No longer output the rule numbers, but do output the state number.
18757 A single loop for the shifts + gotos is enough, but picked a
18758 distinct color for each.
18759 (print_graph): Initialize and finalize closure.
18761 2001-12-13 Akim Demaille <akim@epita.fr>
18763 * src/reader.c (readgram): Remove dead code, an strip useless
18765 (get_type): Remove, unused.
18767 2001-12-12 Akim Demaille <akim@epita.fr>
18769 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
18770 on that of lib/error.c.
18772 2001-12-12 Akim Demaille <akim@epita.fr>
18774 Some hosts don't like `/' in includes.
18776 * src/system.h: Include libgettext.h without qualifying the path.
18777 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
18780 2001-12-11 Marc Autret <autret_m@epita.fr>
18782 * src/output.c (output_parser): Remove useless muscle.
18784 2001-12-11 Marc Autret <autret_m@epita.fr>
18786 * src/bison.simple: Remove #line just before %%epilogue. It
18787 is now handled in ...
18788 * src/reader.c (read_additionnal_code): Add the output of a
18789 #line for the epilogue.
18791 2001-12-10 Marc Autret <autret_m@epita.fr>
18793 * src/reader.c (copy_definition): Re-use CPP-outed code which
18794 replace precedent remove.
18795 * src/bison.simple: Remove #line before %%prologue because
18796 %%input-line is wrong at this time.
18798 2001-12-10 Marc Autret <autret_m@epita.fr>
18800 * src/reader.c (symbols_output): Clean up.
18801 * src/output.c (output_gram, output): Clean up.
18803 2001-12-10 Akim Demaille <akim@epita.fr>
18805 * src/lalr.c (initialize_lookaheads): New. Extracted from...
18806 * src/LR0.c (set_state_table): here.
18807 * src/lalr.c (lalr): Call it.
18809 2001-12-10 Akim Demaille <akim@epita.fr>
18811 * src/state.h (shifts): Remove the `number' member: shifts are
18812 attached to state, hence no longer need to be labelled with a
18815 2001-12-10 Akim Demaille <akim@epita.fr>
18817 Now that states have a complete set of members, the linked list of
18818 shifts is useless: just fill directly the state's shifts member.
18820 * src/state.h (shifts): Remove the `next' member.
18821 * src/LR0.c (first_state, last_state): Remove.
18822 Adjust the callers.
18823 (augment_automaton): Don't look for the shifts that must be added
18824 a shift on EOF: it is those of the state we looked for! But now,
18825 since shifts are attached, it is no longer needed to looking
18826 merely by its id: its number.
18828 2001-12-10 Akim Demaille <akim@epita.fr>
18830 * src/LR0.c (augment_automaton): Better variable locality.
18831 Remove an impossible branch: if there is a state corresponding to
18832 the start symbol being shifted, then there is shift for the start
18833 symbol from the initial state.
18835 2001-12-10 Akim Demaille <akim@epita.fr>
18837 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
18838 only when appropriate: when insert_start_shifting_state' is not
18840 * tests/regression.at (Rule Line Numbers): Adjust.
18842 2001-12-10 Akim Demaille <akim@epita.fr>
18844 * src/LR0.c (augment_automaton): Now that all states have shifts,
18845 merge the two cases addition shifts to the initial state.
18847 2001-12-10 Akim Demaille <akim@epita.fr>
18849 * src/lalr.c (set_state_table): Move to...
18851 * src/lalr.c (lalr): Don't call it...
18852 * src/LR0.c (generate_states): do it.
18853 * src/LR0.h (first_state): Remove, only the table is used.
18855 2001-12-10 Akim Demaille <akim@epita.fr>
18857 * src/LR0.h (first_shift, first_reduction): Remove.
18858 * src/lalr.c: Don't use first_shift: find shifts through the
18861 2001-12-10 Akim Demaille <akim@epita.fr>
18863 * src/LR0.c: Attach shifts to states as soon as they are
18865 * src/lalr.c (set_state_table): Instead of assigning shifts to
18866 state, just assert that the mapping was properly done.
18868 2001-12-10 Akim Demaille <akim@epita.fr>
18870 * src/LR0.c (insert_start_shift): Rename as...
18871 (insert_start_shifting_state): this.
18872 (insert_eof_shifting_state, insert_accepting_state): New.
18873 (augment_automaton): Adjust.
18874 Better locality of the variables.
18875 When looking if the start_symbol is shifted from the initial
18876 state, using `while (... symbol != start_symbol ...)' sounds
18877 better than `while (... symbol < start_symbol ...)': If fail
18878 to see how the order between symbols could be relevant!
18880 2001-12-10 Akim Demaille <akim@epita.fr>
18882 * src/getargs.h: Don't declare `spec_name_prefix' and
18883 `spec_file_prefix', declared by src/files.h.
18884 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
18885 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
18886 * src/output.c (prepare): Adjust.
18887 * src/reader.c (symbols_output): Likewise.
18888 * src/vmsgetargs.c: Vaguely adjust, but who cares?
18890 2001-12-10 Akim Demaille <akim@epita.fr>
18892 * src/muscle_tab.c (muscle_init): NULL is a better default than
18895 2001-12-10 Akim Demaille <akim@epita.fr>
18897 * src/reader.c (reader): Calling symbols_output once is enough.
18899 2001-12-10 Akim Demaille <akim@epita.fr>
18901 Now that states have a complete set of members, the linked list of
18902 reductions is useless: just fill directly the state's reductions
18905 * src/state.h (struct reductions): Remove member `number' and
18907 * src/LR0.c (first_reduction, last_reduction): Remove.
18908 (save_reductions): Don't link the new reductions, store them in
18910 * src/lalr.c (set_state_table): No need to attach reductions to
18911 states, it's already done.
18912 * src/output.c (output_actions): No longer free the shifts, then
18913 the reductions, then the states: free all the states and their
18916 2001-12-10 Akim Demaille <akim@epita.fr>
18918 * src/options.c (OPTN, DRTV, BOTH): New.
18919 (option_table): Use them.
18921 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
18922 the job of system.h.
18923 * src/options.c: Don't include stdio.h and xalloc.h for the same
18926 2001-12-10 Akim Demaille <akim@epita.fr>
18928 * src/output.c (output, prepare): Make sure the values of the
18929 muscles `action' and `prologue' are 0-terminated.
18931 2001-12-10 Akim Demaille <akim@epita.fr>
18933 Clean up GCC warnings.
18935 * src/reader.c (copy_action): `buf' is not used.
18936 (parse_skel_decl): Be static.
18937 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
18938 * src/options.h (create_long_option_table): Have a real prototype.
18939 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
18940 (hash_delete_at): Return const void *.
18941 Adjust casts to preserve the const.
18943 2001-12-10 Akim Demaille <akim@epita.fr>
18945 * configure.in: Require 2.52g.
18946 M4 is not needed, but AUTOM4TE is.
18947 * m4/m4.m4: Remove.
18948 * tests/Makefile.am: Adjust.
18950 2001-12-10 Akim Demaille <akim@epita.fr>
18952 One structure for states is enough, even though theoretically
18953 there are LR(0) states and LALR(1) states.
18955 * src/lalr.h (state_t): Remove.
18956 (state_table): Be state_t **, not state_t *.
18957 * src/state.h (core, CORE_ALLOC): Rename as...
18958 (state_t, STATE_ALLOC): this.
18959 Add the LALR(1) members: shifts, reductions, errs.
18960 * src/LR0.c (state_table): Rename as...
18961 (state_hash): this, to avoid name clashes with the global
18963 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
18964 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
18966 2001-12-10 Akim Demaille <akim@epita.fr>
18968 Bison dumps core on bash.y.
18969 Reported by Pascal Bart.
18971 * src/warshall.c (bitmatrix_print): New.
18973 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
18974 j must be the outer loop.
18975 * tests/regression.at (Broken Closure): New.
18977 2001-12-05 Akim Demaille <akim@epita.fr>
18979 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
18981 Reported by Peter Hamorsky.
18983 2001-12-05 Akim Demaille <akim@epita.fr>
18985 * src/conflicts.c (err_table): Remove.
18986 (resolve_sr_conflict): Adjust.
18987 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
18989 (state_t.reductions, state_t.shifts): this.
18991 2001-12-05 Akim Demaille <akim@epita.fr>
18993 * src/reduce.c (reduce_grammar_tables): No longer disable the
18994 removal of useless rules via CPP but via `if (0)', so that the
18995 compiler still check the code is valid.
18996 For instance, it should have noticed `rline' no longer exists: use
18997 the `line' member of rule_t.
18998 * src/gram.c (dummy, rline): Remove, unused.
19000 2001-12-05 Akim Demaille <akim@epita.fr>
19002 * src/output.c (pack_vector): Use assert, not berror.
19003 * src/main.c (berror): Remove, unused.
19005 2001-12-05 Akim Demaille <akim@epita.fr>
19007 New experimental feature: if --verbose --trace output all the
19008 items of a state, not only its kernel.
19010 * src/print.c (print_core): If `trace_flag', then invoke closure
19011 before outputting the items of the state (print_core is no longer
19012 a correct name them).
19013 (print_results): Invoke new_closure/free_closure if needed.
19015 2001-12-05 Akim Demaille <akim@epita.fr>
19017 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
19018 * src/closure.c, src/closure.h (itemsetsize): Rename as...
19019 (nitemset): for consistency with the rest of the project.
19021 2001-12-05 Akim Demaille <akim@epita.fr>
19023 * src/closure.c (print_closure): Improve.
19024 (closure): Use it for printing input and output.
19026 2001-12-05 Akim Demaille <akim@epita.fr>
19028 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
19029 indexed by nonterminals.
19031 2001-12-05 Akim Demaille <akim@epita.fr>
19033 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
19035 * src/warshall.h: Remove accidental duplication of the content.
19037 2001-12-05 Akim Demaille <akim@epita.fr>
19039 * src/closure.c (set_fderives): De-obfuscate.
19041 2001-12-05 Akim Demaille <akim@epita.fr>
19043 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
19045 2001-12-05 Akim Demaille <akim@epita.fr>
19047 * src/closure.c (set_firsts): De-obfuscate.
19049 2001-12-05 Akim Demaille <akim@epita.fr>
19051 * src/output.c (action_row): De-obfuscate
19052 using the good o' techniques: arrays not pointers, variable
19053 locality, BITISSET, RESETBIT etc.
19055 2001-12-05 Akim Demaille <akim@epita.fr>
19057 Pessimize the code to simplify it: from now on, all the states
19058 have a valid SHIFTS, which NSHIFTS is possibly 0.
19060 * src/LR0.c (shifts_new): Be global and move to..
19061 * src/state.c, src/state.h: here.
19062 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
19063 * src/print_graph: Adjust.
19065 2001-12-05 Akim Demaille <akim@epita.fr>
19067 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
19068 * src/conflicts.c: Use it.
19069 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
19070 incorrectly ``simplified''.
19072 2001-12-05 Akim Demaille <akim@epita.fr>
19074 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
19075 using the good o' techniques: arrays not pointers, variable
19076 locality, BITISSET, RESETBIT etc.
19078 2001-12-05 Akim Demaille <akim@epita.fr>
19080 * src/state.h (SHIFT_SYMBOL): New.
19081 * src/conflicts.c: Use it to deobfuscate.
19083 2001-12-05 Akim Demaille <akim@epita.fr>
19085 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
19086 (print_reductions): De-obfuscate using the good o' techniques:
19087 arrays not pointers, variable locality, BITISSET.
19089 2001-12-05 Akim Demaille <akim@epita.fr>
19091 * src/conflicts.c (print_reductions): Arrays, not pointers.
19094 2001-12-05 Akim Demaille <akim@epita.fr>
19096 * src/conflicts.c (print_reductions): Pessimize, but clarify.
19098 2001-12-05 Akim Demaille <akim@epita.fr>
19100 * src/conflicts.c (print_reductions): Improve variable locality.
19102 2001-12-05 Akim Demaille <akim@epita.fr>
19104 * src/conflicts.c (print_reductions): Pessimize, but clarify.
19106 2001-12-05 Akim Demaille <akim@epita.fr>
19108 * src/conflicts.c (print_reductions): Improve variable locality.
19110 2001-12-05 Akim Demaille <akim@epita.fr>
19112 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
19113 * src/lalr.c: Use them.
19115 2001-12-05 Akim Demaille <akim@epita.fr>
19117 * src/LR0.c (augment_automaton): Formatting changes.
19118 Better variable locality.
19120 2001-12-05 Akim Demaille <akim@epita.fr>
19122 * src/lalr.c (matrix_print): New.
19123 (transpose): Use it.
19124 Use arrays instead of pointers.
19126 2001-12-05 Akim Demaille <akim@epita.fr>
19128 * src/lalr.c (maxrhs): Move to...
19129 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
19130 * src/lalr.c (build_relations): Adjust.
19132 2001-12-05 Akim Demaille <akim@epita.fr>
19134 * src/lalr.c (transpose): Free the memory allocated to the
19135 argument, as it is replaced by the results by the unique caller.
19136 (build_relations): Merely invoke transpose: it handles the memory
19138 Improve variable locality.
19139 Avoid variables used as mere abbreviations.
19140 (compute_lookaheads): Use arrays instead of pointers.
19142 2001-12-05 Akim Demaille <akim@epita.fr>
19144 * src/lalr.c (initialize_F): Improve variable locality.
19145 Avoid variables used as mere abbreviations.
19147 2001-12-05 Akim Demaille <akim@epita.fr>
19149 * src/derives.c (print_derives): Display the ruleno.
19150 * src/lalr.c (initialize_F, transpose): Better variable locality
19151 to improve readability.
19152 Avoid variables used as mere abbreviations.
19154 2001-12-05 Akim Demaille <akim@epita.fr>
19156 * src/lalr.c (traverse): Use arrays instead of pointers.
19158 2001-12-05 Akim Demaille <akim@epita.fr>
19160 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
19161 the handling of squeue.
19162 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
19164 2001-12-05 Akim Demaille <akim@epita.fr>
19166 Because useless nonterminals are now kept alive (instead of being
19167 `destroyed'), we now sometimes examine them, and store information
19168 related to them. Hence we need to know their number, and adjust
19169 memory allocations.
19171 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
19173 * src/LR0.c (allocate_itemsets): The memory allocated to
19174 `symbol_count' was used for two different purpose: once to count
19175 the number of occurrences of each symbol, and later reassigned to
19176 `shift_symbol', containing the symbol that can be shifted from a
19178 Deobfuscate, i.e., allocate, use and free `symbol_count' here
19180 (new_itemsets): Allocate `shift_symbol' here.
19181 (allocate_itemsets): symbol_count includes useless nonterminals.
19182 Make room for them.
19183 (free_storage): Use `free', not `XFREE', for pointers that cannot
19186 2001-12-05 Akim Demaille <akim@epita.fr>
19188 * src/nullable.c (set_nullable): Deobfuscate the handling of
19190 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
19192 2001-12-05 Akim Demaille <akim@epita.fr>
19194 * src/gram.c, src/gram.h (ritem_print): New.
19195 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
19196 (This useless function was defined only to work around VMS linkers
19197 that can't handle compilation units with variables only).
19198 * src/reduce.c (dump_grammar): Use it to trace the construction of
19201 2001-12-04 Paul Eggert <eggert@twinsun.com>
19203 * src/bison.simple (union yyalloc): Change member names
19204 to be the same as the stack names.
19205 (yyparse): yyptr is now union yyalloc *, not char *.
19206 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
19207 and may generate better code on some machines.
19208 (yystpcpy): Use prototype if __STDC__ is defined, not just
19209 if __cplusplus is defined.
19211 2001-11-30 Akim Demaille <akim@epita.fr>
19213 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
19214 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
19215 Gettext doesn't compile cleanly, and dies with -Werror.
19216 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
19217 Include WARNING_CFLAGS here.
19218 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
19219 before being defined.
19221 2001-11-27 Paul Eggert <eggert@twinsun.com>
19223 * lib/quotearg.h (quotearg_n, quotearg_n_style):
19224 First arg is int, not unsigned.
19225 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
19226 (SIZE_MAX, UINT_MAX): New macros.
19227 (quotearg_n_options): Abort if N is negative.
19228 Avoid overflow check on hosts where size_t is 64 bits and int
19229 is 32 bits, as overflow is impossible there.
19230 Fix off-by-one typo that caused unnecessary reallocation.
19232 2001-11-29 Paul Eggert <eggert@twinsun.com>
19234 Name space cleanup in generated parser.
19236 * doc/bison.texinfo (Bison Parser): Discuss system headers
19237 and their effect on the user name space.
19239 * src/bison.simple:
19240 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
19241 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
19242 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
19244 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
19245 on user names when possible.
19247 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
19248 Simplify test for whather <alloca.h> exists.
19250 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
19252 (<stdio.h>): Include if YYDEBUG.
19254 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
19255 ! defined (yyoverflow) && ! defined (yymemcpy).
19257 (yymemcpy, yyparse): Rename local variables as needed so that
19258 they all begin with 'yy'.
19260 (yystrlen, yystpcpy): New functions.
19262 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
19265 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
19266 instead of relying on string.h functions. Use YYSTACK_ALLOC
19267 and YYSTACK_FREE instead of malloc and free.
19269 2001-11-30 Akim Demaille <akim@epita.fr>
19271 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
19272 before their first uses.
19273 (YYBISON, YYPURE): Move to the top of the output.
19275 2001-11-30 Akim Demaille <akim@epita.fr>
19277 * tests/reduce.at (Useless Nonterminals): Fix.
19279 2001-11-30 Akim Demaille <akim@epita.fr>
19281 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
19282 if body instead of `;' to pacify GCC's warnings.
19284 2001-11-30 Akim Demaille <akim@epita.fr>
19286 Instead of mapping the LHS of unused rules to -1, keep the LHS
19287 valid, but flag the rules as invalid.
19289 * src/gram.h (rule_t): `useful' is a new member.
19290 * src/print.c (print_grammar): Adjust.
19291 * src/derives.c (set_derives): Likewise.
19292 * src/reader.c (packgram, reduce_output): Likewise.
19293 * src/reduce.c (reduce_grammar_tables): Likewise.
19294 * tests/reduce.at (Underivable Rules, Useless Rules): New.
19296 2001-11-30 Akim Demaille <akim@epita.fr>
19298 * src/reduce.c (reduce_output): Formatting changes.
19299 * src/print.c (print_results, print_grammar): Likewise.
19300 * tests/regression.at (Rule Line Numbers)
19301 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
19303 2001-11-30 Akim Demaille <akim@epita.fr>
19305 * src/reduce.c (nonterminals_reduce): Instead of throwing away
19306 useless nonterminals, move them at the end of the symbol arrays.
19307 (reduce_output): Adjust.
19308 * tests/reduce.at (Useless Nonterminals): Adjust.
19310 2001-11-30 Akim Demaille <akim@epita.fr>
19312 * src/reduce.c: Various comment/formatting changes.
19313 (nonterminals_reduce): New, extracted from...
19314 (reduce_grammar_tables): here.
19315 (reduce_grammar): Call nonterminals_reduce.
19317 2001-11-29 Paul Eggert <eggert@twinsun.com>
19319 * src/bison.simple (YYSTACK_REALLOC): Remove.
19320 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
19321 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
19323 (union yyalloc): New type.
19324 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
19325 an arbitrary restriction on hosts where size_t is wider than int.
19327 (yyparse): Don't dump core if alloca or malloc fails; instead, report
19328 a parser stack overflow. Allocate just one block of memory for all
19329 three stacks, instead of allocating three blocks; this typically is
19330 faster and reduces fragmentation.
19332 Do not limit the number of items in the stack to a value that fits
19333 in 'int', as this is an arbitrary limit on hosts with 64-bit
19334 size_t and 32-bit int.
19336 2001-11-29 Marc Autret <autret_m@epita.fr>
19338 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
19339 of defining YYERROR_VERBOSE.
19340 [AT_DATA]: $4 is now out of C declarations in the prologue.
19342 2001-11-28 Marc Autret <autret_m@epita.fr>
19344 * src/reader.c (parse_dquoted_param): New.
19345 (parse_skel_decl): Use it.
19346 * src/lex.h: Add its prototype.
19347 * src/lex.c (literalchar): Become not static.
19349 2001-11-28 Marc Autret <autret_m@epita.fr>
19351 * src/output.h: And put its extern declaration here.
19352 * src/output.c (error_verbose): Define here.
19353 (prepare): Echo name modification.
19354 * src/getargs.h: Clean its extern declaration.
19355 * src/getargs.c (error_verbose_flag): Remove.
19356 (getargs): Remove case 'e'.
19357 * src/options.c (option_table): 'error-verbose' is now seen as simple
19361 * src/reader.c (read_declarations): Remove case tok_include.
19362 (parse_include_decl): Remove.
19363 * src/lex.h (token_t): Remove tok_include.
19364 * src/options.c (option_table): 'include' is now a simple command line
19367 2001-11-28 Marc Autret <autret_m@epita.fr>
19369 * src/bison.simple: Adjust muscle names.
19370 * src/muscle_tab.c (muscle_init): Also rename the muscles.
19371 * src/output.c (prepare): s/_/-/ for the muscles names.
19372 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
19374 2001-11-28 Marc Autret <autret_m@epita.fr>
19376 * src/bison.simple: Fix debug.
19377 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
19379 2001-11-28 Akim Demaille <akim@epita.fr>
19381 * src/LR0.c (shifts_new): New.
19382 (save_shifts, insert_start_shift, augment_automaton): Use it.
19384 2001-11-28 Akim Demaille <akim@epita.fr>
19386 * src/closure.c (closure): `b' and `ruleno' denote the same value:
19389 2001-11-28 Akim Demaille <akim@epita.fr>
19391 * src/closure.c (closure): Instead of looping over word in array
19392 then bits in words, loop over bits in array.
19394 2001-11-28 Akim Demaille <akim@epita.fr>
19396 * src/closure.c (closure): No longer optimize the special case
19397 where all the bits of `ruleset[r]' are set to 0, to make the code
19400 2001-11-28 Akim Demaille <akim@epita.fr>
19402 * src/closure.c (closure): `r' and `c' are new variables, used to
19403 de-obfuscate accesses to RULESET and CORE.
19405 2001-11-28 Akim Demaille <akim@epita.fr>
19407 * src/reduce.c (reduce_print): Use ngettext.
19408 (dump_grammar): Improve the trace accuracy.
19410 2001-11-28 Akim Demaille <akim@epita.fr>
19412 * src/reduce.c (dump_grammar): Don't translate trace messages.
19414 2001-11-28 Akim Demaille <akim@epita.fr>
19416 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
19417 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
19418 as all tags are free'ed afterwards.
19419 From Enrico Scholz.
19421 2001-11-27 Paul Eggert <eggert@twinsun.com>
19423 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
19424 use alloca when we didn't want to, and vice versa.
19426 2001-11-27 Marc Autret <autret_m@epita.fr>
19428 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
19430 * src/output.c (prepare): Remove its update.
19432 2001-11-27 Marc Autret <autret_m@epita.fr>
19434 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
19435 Use %error-verbose.
19437 2001-11-27 Marc Autret <autret_m@epita.fr>
19439 * src/bison.simple: Remove YYERROR_VERBOSE using.
19440 Use %%error_verbose.
19441 (yyparse): Likewise.
19442 * src/output.c (prepare): Give its final value.
19443 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
19444 * src/getargs.h: Add its extern declaration.
19445 * src/getargs.c (error_verbose_flag): New int.
19446 (getargs): Update to catch new case.
19447 * src/options.c (option_table): 'error-verbose' is a new option.
19448 (shortopts): Update.
19450 2001-11-27 Akim Demaille <akim@epita.fr>
19452 * src/system.h: Use intl/libgettext.h.
19453 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
19455 2001-11-27 Akim Demaille <akim@epita.fr>
19457 * tests/torture.at (Exploding the Stack Size with Malloc):
19458 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
19460 2001-11-27 Akim Demaille <akim@epita.fr>
19462 * src/files.c: Include error.h.
19463 Reported by Hans Aberg.
19465 2001-11-26 Marc Autret <autret_m@epita.fr>
19467 * src/reader.c (parse_include_decl): New, not yet implemented.
19468 (read_declarations): Add case tok_include.
19469 * src/getargs.h (include): Add its extern definition.
19470 * src/getargs.c (include): New const char *.
19471 (getargs): Add case '-I'.
19472 * src/options.c (option_table): Add include as command line and
19474 * src/lex.h (token_t): Add tok_include.
19476 2001-11-26 Akim Demaille <akim@epita.fr>
19478 * src/reader.c (readgram): Make sure rules for mid-rule actions
19479 have a lineno equal to that of their host rule.
19480 Reported by Hans Aberg.
19481 * tests/regression.at (Rule Line Numbers): New.
19483 2001-11-26 Akim Demaille <akim@epita.fr>
19485 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
19488 2001-11-26 Akim Demaille <akim@epita.fr>
19490 * src/complain.c, src/complain.h (error): Remove, provided by
19493 2001-11-26 Akim Demaille <akim@epita.fr>
19495 * src/reader.c (read_declarations): Don't abort on tok_illegal,
19496 issue an error message.
19497 * tests/regression.at (Invalid %directive): New.
19498 Reported by Hans Aberg.
19500 2001-11-26 Akim Demaille <akim@epita.fr>
19502 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
19503 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
19505 2001-11-26 Akim Demaille <akim@epita.fr>
19507 * src/conflicts.c (conflicts_print): Don't complain at all when
19508 there are no reduce/reduce conflicts, and as many shift/reduce
19509 conflicts as expected.
19510 * tests/regression.at (%expect right): Adjust.
19512 2001-11-23 Akim Demaille <akim@epita.fr>
19514 * lib/alloca.c: Update, from fileutils.
19516 2001-11-23 Akim Demaille <akim@epita.fr>
19518 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
19520 2001-11-23 Akim Demaille <akim@epita.fr>
19522 * src/system.h: Include alloca.h.
19523 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
19525 2001-11-23 Akim Demaille <akim@epita.fr>
19527 * src/print_graph.c (print_actions): Remove `rule', unused.
19528 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
19529 pacify GCC's signed < unsigned warnings.
19530 * src/closure.c (itemsetsize): Likewise.
19531 * src/reader.c (symbol_list_new): Static.
19533 2001-11-23 Akim Demaille <akim@epita.fr>
19535 Attaching lineno to buckets is stupid, since only one copy of each
19536 symbol is kept, only the line of the first occurrence is kept too.
19538 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
19539 * src/reader.c (rline_allocated): Remove, unused.
19540 (symbol_list): Have a `line' member.
19541 (symbol_list_new): New.
19542 (readgram): Use it.
19543 * src/print.c (print_grammar): Output the rule line numbers.
19544 * tests/regression.at (Solved SR Conflicts)
19545 (Unresolved SR Conflicts): Adjust.
19546 Reported by Hans Aberg.
19548 2001-11-22 Marc Autret <autret_m@epita.fr>
19550 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
19552 2001-11-22 Marc Autret <autret_m@epita.fr>
19554 * src/muscle_tab.c (muscle_init): Remove initialization of
19556 * src/output.c (output_master_parser): Do it here.
19558 2001-11-20 Akim Demaille <akim@epita.fr>
19561 * configure.in (ALL_LINGUAS): Adjust.
19562 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
19563 longer contains strings to translate.
19565 2001-11-19 Akim Demaille <akim@epita.fr>
19567 * src/conflicts.c (conflicts_print): Add a missing \n.
19569 2001-11-19 Akim Demaille <akim@epita.fr>
19571 * src/nullable.c (nullable_print): New.
19572 (set_nullable): Call it when tracing.
19573 Better locality of variables.
19575 2001-11-19 Akim Demaille <akim@epita.fr>
19577 * src/print.c (print_actions): Better locality of variables.
19579 2001-11-19 Akim Demaille <akim@epita.fr>
19581 * src/derives.c (print_derives): Fix and enrich.
19582 * src/closure.c (print_fderives): Likewise.
19584 2001-11-19 Akim Demaille <akim@epita.fr>
19586 * src/closure.c (itemsetend): Remove, replaced with...
19587 (itemsetsize): new.
19589 2001-11-19 Akim Demaille <akim@epita.fr>
19591 * src/LR0.c (kernel_end): Remove, replaced with...
19592 (kernel_size): new.
19594 2001-11-19 Akim Demaille <akim@epita.fr>
19596 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
19599 2001-11-19 Akim Demaille <akim@epita.fr>
19601 * src/closure.c (closure): Use arrays instead of pointers to clarify.
19603 2001-11-19 Akim Demaille <akim@epita.fr>
19605 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
19607 * src/LR0.c: Likewise.
19608 (allocate_itemsets): Use arrays instead of pointers to clarify.
19610 2001-11-19 Akim Demaille <akim@epita.fr>
19612 * src/getargs.c (statistics_flag): Replace with...
19614 (longopts): Accept --trace instead of --statistics.
19615 * src/getargs.h, src/options.c: Adjust.
19616 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
19617 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
19619 2001-11-19 Akim Demaille <akim@epita.fr>
19621 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
19622 pointers to clarify the code.
19623 (save_reductions, save_shifts): Factor common parts of alternatives.
19625 2001-11-19 Akim Demaille <akim@epita.fr>
19627 * src/LR0.c (new_state, get_state): Complete TRACE code.
19628 * src/closure.c: Include `reader.h' to get `tags', needed by the
19630 Rename the conditional DEBUG as TRACE.
19631 Output consistently TRACEs to stderr, not stdout.
19632 * src/derives.c: Likewise.
19633 * src/reduce.c: (inaccessable_symbols): Using if is better style
19635 Use `#if TRACE' instead of `#if 0' for tracing code.
19637 2001-11-19 Akim Demaille <akim@epita.fr>
19639 * src/system.h (LIST_FREE, shortcpy): New.
19640 * src/LR0.c: Use them.
19641 * src/output.c (free_itemsets, free_reductions, free_shifts):
19642 Remove, replaced by LIST_FREE.
19644 2001-11-19 Akim Demaille <akim@epita.fr>
19646 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
19647 (REDUCTIONS_ALLOC): New.
19648 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
19651 2001-11-19 Akim Demaille <akim@epita.fr>
19653 * src/LR0.c (new_state): Complete trace code.
19654 * src/nullable.c (set_nullable): Don't translate traces.
19656 2001-11-19 Akim Demaille <akim@epita.fr>
19658 * src/print_graph.c (print_core): Better locality of variables.
19659 * src/print.c (print_core): Likewise.
19661 2001-11-19 Akim Demaille <akim@epita.fr>
19663 * src/vcg.c: You do the output, so you are responsible of the
19664 handling of VCG syntax, in particular: use quotearg.
19665 * src/print_graph.c: Don't.
19666 (print_actions): Don't output the actions as part of the nodes,
19667 since that's the job of the edges.
19668 (print_state): Don't output by hand: fill the node description,
19669 and ask for its output.
19671 2001-11-19 Akim Demaille <akim@epita.fr>
19673 * src/bison.simple (yyparse): When verbosely reporting an error,
19674 no longer put additional quotes around token names.
19675 * tests/calc.at: Adjust.
19677 2001-11-19 Akim Demaille <akim@epita.fr>
19679 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
19680 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
19681 * src/output.c: Adjust.
19683 2001-11-19 Akim Demaille <akim@epita.fr>
19685 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
19687 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
19689 2001-11-19 Akim Demaille <akim@epita.fr>
19691 * src/gram.h (rule_t): New.
19693 (rrhs, rlhs): Remove, part of state_t.
19694 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
19695 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
19696 * src/reader.c, src/reduce.c: Adjust.
19698 2001-11-19 Akim Demaille <akim@epita.fr>
19700 * src/reader.c (symbols_output): New, extracted from...
19701 (packsymbols): Here.
19704 2001-11-19 Akim Demaille <akim@epita.fr>
19706 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
19707 (maxrhs): this new function.
19709 2001-11-19 Akim Demaille <akim@epita.fr>
19711 * src/lalr.c (F): New macro to access the variable F.
19714 2001-11-19 Akim Demaille <akim@epita.fr>
19716 * src/lalr.h (LA): New macro to access the variable LA.
19717 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19718 * src/lalr.c: Adjust.
19720 2001-11-19 Akim Demaille <akim@epita.fr>
19722 * src/lalr.c (initialize_LA): Only initialize LA. Let...
19723 (set_state_table): handle the `lookaheads' members.
19725 2001-11-19 Akim Demaille <akim@epita.fr>
19727 * src/lalr.h (lookaheads): Removed array, whose contents is now
19729 (state_t): this structure.
19730 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19733 2001-11-19 Akim Demaille <akim@epita.fr>
19735 * src/lalr.h (consistent): Removed array, whose contents is now
19737 (state_t): this structure.
19738 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19741 2001-11-19 Akim Demaille <akim@epita.fr>
19743 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
19744 contents are now members of...
19745 (state_t): this structure.
19746 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19749 2001-11-19 Akim Demaille <akim@epita.fr>
19751 * src/lalr.h (state_t): New.
19752 (state_table): Be a state_t * instead of a core **.
19753 (accessing_symbol): Remove, part of state_t.
19754 * src/lalr.c: Adjust.
19755 (set_accessing_symbol): Merge into...
19756 (set_state_table): this.
19757 * src/print_graph.c, src/conflicts.c: Adjust.
19759 2001-11-14 Akim Demaille <akim@epita.fr>
19761 * tests/calc.at, tests/output.at, tests/regression.at,
19762 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
19763 now the tests are run in private dirs, therefore AC_CLEANUP and
19764 family can be simplified to 0-ary.
19765 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
19766 use abs. path to find config.h.
19767 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
19768 stderr, there can be way too much random noise.
19769 Instead pass -Werror to GCC and rely on the exit status.
19770 Reported by Wolfram Wagner.
19772 2001-11-14 Akim Demaille <akim@epita.fr>
19774 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
19775 defined only if yyoverflow is defined, to avoid `warning: unused
19777 Reported by The Test Suite.
19779 2001-11-14 Akim Demaille <akim@epita.fr>
19781 * src/print.c: Include reduce.h.
19782 Reported by Hans Aberg.
19784 2001-11-14 Akim Demaille <akim@epita.fr>
19786 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
19787 Revert a previous patch: these are really const.
19788 * src/conflicts.c (conflict_report): Additional useless pair of
19789 braces to pacify GCC's warnings for `if () if () {} else {}'.
19790 * src/lex.c (parse_percent_token): Replace equal_offset with
19793 Be sure to strdup `arg' when used, since there is no reason for
19794 token_buffer not to change.
19796 2001-11-14 Akim Demaille <akim@epita.fr>
19798 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
19800 * src/main.c (main): Use them.
19801 Suggested by Hans Aberg.
19803 2001-11-12 Akim Demaille <akim@epita.fr>
19805 * src/system.h (ngettext): Now that we use ngettext, be sure to
19806 provide a default definition when NLS are not used.
19808 2001-11-12 Akim Demaille <akim@epita.fr>
19810 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
19811 Use @kbd to denote user input.
19812 (Language and Grammar): ANSIfy the example.
19813 Adjust its layout for info/notinfo.
19814 (Location Tracking Calc): Output error messages to stderr.
19815 Output locations in a more GNUtically correct way.
19816 Fix a couple of Englishos.
19817 Adjust @group/@end group pairs.
19819 2001-11-12 Akim Demaille <akim@epita.fr>
19821 %expect was not functioning at all.
19823 * src/conflicts.c (expected_conflicts): Set to -1.
19824 (conflict_report): Use ngettext.
19825 (conflicts_print): Check %expect and make its violation an error.
19826 * doc/bison.texinfo (Expect Decl): Adjust.
19827 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
19828 * tests/regression.at (%expect not enough, %expect right)
19829 (%expect too much): New.
19831 2001-11-12 Akim Demaille <akim@epita.fr>
19833 * tests/regression.at (Conflicts): Rename as...
19834 (Unresolved SR Conflicts): this.
19835 (Solved SR Conflicts): New.
19837 2001-11-12 Akim Demaille <akim@epita.fr>
19839 * src/reduce.c (print_results): Rename as...
19840 (reduce_output): This.
19841 Output to OUT, passed as argument, instead of output_obstack.
19842 (dump_grammar): Likewise.
19843 (reduce_free): New.
19845 (reduce_grammar): No longer call reduce_output, since...
19846 * src/print.c (print_results): do it.
19847 * src/main.c (main): Call reduce_free;
19849 2001-11-12 Akim Demaille <akim@epita.fr>
19851 * src/conflicts.c (print_reductions): Accept OUT as argument.
19852 Output to it, not to output_obstack.
19853 * src/print.c (print_actions): Adjust.
19855 2001-11-12 Akim Demaille <akim@epita.fr>
19857 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
19858 the result instead of using...
19859 (src_total, rrc_total, src_count, rrc_count): Remove.
19860 (any_conflicts): Remove.
19861 (print_conflicts): Split into...
19862 (conflicts_print, conflicts_output): New.
19863 * src/conflicts.h: Adjust.
19864 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
19865 * src/print.c (print_grammar): Issue `\n' between two rules.
19866 * tests/regression.at (Conflicts): New.
19867 Reported by Tom Lane.
19869 2001-11-12 Akim Demaille <akim@epita.fr>
19871 * tests/regression.at (Invalid input): Remove, duplicate with
19872 ``Invalid input: 1''.
19874 2001-11-12 Akim Demaille <akim@epita.fr>
19876 * tests/torture.at (AT_DATA_STACK_TORTURE)
19877 (Exploding the Stack Size with Alloca)
19878 (Exploding the Stack Size with Malloc): New.
19880 2001-11-12 Akim Demaille <akim@epita.fr>
19882 * src/bison.simple (YYSTACK_REALLOC): New.
19883 (yyparse) [!yyoverflow]: Use it and free the old stack.
19884 Reported by Per Allansson.
19886 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
19888 * src/bison.simple: Define type yystype instead of YYSTYPE, and
19889 define CPP macro, which substitute YYSTYPE by yystype.
19890 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
19891 with yyltype/YYLTYPE. This allows inclusion of the generated
19892 header within the parser if the compiler, such as GGC, accepts
19893 multiple equivalent #defines.
19896 2001-11-05 Akim Demaille <akim@epita.fr>
19898 * src/reader.c (symbols_output): New, extracted from...
19899 (packsymbols): here.
19902 2001-11-05 Akim Demaille <akim@epita.fr>
19904 * src/lex.c (parse_percent_token): s/quotearg/quote/.
19906 2001-11-05 Akim Demaille <akim@epita.fr>
19908 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
19911 2001-11-05 Akim Demaille <akim@epita.fr>
19913 * src/options.h (struct option_table_struct): set_flags is void*.
19914 * src/options.c (longopts): Support `--output' and `%output'.
19916 * src/lex.h (tok_setopt): Remove, replaced with...
19917 (tok_intopt, tok_stropt): these new guys.
19918 * src/lex.c (getopt.h): Not needed.
19919 (token_buffer, unlexed_token_buffer): Not const.
19920 (percent_table): Promote `-' over `_' in directive names.
19921 Active `%name-prefix', `file-prefix', and `output'.
19922 (parse_percent_token): Accept possible arguments to directives.
19923 Promote `-' over `_' in directive names.
19925 2001-11-04 Akim Demaille <akim@epita.fr>
19927 * doc/bison.texinfo (Decl Summary): Split the list into
19928 `directives for grammars' and `directives for bison'.
19930 Add description of `%name-prefix', `file-prefix', and `output'.
19931 Promote `-' over `_' in directive names.
19932 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
19933 Simplify the description of `--name-prefix'.
19934 Promote `-' over `_' in directive names.
19935 Promote `--output' over `--output-file'.
19936 Fix the description of `--defines'.
19937 * tests/output.at: Exercise %file-prefix and %output.
19939 2001-11-02 Akim Demaille <akim@epita.fr>
19941 * doc/refcard.tex: Update.
19943 2001-11-02 Akim Demaille <akim@epita.fr>
19945 * src/symtab.h (SUNDEF): New.
19946 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
19947 stand for `uninitialized', instead of 0.
19948 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
19949 * src/lex.c (lex): Adjust.
19951 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
19953 Let yylex return it instead of a plain 0.
19954 Reported by Dick Streefland.
19956 2001-11-02 Akim Demaille <akim@epita.fr>
19958 * tests/regression.at (Mixing %token styles): New test.
19960 2001-11-02 Akim Demaille <akim@epita.fr>
19962 * src/reader.c (parse_thong_decl): Formatting changes.
19963 (token_translations_init): New, extracted from...
19964 (packsymbols): Here.
19967 2001-11-01 Akim Demaille <akim@epita.fr>
19969 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
19970 Check that `9foo.y' produces correct cpp guards.
19971 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
19975 2001-11-01 Akim Demaille <akim@epita.fr>
19977 * tests/regression.at (Invalid input: 2): New.
19978 * src/lex.c (unlexed_token_buffer): New.
19979 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
19983 2001-11-01 Akim Demaille <akim@epita.fr>
19985 * tests/calc.at: Catch up with 1.30.
19986 * configure.in: Bump to 1.49a.
19987 Adjust to newer Autotest.
19989 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
19991 * src/conflicts.c: Move global variables rrc_total and src_total ...
19992 (print_conflicts): here.
19993 * src/output.c (output): Free global variable user_toknums.
19994 * src/lex.c (token_obstack): Become static.
19996 2001-10-18 Akim Demaille <akim@epita.fr>
19998 * tests/atlocal.in (GCC): Add.
19999 * tests/calc.at: s/m4_match/m4_bmatch/.
20000 s/m4_patsubst/m4_bpatsubst/.
20001 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
20002 * configure.in: AC_SUBST(GCC).
20004 2001-10-14 Marc Autret <autret_m@epita.fr>
20006 * src/options.c (create_long_option_table): Fix.
20008 2001-10-10 Akim Demaille <akim@epita.fr>
20010 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
20012 2001-10-04 Akim Demaille <akim@epita.fr>
20014 * src/reader.c (parse_union_decl): Push the caracters in
20015 union_obstack, not attrs_obstack.
20017 2001-10-04 Akim Demaille <akim@epita.fr>
20019 Merge in the branch 1.29.
20021 * src/reader.c (packsymbols): Use a temporary obstack for
20022 `%%tokendef', since output_stack is already used elsewhere.
20024 2001-10-02 Akim Demaille <akim@epita.fr>
20028 2001-10-02 Akim Demaille <akim@epita.fr>
20032 2001-10-02 Akim Demaille <akim@epita.fr>
20034 * tests/regression.at (Invalid CPP headers): New.
20035 From Alexander Belopolsky.
20036 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
20038 2001-10-02 Akim Demaille <akim@epita.fr>
20040 * tests/regression.at (Invalid input): New.
20041 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
20044 2001-10-02 Akim Demaille <akim@epita.fr>
20046 * tests/calc.at: Now that --debug works, the tests must be adjusted.
20048 2001-10-02 Akim Demaille <akim@epita.fr>
20050 * src/output.c (output_parser): Assert `skeleton'.
20051 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
20055 2001-10-01 Marc Autret <autret_m@epita.fr>
20057 * src/lex.h: Echo modifications.
20058 * src/lex.c (unlex): Parameter is now token_t.
20061 2001-10-01 Marc Autret <autret_m@epita.fr>
20063 * src/main.c: Include lex.h.
20066 2001-09-29 Akim Demaille <akim@epita.fr>
20068 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
20070 2001-09-28 Akim Demaille <akim@epita.fr>
20072 * tests/testsuite.at: Update to newer Autotest.
20073 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
20075 2001-09-27 Akim Demaille <akim@epita.fr>
20077 Position independent wrapper.
20079 * tests/bison: Remove.
20080 * tests/bison.in: New.
20081 * configure.in: Adjust.
20083 2001-09-27 Paul Eggert <eggert@twinsun.com>
20085 Port quotearg fixes from tar 1.13.24.
20087 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
20089 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
20090 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
20092 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
20093 * m4/mbrtowc.m4: New file.
20094 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
20095 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
20097 2001-09-27 Akim Demaille <akim@epita.fr>
20101 2001-09-27 Akim Demaille <akim@epita.fr>
20105 2001-09-25 Akim Demaille <akim@epita.fr>
20107 * src/system.h: Include `xalloc.h'.
20108 Remove it from the C files.
20109 * src/files.c (output_files): Free the obstacks.
20110 * src/lex.c (init_lex): Rename as...
20113 * src/main.c (main): Use it.
20115 2001-09-24 Marc Autret <autret_m@epita.fr>
20117 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
20118 to output informations in fout (FILE*).
20119 (open_graph, close_graph): Likewise.
20120 (output_graph, output_edge, output_node): Likewise.
20121 * src/vcg.h: Update function prototypes.
20122 * src/print_graph.c (print_graph): Open output graph file.
20123 (print_actions): Adjust.
20124 * src/files.h: Remove extern declaration.
20125 * src/files.c: Remove graph_obstack declaration.
20126 (open_files): Remove graph_obstack initialization.
20127 (output_files): Remove graph_obstack saving.
20129 2001-09-24 Marc Autret <autret_m@epita.fr>
20131 * src/files.c (compute_output_file_names): Fix.
20133 2001-09-24 Marc Autret <autret_m@epita.fr>,
20134 Akim Demaille <akim@epita.fr>
20136 * src/reader.c (reader): Remove call to free_symtab ().
20137 * src/main.c (main): Call it here.
20139 * src/conflicts.c (initialize_conflicts): Rename as...
20140 (solve_conflicts): this.
20141 * src/print.c (print_core, print_actions, print_state)
20142 (print_grammar): Dump to a file instead a `output_obstack'.
20143 (print_results): Dump `output_obstack', and then proceed with the
20145 * src/files.c (compute_output_file_names, close_files): New.
20146 (output_files): Adjust.
20147 * src/main.c (main): Adjust.
20149 2001-09-23 Marc Autret <autret_m@epita.fr>
20151 * src/files.c (compute_header_macro): Computes header macro name
20152 from spec_defines_file when given.
20154 2001-09-23 Marc Autret <autret_m@epita.fr>
20156 * src/files.c (output_files): Add default extensions.
20158 2001-09-22 Akim Demaille <akim@epita.fr>
20160 * src/conflicts.c (finalize_conflicts): Rename as...
20161 (free_conflicts): this.
20163 2001-09-22 Akim Demaille <akim@epita.fr>
20165 * src/gram.c (gram_free): Rename back as...
20167 (output_token_translations): Free `token_translations'.
20168 * src/symtab.c (free_symtab): Free the tag field.
20170 2001-09-22 Akim Demaille <akim@epita.fr>
20172 Remove `translations' as it is always set to true.
20174 * src/gram.h: Adjust.
20175 * src/reader.c (packsymbols, parse_token_decl): Adjust
20176 * src/print.c (print_grammar): Adjust.
20177 * src/output.c (output_token_translations): Adjust.
20178 * src/lex.c (lex): Adjust.
20179 * src/gram.c: Be sure the set pointers to NULL.
20180 (dummy): Rename as...
20183 2001-09-22 Akim Demaille <akim@epita.fr>
20185 * configure.in: Invoke AM_LIB_DMALLOC.
20186 * src/system.h: Use dmalloc.
20187 * src/LR0.c: Be sure to have pointers initialized to NULL.
20188 (allocate_itemsets): Allocate kernel_items only if needed.
20190 2001-09-22 Akim Demaille <akim@epita.fr>
20192 * configure.in: Bump to 1.29b.
20193 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
20194 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
20195 need xmalloc.c in calc.y.
20198 2001-09-21 Akim Demaille <akim@epita.fr>
20201 * Makefile.maint, config/config.guess, config/config.sub,
20202 * config/missing: Update from masters.
20203 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
20205 * configure.in (ALL_LINGUAS): Add `tr'.
20207 2001-09-21 Akim Demaille <akim@epita.fr>
20209 * tests/Makefile.am (package.m4): Move to...
20210 ($(srcdir)/$(TESTSUITE)): here.
20212 2001-09-20 Akim Demaille <akim@epita.fr>
20214 * src/complain.c: No longer try to be standalone: use system.h.
20215 Don't assume __STDC__ is defined to 1. Just test if it is defined.
20216 * src/complain.h: Likewise.
20217 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
20218 Remove the unused variable `n'.
20219 From Albert Chin-A-Young.
20221 2001-09-18 Marc Autret <autret_m@epita.fr>
20223 * doc/bison.1: Update.
20224 * doc/bison.texinfo (Bison Options): Update --defines and --graph
20226 (Option Cross Key): Update.
20229 2001-09-18 Marc Autret <autret_m@epita.fr>
20231 * tests/regression.at: New test (comment in %union).
20233 2001-09-18 Marc Autret <autret_m@epita.fr>
20235 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
20237 Reported by Keith Browne.
20239 2001-09-18 Marc Autret <autret_m@epita.fr>
20241 * tests/output.at: Add tests for --defines and --graph.
20243 2001-09-18 Marc Autret <autret_m@epita.fr>
20245 * tests/output.at: Removes tests of %{header,src}_extension features.
20247 2001-09-18 Akim Demaille <akim@epita.fr>
20249 * tests/Makefile.am (package.m4): New.
20250 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
20251 (_AT_CHECK_CALC_ERROR): Likewise.
20252 Factor the `, ' part of verbose error messages.
20254 2001-09-18 Marc Autret <autret_m@epita.fr>
20256 * src/getargs.c (longopts): Declare --defines and --graph as options
20257 with optional arguments.
20258 * src/files.h: Add extern declarations.
20259 * src/files.c (spec_graph_file, spec_defines_file): New.
20260 (output_files): Update.
20261 Remove CPP-outed code.
20263 2001-09-18 Marc Autret <autret_m@epita.fr>
20265 Turn off %{source,header}_extension feature.
20267 * src/files.c (compute_exts_from_gf): Update.
20268 (compute_exts_from_src): Update.
20269 (output_files): CPP-out useless code.
20270 * src/files.h: Remove {header,source}_extension extern declarations.
20271 * src/reader.c (parse_dquoted_param): CPP-out.
20272 (parse_header_extension_decl): Remove.
20273 (parse_source_extension_decl): Remove.
20274 (read_declarations): Remove cases tok_{hdrext,srcext}.
20275 * src/lex.c (percent_table): Remove {header,source}_extension entries.
20276 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
20278 2001-09-10 Akim Demaille <akim@epita.fr>
20280 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
20281 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
20282 (AT_CHECK_OUTPUT): this.
20283 Merely check ls' exit status, its output is useless.
20285 2001-09-10 Akim Demaille <akim@epita.fr>
20287 * tests/calc.at: Use m4_match.
20288 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
20290 2001-09-10 Marc Autret <autret_m@epita.fr>,
20291 Akim Demaille <akim@epita.fr>
20293 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
20295 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
20297 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
20298 * src/lex.h: Adjust prototype.
20299 (token_t): Add `tok_undef'.
20300 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
20301 (parse_percent_token): Now returns token_t.
20302 Add default statement in switch.
20303 (lex): Separate `c' as an input variable, from the token_t result
20305 (unlexed): Is a token_t.
20307 2001-09-10 Akim Demaille <akim@epita.fr>
20309 * configure.in: Bump to 1.29a.
20311 2001-09-07 Akim Demaille <akim@epita.fr>
20315 2001-08-30 Akim Demaille <akim@epita.fr>
20317 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
20318 * m4/atconfig.m4: Remove.
20319 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
20320 * tests/bison: New.
20321 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
20322 m4_if, m4_patsubst, and m4_regexp.
20323 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
20324 `input' file instead of echo.
20326 2001-08-29 Akim Demaille <akim@epita.fr>
20330 2001-08-29 Akim Demaille <akim@epita.fr>
20334 2001-08-29 Paul Eggert <eggert@twinsun.com>
20336 * src/bison.simple (yyparse): Don't take the address of an
20337 item before the start of an array, as that doesn't conform to
20340 2001-08-29 Robert Anisko <anisko_r@epita.fr>
20342 * doc/bison.texinfo (Location Tracking Calc): New node.
20344 2001-08-29 Paul Eggert <eggert@twinsun.com>
20346 * src/output.c (output): Do not define const, as this now
20347 causes more problems than it cures.
20349 2001-08-29 Akim Demaille <akim@epita.fr>
20351 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
20353 Be sure to tag the `detailmenu'.
20355 2001-08-29 Akim Demaille <akim@epita.fr>
20357 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
20358 download in a tmp dir.
20360 2001-08-28 Marc Autret <autret_m@epita.fr>
20362 * config/depcomp: New file.
20364 2001-08-28 Marc Autret <autret_m@epita.fr>
20366 * doc/bison.1 (mandoc): Adjust.
20367 From Juan Manuel Guerrero.
20369 2001-08-28 Marc Autret <autret_m@epita.fr>
20371 * src/print_graph.c (print_state): Fix.
20373 2001-08-27 Marc Autret <autret_m@epita.fr>
20375 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
20377 Echo modifications to the functions prototypes.
20378 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
20380 2001-08-27 Marc Autret <autret_m@epita.fr>
20382 * src/vcg.c: Include `xalloc.h'.
20383 (add_colorentry): New.
20384 (add_classname): New.
20385 (add_infoname): New.
20386 * src/vcg.h: Add new prototypes.
20388 2001-08-27 Akim Demaille <akim@epita.fr>
20390 * Makefile.maint: Sync. again with CVS Autoconf.
20392 2001-08-27 Akim Demaille <akim@epita.fr>
20394 * Makefile.maint: Formatting changes.
20395 (po-update, cvs-update, update): New targets.
20398 2001-08-27 Akim Demaille <akim@epita.fr>
20400 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
20401 * Makefile.maint: Sync. with CVS Autoconf.
20403 2001-08-27 Marc Autret <autret_m@epita.fr>
20405 * src/vcg.h (struct infoname_s): New.
20406 (struct colorentry_s): New.
20407 (graph_s): New fields {vertical,horizontal}_order in structure.
20408 Add `infoname' field.
20409 Add `colorentry' field;
20410 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
20411 (G_HORIZONTAL_ORDER): New.
20413 (G_COLORENTRY): New.
20414 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
20415 Add output of `infoname'.
20416 Add output of `colorentry'.
20418 2001-08-27 Marc Autret <autret_m@epita.fr>
20420 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
20421 This one shadowed a global parameter.
20423 2001-08-24 Marc Autret <autret_m@epita.fr>
20425 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
20426 instead of `unsigned'.
20427 (print_state): Do not call obstack_object_size () in obstack_grow ()
20428 to avoid macro variables shadowing.
20430 2001-08-23 Marc Autret <autret_m@epita.fr>
20432 * src/lex.c (percent_table): Typo: s/naem/name/.
20434 Normalize new options declarations.
20436 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
20438 * tests/suite.at: Exercise %header_extension and %source_extension.
20440 2001-08-16 Marc Autret <autret_m@epita.fr>
20442 * src/reader.c (parse_dquoted_param): New.
20443 (parse_header_extension_decl): Use it.
20444 (parse_source_extension_decl): Likewise.
20446 2001-08-16 Marc Autret <autret_m@epita.fr>
20448 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
20449 (get_xxxx_str): Use assert () instead of complain ().
20450 Remove return invokations in default cases.
20451 (get_decision_str): Modify default behaviour. Remove second argument.
20452 Echo modifications on calls.
20453 (output_graph): Fix.
20455 2001-08-16 Marc Autret <autret_m@epita.fr>
20457 * src/getargs.c (usage): Update with ``-g, --graph''.
20459 2001-08-16 Marc Autret <autret_m@epita.fr>
20461 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
20462 (Option Cross Key): Likewise.
20463 * doc/bison.1: Update.
20465 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
20467 * src/output.c (output_master_parser): Don't finish action_obstack.
20468 (output_parser): Don't care about the muscle action, here.
20469 (prepare): Copy the action_obstack in the action muscle.
20470 (output): Free action_obstack.
20472 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
20474 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
20475 will contain `%union' declaration.
20476 (parse_union_decl): Delete #line directive output.
20477 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
20478 informations about %union.
20479 (parse_union_decl): Copy the union_obstack in the muscle stype.
20480 * src/bison.simple: Add new #line directive.
20481 Add typdef %%stype YYSTYPE.
20483 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
20485 * src/bison.simple: Add new `#line' directive.
20487 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
20489 * src/bison.simple: New `#line' directive.
20490 * src/output.c (output_parser): Support new dynamic muscle input_line.
20492 2001-09-22 Marc Autret <autret_m@epita.fr>
20494 * src/output.c (output_master_parser): New.
20495 (output_parser): Be more re-entrant.
20497 2001-09-21 Marc Autret <autret_m@epita.fr>
20499 * src/reader.c (copy_definition, parse_union_decl): Update and use
20501 (copy_action): Likewise.
20502 Use obstack_1grow ().
20503 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
20505 2001-09-21 Marc Autret <autret_m@epita.fr>
20507 * src/options.c (option_table): Adjust.
20508 * src/lex.c (parse_percent_token): Fix.
20510 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
20512 * src/options.c (symtab.h): Include it, need by lex.h.
20514 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
20516 * src/lex.c (parse_percent_token): Change type of variable `tx', which
20517 is now an option_table_struct*.
20518 (option_strcmp): New function option_strcmp.
20519 (parse_percent_token): Call option_strcmp.
20520 * src/getargs.c (xalloc.h, options.h): Include it.
20521 (getargs): Call create_long_option_table.
20522 (getargs): Free longopts at the end of the function.
20523 (shortopts): Move in options.c.
20524 * src/options.c (create_long_option_table): New function. Convert
20525 information from option_table to option structure.
20526 * src/reader.c (options.h): Include it.
20528 * src/Makefile.am: Adjust.
20529 * src/options.c (option_table): Create from longopts and percent_table.
20530 * src/getargs.c (longopts): Delete.
20531 * src/lex.c (struct percent_table_struct): Delete.
20532 (percent_table): Delete.
20533 (options.h): Include it.
20534 * src/options.c: Create.
20535 * src/options.h: Create.
20536 Declare enum opt_access_e.
20537 Define struct option_table_struct.
20539 2001-09-20 Marc Autret <autret_m@epita.fr>
20541 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
20544 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
20546 * src/bison.simple: s/%%filename/%%skeleton.
20547 * src/muscle_tab.c (getargs.h): Include it.
20548 (muscle_init): Insert new muscle skeleton.
20550 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
20552 * src/output.c (output_parser): Delete unused variable actions_dumped.
20554 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
20556 * src/output.c (output): Delete call to reader_output_yylsp.
20557 * src/reader.c (reader): Likewise.
20558 * src/reader.h: Delete declaration of reader_output_yylsp.
20560 2001-09-02 Marc Autret <autret_m@epita.fr>
20562 * src/reader.c: Include muscle_tab.h.
20563 (parse_union_decl): Update.
20564 (parse_macro_decl): Rename parse_muscle_decl.
20565 Update to use renamed functions and variable.
20566 (read_declarations, copy_action, read_additionnal_code, : Updated
20567 with correct variables and functions names.
20568 (packsymbols, reader): Likewise.
20570 * src/reader.h (muscle_obstack): Extern declaration update.
20572 * src/output.c: Include muscle_tab.h
20573 In all functions using macro_insert, change by using muscle_insert ().
20574 (macro_obstack): Rename muscle_obstack.
20575 Echo modifications in the whole file.
20576 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
20577 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
20578 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
20580 * src/muscle_tab.h: Update double inclusion macros.
20581 (macro_entry_s): Rename muscle_entry_s.
20584 * src/muscle_tab.c: Include muscle_tab.h.
20585 Rename macro_tabble to muscle_table.
20586 (mhash1, mhash2, mcmp): Use muscle_entry.
20587 (macro_init): Rename muscle_init. Update.
20588 (macro_insert): Rename muscle_insert. Update.
20589 (macro_find): Rename muscle_find. Update.
20591 * src/main.c: Include muscle_tab.h.
20592 (main): Call muscle_init ().
20593 * src/Makefile.am (bison_SOURCES): Echo modifications.
20595 2001-09-02 Marc Autret <autret_m@epita.fr>
20597 Now the files macro_tab.[ch] are named muscle_tab.[ch].
20599 * src/muscle_tab.c, src/muscle_tab.h: Add files.
20601 2001-09-02 Marc Autret <autret_m@epita.fr>
20603 * src/macrotab.c, src/macrotab.h: Remove.
20605 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
20607 * src/reader.c (copy_guard): Use muscle to specify the `#line'
20610 2001-09-01 Marc Autret <autret_m@epita.fr>
20612 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
20613 to an explicit value to activate the feature. We do it here.
20615 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20617 * src/output.c (prepare): Delete the `filename' muscule insertion.
20618 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
20619 (parse_union_decl): Likewise.
20620 * src/macrotab.c (macro_init): Initialize filename by infile.
20622 2001-08-31 Marc Autret <autret_m@epita.fr>
20624 * src/bison.simple (YYLSP_NEEDED): New definition.
20625 * src/output.c (prepare): Add macro insertion of `locations_flag'
20627 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20629 * src/output.c (prepare): Delete insertion of previous muscles,
20630 and insert the `prefix' muscles.
20631 * src/macrotab.c (macro_init): Likewise.
20632 (macro_init): Initialization prefix directive by `yy'.
20633 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
20634 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
20635 yylval, yydebug, yyerror, yynerrs and yyparse.
20636 New directive `#define' to substitute yydebug, ... with option
20639 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20641 * src/main.c (main): Standardize.
20642 * src/output.c (output_table_data, output_parser): Likewise.
20643 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
20645 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
20647 * src/reader.c (read_additionnal_code): Rename %%user_code to
20649 * src/output.c (output): Rename %%declarations to %%prologue.
20650 * src/bison.simple: Echo modifications.
20652 2001-08-31 Marc Autret <autret_m@epita.fr>
20654 * src/reader.c (readgram): CleanUp.
20655 (output_token_defines): Likewise.
20656 (packsymbols): Likewise.
20657 (reader): Likewise.
20658 * src/output.c (output): CPP-out useless code.
20660 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
20662 * src/reader.c (reader): Delete obsolete call to function
20663 output_trailers and output_headers.
20664 * src/output.h: Remove obsolete functions prototypes of output_headers
20665 and output_trailers.
20667 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
20669 * src/main.c: Include macrotab.h.
20670 * src/macrotab.h (macro_entry_s): Constify fields.
20671 Adjust functions prototypes.
20672 * src/macrotab.c (macro_insert): Constify key and value.
20673 (macro_find): Constify key.
20674 (macro_insert): Include 'xalloc.h'
20675 (macro_insert): Use XMALLOC.
20676 (macro_find): Constify return value.
20677 * src/output.c (output_table_data): Rename table to table_data.
20678 (output_parser): Constify macro_key, macro_value.
20680 2001-08-30 Marc Autret <autret_m@epita.fr>
20682 * src/reader.c (parse_skel_decl): New.
20683 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
20684 * src/lex.h (token_t): New token `tok_skel'.
20685 * src/lex.c (percent_table): Add skeleton option entry.
20688 2001-08-29 Marc Autret <autret_m@epita.fr>
20690 * src/bison.simple: Add %%user_code directive at the end.
20691 * src/reader.c (read_additionnal_code): New.
20693 * src/output.c (output_program): Remove.
20696 2001-08-28 Marc Autret <autret_m@epita.fr>
20698 * src/output.c (output_actions): Clean up.
20699 (output_gram): CPP-out useless code.
20700 * src/reader.c (reader): Clean up, CPP-out useless code.
20702 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
20704 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
20706 * src/bison.simple: Add `%%definitions'.
20708 2001-08-28 Marc Autret <autret_m@epita.fr>
20710 * config/depcomp: New file.
20712 2001-08-27 Paul Eggert <eggert@twinsun.com>
20714 * src/bison.simple (yyparse): Don't take the address of an
20715 item before the start of an array, as that doesn't conform to
20718 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
20720 * src/output.c (output): Remove the initialization of the macro
20721 obstack. It was done too late here.
20723 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
20725 (reader): Initialize the macro obstack here, since we need it to grow
20726 '%define' directives.
20728 * src/reader.h: Declare the macro obstack as extern.
20730 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
20732 * src/output.c (output_parser): Fix. Store single '%' characters in
20733 the output obstack instead of throwing them away.
20735 2001-08-27 Akim Demaille <akim@epita.fr>
20737 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
20739 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20741 * lib/Makefile.am: Adjust.
20743 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20745 * src/bison.simple: Update and add '%%' directives.
20747 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20749 * src/reader.c (reader): Remove calls to 'output_headers' and
20750 'output_trailers'. Remove some C output.
20751 (readgram): Disable a piece of code that was writing a default
20752 definition for 'YYSTYPE'.
20753 (reader_output_yylsp): Remove.
20754 (packsymbols): Output token defintions to a macro.
20755 (copy_definition): Disable C output.
20757 * src/reader.c (parse_macro_decl): New function used to parse macro
20759 (copy_string2): Put the body of copy_string into this new function.
20760 Add a parameter to let the caller choose whether he wants to copy the
20761 string delimiters or not.
20762 (copy_string): Be a simple call to copy_string2 with the last argument
20764 (read_declarations): Add case for macro definition.
20765 (copy_identifier): New.
20766 (parse_macro_decl): Read macro identifiers using copy_identifier
20769 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20771 * src/output.c (prepare): Add prefixed names.
20772 (output_parser): Output semantic actions.
20773 (output_parser): Fix bug on '%%line' directives.
20775 * src/output.c (output_headers): Remove. The C code printed by this
20776 function should now be in the skeletons.
20777 (output_trailers): Remove.
20778 (output): Disable call to 'reader_output_yylsp'.
20779 (output_rule_data): Do not output tables to the table obstack.
20781 * src/output.c: Remove some C dedicated output.
20782 Improve the use of macro and output obstacks.
20783 (output_defines): Remove.
20785 * src/output.c (output_token_translations): Associate 'translate'
20786 table with a macro. No output to the table obstack.
20787 (output_gram): Same for 'rhs' and 'prhs'.
20788 (output_stos): Same for 'stos'.
20789 (output_rule_data): Same for 'r1' and 'r2'.
20790 (token_actions): Same for 'defact'.
20791 (goto_actions): Same for 'defgoto'.
20792 (output_base): Same for 'pact' and 'pgoto'.
20793 (output_table): Same for 'table'.
20794 (output_check): Same for 'check'.
20796 * src/output.c (output_table_data): New function.
20797 (output_short_table): Remove.
20798 (output_short_or_char_table): Remove.
20800 * src/output.c (output_parser): Replace most of the skeleton copy code
20801 with something new. Skeletons are now processed character by character
20802 rather than line by line, and Bison looks for '%%' macros. This is the
20803 first step in making Bison's output process (a lot) more flexible.
20804 (output_parser): Use the macro table.
20806 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20808 * src/main.c (main): Initialize the macro table.
20810 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20812 * src/lex.c (percent_table): Add tok_define.
20813 * src/lex.h: Add tok_define.
20815 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20817 * src/macrotab.c: New file.
20818 * src/macrotab.h: New file.
20819 * src/Makefile.am: Update.
20821 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
20823 * lib/hash.c: New file.
20824 * lib/hash.h: New file.
20825 * lib/Makefile.am: Update.
20827 2001-08-15 Akim Demaille <akim@epita.fr>
20831 2001-08-15 Marc Autret <autret_m@epita.fr>
20833 * src/reader.c (readgram): Indent output macro YYSTYPE.
20834 (packsymbols): Likewise.
20835 (output_token_defines): Likewise.
20836 * src/files.c: Standardize.
20837 (compute_header_macro): New.
20838 (defines_obstack_save): New. Use compute_header_macro.
20839 (output_files): Update. Use defines_obstack_save.
20841 2001-08-15 Akim Demaille <akim@epita.fr>
20843 * doc/bison.texinfo (Table of Symbols): Document
20844 YYSTACK_USE_ALLOCA.
20846 2001-08-15 Akim Demaille <akim@epita.fr>
20848 * missing: Update from CVS Automake.
20849 * config/config.guess, config/config.sub, config/texinfo.tex:
20850 Update from gnu.org.
20852 2001-08-15 Akim Demaille <akim@epita.fr>
20854 * Makefile.maint: Sync with CVS Autoconf.
20856 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
20858 * doc/bison.texinfo: Include GNU Free Documentation License from
20860 * doc/fdl.texi: Add to package.
20862 2001-08-14 Marc Autret <autret_m@epita.fr>
20864 Turn on %{source,header}_extension features.
20866 * src/lex.c (percent_table): Un-CPP out header_extension and
20868 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
20869 (compute_exts_from_src): Remove conditions. It restores priorities
20872 2001-08-14 Marc Autret <autret_m@epita.fr>
20874 * src/files.c (compute_base_names): Add extensions computing when
20875 `--file-prefix' used.
20876 Standardize function calls.
20878 2001-08-13 Marc Autret <autret_m@epita.fr>
20880 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
20881 defining it (defined but null disables alloca).
20883 2001-08-13 Marc Autret <autret_m@epita.fr>
20885 * src/bison.simple (_yy_memcpy): CPP reformat.
20887 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
20889 * tests/atconfig.in (CPPFLAGS): Fix.
20891 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
20893 * doc/bison.texinfo: Include GNU General Public License from
20895 * doc/gpl.texi: Add to package.
20897 2001-08-10 Marc Autret <autret_m@epita.fr>
20899 * src/print_graph.h: Fix.
20900 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
20902 2001-08-10 Akim Demaille <akim@epita.fr>
20904 * src/system.h: Provide default declarations for stpcpy, strndup,
20907 2001-08-10 Robert Anisko <anisko_r@epita.fr>
20909 * doc/bison.texinfo (Locations): Update @$ stuff.
20911 2001-08-09 Robert Anisko <anisko_r@epita.fr>
20913 * src/bison.simple (YYLLOC_DEFAULT): Update.
20916 2001-08-08 Marc Autret <autret_m@epita.fr>
20918 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
20919 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
20920 Reported by Fabrice Bauzac.
20922 2001-08-08 Marc Autret <autret_m@epita.fr>
20924 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
20925 * src/vcg.c (output_node): Fix.
20926 * src/vcg.h: Cleanup.
20927 * src/print_graph.c: Add comments.
20928 (node_output_size): New global variable. Simplify the formatting of
20929 the VCG graph output.
20930 (print_actions): Unused code is now used. It notifies the final state
20931 and no action states in the VCG graph. It also give the reduce actions.
20932 The `shift and goto' edges are red and the `go to state' edges are
20934 Get the current node name and node_obstack by argument.
20935 (node_obstack): New variable.
20936 (print_state): Manage node_obstack.
20937 (print_core): Use node_obstack given by argument.
20938 A node is not only computed here but in print_actions also.
20939 (print_graph): CPP out useless code instead of commenting it.
20941 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
20943 * tests/atconfig.in (CPPFLAGS): Fix.
20945 2001-08-07 Akim Demaille <akim@epita.fr>
20947 * src/print_graph.c (quote): New.
20948 (print_core): Use it.
20950 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
20952 * src/vcg.c (complain.h): Include it.
20953 Unepitaize `return' invocations.
20954 [NDEBUG] (main): Remove.
20955 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
20956 * src/files.c (open_files): Initialize graph_obstack.
20957 * src/print_graph.c (print_actions): CPP out useless code.
20958 (print_core): Don't output the last `\n' in labels.
20960 * src/files.c (output_files): Output the VCG file.
20961 * src/main.c (main): Invoke print_graph ();
20963 2001-08-06 Marc Autret <autret_m@epita.fr>
20965 Automaton VCG graph output.
20966 Using option ``-g'' or long option ``--graph'', you can generate
20967 a gram_filename.vcg file containing a VCG description of the LALR (1)
20968 automaton of your grammar.
20970 * src/main.c: Call to print_graph() function.
20971 * src/getargs.h: Update.
20972 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
20973 (graph_flag): New flag.
20974 (longopts): Update.
20975 (getargs): Add case `g'.
20976 * src/files.c (graph_obstack): New obstack struct.
20977 (open_files): Initialize new obstack.
20978 (output_files): Saves graph_obstack if required.
20979 * src/files.h (graph_obstack): New extern declaration.
20980 * src/Makefile.am: Add new source files.
20982 2001-08-06 Marc Autret <autret_m@epita.fr>
20984 * src/print_graph.c, src/print_graph.h (graph): New.
20985 * src/vcg.h: New file.
20986 * src/vcg.c: New file, VCG graph handling.
20988 2001-08-06 Marc Autret <autret_m@epita.fr>
20990 Add of %source_extension and %header_extension which specify
20991 the source or/and the header output file extension.
20993 * src/files.c (compute_base_names): Remove initialisation of
20994 src_extension and header_extension.
20995 (compute_exts_from_gf): Update.
20996 (compute_exts_from_src): Update.
20997 (output_files): Update.
20998 * src/reader.c (parse_header_extension_decl): New.
20999 (parse_source_extension_decl): New.
21000 (read_declarations): New case statements for the new tokens.
21001 * src/lex.c (percent_table): Add entries for %source_extension
21002 and %header_extension.
21003 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
21005 2001-08-06 Marc Autret <autret_m@epita.fr>
21007 * configure.in: Bump to 1.28c.
21008 * doc/bison.texinfo: Texinfo thingies.
21010 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
21012 * tests/atconfig.in (CPPFLAGS): Add.
21013 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
21015 2001-08-03 Akim Demaille <akim@epita.fr>
21019 2001-08-03 Akim Demaille <akim@epita.fr>
21021 * tests/Makefile.am (check-local): Ship testsuite.
21022 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
21023 Include `string.h'.
21025 2001-08-03 Akim Demaille <akim@epita.fr>
21027 * configure.in: Try using -Wformat when compiling.
21029 2001-08-03 Akim Demaille <akim@epita.fr>
21031 * configure.in: Bump to 1.28b.
21033 2001-08-03 Akim Demaille <akim@epita.fr>
21035 * src/complain.c: Adjust strerror_r portability issues.
21037 2001-08-03 Akim Demaille <akim@epita.fr>
21041 2001-08-03 Akim Demaille <akim@epita.fr>
21043 * src/getargs.c, src/getarg.h (skeleton)): Constify.
21044 * src/lex.c (literalchar): Avoid name clashes on `buf'.
21045 * src/getargs.c: Include complain.h.
21046 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
21047 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
21049 2001-08-03 Akim Demaille <akim@epita.fr>
21051 * src/reader.c (readgram): Display hidden chars in error messages.
21053 2001-08-03 Akim Demaille <akim@epita.fr>
21055 Update to gettext 0.10.39.
21057 2001-08-03 Akim Demaille <akim@epita.fr>
21059 * lib/strspn.c: New.
21061 2001-08-01 Marc Autret <autret_m@epita.fr>
21063 * doc/bison.texinfo: Update.
21064 * doc/bison.1 (mandoc): Update.
21065 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
21066 * src/files.c: Support output files extensions computing.
21067 (src_extension): New static variable.
21068 (header_extension): New static variable.
21069 (tr): New function.
21070 (get_extension_index): New function, gets the index of an extension
21071 filename in a string.
21072 (compute_exts_from_gf): New function, computes extensions from the
21073 grammar file extension.
21074 (compute_exts_from_src): New functions, computes extensions from the
21075 C source file extension, file given by ``-o'' option.
21076 (compute_base_names): Update.
21077 (output_files): Update.
21079 2001-08-01 Robert Anisko <anisko_r@epita.fr>
21081 * doc/bison.texi: Document @$.
21082 (Locations): New section.
21084 2001-07-18 Akim Demaille <akim@epita.fr>
21086 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
21087 * config/prev-version.txt, config/move-if-change: New.
21088 * Makefile.am: Adjust.
21090 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
21092 * src/bison.simple (yyparse): Suppress warning `comparaison
21093 between signed and unsigned'.
21095 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
21097 * src/getargs.h (raw_flag): Remove.
21098 * src/getargs.c: Die on `-r'/`--raw'.
21099 * src/lex.c (parse_percent_token): Die on `%raw'.
21100 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
21101 * tests/calc.at: Suppress test with option `--raw'.
21103 2001-07-14 Akim Demaille <akim@epita.fr>
21106 * configure.in: Require Autoconf 2.50.
21107 Update to gettext 0.10.38.
21109 2001-03-16 Akim Demaille <akim@epita.fr>
21111 * doc/bison.texinfo: ANSIfy the examples.
21113 2001-03-16 Akim Demaille <akim@epita.fr>
21115 * getargs.c (skeleton): New variable.
21116 (longopts): --skeleton is a new option.
21117 (shortopts, getargs): -S is a new option.
21118 * getargs.h: Declare skeleton.
21119 * output.c (output_parser): Use it.
21121 2001-03-16 Akim Demaille <akim@epita.fr>
21123 * m4/strerror_r.m4: New.
21124 * m4/error.m4: Run AC_FUNC_STRERROR_R.
21125 * lib/error.h, lib/error.c: Update.
21127 2001-03-16 Akim Demaille <akim@epita.fr>
21129 * src/getargs.c (longopts): Clean up.
21131 2001-02-21 Akim Demaille <akim@epita.fr>
21133 * src/reader.c (gensym): `gensym_count' is your own.
21134 Use a static buf to create the symbol name, as token_buffer is no
21137 2001-02-08 Akim Demaille <akim@epita.fr>
21139 * src/conflicts.c (conflict_report): Be sure not to append to res
21140 between two calls, which could happen if both first sprintf were
21141 skipped, but not the first cp += strlen.
21143 2001-02-08 Akim Demaille <akim@epita.fr>
21145 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
21146 New, from fileutils 4.0.37.
21147 * configure.in: Require Autoconf 2.49c. I took some time before
21148 making this decision. This is the only way out for portability
21149 issues in Bison, it would mean way too much duplicate effort to
21150 import in Bison features implemented in 2.49c since 2.13.
21151 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
21153 2001-02-02 Akim Demaille <akim@epita.fr>
21155 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
21156 * lib/xalloc.h, lib/xmalloc.c: Update.
21158 2001-01-19 Akim Demaille <akim@epita.fr>
21160 Get rid of the ad hoc handling of token_buffer in the scanner: use
21163 * src/lex.c (token_obstack): New.
21164 (init_lex): Initialize it. No longer call...
21165 (grow_token_buffer): this. Remove it.
21166 Adjust all the places which used it to use the obstack.
21168 2001-01-19 Akim Demaille <akim@epita.fr>
21170 * src/lex.h: Rename all the tokens:
21171 s/\bENDFILE\b/tok_eof/g;
21172 s/\bIDENTIFIER\b/tok_identifier/g;
21174 Let them be enums, not #define, to ease debugging.
21175 Adjust all the code.
21177 2001-01-18 Akim Demaille <akim@epita.fr>
21179 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
21180 * src/lex.c (maxtoken, grow_token_buffer): Static.
21182 2001-01-18 Akim Demaille <akim@epita.fr>
21184 Since we now use obstacks, more % directives can be enabled.
21186 * src/lex.c (percent_table): Also accept `%yacc',
21187 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
21189 Handle the actions for `%semantic_parser' and `%pure_parser' here,
21190 instead of returning a token.
21191 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
21192 * src/reader.c (read_declarations): Adjust.
21193 * src/files.c (open_files): Don't call `compute_base_names', don't
21194 compute `attrsfile' since they depend upon data which might be
21195 *in* the input file now.
21196 (output_files): Do it here.
21197 * src/output.c (output_headers): Document the fact that this patch
21198 introduces a guaranteed SEGV for semantic parsers.
21199 * doc/bison.texinfo: Document them.
21200 * tests/suite.at: Exercise these %options.
21202 2000-12-20 Akim Demaille <akim@epita.fr>
21204 Also handle the output file (--verbose) with obstacks.
21206 * files.c (foutput): Remove.
21207 (output_obstack): New.
21208 Adjust all dependencies.
21209 * src/conflicts.c: Return a string.
21210 * src/system.h (obstack_grow_string): Rename as...
21211 (obstack_sgrow): this. Be ready to work with non literals.
21212 (obstack_fgrow4): New.
21214 2000-12-20 Akim Demaille <akim@epita.fr>
21216 * src/files.c (open_files): Fix the computation of short_base_name
21217 in the case of `-o foo.tab.c'.
21219 2000-12-20 Akim Demaille <akim@epita.fr>
21221 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
21222 (copy_dollar): Now that everything uses obstacks, get rid of the
21225 2000-12-20 Akim Demaille <akim@epita.fr>
21227 * src/files.c (open_files): Actually the `.output' file is based
21228 on the short_base_name, not base_name.
21229 * tests/suite.at (Checking output file names): Adjust.
21231 2000-12-20 Akim Demaille <akim@epita.fr>
21233 * src/bison.s1: Remove, we now use directly...
21234 * src/bison.simple: this.
21235 * src/Makefile.am: Use pkgdata instead of data.
21237 2000-12-20 Akim Demaille <akim@epita.fr>
21239 * src/files.c (guard_obstack): New.
21240 (open_files): Initialize it.
21241 (output_files): Dump it...
21242 * src/files.h: Export it.
21243 * src/reader.c (copy_guard): Use it.
21245 2000-12-19 Akim Demaille <akim@epita.fr>
21247 * src/files.c (outfile, defsfile, actfile): Removed as global
21249 (open_files): Don't compute them.
21250 (output_files): Adjust.
21251 (base_name, short_base_name): Be global.
21252 Adjust dependencies.
21254 2000-12-19 Akim Demaille <akim@epita.fr>
21256 * src/files.c (strsuffix): New.
21257 (stringappend): Be just like strcat but allocate.
21258 (base_names): Eve out from open_files.
21259 Try to simplify the rather hairy computation of base_name and
21261 (open_files): Use it.
21262 * tests/suite.at (Checking output file names): New test.
21264 2000-12-19 Akim Demaille <akim@epita.fr>
21266 * src/system.h (obstack_grow_literal_string): Rename as...
21267 (obstack_grow_string): this.
21268 * src/output.c (output_parser): Recognize `%% actions' instead of
21270 * src/bison.s1: s/$/%% actions/.
21271 * src/bison.hairy: Likewise.
21273 2000-12-19 Akim Demaille <akim@epita.fr>
21275 * src/output.c (output_parser): Compute the `#line' lines when
21277 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
21278 Suggested by Hans Aberg.
21280 2000-12-19 Akim Demaille <akim@epita.fr>
21282 Let the handling of the skeleton files be local to the procedures
21285 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
21287 (fparser, open_extra_files): Remove.
21288 (open_files, output_files): Don't take care of fparser.
21289 * src/files.h: Adjust.
21290 * src/output.c (output_parser): Open and close the file to the
21292 * src/reader.c (read_declarations): When %semantic_parser, open
21295 2000-12-19 Akim Demaille <akim@epita.fr>
21297 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
21298 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
21300 2000-12-19 Akim Demaille <akim@epita.fr>
21302 * src/files.c (open_files): Yipee! We no longer need all the code
21303 looking for `/tmp' since we have no tmp file.
21305 2000-12-19 Akim Demaille <akim@epita.fr>
21307 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
21309 * src/files.c (open_files): Less dependency on MSDOS etc.
21311 2000-12-14 Akim Demaille <akim@epita.fr>
21313 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
21314 Provide a default definition.
21315 Use it when executing the default @ action.
21316 * src/reader.c (reader_output_yylsp): No longer include
21317 `timestamp' and `text' in the default YYLTYPE.
21319 2000-12-12 Akim Demaille <akim@epita.fr>
21321 * src/reader.c (copy_definition, parse_union_decl, copy_action)
21322 (copy_guard): Quote the file names.
21323 Reported by Laurent Mascherpa.
21325 2000-12-12 Akim Demaille <akim@epita.fr>
21327 * src/output.c (output_headers, output_program, output): Be sure
21328 to escape special characters when outputting filenames.
21329 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
21330 (output_headers): Don't depend on them, Use ACTSTR.
21332 2000-11-17 Akim Demaille <akim@epita.fr>
21334 * lib/obstack.h: Formatting changes.
21335 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
21336 prevents type checking.
21337 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
21338 cast the value to (void *): assigning a `foo *' to a `void *'
21340 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
21341 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
21344 2000-11-17 Akim Demaille <akim@epita.fr>
21346 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
21348 (suite.m4, regression.m4, calc.m4): these.
21349 * tests/atgeneral.m4: Update from CVS Autoconf.
21351 2000-11-17 Akim Demaille <akim@epita.fr>
21353 * tests/regression.m4 (%union and --defines): New test,
21354 demonstrating a current bug in the obstack implementation.
21356 2000-11-17 Akim Demaille <akim@epita.fr>
21358 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
21360 Use them to declare the variables which are global or local to
21363 2000-11-17 Akim Demaille <akim@epita.fr>
21365 * acconfig.h: Remove, no longer used.
21367 2000-11-07 Akim Demaille <akim@epita.fr>
21369 * src: s/Copyright (C)/Copyright/g.
21371 2000-11-07 Akim Demaille <akim@epita.fr>
21373 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
21375 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
21377 2000-11-07 Akim Demaille <akim@epita.fr>
21379 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
21380 Merge in a single CPP if/else.
21382 2000-11-07 Akim Demaille <akim@epita.fr>
21384 * src/output.c (output): Remove useless variables.
21385 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
21386 argument `data' for consistency with the prototypes.
21387 Qualify it `const'.
21388 (obstack_copy, obstack_copy0): Rename the second argument as
21389 `address' for consistency. Qualify it `const'.
21390 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
21391 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
21392 `const' their input argument (`data' or `address').
21393 Adjust the corresponding macros to include `const' in casts.
21395 2000-11-03 Akim Demaille <akim@epita.fr>
21397 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
21398 s/PFILE1/BISON_HAIRY/.
21399 Adjust dependencies.
21401 2000-11-03 Akim Demaille <akim@epita.fr>
21403 For some reason, this was not applied.
21405 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
21406 `unlink': it's no longer used.
21408 2000-11-03 Akim Demaille <akim@epita.fr>
21410 * src/files.c (skeleton_find): New function, eved out of...
21411 (open_files, open_extra_files): here.
21413 2000-11-03 Akim Demaille <akim@epita.fr>
21415 Don't use `atexit'.
21417 * src/files.c (obstack_save): New function.
21418 (done): Rename as...
21419 (output_files): this.
21420 Use `obstack_save'.
21421 * src/main.c (main): Don't use `atexit' to register `done', since
21422 it no longer has to remove tmp files, just call `output_files'
21423 when there are no errors.
21425 2000-11-02 Akim Demaille <akim@epita.fr>
21427 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
21428 `unlink': it's no longer used.
21429 * src/files.h: Formatting changes.
21431 2000-11-02 Akim Demaille <akim@epita.fr>
21433 Remove the last uses of mktemp and unlink/delete.
21435 * src/files.c (fdefines, ftable): Removed.
21436 (defines_ostack, table_obstack): New.
21437 Adjust dependencies of the former into uses of the latter.
21438 * src/output.c (output_short_or_char_table, output_short_table):
21439 Convert to using obstacks.
21440 * src/reader.c (copy_comment2): Accept one FILE * and two
21442 (output_token_defines, reader_output_yylsp): Use obstacks.
21443 * src/system.h (obstack_fgrow3): New.
21444 * po/POTFILES.in: Adjust.
21446 2000-11-01 Akim Demaille <akim@epita.fr>
21448 Change each use of `fattrs' into a use of `attrs_obstack'.
21450 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
21451 * src/files.c (fattrs): Remove.
21452 (attrs_obstack): New.
21453 Adjust all dependencies.
21454 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
21456 2000-11-01 Akim Demaille <akim@epita.fr>
21458 Introduce obstacks.
21459 Change each use of `faction' into a use of `action_obstack'.
21461 * lib/obstack.h, lib/obstack.c: New files.
21462 * src/files.c (faction): Remove.
21463 (action_obstack): New.
21464 Adjust all dependencies.
21466 2000-10-20 Akim Demaille <akim@epita.fr>
21468 * lib/quote.h (PARAMS): New macro. Use it.
21470 2000-10-16 Akim Demaille <akim@epita.fr>
21472 * src/output.c (output_short_or_char_table): New function.
21473 (output_short_table, output_token_translations): Use it.
21474 (goto_actions): Use output_short_table.
21476 2000-10-16 Akim Demaille <akim@epita.fr>
21478 * src/symtab.c (bucket_new): New function.
21481 * src/output.c (output_short_table): New argument to display the
21482 comment associated with the table.
21483 Adjust dependencies.
21484 (output_gram): Use it.
21485 (output_rule_data): Nicer output layout for YYTNAME.
21487 2000-10-16 Akim Demaille <akim@epita.fr>
21489 * src/lex.c (read_typename): New function.
21491 * src/reader.c (copy_dollar): Likewise.
21493 2000-10-16 Akim Demaille <akim@epita.fr>
21495 * src/reader.c (copy_comment2): Expect the input stream to be on
21496 the `/' which is suspected to open a comment, instead of being
21497 called after `//' or `/*' was read.
21498 (copy_comment, copy_definition, parse_union_decl, copy_action)
21499 (copy_guard): Adjust.
21501 2000-10-16 Akim Demaille <akim@epita.fr>
21503 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
21504 `read_signed_integer'.
21506 2000-10-16 Akim Demaille <akim@epita.fr>
21508 * src/reader.c (copy_dollar): New function.
21509 (copy_guard, copy_action): Use it.
21511 2000-10-16 Akim Demaille <akim@epita.fr>
21513 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
21514 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
21515 New files, from Fileutils 4.0.27.
21516 * src/main.c (printable_version): Remove.
21517 * src/lex.c, src/reader.c: Use `quote'.
21519 2000-10-04 Akim Demaille <akim@epita.fr>
21521 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
21523 2000-10-04 Akim Demaille <akim@epita.fr>
21525 * doc/bison.texinfo: Various typos spotted by Neil Booth.
21527 2000-10-04 Akim Demaille <akim@epita.fr>
21529 When a literal string is used to define two different tokens,
21530 `bison -v' segfaults.
21531 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
21533 * tests/regression.m4: New file.
21534 Include the core of the sample provided by Piotr Gackiewicz.
21535 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
21538 2000-10-04 Akim Demaille <akim@epita.fr>
21540 * src/reader.c (parse_expect_decl): Keep `count' within the size
21544 2000-10-02 Paul Eggert <eggert@twinsun.com>
21546 * bison.s1 (yyparse): Assign the default value
21547 unconditionally, to avoid a GCC warning and make the parser a
21550 2000-10-02 Akim Demaille <akim@epita.fr>
21552 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
21555 2000-10-02 Akim Demaille <akim@epita.fr>
21557 * src/derives.c, src/print.c, src/reduce.c: To ease the
21558 translation, move some `\n' out of the translated strings.
21560 2000-10-02 Akim Demaille <akim@epita.fr>
21562 The location tracking mechanism is precious for parse error
21563 messages. Nevertheless, it is enabled only when `@n' is used in
21564 the grammar, which is a different issue (you can use it in error
21565 message, but not in the grammar per se). Therefore, there should
21566 be another means to enable it.
21568 * src/getargs.c (getargs): Support `--locations'.
21569 (usage): Report it.
21570 * src/getargs.h (locationsflag): Export it.
21571 * src/lex.c (percent_table): Support `%locations'.
21572 * src/reader.c (yylsp_needed): Remove this variable, now replaced
21573 with `locationsflag'.
21574 * doc/bison.texinfo: Document `--locations' and `%locations'.
21576 * tests/calc.m4: Test it.
21578 For regularity of the names, replace each
21579 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
21580 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
21581 In addition replace each `flag' with `_flag'.
21583 2000-10-02 Akim Demaille <akim@epita.fr>
21585 Also test parse error messages, including with YYERROR_VERBOSE.
21587 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
21589 Use it to check the computations.
21590 Use it to check `nonassoc' is honored.
21591 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
21592 `--yyerror-verbose'.
21593 (_AT_CHECK_CALC): Adjust to this option.
21594 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
21596 2000-10-02 Akim Demaille <akim@epita.fr>
21598 Test also `--verbose', `--defines' and `--name-prefix'. Testing
21599 the latter demonstrates a flaw in the handling of non debugging
21600 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
21601 was used in order to simplify:
21617 unfortunately this leads to a CPP conflict when
21618 `--name-prefix=foo' is used since it produces `#define yydebug
21621 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
21622 (YYDPRINTF): New macro.
21624 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
21626 Also test `--verbose', `--defines' and `--name-prefix'.
21628 2000-10-02 Akim Demaille <akim@epita.fr>
21630 Improve the readability of the produced parsers.
21632 * src/bison.s1: Formatting changes.
21633 Improve the comment related to the `$' mark.
21634 (yydefault): Don't fall through to `yyresume': `goto' there.
21635 * src/output.c (output_parser): When the `$' is met, skip the end
21637 New variable, `number_of_dollar_signs', to check there's exactly
21638 one `$' in the parser skeleton.
21640 2000-10-02 Akim Demaille <akim@epita.fr>
21642 * lib/xstrdup.c: New file, from the fileutils.
21643 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
21644 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
21645 instead of strlen + xmalloc + strcpy.
21646 * src/symtab.c (copys): Remove, use xstrdup instead.
21648 2000-10-02 Akim Demaille <akim@epita.fr>
21650 * src/gram.h (associativity): New enum type which replaces the
21651 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
21652 `right_assoc', `left_assoc' and `non_assoc'.
21653 Adjust all dependencies.
21654 * src/reader.c: Formatting changes.
21655 (LTYPESTR): Don't define it, use it as a literal in
21656 `reader_output_yylsp'.
21657 * src/symtab.h (symbol_class): New enum type which replaces the
21658 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
21659 `sunknown', `stoken and `snterm'.
21661 2000-10-02 Akim Demaille <akim@epita.fr>
21663 * src/getargs.c (fixed_outfiles): Rename as...
21664 (yaccflag): for consistency and accuracy.
21665 Adjust dependencies.
21667 2000-10-02 Akim Demaille <akim@epita.fr>
21669 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
21670 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
21671 difficult and introduced a lot of core dump. It turns out that
21672 Bison used an implementation of `xmalloc' based on `calloc', and
21673 at various places it does depend upon the initialization to 0. I
21674 have not tried to isolate the pertinent places, and all the former
21675 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
21676 someone should address this issue.
21678 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
21679 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
21681 Adjust dependencies.
21682 * src/warshall.h: New file.
21685 2000-10-02 Akim Demaille <akim@epita.fr>
21687 Various anti-`extern in *.c' changes.
21689 * src/system.h: Include `assert.h'.
21691 2000-10-02 Akim Demaille <akim@epita.fr>
21693 * src/state.h (nstates, final_state, first_state, first_shift)
21694 (first_reduction): Move their exportation from here...
21695 * src/LR0.h: to here.
21696 Adjust dependencies.
21697 * src/getargs.c (statisticsflag): New variable.
21698 Add support for `--statistics'.
21699 Adjust dependencies.
21701 Remove a lot of now useless `extern' statements in most files.
21703 2000-10-02 Akim Demaille <akim@epita.fr>
21705 * src/LR0.h: New file.
21708 2000-10-02 Akim Demaille <akim@epita.fr>
21710 * src/print.h: New file.
21712 * src/print.c: Formatting and ordering changes.
21713 (verbose, terse): Replace with...
21714 (print_results): this new function.
21715 Adjust dependencies.
21717 2000-10-02 Akim Demaille <akim@epita.fr>
21719 * src/conflicts.c (conflict_report): New function.
21720 (conflict_log, verbose_conflict_log): Replace with...
21721 (print_conflicts): this function.
21722 Adjust dependencies.
21723 * src/conflicts.h: New file.
21724 Propagate its inclusion.
21726 2000-10-02 Akim Demaille <akim@epita.fr>
21728 * src/nullable.h: New file.
21729 Propagate its inclusion.
21730 * src/nullable.c: Formatting changes.
21732 2000-10-02 Akim Demaille <akim@epita.fr>
21734 * src/reduce.h: New file.
21735 Propagate its inclusion.
21736 * src/reduce.c: Topological sort and other formatting changes.
21737 (bool, TRUE, FALSE): Move their definition to...
21738 * src/system.h: here.
21740 2000-10-02 Akim Demaille <akim@epita.fr>
21742 * src/files.c: Formatting changes.
21743 (tryopen, tryclose, openfiles): Rename as...
21744 (xfopen, xfclose, open_files): this.
21745 (stringappend): static.
21746 * src/files.h: Complete the list of exported symbols.
21749 2000-10-02 Akim Demaille <akim@epita.fr>
21751 * src/reader.h: New file.
21752 Propagate its use instead of tedious list of `extern' and
21754 * src/reader.c: Formatting changes, topological sort,
21757 2000-10-02 Akim Demaille <akim@epita.fr>
21759 * src/lex.h: Prototype `lex.c' exported functions.
21760 * src/reader.c: Adjust.
21761 * src/lex.c: Formatting changes.
21762 (safegetc): Rename as...
21765 2000-10-02 Akim Demaille <akim@epita.fr>
21767 * src/lalr.h: New file.
21768 Propagate its inclusion instead of prototypes and `extern'.
21769 * src/lalr.c: Formatting changes, topological sorting etc.
21771 2000-10-02 Akim Demaille <akim@epita.fr>
21773 * src/output.c (token_actions): Introduce a temporary array,
21774 YYDEFACT, that makes it possible for this function to use
21775 output_short_table.
21777 2000-10-02 Akim Demaille <akim@epita.fr>
21779 `user_toknums' is output as a `short[]' in `output.c', while it is
21780 defined as a `int[]' in `reader.c'. For consistency with the
21781 other output tables, `user_toknums' is now defined as a table of
21784 * src/reader.c (user_toknums): Be a short table instead of an int
21786 Adjust dependencies.
21788 Factor the short table outputs.
21790 * src/output.c (output_short_table): New function.
21791 * src/output.c (output_gram, output_stos, output_rule_data)
21792 (output_base, output_table, output_check): Use it.
21794 2000-10-02 Akim Demaille <akim@epita.fr>
21796 * src/output.c (output): Topological sort of the functions, in
21797 order to get rid of the `static' prototypes.
21798 No longer use `register'.
21799 * src/output.h: New file.
21800 Propagate its inclusion in files explicitly prototyping functions
21803 2000-09-21 Akim Demaille <akim@epita.fr>
21805 * src/atgeneral.m4: Update from Autoconf.
21807 2000-09-21 Akim Demaille <akim@epita.fr>
21809 * src/closure.h: New file.
21810 * src/closure.c: Formatting changes, topological sort over the
21811 functions, use of closure.h.
21812 (initialize_closure, finalize_closure): Rename as...
21813 (new_closure, free_closure): these. Adjust dependencies.
21814 * src/LR0.c: Formatting changes, topological sort, use of
21816 (initialize_states): Rename as...
21817 (new_states): this.
21818 * src/Makefile.am (noinst_HEADERS): Adjust.
21820 2000-09-20 Akim Demaille <akim@epita.fr>
21822 * src/acconfig.h: Don't protect config.h against multiple
21824 Don't define PARAMS.
21825 * src/system.h: Define PARAMS.
21826 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
21827 purpose of config.h. system.h must not try to fix wrong
21828 definitions in config.h.
21830 2000-09-20 Akim Demaille <akim@epita.fr>
21832 * src/derives.h: New file.
21833 * src/main.c, src/derives.h: Use it.
21834 Formatting changes.
21835 * src/Makefile.am (noinst_HEADERS): Adjust.
21837 2000-09-20 Akim Demaille <akim@epita.fr>
21839 * tests/atgeneral.m4: Update from Autoconf.
21840 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
21841 (AT_CHECK_CALC): New macros.
21842 Use these macros to test bison with options `', `--raw',
21843 `--debug', `--yacc', `--yacc --debug'.
21845 2000-09-19 Akim Demaille <akim@epita.fr>
21847 * src/output.c: Formatting changes.
21848 * src/machine.h: Remove, leaving its contents in...
21849 * src/system.h: here.
21851 Adjust all dependencies on stdio.h and machine.h.
21852 * src/getargs.h: New file.
21853 Let all `extern' declarations about getargs.c be replaced with
21854 inclusion of `getargs.h'.
21855 * src/Makefile.am (noinst_HEADERS): Adjust.
21857 * tests/calc.m4 (yyin): Be initialized in main, not on the global
21859 (yyerror): Returns void, not int.
21860 * doc/bison.texinfo: Formatting changes.
21862 2000-09-19 Akim Demaille <akim@epita.fr>
21864 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
21867 2000-09-18 Akim Demaille <akim@epita.fr>
21869 * configure.in: Append WARNING_CFLAGS to CFLAGS.
21870 * src/Makefile.am (INCLUDES): Don't.
21871 Be ready to fetch headers in lib/.
21873 2000-09-18 Akim Demaille <akim@epita.fr>
21875 * doc/bison.texinfo: Update the copyright.
21876 ANSIfy and GNUify the examples.
21877 Remove the old menu.
21879 2000-09-18 Akim Demaille <akim@epita.fr>
21881 First set of tests: use the `calc' example from the documentation.
21883 * src/bison.s1 (yyparse): Condition the code using `yytname' which
21884 is defined only when YYDEBUG is.
21885 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
21886 * src/files.c (tryopen, tryclose): Formatting changes.
21887 Move to the top and be static.
21888 * src/reader.c (read_signed_integer): Likewise.
21889 * tests/calc.m4: New file.
21890 * Makefile.am, suite.m4: Adjust.
21891 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
21893 2000-09-18 Akim Demaille <akim@epita.fr>
21895 Add support for an Autotest test suite for Bison.
21897 * m4/m4.m4, m4/atconfig.m4: New files.
21898 * m4/Makefile.am (EXTRA_DIST): Adjust.
21899 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
21901 * src/getargs.c: Display a more standard --version message.
21902 * src/reader.c (reader): Formatting changes.
21903 No longer depend upon VERSION_STRING.
21904 * configure.in: No longer use `dnl'.
21905 Set up the test suite and the new directory `tests/.
21906 (VERSION_STRING): Remove.
21908 2000-04-14 Akim Demaille <akim@epita.fr>
21910 * src/reader.c (copy_comment2): New function, same as former
21911 `copy_comment', but outputs into two FILE *.
21912 (copy_comment): Use it.
21913 (parse_union_decl): Use it.
21914 (get_type, parse_start_decl): Use the same `invalid' message.
21915 (parse_start_decl, parse_union_decl): Use the same `multiple'
21917 (parse_union_decl, copy_guard, copy_action): Use the same
21918 `unmatched' message.
21919 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
21921 2000-03-31 Akim Demaille <akim@epita.fr>
21923 * src/files.c (tryopen, tryclose): Move to the top.
21926 2000-03-31 Akim Demaille <akim@epita.fr>
21928 * src/main.c (main): Don't call `done', exit does it.
21930 2000-03-31 Akim Demaille <akim@epita.fr>
21932 * allocate.c: s/return (foo)/return foo/.
21933 * lalr.c: Likewise.
21935 * output.c: Likewise.
21936 * reader.c: Likewise.
21937 * symtab.c: Likewise.
21938 * vmsgetargs.c: Likewise.
21940 2000-03-31 Akim Demaille <akim@epita.fr>
21942 Clean up the error reporting functions.
21944 * src/report.c: New file.
21945 * src/report.h: Likewise.
21946 * src/Makefile.am: Adjust.
21947 * m4/error.m4: New file.
21948 * m4/Makefile.am: Adjust.
21949 * configure.in (jm_PREREQ_ERROR): Call it.
21950 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
21952 (fatal, fatals): Remove. All callers use complain.c::fatal.
21953 (warn, warni, warns, warnss, warnss): Remove. All callers use
21954 complain.c::complain.
21955 (toomany): Remove, use fatal instead.
21956 * src/files.c (done): No argument, use complain_message_count.
21957 * src/main.c (main): Register `done' to `atexit'.
21959 * src/getargs.c (usage): More `fputs', less `fprintf'.
21961 2000-03-28 Akim Demaille <akim@epita.fr>
21963 * lib/: New directory.
21964 * Makefile.am (SUBDIRS): Adjust.
21965 * configure.in: Adjust.
21966 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
21968 * src/alloca.c: Moved to lib/.
21969 * src/getopt.c: Likewise.
21970 * src/getopt1.c: Likewise.
21971 * src/getopt.h: Likewise.
21972 * src/ansi2knr.c: Likewise.
21973 * src/ansi2knr.1: Likewise.
21974 * src/Makefile.am: Adjust.
21975 * lib/Makefile.am: New file.
21977 2000-03-28 Akim Demaille <akim@epita.fr>
21979 * src/getargs.c (usage): Refresh the help message.
21981 2000-03-17 Akim Demaille <akim@epita.fr>
21983 * src/getopt1.c: Updated from textutils 2.0e
21984 * src/getopt.c: Likewise.
21985 * src/getopt.h: Likewise.
21987 2000-03-17 Akim Demaille <akim@epita.fr>
21989 * src/Makefile.am (bison.simple): Fix the awk program: quote only
21990 the file name, not the whole `#line LINE FILE'.
21992 2000-03-17 Akim Demaille <akim@epita.fr>
21994 On syntax errors, report the token on which we choked.
21996 * src/bison.s1 (yyparse): In the label yyerrlab, when
21997 YYERROR_VERBOSE, add yychar in msg.
21999 2000-03-17 Akim Demaille <akim@epita.fr>
22001 * src/reader.c (copy_at): New function.
22002 (copy_guard): Use it.
22003 (copy_action): Use it.
22005 2000-03-17 Akim Demaille <akim@epita.fr>
22007 Be kind to translators, save some useless translations.
22009 * src/main.c (banner): New function.
22010 (fatal_banner): Use it.
22011 (warn_banner): Use it.
22013 2000-03-17 Akim Demaille <akim@epita.fr>
22015 * src/reader.c (copy_definition): Use copy_string and
22016 copy_comment. Removed now unused `match', `ended',
22018 (copy_comment, copy_string): Moved, to be visible from
22021 2000-03-17 Akim Demaille <akim@epita.fr>
22023 * src/reader.c (copy_string): Declare `static inline'. No
22024 problems with inline, since it is checked by configure.
22025 (copy_comment): Likewise.
22027 2000-03-17 Akim Demaille <akim@epita.fr>
22029 * src/reader.c (packsymbols): Formatting changes.
22031 2000-03-17 Akim Demaille <akim@epita.fr>
22033 * src/reader.c (copy_comment): New function, factored out from:
22034 (copy_action): Use it. Removed now unused `match', `ended',
22036 (copy_guard): Likewise.
22038 2000-03-17 Akim Demaille <akim@epita.fr>
22040 * src/reader.c (copy_string): New function, factored out from:
22041 (copy_action): Use it.
22042 (copy_guard): Likewise.
22044 2000-03-17 Akim Demaille <akim@epita.fr>
22046 Change the handling of @s so that they behave exactly like $s.
22047 There is now a pseudo variable @$ (readble and writable), location
22048 of the lhs of the rule (by default ranging from the location of
22049 the first symbol of the rhs, to the location of the last symbol,
22050 or, if the rhs is empty, YYLLOC).
22052 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
22054 (yyparse): When providing a default semantic action, provide a
22055 default location action.
22056 (after the $): No longer change `*YYLSP', just stack YYLOC the
22057 same way you stack YYVAL.
22058 * src/reader.c (read_declarations): Use warns.
22059 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
22060 (copy_action, case '@'): Likewise.
22061 Use a standard error message, to save useless work from
22064 2000-03-17 Akim Demaille <akim@epita.fr>
22066 * src/bison.s1: Formatting and cosmetics changes.
22067 * src/reader.c: Likewise.
22068 Update the Copyright notice.
22070 2000-03-17 Akim Demaille <akim@epita.fr>
22072 * src/bison.s1 (#line): All set to `#line' only, since the
22073 Makefile now handles them.
22075 2000-03-16 Akim Demaille <akim@epita.fr>
22077 * src/output.c (output_rule_data): Output the documentation of
22078 some of the tables.
22079 (Copyright notice): Update.
22080 Formatting changes.
22082 2000-03-16 Akim Demaille <akim@epita.fr>
22084 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
22085 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
22086 One `#if YYDEBUG' remains, since it uses variables which are
22087 defined only if `YYDEBUG != 0'.
22089 2000-03-16 Akim Demaille <akim@epita.fr>
22091 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
22092 and related variables so that the similarities are highlighted.
22094 2000-03-16 Akim Demaille <akim@epita.fr>
22096 * src/bison.s1: Properly indent CPP directives.
22098 2000-03-16 Akim Demaille <akim@epita.fr>
22100 * src/bison.s1: Properly indent the `alloca' CPP section.
22102 2000-03-16 Akim Demaille <akim@epita.fr>
22104 Do not hard code values of directories in `configure.in'.
22105 Update the `configure' tool chain.
22107 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
22109 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
22110 (AC_OUTPUT): Add m4/Makefile.
22111 Bump to bison 1.28a, 1.29 has never been released.
22112 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
22113 handled via src/Makefile.am.
22114 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
22115 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
22117 * Makefile.am (SUBDIRS): Add m4.
22118 (ACLOCAL_AM_FLAGS): New variable.
22119 (AUTOMAKE_OPTIONS): Add check-news.
22120 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
22121 the proper line number and file name.
22122 (DEFS): Propagate the location of bison library files and of the
22124 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
22126 * acinclude.m4: Remove, replaced by the directory m4.
22127 * m4/Makefile.am (EXTRA_DIST): New variable.
22128 * m4/gettext.m4: New file, from the fileutils.
22129 * m4/lcmessage.m4: Likewise
22130 * m4/progtest.m4: Likewise.
22131 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
22133 2000-03-10 Akim Demaille <akim@epita.fr>
22136 Formatting changes of various comments.
22137 Respect the GNU coding standards at various places.
22138 Don't use `_()' when no translation is needed.
22140 1999-12-13 Jesse Thilo <jthilo@gnu.org>
22143 OS/2 honors TMPDIR environment variable.
22145 1999-12-13 Jesse Thilo <jthilo@gnu.org>
22147 * doc/bison.texinfo: Tweaked spelling and grammar.
22149 Removed reference to price of printed copy.
22150 Mention BISON_SIMPLE and BISON_HAIRY.
22152 1999-12-13 Jesse Thilo <jthilo@gnu.org>
22154 * configure.in, NEWS:
22155 Bison 1.29 released.
22157 1999-10-27 Jesse Thilo <jthilo@gnu.org>
22159 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
22160 Added reference card.
22162 1999-07-26 Jesse Thilo <jthilo@gnu.org>
22164 * po/ru.po: Added Russian translation.
22166 1999-07-26 Jesse Thilo <jthilo@gnu.org>
22168 * configure.in: Added Russian translation.
22170 1999-07-06 Jesse Thilo <jthilo@gnu.org>
22172 * configure.in, NEWS, README:
22173 Released version 1.28.
22175 1999-06-14 Jesse Thilo <jthilo@gnu.org>
22178 Squashed redefinition warning on some systems.
22180 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
22181 Have configure build version string instead of relying on ANSI string
22184 1999-06-14 Jesse Thilo <jthilo@gnu.org>
22186 * po/POTFILES.in: Got rid of version.c.
22188 1999-06-14 Jesse Thilo <jthilo@gnu.org>
22190 * acconfig.h, configure.in:
22191 Have configure build version string instead of relying on ANSI string
22194 1999-06-08 Jesse Thilo <jthilo@gnu.org>
22197 Dropped mention of `+' for long-named options.
22199 1999-05-30 Jesse Thilo <jthilo@gnu.org>
22201 * src/files.c: Added <unistd.h> for unlink().
22203 * src/Makefile.am, src/system.h:
22206 1999-05-30 Jesse Thilo <jthilo@gnu.org>
22208 * README: Added a FAQ list.
22210 * configure.in, acconfig.h:
22213 1999-05-30 Jesse Thilo <jthilo@gnu.org>
22215 * doc/FAQ, doc/Makefile.am:
22218 1999-05-19 Jesse Thilo <jthilo@gnu.org>
22220 * src/alloc.h, src/symtab.h, src/version.c:
22221 Protected inclusion of "config.h" with HAVE_CONFIG_H.
22223 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22225 * src/.cvsignore, src/Makefile.am:
22226 Reorganized: sources in `src', documentation in `doc'.
22228 * src/lex.c (literalchar):
22229 fixed the code for escaping double quotes (thanks
22232 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22234 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
22235 Adjusted paths to reflect directory reorganization.
22237 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22239 * doc/.cvsignore, doc/Makefile.am:
22240 Reorganized: sources in `src', documentation in `doc'.
22242 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22245 Updated AC_INIT file to reflect directory reorganization.
22247 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
22248 Reorganized: sources in `src', documentation in `doc'.
22250 1999-04-13 Jesse Thilo <jthilo@gnu.org>
22253 Don't declare calloc() and realloc() if not necessary.
22255 1999-04-13 Jesse Thilo <jthilo@gnu.org>
22257 * configure.in, acconfig.h, acinclude.m4:
22258 Don't declare calloc() and realloc() if not necessary.
22260 1999-03-23 Jesse Thilo <jthilo@gnu.org>
22262 * po/.cvsignore: Added i18n support.
22264 1999-03-23 Jesse Thilo <jthilo@gnu.org>
22266 * acconfig.h, configure.in, Makefile.am:
22267 Added i18n support.
22269 1999-03-22 Jesse Thilo <jthilo@gnu.org>
22271 * src/bison.s1: Fixed #line numbers.
22273 1999-03-15 Jesse Thilo <jthilo@gnu.org>
22275 * po/es.po, po/fr.po, po/nl.po, po/de.po:
22276 Added PO files from Translation Project.
22278 1999-03-03 Jesse Thilo <jthilo@gnu.org>
22281 Added support for non-ANSI compilers (ansi2knr).
22283 1999-02-16 Jesse Thilo <jthilo@gnu.org>
22285 * configure.in: Bumped version number to 1.27.
22288 Added `bison.simple' to list of files removed by `make distclean'.
22290 1999-02-12 Jesse Thilo <jthilo@gnu.org>
22292 * src/files.c, src/files.h:
22293 Defined locations of parser files in config.h instead of Makefile.
22295 1999-02-12 Jesse Thilo <jthilo@gnu.org>
22297 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
22298 Defined locations of parser files in config.h instead of Makefile.
22300 1999-02-09 Jesse Thilo <jthilo@gnu.org>
22303 Removed inappropriate use of $< macro.
22305 1999-02-05 Jesse Thilo <jthilo@gnu.org>
22307 * po/Makefile.in.in, po/POTFILES.in:
22308 Add `po' directory skeleton.
22310 1999-01-27 Jesse Thilo <jthilo@gnu.org>
22312 * README: Document help-bison list.
22314 * configure.in: Add check for mkstemp().
22316 1999-01-20 Jesse Thilo <jthilo@gnu.org>
22318 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
22319 Hush a few compiler warnings.
22322 Add tryclose(), which verifies that fclose was successful.
22323 Hush a couple of compiler warnings.
22325 1999-01-20 Jesse Thilo <jthilo@gnu.org>
22327 * Makefile.am, OChangeLog:
22328 ChangeLog is now automatically generated. Include the old version as
22331 1999-01-14 Jesse Thilo <jthilo@gnu.org>
22333 * src/gram.h, src/lalr.c, src/lex.c, src/lex.h, src/machine.h, src/main.c, src/nullable.c, src/output.c, src/print.c, src/reader.c, src/reduce.c, src/state.h, src/symtab.c, src/symtab.h, src/types.h, src/vmsgetargs.c, src/warshall.c, src/allocate.c, src/alloc.h, src/bison.s1, src/closure.c, src/conflicts.c, src/derives.c, src/files.c, src/files.h, src/getargs.c, src/gram.c, src/LR0.c:
22334 Update FSF address.
22336 1999-01-14 Jesse Thilo <jthilo@gnu.org>
22338 * doc/bison.texinfo: Fix formatting glitch.
22340 * doc/bison.texinfo: Update FSF address.
22342 1999-01-14 Jesse Thilo <jthilo@gnu.org>
22344 * acconfig.h: Update FSF address.
22346 1999-01-08 Jesse Thilo <jthilo@gnu.org>
22349 Don't define PACKAGE here, since config.h defines it.
22351 1998-12-30 Jesse Thilo <jthilo@gnu.org>
22353 * src/reader.c: Update copyright date.
22356 Ditch sprintf to statically-sized buffers in fatal/warn functions in
22357 favor of output directly to stderr (avoids buffer overruns).
22359 * src/reader.c: Some checks for premature EOF.
22361 * src/allocate.c, src/alloc.h, src/closure.c, src/conflicts.c, src/derives.c, src/getargs.c, src/gram.c, src/lalr.c, src/lex.c, src/LR0.c, src/main.c, src/nullable.c, src/output.c, src/print.c, src/reduce.c, src/symtab.c, src/symtab.h, src/warshall.c:
22362 Use prototypes if the compiler understands them.
22364 * src/files.c: Honor TMPDIR on Unix hosts.
22365 Use prototypes if the compiler understands them.
22368 Fix a couple of buffer overrun bugs.
22369 Use prototypes if the compiler understands them.
22371 * src/system.h: Include unistd.h and ctype.h.
22372 Use #ifdef instead of #if for NLS symbols.
22374 1998-12-30 Jesse Thilo <jthilo@gnu.org>
22376 * doc/bison.texinfo:
22377 Delete comment "consider using @set for edition number, etc..." since
22378 we now are doing so.
22380 1998-12-30 Jesse Thilo <jthilo@gnu.org>
22383 Use prototypes if the compiler understands them.
22385 * NEWS: Document 1.26 highlights.
22387 * Makefile.am: Require Automake 1.3 or later.
22390 Use prototypes if the compiler understands them.
22392 1998-12-29 Jesse Thilo <jthilo@gnu.org>
22395 Use VERSION symbol from automake for version number.
22397 1998-12-29 Jesse Thilo <jthilo@gnu.org>
22399 * acconfig.h, configure.in, version.cin:
22400 Use VERSION symbol from automake for version number.
22402 1998-11-28 Jesse Thilo <jthilo@gnu.org>
22405 Distribute original version of simple parser (bison.s1), not built
22406 version (bison.simple).
22408 1998-11-28 Jesse Thilo <jthilo@gnu.org>
22410 * doc/bison.texinfo: Add info dir entry.
22412 * doc/bison.texinfo:
22413 Let automake put version number into documentation.
22415 1998-11-26 Jesse Thilo <jthilo@gnu.org>
22417 * src/bison.cld, src/build.com, src/vmshlp.mar:
22418 Add non-RCS files from /gd/gnu/bison.
22420 1998-11-26 Jesse Thilo <jthilo@gnu.org>
22423 Document the BISON_HAIRY and BISON_SIMPLE variables.
22425 1998-11-25 Jesse Thilo <jthilo@gnu.org>
22427 * src/version.c: Build version.c automatically.
22430 Fix token numbering (used to start at 258, not 257).
22432 * src/system.h: Include config.h.
22434 * src/getargs.c: Update bug report address.
22436 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
22437 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
22439 1998-11-25 Jesse Thilo <jthilo@gnu.org>
22442 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
22444 * configure.in, version.cin:
22445 Build version.c automatically.
22447 * AUTHORS: Add AUTHORS file.
22449 * README: Update bug report address.
22452 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
22454 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
22455 Add automake stuff.
22457 1998-11-25 Jesse Thilo <jthilo@gnu.org>
22459 * doc/bison.texinfo: Clean up some formatting.
22461 1998-05-05 Richard Stallman <rms@gnu.org>
22463 * doc/bison.texinfo:
22464 Explain better why to make a pure parser.
22466 1998-01-05 Richard Stallman <rms@gnu.org>
22468 * src/files.c (openfiles):
22469 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
22470 find a temporary directory, if possible. Do not unlink files while
22473 1997-08-25 Richard Stallman <rms@gnu.org>
22475 * src/reader.c (stack_offset;):
22476 Change some warni to warns.
22478 * src/lex.c (literalchar): Use warns, not warni.
22480 1997-06-28 Richard Stallman <rms@gnu.org>
22482 * src/bison.s1: Add a Bison version comment.
22484 * src/main.c (fatal, warn, berror):
22487 1997-06-28 Richard Stallman <rms@gnu.org>
22489 * Makefile.in (bison_version): New variable.
22490 (dist): Use that variable.
22491 (bison.s1): Substitute the Bison version into bison.simple.
22493 * bison.simple: Add a Bison version comment.
22495 1997-06-18 Richard Stallman <rms@gnu.org>
22497 * src/main.c (fatal, warn, berror):
22498 Make error messages standard.
22499 (toomany): Improve error message text.
22501 * src/LR0.c, src/closure.c, src/conflicts.c, src/derives.c, src/files.c, src/lalr.c, src/lex.c, src/nullable.c, src/output.c, src/print.c, src/reader.c, src/reduce.c, src/symtab.c:
22502 new.h renamed to alloc.h.
22504 1997-06-18 Richard Stallman <rms@gnu.org>
22506 * Makefile.in: new.h renamed to alloc.h.
22508 1997-05-24 Richard Stallman <rms@gnu.org>
22510 * src/lex.c (literalchar):
22511 Fix the code for escaping \, " and '.
22513 (lex): Avoid trouble when there are many chars
22514 to discard in a char literal with just several chars in it.
22516 1997-05-17 Richard Stallman <rms@gnu.org>
22519 Use malloc, if using alloca is troublesome.
22520 (YYSTACK_USE_ALLOCA): New flag macro.
22521 Define it for some systems and compilers.
22522 (YYSTACK_ALLOC): New macro.
22523 (yyparse): Use YYSTACK_ALLOC to allocate stack.
22524 If it was malloc'd, free it.
22526 1997-05-17 Richard Stallman <rms@gnu.org>
22529 Use malloc, if using alloca is troublesome.
22530 (YYSTACK_USE_ALLOCA): New flag macro.
22531 Define it for some systems and compilers.
22532 (YYSTACK_ALLOC): New macro.
22533 (yyparse): Use YYSTACK_ALLOC to allocate stack.
22534 If it was malloc'd, free it.
22536 1997-04-23 Richard Stallman <rms@gnu.org>
22539 (alloca) [__hpux]: Always define as __builtin_alloca.
22541 1997-04-23 Richard Stallman <rms@gnu.org>
22544 (alloca) [__hpux]: Always define as __builtin_alloca.
22546 1997-04-22 Richard Stallman <rms@gnu.org>
22549 [__hpux]: Include alloca.h (right for HPUX 10)
22550 instead of declaring alloca (right for HPUX 9).
22552 * src/bison.s1 (__yy_memcpy):
22553 Declare arg `count' as unsigned int.
22554 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
22556 1997-04-22 Richard Stallman <rms@gnu.org>
22559 [__hpux]: Include alloca.h (right for HPUX 10)
22560 instead of declaring alloca (right for HPUX 9).
22562 * bison.simple (__yy_memcpy):
22563 Declare arg `count' as unsigned int.
22564 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
22566 1997-01-03 Richard Stallman <rms@gnu.org>
22568 * src/allocate.c: [__STDC__ or _MSC_VER]:
22569 Declare calloc and realloc to return void *.
22571 1997-01-02 Richard Stallman <rms@gnu.org>
22574 [_MSC_VER]: Include stdlib.h and process.h.
22575 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
22577 * src/main.c (main): Return FAILURE as a value.
22578 (printable_version): Declare arg as int, not char.
22580 1997-01-02 Richard Stallman <rms@gnu.org>
22582 * Makefile.in (dist):
22583 Explicitly check for symlinks, and copy them.
22585 1996-12-19 Richard Stallman <rms@gnu.org>
22588 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
22590 1996-12-18 Paul Eggert <eggert@gnu.org>
22592 * src/bison.s1 (yyparse):
22593 If __GNUC__ and YYPARSE_PARAM are both defined,
22594 declare yyparse to have a void * argument.
22596 1996-12-18 Paul Eggert <eggert@gnu.org>
22598 * bison.simple (yyparse):
22599 If __GNUC__ and YYPARSE_PARAM are both defined,
22600 declare yyparse to have a void * argument.
22602 1996-12-17 Richard Stallman <rms@gnu.org>
22604 * src/reduce.c (nbits): Add some casts.
22606 1996-08-12 Richard Stallman <rms@gnu.org>
22608 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
22610 1996-08-12 Richard Stallman <rms@gnu.org>
22612 * bison.simple: Test _MSDOS as well as _MSDOS_.
22614 1996-07-31 Richard Stallman <rms@gnu.org>
22617 [__sun && __i386]: Include alloca.h.
22619 1996-07-31 Richard Stallman <rms@gnu.org>
22622 [__sun && __i386]: Include alloca.h.
22624 1996-07-30 Richard Stallman <rms@gnu.org>
22626 * src/bison.s1: Comment change.
22628 * src/bison.s1: Test _MSDOS_, not MSDOS.
22630 1996-07-30 Richard Stallman <rms@gnu.org>
22632 * bison.simple: Comment change.
22634 * bison.simple: Test _MSDOS_, not MSDOS.
22636 1996-06-01 Richard Stallman <rms@gnu.org>
22638 * src/reduce.c, src/reader.c, src/print.c, src/output.c, src/nullable.c, src/lex.c, src/lalr.c, src/getargs.c, src/derives.c, src/conflicts.c, src/closure.c, src/allocate.c:
22639 Insert `_' macro around many string constants.
22642 Insert `_' macro around many string constants.
22644 (main): Call setlocale, bindtextdomain and textdomain.
22646 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
22647 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
22648 [ENABLE_NLS]: Include libintl.h.
22649 [ENABLE_NLS] (gettext): Define.
22650 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
22651 (N_, PACKAGE, LOCALEDIR): New macros.
22653 1996-06-01 Richard Stallman <rms@gnu.org>
22655 * POTFILES.in: New file.
22657 * Makefile.in (allocate.o):
22658 Define target explicitly.
22660 * Makefile.in (CFLAGS): Set to @CFLAGS@.
22661 (LDFLAGS): Set to @LDFLAGS@.
22662 (configure): Run autoconf only if preceding `cd' succeeds.
22663 (bison.s1): Redirect output to temporary file then move the
22664 temporary to the target, rather than redirecting directly to bison.s1.
22665 (clean): Remove config.status and config.log.
22666 (distclean): Don't remove config.status here.
22668 1996-05-12 Richard Stallman <rms@gnu.org>
22671 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
22673 1996-05-12 Richard Stallman <rms@gnu.org>
22676 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
22678 1996-05-11 Richard Stallman <rms@gnu.org>
22680 * src/bison.s1 (__yy_memcpy):
22681 Really reorder the args, as was supposedly done on Feb 14 1995.
22682 (yyparse): Calls changed accordingly.
22684 1996-05-11 Richard Stallman <rms@gnu.org>
22686 * Makefile.in (dist): Don't use $(srcdir).
22688 * bison.simple (__yy_memcpy):
22689 Really reorder the args, as was supposedly done on Feb 14 1995.
22690 (yyparse): Calls changed accordingly.
22692 1996-01-27 Richard Stallman <rms@gnu.org>
22694 * src/output.c (output_rule_data):
22695 Test YYERROR_VERBOSE in the conditional
22696 around the definition of ttyname.
22698 1995-12-29 Richard Stallman <rms@gnu.org>
22701 Fix line numbers in #line commands.
22703 1995-12-29 Richard Stallman <rms@gnu.org>
22706 Fix line numbers in #line commands.
22708 1995-12-27 Richard Stallman <rms@gnu.org>
22710 * src/bison.s1 (YYPARSE_PARAM_DECL):
22711 In C++, make it always null.
22712 (YYPARSE_PARAM_ARG): New macro.
22713 (yyparse): Use YYPARSE_PARAM_ARG.
22715 1995-12-27 Richard Stallman <rms@gnu.org>
22717 * bison.simple (YYPARSE_PARAM_DECL):
22718 In C++, make it always null.
22719 (YYPARSE_PARAM_ARG): New macro.
22720 (yyparse): Use YYPARSE_PARAM_ARG.
22722 1995-11-29 Richard Stallman <rms@gnu.org>
22724 * doc/bison.texinfo:
22725 Describe literal string tokens, %raw, %no_lines, %token_table.
22727 1995-11-29 Daniel Hagerty <hag@gnu.org>
22729 * doc/bison.texinfo: Fixed update date
22731 1995-10-16 Richard Stallman <rms@gnu.org>
22733 * src/version.c: Version 1.25.
22735 1995-10-16 Richard Stallman <rms@gnu.org>
22737 * NEWS: *** empty log message ***
22739 1995-10-16 Richard Stallman <rms@gnu.org>
22741 * doc/bison.1, doc/bison.rnh:
22744 1995-10-15 Richard Stallman <rms@gnu.org>
22746 * src/vmsgetargs.c, src/getargs.c:
22747 Added -n, -k, and -raw switches.
22748 (noparserflag, toknumflag, rawtoknumflag): New variables.
22750 * src/symtab.h (SALIAS):
22751 New #define for adding aliases to %token.
22752 (struct bucket): Added `alias' field.
22754 * src/reduce.c (reduce_grammar):
22755 Revise error message.
22756 (print_notices): Remove final `.' from error message.
22758 * src/reader.c (reader_output_yylsp):
22760 (readgram): Use `#if 0' around code that accepted %command
22761 inside grammar rules: The documentation doesn't allow it,
22762 and it will fail since the %command processors scan for the next %.
22763 (parse_token_decl): Extended the %token
22764 declaration to allow a multi-character symbol as an alias.
22765 (parse_thong_decl): New function.
22766 (read_declarations): Added %thong declarations.
22767 (read_declarations): Handle NOOP to deal with allowing
22768 % declarations as another means to specify the flags.
22769 (readgram): Allow %prec prior to semantics embedded in a rule.
22770 (skip_to_char, read_declarations, copy_definition)
22771 (parse_token_decl, parse_start_decl, parse_type_decl)
22772 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
22773 (get_type_name, copy_guard, copy_action, readgram)
22774 (get_type, packsymbols): Revised most error messages.
22775 Changed `fatal' to `warnxxx' to avoid aborting for error.
22776 Revised and use multiple warnxxx functions to avoid using VARARGS1.
22777 (read_declarations): Improve the error message for
22778 an invalid character. Do not abort.
22779 (read_declarations, copy_guard, copy_action): Use
22780 printable_version to avoid unprintable characters in printed output.
22781 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
22782 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
22783 Allow the type of a non-terminal can be given
22784 more than once, as long as all specifications give the same type.
22787 (output_headers, output_trailers, output, output_gram)
22788 (output_rule_data): Implement noparserflag variable.
22789 Implement toknumflag variable.
22790 (output): Call reader_output_yylsp to output LTYPESTR.
22792 * src/main.c (main):
22793 If reader sees an error, don't process the grammar.
22794 (fatals): Updated to not use VARARGS1.
22795 (printable_version, int_to_string, warn, warni, warns, warnss)
22796 (warnsss): New error reporting functions. Avoid abort for error.
22799 Added THONG and NOOP for alias processing.
22800 Added SETOPT for the new code that allows setting options with %flags.
22803 Include getopt.h. Add some extern decls.
22804 (safegetc): New function to deal with EOF gracefully.
22805 (literalchar); new function to deal with reading \ escapes.
22806 (lex): Use literalchar.
22807 (lex): Implemented "..." tokens.
22808 (literalchar, lex, parse_percent_token): Made tokenbuffer
22809 always contain the token. This includes growing the token
22810 buffer while reading an integer.
22811 (parse_percent_token): Replaced if-else statement with percent_table.
22812 (parse_percent_token): Added % declarations as another
22813 way to specify the flags -n, -l, and -r. Also added hooks for
22814 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
22815 major changes to files.c.
22816 (lex) Retain in the incoming stream a character following
22818 (skip_white_space, lex): Revised most error messages
22819 and changed fatal to warn to avoid aborting.
22820 (percent_table): Added %thong declarations.
22822 * src/gram.h: Comment changes.
22824 * src/files.c (openfiles, open_extra_files, done):
22826 and actfile file. Handle noparserflag. Both for -n switch.
22828 * src/conflicts.c (resolve_sr_conflict):
22829 Remove use of alloca.
22831 1995-06-01 Jim Meyering <meyering@gnu.org>
22833 * doc/bison.texinfo: *** empty log message ***
22835 1995-05-06 Richard Stallman <rms@gnu.org>
22837 * src/bison.s1: Comment change.
22839 1995-05-06 Richard Stallman <rms@gnu.org>
22841 * bison.simple: Comment change.
22843 1995-05-03 Richard Stallman <rms@gnu.org>
22845 * src/version.c: Version now 1.24.
22847 * src/bison.s1: Change distribution terms.
22849 * src/version.c: Version now 1.23.
22851 1995-05-03 Richard Stallman <rms@gnu.org>
22853 * doc/bison.texinfo:
22854 Rewrite "Conditions for Using Bison".
22855 Update version to 1.24.
22857 1995-05-03 Richard Stallman <rms@gnu.org>
22859 * bison.simple: Change distribution terms.
22861 1995-02-23 Richard Stallman <rms@gnu.org>
22863 * src/files.c: Test __VMS_POSIX as well as VMS.
22865 1995-02-14 Jim Meyering <meyering@gnu.org>
22867 * src/bison.s1 (__yy_memcpy):
22868 Renamed from __yy_bcopy to avoid
22869 confusion. Reverse FROM and TO arguments to be consistent with
22872 1995-02-14 Jim Meyering <meyering@gnu.org>
22874 * bison.simple (__yy_memcpy):
22875 Renamed from __yy_bcopy to avoid
22876 confusion. Reverse FROM and TO arguments to be consistent with
22879 1994-11-10 David J. MacKenzie <djm@gnu.org>
22885 * Makefile.in (DISTFILES): Include NEWS.
22887 * Makefile.in (DISTFILES):
22888 Include install-sh, not install.sh.
22890 * configure.in: Update to Autoconf v2 macro names.
22892 1994-10-05 David J. MacKenzie <djm@gnu.org>
22894 * Makefile.in: fix typo
22896 * Makefile.in (prefix, exec_prefix):
22897 Let configure set them.
22899 1994-09-28 David J. MacKenzie <djm@gnu.org>
22901 * Makefile.in: Set datadir to $(prefix)/share.
22903 1994-09-15 Richard Stallman <rms@gnu.org>
22906 Update copyright notice and GPL version.
22908 1994-09-15 Richard Stallman <rms@gnu.org>
22911 Update copyright notice and GPL version.
22913 1994-07-12 Richard Stallman <rms@gnu.org>
22915 * src/reduce.c, src/reader.c:
22918 1994-05-05 David J. MacKenzie <djm@gnu.org>
22920 * Makefile.in: entered into RCS
22922 1994-03-26 Richard Stallman <rms@gnu.org>
22924 * src/bison.s1: entered into RCS
22926 1994-03-26 Richard Stallman <rms@gnu.org>
22928 * bison.simple: entered into RCS
22930 1994-03-25 Richard Stallman <rms@gnu.org>
22932 * src/main.c: entered into RCS
22934 1994-03-24 Richard Stallman <rms@gnu.org>
22936 * src/conflicts.c: entered into RCS
22938 1994-01-02 Richard Stallman <rms@gnu.org>
22940 * Makefile.in: *** empty log message ***
22942 1993-11-21 Richard Stallman <rms@gnu.org>
22944 * src/bison.s1: *** empty log message ***
22946 1993-11-21 Richard Stallman <rms@gnu.org>
22948 * doc/bison.texinfo: entered into RCS
22950 * doc/bison.texinfo: *** empty log message ***
22952 1993-11-21 Richard Stallman <rms@gnu.org>
22954 * bison.simple: *** empty log message ***
22956 1993-10-25 David J. MacKenzie <djm@gnu.org>
22958 * doc/bison.texinfo: *** empty log message ***
22960 1993-10-19 Richard Stallman <rms@gnu.org>
22962 * src/bison.s1: *** empty log message ***
22964 1993-10-19 Richard Stallman <rms@gnu.org>
22966 * bison.simple: *** empty log message ***
22968 1993-10-14 Richard Stallman <rms@gnu.org>
22970 * src/bison.s1: *** empty log message ***
22972 1993-10-14 Richard Stallman <rms@gnu.org>
22974 * bison.simple: *** empty log message ***
22976 1993-09-14 David J. MacKenzie <djm@gnu.org>
22978 * doc/bison.texinfo: *** empty log message ***
22980 1993-09-13 Noah Friedman <friedman@gnu.org>
22982 * Makefile.in: *** empty log message ***
22984 1993-09-10 Richard Stallman <rms@gnu.org>
22986 * src/conflicts.c: *** empty log message ***
22988 * src/system.h: entered into RCS
22990 1993-09-10 Richard Stallman <rms@gnu.org>
22992 * doc/bison.1: entered into RCS
22994 1993-09-06 Noah Friedman <friedman@gnu.org>
22996 * src/version.c: entered into RCS
22998 1993-09-06 Noah Friedman <friedman@gnu.org>
23000 * Makefile.in: *** empty log message ***
23002 1993-07-30 David J. MacKenzie <djm@gnu.org>
23004 * Makefile.in: *** empty log message ***
23006 1993-07-24 Richard Stallman <rms@gnu.org>
23008 * src/bison.s1: *** empty log message ***
23010 1993-07-24 Richard Stallman <rms@gnu.org>
23012 * bison.simple: *** empty log message ***
23014 1993-07-08 David J. MacKenzie <djm@gnu.org>
23016 * Makefile.in: *** empty log message ***
23018 1993-07-04 Richard Stallman <rms@gnu.org>
23020 * src/bison.s1: *** empty log message ***
23022 1993-07-04 Richard Stallman <rms@gnu.org>
23024 * bison.simple: *** empty log message ***
23026 1993-06-26 David J. MacKenzie <djm@gnu.org>
23028 * src/getargs.c: entered into RCS
23030 1993-06-26 David J. MacKenzie <djm@gnu.org>
23032 * doc/bison.texinfo: *** empty log message ***
23034 * doc/bison.1: New file.
23036 1993-06-25 Richard Stallman <rms@gnu.org>
23038 * src/getargs.c: New file.
23040 1993-06-16 Richard Stallman <rms@gnu.org>
23042 * src/bison.s1: *** empty log message ***
23044 1993-06-16 Richard Stallman <rms@gnu.org>
23046 * bison.simple: *** empty log message ***
23048 1993-06-03 Richard Stallman <rms@gnu.org>
23050 * src/bison.s1: New file.
23052 1993-06-03 Richard Stallman <rms@gnu.org>
23054 * doc/bison.texinfo: *** empty log message ***
23056 1993-06-03 Richard Stallman <rms@gnu.org>
23058 * bison.simple: New file.
23060 1993-05-19 Richard Stallman <rms@gnu.org>
23062 * doc/bison.texinfo: New file.
23064 1993-05-07 Noah Friedman <friedman@gnu.org>
23066 * Makefile.in: *** empty log message ***
23068 1993-04-28 Noah Friedman <friedman@gnu.org>
23070 * src/reader.c: *** empty log message ***
23072 1993-04-23 Noah Friedman <friedman@gnu.org>
23074 * src/alloc.h: entered into RCS
23076 1993-04-20 David J. MacKenzie <djm@gnu.org>
23078 * src/version.c: *** empty log message ***
23080 * src/files.c, src/allocate.c:
23083 * src/reader.c: *** empty log message ***
23085 * src/lex.c: entered into RCS
23087 * src/conflicts.c: New file.
23089 * src/symtab.c: entered into RCS
23091 * src/alloc.h: New file.
23093 * src/LR0.c: entered into RCS
23095 1993-04-18 Noah Friedman <friedman@gnu.org>
23097 * src/reader.c: New file.
23099 * src/version.c: *** empty log message ***
23101 1993-04-18 Noah Friedman <friedman@gnu.org>
23103 * Makefile.in: *** empty log message ***
23105 1993-04-17 Noah Friedman <friedman@gnu.org>
23107 * Makefile.in: *** empty log message ***
23109 1993-04-15 Richard Stallman <rms@gnu.org>
23111 * src/main.c, src/files.c:
23114 1993-04-15 Noah Friedman <friedman@gnu.org>
23116 * configure.in: entered into RCS
23118 * configure.in: *** empty log message ***
23120 * configure.in: New file.
23122 1993-04-14 Richard Stallman <rms@gnu.org>
23124 * Makefile.in: New file.
23126 1993-04-13 Richard Stallman <rms@gnu.org>
23128 * src/version.c: New file.
23130 1993-03-25 Richard Stallman <rms@gnu.org>
23132 * src/output.c: entered into RCS
23134 1992-09-25 Richard Stallman <rms@gnu.org>
23136 * configure.bat: entered into RCS
23138 1992-06-22 Richard Stallman <rms@gnu.org>
23140 * src/vmsgetargs.c: entered into RCS
23142 1992-06-22 Richard Stallman <rms@gnu.org>
23144 * doc/bison.rnh: entered into RCS
23146 1992-04-20 David J. MacKenzie <djm@gnu.org>
23148 * README: entered into RCS
23150 1992-01-22 Richard Stallman <rms@gnu.org>
23152 * src/machine.h: entered into RCS
23154 1991-12-21 Richard Stallman <rms@gnu.org>
23156 * src/lalr.c, src/closure.c:
23159 1991-12-20 Richard Stallman <rms@gnu.org>
23161 * src/state.h: entered into RCS
23163 1991-12-18 Richard Stallman <rms@gnu.org>
23165 * src/print.c, src/nullable.c, src/derives.c:
23168 1991-11-03 David J. MacKenzie <djm@gnu.org>
23170 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
23173 1988-09-09 Richard Stallman <rms@gnu.org>
23175 * src/bison.hairy: entered into RCS
23177 1987-12-16 Richard Stallman <rms@gnu.org>
23179 * REFERENCES: entered into RCS
23184 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
23185 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
23186 Free Software Foundation, Inc.
23188 Copying and distribution of this file, with or without
23189 modification, are permitted provided the copyright notice and this
23190 notice are preserved.