1 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
3 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
5 (Java Differences): Fix some typos.
6 * THANKS: Add Sebastian Setzer.
8 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
10 * data/java.m4 (b4_single_class_if): Remove.
11 (b4_abstract_if): Look at "%define abstract".
13 (b4_union_name): Rename...
14 (b4_yystype): ... to this. Map to "%define stype".
15 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
16 b4_maybe_throws): Fix quoting.
17 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
18 * data/lalr1.java (Lexer interface): Always define.
19 (Lexer interface within parser class): Remove.
20 (YYLexer class): New, used when "%code lexer" is present.
21 (constructor): When "%code lexer" is used, pass %lex-param
22 to the lexer constructor.
23 (yylex, yyparse): Remove %lex-param from method invocations
24 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
26 * doc/bison.texinfo (Java Bison Interface): Mention "%define
27 abstract". Rename "%define union_name" to "%define stype".
28 Rename method names according to previous patch.
29 (Java Scanner Interface): Describe "%code lexer" instead of
30 "%pure-parser" and "%define single_class".
31 (Java Differences): Mention "%code lexer".
33 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
34 Include scanner here, using macros from tests/local.at.
35 (AT_DATA_CALC_Y): Remove final argument.
36 (_AT_CHECK_JAVA_CALC): Likewise.
37 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
38 of %locations and %error-verbose.
39 (main): Test with and without %lex-param.
40 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
41 (AT_BISON_OPTION_POPDEFS): Pop it.
43 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
45 DJGPP spefic issue. Inhibit the use of disallowed characters for
46 file name genertion on Win98, WinXP, etc. These are |<>":?*\
47 and concern testsuite case 46.
48 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
49 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
50 * djgpp/config.bat: Inhibit the use of disallowed characters.
52 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
54 Miscellaneous %define and %code cleanup.
55 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
56 values are interpreted.
57 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
58 documentation a little more.
59 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
60 muscle_percent_define_insert, muscle_percent_code_grow): New
62 * src/muscle_tab.h (muscle_percent_define_insert,
63 muscle_percent_code_grow): Prototype.
64 * src/parse-gram.y (prologue_declaration): Use
65 muscle_percent_define_insert and muscle_percent_code_grow when parsing
66 %define and %code directives.
68 Make it easy to share %define boolean variables between the front-end
69 and back-end. Though not used yet, this will be useful in the future.
70 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
71 Bison uses of names rather than just skeleton uses of names.
72 (b4_percent_define_get, b4_percent_define_ifdef): Rename
73 b4_percent_define_skeleton_variables(VARIABLE) to
74 b4_percent_define_bison_variables(VARIABLE).
75 (b4_percent_code_get, b4_percent_code_ifdef): Rename
76 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
77 b4_percent_code_bison_qualifiers(QUALIFIER).
78 (b4_check_user_names_wrap): Update for renames.
79 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
80 muscle_percent_define_default): New functions mimicking
81 b4_percent_define_flag_if and b4_percent_define_default.
83 For %define variables, report locations for invalid values and
85 * data/bison.m4 (b4_percent_define_flag_if): Read
86 b4_percent_define_loc(VARIABLE) to report the location of an invalid
88 (b4_percent_define_default): Save a special location in
89 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
90 must later be reported as invalid.
91 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
93 (muscle_percent_define_insert): Record the location of VARIABLE in
94 muscle percent_define_loc(VARIABLE), and use it to report the previous
95 location for a redefinition.
96 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
97 (muscle_percent_define_default): Update like b4_percent_define_default.
98 (muscle_grow_user_name_list): Rename to...
99 (muscle_user_name_list_grow): ... this for consistency and use
100 muscle_location_grow.
101 * src/muscle_tab.h (muscle_location_grow): Prototype.
102 * tests/input.at (%define errors): Update expected output.
103 * tests/skeletons.at (%define boolean variables: invalid skeleton
104 defaults): New test case.
106 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
108 * src/print.c (lookahead_set, state_default_rule): Remove.
109 (print_reductions): Replace state_default_rule invocation with
110 equivalent use of yydefact, which was computed in token_actions in
112 (print_results): Don't allocate lookahead_set.
114 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
116 * data/lalr1.java: Prefix all private members with yy.
118 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
120 Use YYFPRINTF instead of fprintf where appropriate. Reported by
122 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
123 * THANKS: Add Sébastien Fricker.
124 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
125 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
126 accept a variable number of arguments.
128 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
130 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
132 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
134 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
135 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
136 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
138 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
140 Undo my 2007-02-07 change, switching back to the c-strcase module
141 introduced in the 2007-02-03 change. Bruno Haible reported that
142 the 2007-02-07 change would be dangerous in Turkish if we add a
143 language whose name contains "i", since "i" is not lowercase "I"
145 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
146 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
147 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
148 * m4/.cvsignore: Remove strcase.m4.
149 * src/getargs.c: Revert 2007-02-07 change, as follows.
151 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
153 2007-02-11 Bruno Haible <bruno@clisp.org>
155 Enable the Java related testsuite tests when the only Java compiler
156 found is a gcj < 4.3. Discussed at
157 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
158 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
160 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
162 * data/Makefile.am: Update copyright date.
163 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
164 yypstate_new returns NULL.
165 (yypstate_new): Return NULL if malloc does.
166 * src/reader.c (packgram): Move translation of rule actions from the
167 beginning of packgram to...
168 (check_and_convert_grammar): ... here right before packgram is invoked
169 so it's easier to write more complete comments, and remove redundant
172 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
174 As in semantic actions, make @$ in %initial-action, %destructor, and
175 %printer imply %locations.
176 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
178 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
179 (@$ in %initial-action implies %locations,
180 @$ in %destructor implies %locations,
181 @$ in %printer implies %locations): ... these new test cases.
183 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
185 Undo most of the 2007-02-03 change, switching to the strcase module
186 now that gnulib strcase has been fixed.
187 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
188 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
189 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
190 * m4/.cvsignore: Add strcase.m4.
191 * src/getargs.c: Revert 2007-02-03 change, as follows.
192 Don't include c-strcase.h.
193 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
194 strcasecmp has "unspecified behavior" outside the POSIX locale,
195 but it works fine in practice if at least one argument is ASCII,
196 as is the case in Bison.
198 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
200 * tests/java.at: Skip tests if only one of javac/java is present.
201 Reported by Joel E. Denny.
202 * tests/atlocal.in: Adjust copyright years.
204 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
206 * data/lalr1.java (Stack): Work around old verifiers that disallow
207 access to the private fields of an inner class, from the outer class.
208 We can make Stack's fields public because user code doesn't have access
209 to the instance of Stack used by parse(). Reported by Paul Eggert.
211 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
213 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
214 the right spot for these files?
215 * bootstrap.conf (gnulib_modules): Add c-strcase.
216 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
218 * src/getargs.c: Include c-strcase.h.
219 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
220 to avoid unspecified behavior.
222 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
224 * doc/bison.texinfo (Decl Summary): Correct typo.
226 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
228 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
229 Complain if the value does not match empty, "true" or "false".
230 * data/c++.m4: Adjust default definitions of %define variables.
231 * data/java.m4: Adjust default definitions of %define variables.
232 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
234 * tests/input.at (Boolean %define variables): Test new behavior.
236 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
238 * NEWS: Mention java.
239 * TODO: Remove things that are done.
240 * bootstrap.conf: Add javacomp-script and javaexec-script.
241 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
243 * data/Makefile.am: Add new files.
244 * data/java-skel.m4: New.
246 * data/lalr1.java: New.
248 * doc/bison.texinfo: Put "A Complete C++ Example" under
249 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
250 under Other Languages.
252 * src/getargs.c (valid_languages): Add Java.
253 * src/getargs.h (struct bison_language): Update size of string fields.
255 * tests/Makefile.am: Add java.at.
256 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
257 * tests/java.at: New.
258 * tests/testsuite.at: Include it.
260 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
263 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
264 at_directive_argv arguments so these no longer have to be global
265 variables. Also, update the implementation for the following changes.
266 (fail_for_at_directive_too_many_args,
267 fail_for_at_directive_too_few_args): Add at_directive_name argument.
268 (at_directive_name): Remove as at_directive_argv[0] will be used for
270 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
271 for the directive name.
272 (at_directive_argc, at_directive_argv): Make these local within
273 skel_lex instead of global.
274 (INITIAL): Update directive start action for above changes.
275 (SC_AT_DIRECTIVE_ARG): Rename to...
276 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
277 (SC_AT_DIRECTIVE_SKIP_WS): Update.
278 (scan_skel): Move yylex_destroy to...
279 (skel_scanner_free): ... here.
280 * tests/skeletons.at (installed skeleton file name): Rename to...
281 (installed skeleton file names): ... this.
283 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
285 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
286 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
287 Summary" not "Directives".
288 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
289 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
290 since the former is now the more complete one.
291 (Prologue Alternatives): Likewise and do the same for %defines.
292 (Table of Symbols): Add summary of %code, add summary of %define, and
293 move full %code documentation to...
294 (Decl Summary): ... here for consistency with other entries in these
296 Move %define entry in order to keep this list alphabetized.
297 Reword %define entry a little to put less emphasis on the skeleton
298 concept, which most users shouldn't have to think about.
300 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
302 Adjust to recent gnulib changes.
303 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
304 Add string.h, string_.h, unistd_.h, wchar_.h.
305 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
306 * src/system.h: Don't include <stpcpy.h>; this is now done by
309 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
311 Simplify implementation of unqualified %code, implement macros for
312 uniform treatment of boolean %define flags. Document %define.
313 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
314 b4_percent_code_ifdef): New.
315 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
316 * data/c++.m4: Define default value for global_tokens_and_yystype.
317 * data/glr.cc: Likewise.
318 * data/location.cc: Use b4_percent_define_flag_if.
320 * doc/bison.texinfo (Decl Summary): Document %define.
322 * src/parse-gram.y (Unqualified %code): Change muscle name to
324 (content.opt): Default to empty.
326 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
328 Implement support for relative and absolute skeleton file names.
329 Discussed starting at
330 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
331 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
332 (Bison Options): Document in --skeleton entry.
333 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
334 full_skeleton can't necessarily hold all of pkgdatadir.
335 If the specified skeleton file name contains a `/', don't prepend
337 * src/parse-gram.y (prologue_declaration): If the specified skeleton
338 file name contains a `/', prepend the grammar file directory.
339 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
340 * skeletons.at: New file.
341 (relative skeleton file names): New test case.
342 (installed skeleton file names): New test case.
343 * tests/testsuite.at: Include skeletons.at.
345 * bootstrap: Update copyright to 2007.
347 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
349 * bootstrap: Remove occurrences of .#bootmp from the files.
351 2007-01-17 Akim Demaille <akim@epita.fr>
353 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
355 Use per-type %printer.
357 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
359 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
360 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
361 djgpp/config.site, src/files.c, src/files.h, src/main.c,
362 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
363 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
364 tests/glr-regression.at, tests/input.at, tests/local.at,
365 tests/output.at, tests/torture.at: Update copyright to 2007.
367 2007-01-16 Akim Demaille <akim@epita.fr>
369 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
371 (Calc++ Scanner): Exit with failure if we can't open the input
373 Accept "-" standing for stdin.
374 (Calc++ Top Level): Print the result only if the parsing was
377 2007-01-16 Akim Demaille <akim@epita.fr>
379 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
381 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
382 and Joel E. Denny <jdenny@ces.clemson.edu>
384 Clean up %define and %code implementation in M4 some. Most
385 importantly, rename all related macros to be in the b4_percent_define
386 and b4_percent_code namespaces. Also, complete support for `.' in
387 %define variable names and %code qualifiers.
388 * data/bison.m4 (b4_check_user_names): Check for special
389 "SKELETON-NAMESPACE(name)" macros instead of using two nested
391 (b4_get_percent_define, b4_get_percent_code): Rename to...
392 (b4_percent_define_get, b4_percent_code_get): ... these.
393 Extend documentation with examples.
394 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
395 b4_percent_define_skeleton_variables and
396 b4_percent_code_skeleton_qualifiers.
397 Expect any value for the %define variable `foo' to be stored in the
398 macro named `b4_percent_define(foo)'; expect any %code blocks for the
399 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
400 expect any unqualified %code blocks to be stored in a macro named
401 `b4_percent_code_unqualified'.
402 Use m4_indir so that %define variable names and %code qualifiers can
403 contain `.', which is allowed by the grammar parser.
404 (b4_percent_define_default): New macro to set a default value for a
406 (m4_wrap): Update wrapped code, and fix some underquoting.
407 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
408 Expect grammar uses of %define variables and %code qualifiers to be
409 defined in b4_percent_define_user_variables and
410 b4_percent_code_user_qualifiers.
411 * data/c++.m4: Use b4_percent_define_default rather than
412 m4_define_default. Fix some underquoting. Skeleton usage of %define
413 variable define_location_comparison now implies skeleton usage of
414 %define variable filename_type.
415 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
416 data/push.c, data/yacc.c: Update macro names.
417 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
420 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
422 DJGPP specific issues.
424 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
425 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
427 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
429 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
430 run parsers in all tests so that Valgrind is invoked during
431 maintainer-check-valgrind.
432 (Duplicate representation of merged trees): Free all semantic values.
433 (Duplicated user destructor for lookahead): Likewise.
435 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
437 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
439 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
440 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
441 miss Valgrind messages.
442 (Exploding the Stack Size with Malloc): Likewise.
444 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
446 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
447 locals. Reported by Juan Manuel Guerrero at
448 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
449 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
450 Fix some indentation also.
451 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
452 explaining this issue.
454 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
455 and Joel E. Denny <jdenny@ces.clemson.edu>
457 Simplify union and prologue handling, and escape union and lex/parse
458 params with digraphs.
459 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
460 values to the empty string since these are no longer guaranteed
461 initialized by the front-end.
462 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
463 braces around b4_user_stype since this is no longer done by the
465 * src/files.c, src/files.h (pre_prologue_obstack,
466 post_prologue_obstack): Remove.
467 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
468 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
469 with digraphs. This fixes lex params and parse params.
470 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
471 * src/output.c (prepare): Remove muscle insertion of the prologues.
472 (output): Remove freeing of pre_prologue_obstack and
473 post_prologue_obstack.
474 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
475 than prologue_augment for prologue parsing so you don't need prologue
477 (grammar_declaration): For %union RHS, use `braceless' instead of
478 "{...}" so that braces are already stripped and code is escaped with
480 * src/reader.c (prologue_augment): Remove.
481 (reader): Remove initialization of pre_prologue_obstack and
482 post_prologue_obstack.
483 * src/reader.h (prologue_augment): Remove.
485 * data/c.m4: Remove stray parenthesis.
487 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
489 Remove quotes from variables names in %define directives and from
490 qualifiers in %code directives, and restrict the characters that are
491 allowed in them to M4-friendly ones. For %define, continue to support
492 the quoted form as a deprecated feature. Discussed starting at
493 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
494 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
496 * doc/bison.texinfo (Prologue Alternatives): Update.
497 (Bison Declaration Summary): In %defines entry, update mention of
498 `%code requires' and `%code provides'.
499 (C++ Location Values): Update %define uses.
500 (Calc++ Parser Interface): Likewise.
501 (Calc++ Parser): Likewise, and update `%code requires' uses.
502 (Table of Symbols): Update %code documentation.
503 * src/parse-gram.y (prologue_declaration): For %define variables, use
504 `variable' instead of `STRING'.
505 (grammar_declaration): For %code qualifiers, use `ID' instead of
507 (variable): New nonterminal that takes an `ID' or a `STRING'.
508 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
510 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
511 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
512 (%define errors): Update %define uses.
514 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
516 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
517 instead of muscle_insert for %define values so that M4-special
518 characters are replaced with digraphs.
519 * tests/input.at (%define errors): Extend to check weird values.
521 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
523 Instead of having skeletons declare all valid %define variables and
524 %code qualifiers, provide macros that retrieve the associated values
525 and build these lists automatically. Thus Bison will now warn when a
526 variable or qualifier is not used by the skeleton in the current
527 invocation regardless of whether it might sometimes be used by that
528 skeleton in other invocations. Also, move all %define value macros to
529 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
530 form, which is replaced by %code.
531 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
532 (b4_check_user_names): ... this, and change the series of valid name
533 arguments to a single list argument for names used in the skeleton
534 similar to the existing list argument for names used in the grammar.
535 Warn instead of complaining.
536 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
537 values and %code code, to format %code code properly, and to build
538 lists of all %define variables and %code qualifiers used in the
539 skeleton: b4_skeleton_percent_define_variables and
540 b4_skeleton_percent_code_qualifiers.
541 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
543 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
544 the skeleton names lists can finish building first. In place of
545 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
546 expect the lists b4_user_percent_define_variables and
547 b4_user_percent_code_qualifiers.
548 * data/c++.m4: Where setting default values for b4_parser_class_name,
549 b4_location_type, b4_filename_type, b4_namespace, and
550 b4_define_location_comparison, update their names to the
551 b4_percent_define_ namespace.
552 * data/glr.c: Don't use b4_check_percent_define_variables and
553 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
554 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
555 (b4_parser_class_name, b4_namespace): Define these using
556 b4_get_percent_define for parser_class_name and namespace.
557 * data/location.cc: Use b4_get_percent_define.
558 * data/push.c: Don't use b4_check_percent_define_variables and
559 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
560 * data/yacc.c: Likewise, and don't call m4_exit in
561 b4_use_push_for_pull_if or m4_wrap code will never execute.
562 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
564 (muscle_grow_user_name_list): ... this for consistency with the
565 terminology used in bison.m4.
566 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
567 %define variable names, and rename muscle used_percent_define_variables
568 to user_percent_define_variables.
569 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
570 user_percent_code_qualifiers.
572 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
573 {CODE} form is no longer accepted.
574 * tests/input.at (Reject bad %code qualifiers): Rename to...
575 (Reject unused %code qualifiers): ... this, and update test output.
576 (%define error): Update test output.
578 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
580 Check for unrecognized %define variables similar to checking for
581 unrecognized %code qualifiers. Check for redefined %define variables.
582 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
584 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
585 (b4_check_percent_define_variables): New, also wraps it.
586 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
587 variables using b4_check_percent_define_variables.
588 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
589 all those exercised in the test suite and all those listed in the
590 `Default values' section of c++.m4. Are there others?
591 * data/push.c, data/yacc.c: Declare no valid %define variables.
592 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
593 similar to muscle_find, but it works even when the muscle stores a
595 (muscle_grow_used_name_list): New function for constructing the used
596 name list muscles that b4_check_for_unrecognized_names requires.
597 * src/parse-gram.y (prologue_declaration): Warn if a variable is
598 %define'd more than once. Define the b4_used_percent_define_variables
599 muscle with muscle_grow_used_name_list.
600 (grammar_declaration): Abbreviate %code code with
601 muscle_grow_used_name_list.
602 * tests/input.at (%define errors): New.
604 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
606 Provide warn_at, complain_at, and fatal_at function callbacks to the
607 skeletons, and use this for %code qualifier complaints.
608 * data/bison.m4 (b4_error_at): New, invoked by...
609 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
610 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
611 @fatal_at(...@) directives.
612 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
613 qualifiers in b4_used_percent_code_qualifiers and to use
615 * src/location.c, src/location.h (boundary_set_from_string): New global
617 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
619 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
620 to b4_used_percent_code_qualifiers.
621 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
623 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
624 (lineno): Rename to...
625 (out_lineno): ... this so I don't misunderstand it again.
626 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
627 here; these newlines are in the input but not the output file.
628 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
629 (at_directive_perform): ... this new static function, and add handling
630 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
632 * tests/input.at (Reject bad %code qualifiers): Update test output with
633 locations and extend.
635 * tests/output.at (Output file name: [, Output file name: ]): Remove
636 bogus comment about these tests failing.
638 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
640 Clean up b4_check_percent_code_qualifiers a little.
641 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
642 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
643 documentation and add examples.
644 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
647 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
649 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
650 unreliable -- especially when they're hidden inside another macro.
651 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
652 data/c.m4: Remove m4_divert(-1).
653 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
654 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
655 m4_divert_push(0) and m4_divert_pop(0).
656 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
657 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
658 pushed and popped by m4sugar, should be first on the stack.
660 Provide warn, complain, and fatal function callbacks to the skeletons.
661 This provides more flexibility than m4_fatal, improves the error
662 message format, and captures messages for translation. Discussed
664 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
665 * data/bison.m4 (b4_error): New, invoked by...
666 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
667 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
668 directives. Because these M4 macros might be called when the current
669 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
670 the previous removal of uses of m4_divert, which caused trouble.
671 (b4_check_percent_code_qualifiers): Use b4_complain instead of
672 m4_fatal to report unrecognized %code qualifiers.
673 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
674 push parser requests.
675 * data/glr.c: Use b4_complain instead of m4_fatal to report
676 non-deterministic push parser requests.
677 Update @output usage to @output(...@) form.
678 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
679 report missing %defines. Update @output usage to @output(...@) form.
680 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
682 * src/main.c (main): Invoke skel_scanner_free.
683 * src/scan-skel.h (skel_scanner_free): Prototype new function.
684 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
685 obstack_for_string from flex-scanner.h.
686 (YY_DECL): Use to declare skel_lex static.
687 (decode_at_digraphs): Remove; now handled in the new
688 SC_AT_DIRECTIVE_ARG start condition.
689 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
691 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
692 at_directive_argv): New static globals.
693 (INITIAL): Use fail_for_invalid_at.
694 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
695 recognize the start of a generalized `@directive(...@)' form and
697 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
698 directive args (using the new obstack_for_string), to decode the
699 contained @ diagraphs, and to perform the directive. It recognizes
700 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
702 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
703 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
705 (scan_skel): Initialize obstack_for_string on the first call.
706 (skel_scanner_free): New function to free obstack_for_string.
707 * tests/input.at (Reject bad %code qualifiers): Update test output.
709 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
711 Consolidate the 4 prologue alternative directives (%code, %requires,
712 %provides, and %code-top) into a single %code directive with an
713 optional qualifier field. Discussed at
714 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
715 * NEWS (2.3a+): Rewrite the existing entry for the prologue
717 * doc/bison.texinfo (Prologue Alternatives): Update.
718 (Decl Summary): Update to %code "requires" and %code "provides".
719 (Calc++ Parser): Update to %code "requires".
720 (Table of Symbols): Remove entries for %requires, %provides, and
721 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
722 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
723 are replaced by b4_percent_code_provides and b4_percent_code_requires,
724 which are skeleton-specific.
725 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
726 declare what %code qualifiers it supports and to complain if any other
727 qualifiers were used in the grammar.
728 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
729 and b4_user_code([b4_percent_code_provides]) in place of
730 b4_user_requires and b4_user_provides.
731 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
732 Add b4_user_code([b4_percent_code_top]) and
733 b4_user_code([b4_percent_code]).
734 Invoke b4_check_percent_code_qualifiers.
735 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
736 PERCENT_REQUIRES): Remove.
737 (grammar_declaration): Remove RHS's for %code-top, %provides, and
738 %requires. Rewrite the %code RHS as the unqualified form defining the
739 muscle b4_percent_code. Add another RHS for the qualified %code form,
740 which defines muscles of the form b4_percent_code_QUALIFIER and the
741 b4_used_percent_code_qualifiers muscle.
742 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
743 PERCENT_REQUIRES): Remove.
744 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
745 %code "requires" and %code "provides".
746 * tests/input.at (Reject bad %code qualifiers): New.
748 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
750 Use the new code_props interface for destructors and printers.
751 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
752 printer_location members, and change the type of the destructor and
753 printer members to code_props.
754 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
755 symbol_printer_get, semantic_type_destructor_set,
756 semantic_type_printer_set, default_tagged_destructor_set,
757 default_tagless_destructor_set, default_tagged_printer_set,
758 default_tagless_printer_set): Use code_props in arguments and return
759 types in place of char const * and location.
760 (symbol_destructor_location_get, symbol_printer_location_get): Remove
761 since the locations are now contained in the return of
762 symbol_destructor_get and symbol_printer_get.
763 * src/output.c (symbol_destructors_output, symbol_printers_output):
765 (symbol_code_props_output): ... this to eliminate duplicate code.
766 (output_skeleton): Update to use symbol_code_props_output.
767 * src/reader.c (symbol_should_be_used): Update use of
768 symbol_destructor_get.
769 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
770 Update uses of the various _destructor_set and _printer_set functions.
771 * src/symtab.c: (default_tagged_destructor_location,
772 default_tagless_destructor_location, default_tagged_printer_location,
773 default_tagless_printer_location): Remove since we...
774 (default_tagged_destructor, default_tagless_destructor,
775 default_tagged_printer, default_tagless_printer): ... change the type
776 of these to code_props.
777 (symbol_new, semantic_type_new, symbol_destructor_set,
778 semantic_type_destructor_set, symbol_destructor_get,
779 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
780 symbol_check_alias_consistency, default_tagged_destructor_set,
781 default_tagless_destructor_set, default_tagged_printer_set,
782 default_tagless_printer_set): Update.
783 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
784 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
786 (symbol_print): Use SYMBOL_CODE_PRINT.
788 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
790 Use the new code_props interface for rule actions.
791 * src/symlist.h (symbol_list): Replace action, action_location, and
792 used members with a code_props action_props member.
793 * src/reader.c (symbol_should_be_used, grammar_rule_check,
794 grammar_midrule_action, grammar_current_rule_merge_set,
795 grammar_current_rule_symbol_append, packgram): Update.
796 * src/scan-code.h (translate_rule_action): Remove, no longer used.
797 * src/scan-code.l (handle_action_dollar): Update.
798 (translate_rule_action): Remove, no longer used.
799 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
801 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
803 Use the new code_props interface in parse-gram.y.
804 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
805 Update all uses of translate_* functions to use the new code_props
806 interface and to use gram_scanner_last_string_free and
807 code_scanner_last_string_free where possible.
808 (grammar_declaration): symbol_list_destructor_set and
809 symbol_list_printer_set now perform the translation, so don't do it
810 here. Use gram_scanner_last_string_free where possible.
811 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
812 translate_code): Remove, no longer used.
813 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
814 symbol_list_printer_set): Perform code translation here rather than
815 depending on the caller to do so.
817 * src/symlist.h (struct symbol_list): Correct some documentation typos.
818 * src/scan-gram.h (gram_last_string): Remove declaration.
819 * src/scan-gram.l (last_string): Declare it static.
821 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
823 Encapsulate code properties and related functionality for the various
824 destructors, printers, and actions into a code_props structure and
825 interface. This patch merely implements code_props in scan-code.h and
826 scan-code.l. Future patches will rewrite other modules to use it.
827 Discussed starting at
828 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
829 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
830 consistently initialize const structs that have an empty location
832 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
833 to ensure consistency.
834 * src/scan-code.h (code_props): New structure.
835 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
836 function, macro, and const global variable for initializing a
837 code_props with no code.
838 (code_props_plain_init, code_props_symbol_action_init,
839 code_props_rule_action_init, code_props_translate_code): The rest of
840 the new code_props functional interface. Among other things, the init
841 functions set the code_props kind field so that
842 code_props_translate_code will know whether to behave like
843 translate_symbol_action, translate_rule_action, or translate_code.
844 These old translate functions must remain until all other modules are
845 updated to use the new code_props interface.
846 (code_scanner_last_string_free): New function similar to
847 gram_scanner_last_string_free.
848 (code_scanner_free): Add documentation.
849 * src/scan-code.l: Implement the new interface.
850 (code_lex): Make it static, add a code_props* argument, and remove the
852 (last_string): New static global similar to the one in scan-gram.l.
853 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
855 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
856 code_props since Bison may one day use this information for destructors
858 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
859 (handle_action_dollar): Use symbol_list_n_get and set used flag
860 directly since symbol_list_n_used_set is removed.
861 (translate_action): Add a code_props* argument and remove the rule,
862 action, and location arguments. Pass the code_props* on to code_lex.
863 (translate_rule_action, translate_symbol_action, translate_code):
864 Rewrite as wrappers around the new code_props interface.
865 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
866 it would eventually need to break the encapsulation of code_props.
868 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
870 * etc/.cvsignore: New.
872 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
874 Add maintainer-push-check to run maintainer-check using push parsing in
875 place of pull parsing where available.
876 * Makefile.am (maintainer-push-check): New.
877 * data/bison.m4 (b4_use_push_for_pull_if): New.
878 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
879 appropriately based on their existing values.
880 (yypush_parse): Don't print push-parser-specific diagnostics if push
881 parsing is being used in place of pull parsing.
882 * data/yacc.c: If push parsing should replace pull parsing, redirect to
884 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
885 variable, and insert b4_use_push_for_pull_flag into muscles.
886 * tests/Makefile.am (maintainer-push-check): New.
888 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
890 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
891 (whether successful or failed) so that yypush_parse can be invoked
892 again to start a new parse using the same yypstate.
893 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
894 check multiple yypull_parse invocations on the same yypstate. For pull
895 mode, extend to check multiple yyparse invocations.
896 (Exploding the Stack Size with Alloca): Extend to try with
898 (Exploding the Stack Size with Malloc): Likewise.
900 * tests/calc.at (Simple LALR Calculator): Don't specify
901 %skeleton "push.c" since %push-pull-parser implies that now.
902 * tests/headers.at (export YYLTYPE): Don't check for the push
903 declarations. Otherwise, this test case can't be used to see if push
904 mode can truly emulate pull mode.
905 * tests/input.at (Torturing the Scanner): Likewise.
906 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
907 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
908 AT_YACC_IF, which now includes the case of push mode since %skeleton
909 need not be used for push mode. This will be more intuitive once
910 push.c is renamed to yacc.c.
912 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
914 For push mode, convert yyparse from a macro to a function, invoke yylex
915 instead of passing a yylexp argument to yypull_parse, and don't
916 generate yypull_parse or yyparse unless %push-pull-parser is declared.
917 Discussed starting at
918 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
919 * data/bison.m4 (b4_pull_if): New.
920 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
921 * data/push.c: Improve M4 quoting a little.
922 (b4_generate_macro_args, b4_parenthesize): Remove.
923 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
924 any time a pull parser is requested.
925 Don't #define this as a wrapper around yypull_parse. Instead, when
926 both push and pull are requested, make it a function that does that
928 (yypull_parse): If there's a b4_prefix, #define this to
929 b4_prefix[pull_parse] when both push and pull are requested.
930 Don't define this as a function unless both push and pull are
932 Remove the yylexp argument and hard-code yylex invocation instead.
933 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
935 * src/getargs.c (pull_parser): New global initialized to true.
936 * getargs.h (pull_parser): extern it.
937 * src/output.c (prepare): Insert pull_flag muscle.
938 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
939 (prologue_declaration): Set both push_parser and pull_parser = true for
940 %push-pull-parser. Set push_parser = true and pull_parser = false for
942 * src/scan-gram.l: Don't accept %push_parser as an alternative to
943 %push-parser since there's no backward-compatibility concern here.
944 Scan %push-pull-parser.
945 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
946 instead of %push-parser.
947 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
948 prototype it in the module that calls yyparse.
949 * tests/input.at (Torturing the Scanner): Likewise.
950 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
952 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
954 Update etc/bench.pl. Optimize push mode a little (the yyn change
955 deserves most of the credit).
956 * Makefile.am (SUBDIRS): Add etc subdirectory.
957 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
958 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
959 yytoken, yyval, and yyloc declarations to...
960 (yyparse or yypush_parse): ... here to improve performance. For
961 yypush_parse invocations after the first, be sure to assign yyn its old
963 (yypstate_new): Don't bother initializing the yyresult field since the
964 initial value isn't used.
965 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
966 remove the #define that, in push mode, set it to yyps->NAME.
967 * etc/Makefile.am: New.
968 * etc/bench.pl: Remove and build it instead from...
969 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
970 "tests/bison" from the build directory by default rather than just
971 invoking "bison" from $PATH.
972 (calc_grammar): Update push parser code: don't declare yylval globally,
973 don't define yyparse_wrapper, and don't #define yyparse.
974 (bench_grammar): Update to check all working combinations of yacc.c,
975 push.c, impure, pure, pull, and push.
977 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
979 For push mode, add pull wrappers around yypush_parse.
980 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
981 (yypull_parse): New function wrapping yypush_parse.
982 (yyparse): New #define wrapping yypull_parse.
983 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
985 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
986 prototype yylex in the module that calls yyparse, and don't prototype
987 yyparse there. Otherwise, the yyparse expansion won't compile.
988 * tests/input.at (Torturing the Scanner): Likewise.
990 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
992 Enable push parsers to operate in impure mode. Thus, %push-parser no
993 longer implies %pure-parser. The point of this change is to move
994 towards being able to test the push parser code by running the entire
995 test suite as if %push-parser had been declared.
996 * data/push.c (yypush_parse): For impure mode, remove the
997 yypushed_char, yypushed_val, and yypushed_loc arguments.
998 Instead, declare these as local variables initialized to the global
999 yychar, yylval, and yylloc.
1000 For the first yypush_parse invocation only, restore the initial values
1001 of these global variables when it's time to read a token since they
1002 have been overwritten.
1003 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
1005 * tests/calc.at (Simple LALR(1) Calculator): Always declare
1006 %pure-parser along with %push-parser since this test case was designed
1007 for pure push parsers.
1008 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
1009 (AT_YACC_OR_PUSH_IF): New.
1010 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
1011 add a note that it's still wrong for some cases (as it has been for a
1013 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
1014 %push-parser no longer implies %pure-parser.
1016 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
1018 Remove some unnecessary differences between the pull parser code and
1019 the push parser code. This patch enables yynerrs in push mode.
1020 * data/push.c: Reformat M4 a little.
1021 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
1022 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
1023 because push mode is on. Instead, if pure mode is on, move yynerrs
1025 (b4_declare_parser_state_variables): ... here.
1026 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
1027 to yyps->NAME so it can be used in yypush_parse.
1028 (yypush_parse): Don't omit uses of yynerrs in push mode.
1030 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
1032 Fix bug such that the first pushed token's value and location are
1033 sometimes overwritten (sometimes by %initial-action) before being used.
1034 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
1035 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
1036 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
1037 more closely mimic the pull parser logic.
1038 Don't copy the pushed token to yychar, yylval, and yylloc until it's
1039 time to read a token, which is after any initialization of yylval and
1041 (gottoken): Rename label to...
1042 (yyread_pushed_token): ... for clarity and to avoid infringing on the
1045 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
1047 Rearrange initialization of the parser state variables so that the
1048 skeleton doesn't have to have a copy for pull mode and another for push
1049 mode. This patch also fixes at least a bug such that yylloc was not
1050 initialized (with b4_location_initial_line and
1051 b4_location_initial_column) upon calling yypush_parse. However, that
1052 initialization now overwrites the first token's location;
1053 %initial-action assigning @$ already did the same thing, and both bugs
1054 will be fixed in a later patch.
1055 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
1056 (b4_declare_parser_state_variables): Remove initialization of yytoken,
1057 yyss, yyvs, yyls, and yystacksize.
1058 (yypstate_new): Remove initialization of some yypstate fields: yystate,
1059 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
1061 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
1062 yyps->NAME so it can be used in yypush_parse.
1063 (yyparse or yypush_parse): For yypush_parse, don't print the
1064 "Starting parse" diagnostic for invocations after the first.
1065 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
1066 yypush_parse, only do it for the first invocation.
1067 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
1068 initialization to occur in yypush_parse but only on the first
1071 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
1073 * data/push.c: Add CPP guards around push parser declarations in both
1074 the header and the code file.
1075 In the code file, move the push parser declarations to the same place
1076 they appear in the header file.
1077 Clean up the M4 some, especially the inconsistent underquoting in
1078 some b4_c_function_def and b4_c_function_decl uses.
1080 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
1082 Encapsulate the push parser state variables into an M4 macro so the
1083 push skeleton doesn't have to list them again for pull mode's yyparse.
1084 For push mode, remove yypush_parse's local equivalents of these
1085 variables to eliminate unnecessary copying between the two sets at
1086 run-time. This patch also fixes at least a bug related to multiple
1087 %initial-action invocations in push mode.
1088 * data/push.c (b4_declare_parser_variables): Rename to...
1089 (b4_declare_scanner_communication_variables): ... this for clarity and
1091 (b4_declare_yyparse_variables): Remove and move its contents to the one
1092 spot where it was invoked.
1093 (b4_declare_parser_state_variables): New macro containing the parser
1094 state variables required by push mode.
1095 (struct yypstate): Replace all fields but yynew with
1096 b4_declare_parser_state_variables.
1097 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
1098 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
1099 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
1100 (yyparse or yypush_parse): For yyparse in pull mode, replace local
1101 parser state variable declarations with
1102 b4_declare_parser_state_variables.
1103 Don't initialize parser state variables when calling yypush_parse since
1104 yypstate_new already does that.
1105 Invoke the user's initial action only upon the first yypush_parse
1107 Remove all code that copies between the local parser state variables
1110 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
1112 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
1113 prevent a name collision in a future patch where these names will
1114 sometimes be #define'd.
1115 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
1116 since it no longer has the same name as the existing argument.
1117 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
1119 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
1120 and Joel E. Denny <jdenny@ces.clemson.edu>
1122 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
1123 that the argument is case-insensitive, and there's no `=' here.
1124 For the %skeleton entry, mention that %language is better.
1125 (Bison Options): Likewise for --language and --skeleton. Move the
1126 --skeleton entry so that the `Tuning the parser' section is sorted
1127 alphabetically on long options.
1128 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
1129 %language directive in detail here; cross-reference the %language
1130 documentation instead.
1131 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
1132 `%require "2.3b"' so that the example is always up-to-date.
1133 (Table of Symbols): Add entries for %language and %skeleton.
1134 * examples/extexi (normalize): Instead of replacing every %require
1135 argument with the current Bison version, just substitute for
1136 `@value{VERSION}'. This guarantees that we're testing what actually
1137 appears in the documentation.
1138 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
1139 rather than `@VERSION@'.
1141 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
1143 * NEWS: Reword the %language news a bit, and put it earlier.
1145 * src/getargs.c (skeleton_arg): Last arg is now location const *.
1146 Rewrite to simplify the logic.
1147 (language_argmatch): Likewise.
1148 (program_name): We now own this var.
1149 * src/getargs.h (struct bison_language): Use char[] rather than
1152 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
1154 * src/complain.c (program_name): Remove decl; no longer needed.
1155 * src/main.c (program_name): Remove; now belongs to getargs.
1157 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
1159 * NEWS: Document %language.
1161 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
1163 * data/c-skel.m4, data/c++-skel.m4: New files.
1164 * data/glr.c: Complain on push parsers.
1166 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
1168 (Decl Summary): Document %language and %skeleton.
1169 (Command line): Document -L.
1171 * examples/extexi: Rewrite %require directive.
1172 * examples/calc++/Makefile.am: Pass VERSION to extexi.
1174 * src/files.c (compute_exts_from_gc): Look in language structure
1176 (compute_file_name_parts): Check whether .tab should be added.
1177 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
1178 (language, skeleton_arg, language_argmatch): New.
1179 (long_options): Add --language.
1180 (getargs): Use skeleton_arg, add -L/--language.
1181 * src/getargs.h: Include location.h.
1182 (struct bison_language, language, skeleton_arg, language_argmatch): New.
1183 * src/output.c (prepare): Pick default skeleton from struct language.
1184 Don't dispatch C skeletons here.
1185 * src/parse-gram.y (PERCENT_LANGUAGE): New.
1186 (prologue_declaration): Add "%language" rule, use skeleton_arg.
1187 * src/scan-gram.l ("%language"): New rule.
1189 * tests/calc.at: Test %skeleton and %language.
1190 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
1191 (AT_GLR_IF): Look for %skeleton "glr.cc".
1192 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
1193 (AT_YACC_IF): Reject %language.
1195 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
1197 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
1198 since it wasn't used; only the typedef name 'semantic_type' is needed.
1199 Also, omit trailing white space.
1201 * bootstrap: Sync from coreutils.
1202 (gnulib_extra_files): Add build-aux/announce.gen.
1203 (slurp): Adjust .gitignore files like .cvsignore files.
1204 * build-aux/announce-gen: Remove from CVS, since bootstrap
1207 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
1209 Make %push-parser imply %pure-parser. This fixes several bugs; see
1210 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
1211 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
1213 * data/push.c: Don't bother testing b4_push_if when deciding whether
1214 to expand b4_declare_parser_variables globally.
1215 (yypush_parse): Likewise in here.
1217 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
1218 (yy_reduce_print): Reformat M4 for readability.
1220 2006-12-15 Bob Rossi <bob@brasko.net>
1221 and Joel Denny <jdenny@ces.clemson.edu>
1223 * data/push.c (yypstate): Add typedef, and update all uses of
1224 struct yypstate to just yypstate.
1225 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
1227 2006-12-14 Bob Rossi <bob@brasko.net>
1229 * data/push.c (yypush_parse): Declare prototype regardless of
1232 2006-12-14 Bob Rossi <bob@brasko.net>
1234 * data/push.c (yyparse): Remove the prototype and the #define when in
1237 2006-12-13 Bob Rossi <bob@brasko.net>
1239 * data/push.c (yypstate_init): Rename to...
1240 (yypstate_new): ... this and use b4_c_function_def.
1241 (yypstate_delete): New.
1242 (yypush_parse): Change parameters yynval and yynlloc to be const.
1243 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
1244 yypstate_delete functions.
1246 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
1248 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
1249 strange test case titles. Reported by Bob Rossi.
1251 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
1253 * TODO: Add pointer to Sylvain Schmitz's work on static detection
1254 of potential ambiguities in GLR grammers.
1256 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
1258 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
1259 `bison ', use m4_index instead of m4_substr since chopping up a string
1260 containing M4-special characters causes problems here.
1262 Fix a couple of bugs related to special characters in user-specified
1263 file names, and make it easier for skeletons to compute output file
1264 names with the same file name prefix as Bison-computed output file
1266 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
1267 b4_parser_file_name and b4_spec_defines_file instead of
1268 @output_parser_name@ and @output_header_name@, which are now redundant.
1269 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
1270 b4_parser_file_name, b4_spec_defines_file, and the new
1271 @basename(FILENAME@) instead of @output_parser_name@ and
1272 @output_header_name@, which inappropriately escaped the file names as
1274 * src/files.c (all_but_ext): Remove static qualifier.
1275 (compute_output_file_names): Move `free (all_but_ext)' to...
1276 (output_file_names_free): ... here since all_but_ext is needed later.
1277 * src/files.h (all_but_ext): Extern.
1278 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
1279 exactly what MUSCLE_INSERT_STRING used to do.
1280 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
1281 characters are escaped properly.
1282 * src/output.c (prepare): Define muscle file_name_all_but_ext as
1284 For pkgdatadir muscle, maintain previous functionality by using
1285 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
1286 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
1287 digraphs would never be expanded. Hopefully no one has M4-special
1288 characters in his Bison installation path.
1289 * src/scan-skel.l: Don't parse @output_header_name@ and
1290 @output_parser_name@ anymore since they're now redundant.
1291 In @output, use decode_at_digraphs.
1292 Parse a new @basename command that invokes last_component.
1293 (decode_at_digraphs): New.
1294 (BASE_QPUTS): Remove unused.
1295 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
1296 (Output file name): New tests.
1298 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
1300 Warn about output files that are generated by the skeletons and that
1301 conflict with other output files.
1302 * data/glr.c: Don't generate the header file here when glr.cc does.
1303 * src/files.c (file_names, file_names_count): New static globals.
1304 (compute_output_file_names): Invoke output_file_name_check for files
1305 not generated by the skeletons and remove existing checks.
1306 (output_file_name_check): New function that warns about conflicting
1308 (output_file_names_free): Free file_names.
1309 * src/files.h (output_file_name_check): Declare.
1310 * src/scan-skel.l: Invoke output_file_name_check for files generated by
1312 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
1313 (Conflicting output files): New tests.
1315 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1317 * doc/bison.texinfo: Fix a couple of typos.
1319 2006-12-08 Bob Rossi <bob@brasko.net>
1321 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
1323 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
1325 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
1326 (yypush_parse): Rename yypvars argument to yyps and remove redundant
1328 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
1329 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
1331 2006-12-07 Bob Rossi <bob@brasko.net>
1332 and Joel Denny <jdenny@ces.clemson.edu>
1334 * data/push.c (yypvarsinit): Change return type from void* to struct
1335 yypvars*. No longer cast to void* on return.
1336 (struct yypvars): Remove yylen since it need not be remembered between
1337 yypushparse invocations.
1338 (yypushparse): Don't copy between yylen and pv->yylen.
1340 2006-12-05 Bob Rossi <bob@brasko.net>
1342 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
1343 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
1344 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
1345 (struct yypvars): Remove b4_declare_parser_variables.
1346 (yypvarsinit): Remove init code for removed variables.
1347 (global scope): Do not declare b4_declare_parser_variables if
1349 (yypushparse): Add b4_declare_parser_variables.
1350 Init new local variables, and remove init code for removed
1353 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
1354 and yyparse for other modes.
1355 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
1356 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
1357 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
1358 (AT_PURE_LEX_IF): True if pure or push parser.
1360 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
1362 Document Yacc prologue alternatives and default %destructor's and
1363 %printer's as experimental. Don't mention Java yet. Discussed at
1364 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
1365 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
1366 (2.3a): Annotate this entry to say the old forms of these features were
1368 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
1369 Table of Symbols): Say they're experimental. Comment out any mention
1370 of Java (we'll want this back eventually).
1372 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
1374 Support a file name argument to %defines. Deprecate `=' in
1375 %file-prefix, %name-prefix, and %output. Discussed at
1376 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
1377 * NEWS (2.3a+): Mention.
1378 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
1379 form of %defines, and remove `=' from entries for %file-prefix,
1380 %name-prefix, and %output.
1381 * src/parse-gram.y (prologue_declaration): Implement.
1382 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
1383 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
1384 all but one occurrence of %name-prefix.
1385 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
1386 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
1387 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
1388 occurrence of each of %file-prefix and %output. Add check for %defines
1390 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
1391 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
1392 Remove the `=' from %output.
1394 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
1396 Don't escape $ in test case titles since Autoconf 2.61 now does that
1398 * tests/actions.at (Default %printer and %destructor are not for error
1399 or $undefined): Here.
1400 (Default %printer and %destructor are not for $accept): Here.
1401 * tests/input.at (Invalid $n and @n): Here.
1403 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
1405 Rename <!> to <>. Discussed starting at
1406 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
1407 * NEWS (2.3a+): Update.
1408 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
1410 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
1411 * src/scan-gram.l (INITIAL): Implement.
1412 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
1413 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
1415 * tests/actions.at (Default tagless %printer and %destructor,
1416 Default tagged and per-type %printer and %destructor,
1417 Default %printer and %destructor are not for error or $undefined,
1418 Default %printer and %destructor are not for $accept,
1419 Default %printer and %destructor for mid-rule values): Update.
1420 * tests/input.at (Default %printer and %destructor redeclared,
1421 Unused values with default %destructor): Update.
1423 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1425 Don't let %prec take a nonterminal.
1426 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
1428 * tests/input.at (%prec takes a token): New test checking that %prec
1429 won't take a nonterminal.
1431 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
1433 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
1434 it was double-quoted.
1435 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
1436 grammar is maintained with Bison's highest standards.
1437 * src/getargs.c: Fix some typos in Doxygen comments.
1439 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
1441 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
1442 later. Reported by Paul Eggert in
1443 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
1444 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
1445 * src/scan-code.l (translate_action): Don't bother invoking
1446 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
1447 (code_scanner_free): Instead of invoking
1448 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
1450 * src/scan-gram.l (gram_scanner_free): Likewise.
1451 * src/scan-skel.l (scan_skel): Likewise.
1453 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
1455 * src/files.c (tr): Change return type to void.
1456 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
1457 has been called previously for the same key.
1458 (muscle_find): Return storage instead of value so that
1459 --enable-gcc-warnings doesn't produce warnings that the return discards
1460 const. aver that the value and storage are the same since storage
1461 could potentially be NULL when value is not.
1462 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
1465 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
1467 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
1468 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
1469 us a slightly cleaner distribution, and also works.
1470 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
1473 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
1474 and Paul Eggert <eggert@cs.ucla.edu>
1476 Don't let Bison leak memory except when it complains.
1477 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
1478 (spec_defines_file, dir_prefix): Now char *, not const char *,
1479 since they are freed.
1480 * src/files.c: Likewise.
1481 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
1483 (tr): Now operates in-place. All uses changed.
1484 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
1486 (compute_file_name_parts, compute_output_file_names): Don't store
1487 read-only data in variables that will be freed.
1488 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
1489 src_extension, and header_extension.
1490 (output_file_names_free): New public function to free
1491 spec_verbose_file, spec_graph_file, spec_defines_file,
1492 parser_file_name, and dir_prefix.
1493 * src/getargs.c (getargs): Don't store read-only data in variables that
1495 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
1496 (which previously existed but was unused), and quotearg_free.
1497 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
1498 * src/muscle_tab.c: Likewise.
1499 (muscle_entry): Make the value char const *,
1500 and add a new storage member that is char * and can be freed.
1501 (muscle_entry_free): New private function.
1502 (muscle_init): Use it instead of free.
1503 (muscle_insert, muscle_grow): Update and use new storage member.
1504 (muscle_code_grow): Free the string passed to muscle_grow
1505 since it's not needed anymore.
1506 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
1507 add a new `char *code' member.
1508 ("{...}"): Declare semantic type as code.
1509 * src/scan-code.h (translate_rule_action):
1510 (translate_symbol_action, translate_code, translate_action): Return
1511 `char const *' rather than `char *' since external code should not free
1513 * src/scan-code.l: Likewise.
1514 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
1515 which is "{...}" in the parser.
1516 * tests/Makefile.am (maintainer-check-valgrind): Set
1517 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
1519 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
1521 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
1522 expecting a non-zero exit status sets --leak-check=summary and
1523 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
1524 this case, and we don't want to hear about it.
1526 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
1528 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
1529 instead of from the template, to simplify configuration a bit.
1530 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
1531 and m4/wint_t.m4, as they are needed with the latest gnulib.
1533 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
1535 Disable unset/unused mid-rule value warnings by default, and recognize
1536 --warnings=midrule-values to enable them. Discussed starting at
1537 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
1538 * NEWS (2.3a+): Mention.
1539 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
1540 warnings): Add entry for midrule-values subargument.
1541 * src/reader.c (symbol_should_be_used): Don't return true just because
1542 the value is a set/used mid-rule value unless
1543 --warnings=midrule-values was specified.
1544 * tests/input.at (Unused values, Unused values before symbol
1545 declarations): Run tests with and without --warnings=midrule-values.
1547 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
1548 than LIST_FREE directly.
1550 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
1552 Finish implementing --warnings=error, which should not be implied by
1553 --warnings=all (or by its synonyms -W and --warnings without
1555 * src/complain.c (set_warning_issued): New function to report that
1556 warnings are being treated as errors and to record an error if so.
1558 (warn_at, warn): ... here.
1559 * src/getargs.c (warnings_args, warnings_types): Reorder so that
1560 "error - warnings are errors" does not appear above "all - all of the
1562 (getargs): For -W and --warnings without subarguments, don't let
1563 FLAGS_ARGMATCH set warnings_error in warnings_flag.
1564 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
1566 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
1568 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
1569 empty subargument list. For example: `bison --warnings= parser.y'.
1571 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
1573 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
1574 the parser header file so that gcc doesn't warn.
1576 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
1578 Split the default %destructor/%printer into two kinds: <*> and <!>.
1579 Discussed starting at
1580 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
1581 * NEWS (2.3a+): Mention.
1582 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
1583 previous change today related to mid-rules.
1584 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
1585 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
1586 (TYPE_TAG_ANY): Add as <*>.
1587 (TYPE_TAG_NONE): Add as <!>.
1588 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
1590 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
1591 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
1592 * src/symlist.c (symbol_list_default_new): Split into tagged and
1594 (symbol_list_destructor_set, symbol_list_printer_set): Split
1595 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
1596 SYMLIST_DEFAULT_TAGLESS.
1597 * src/symlist.h: Update symbol_list_default*_new prototypes.
1598 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
1599 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
1600 * src/symtab.c (default_destructor, default_destructor_location,
1601 default_printer, default_printer_location): Split each into tagged and
1603 (symbol_destructor_get, symbol_destructor_location_get,
1604 symbol_printer_get, symbol_printer_location_get): Implement tagged
1605 default and tagless default cases.
1606 (default_destructor_set, default_printer_set): Split each into tagged
1607 and tagless versions.
1608 * src/symtab.h: Update prototypes.
1609 * tests/actions.at (Default %printer and %destructor): Rename to...
1610 (Default tagless %printer and %destructor): ... this, and extend.
1611 (Per-type %printer and %destructor): Rename to...
1612 (Default tagged and per-type %printer and %destructor): ... this, and
1614 (Default %printer and %destructor for user-defined end token): Extend.
1615 (Default %printer and %destructor are not for error or $undefined):
1617 (Default %printer and %destructor are not for $accept): Update.
1618 (Default %printer and %destructor for mid-rule values): Extend.
1619 * tests/input.at (Default %printer and %destructor redeclared): Extend.
1620 (Unused values with default %destructor): Extend.
1622 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
1624 Don't apply the default %destructor/%printer to an unreferenced midrule
1626 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
1627 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
1628 like $@n instead of just @n so that the default %destructor/%printer
1629 logic doesn't see them as user-defined symbols.
1630 (symbol_is_dummy): Check for both forms of the name.
1631 * src/reader.c (packgram): Remove the `$' from each midrule symbol
1632 name for which the midrule value is referenced in any action.
1633 * tests/actions.at (Default %printer and %destructor for mid-rule
1635 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
1636 for change to dummy symbol names.
1638 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
1640 Warn about unset midrule $$ if the corresponding $n is used.
1641 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
1643 (packgram): Before invoking grammar_rule_check on any rule, make sure
1644 all actions have already been scanned in order to set `used' flags.
1645 Otherwise, checking that a midrule's $$ is set will not always work
1646 properly because the midrule check must forward-reference the midrule's
1648 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
1651 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
1653 More improvements to the documentation of the prologue alternatives:
1654 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
1656 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
1657 some text to clarify the relative importance of the new directives and
1658 to show how these directives may be viewed as code labels.
1660 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
1662 Similar to the recently removed %before-header, add %code-top as the
1663 alternative to the pre-prologue. Mentioned at
1664 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
1665 Also, let the prologue alternatives appear in the grammar section.
1666 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
1667 (prologue_declaration): Move the existing prologue alternatives to...
1668 (grammar_declaration): ... here and add %code-top.
1669 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
1671 Clean up and extend documentation for the prologue alternatives.
1672 * NEWS (2.3a+): Describe prologue alternatives.
1673 * doc/bison.texinfo (Prologue): Move discussion of prologue
1675 (Prologue Alternatives): ... this new section, and extend it to discuss
1676 all 4 directives in detail.
1677 (Table of Symbols): Clean up discussion of prologue alternatives and
1680 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1682 DJGPP specific issues.
1684 * djgpp/config.bat: config.hin has been moved to lib. Adjust
1685 config.bat accordingly.
1686 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
1687 * djgpp/config.site: Likewise.
1689 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
1691 Replace %*-header with %provides, %requires, %code. See discussion at
1692 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
1694 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
1695 (b4_user_start_header): Remove.
1696 * data/glr.c: Use new macros instead of b4_*start_header
1698 * data/glr.cc: Likewise.
1699 * data/lalr1.cc: Likewise.
1700 * data/push.c: Likewise.
1701 * data/yacc.c: Likewise.
1703 * doc/bison.texinfo: Remove %before-header, rename
1704 %{start,end,after}-header to %requires, %provides, %code.
1706 * src/parse-gram.y: Likewise (also rename token names accordingly).
1707 * src/scan-gram.l: Likewise.
1708 * tests/actions.at: Likewise.
1710 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
1712 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
1713 Problem reported by Joel E. Denny.
1715 2006-10-14 Jim Meyering <jim@meyering.net>
1717 (Sync from coreutils.)
1718 Work also when the working directory (with e.g. coreutils sources)
1719 is version controlled with git, rather than CVS.
1720 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
1722 In messages and comments, say e.g., "checked-out sources",
1723 rather than "CVS sources".
1724 (version_controlled_file): New function. Work for git as well as
1725 for CVS. Don't use grep's -q option.
1726 (slurp): Call it here, in place of CVS-specific code.
1728 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
1730 Fix testsuite for ./configure --enable-gcc-warnings:
1731 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
1732 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
1733 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
1734 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
1735 * test/regression.at (Diagnostic that expects two alternatives):
1738 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
1740 * bootstrap.conf (gnulib_modules): Add config-h.
1741 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
1742 worry about HAVE_CONFIG_H.
1743 * lib/abitset.c: Likewise.
1744 * lib/bitset.c: Likewise.
1745 * lib/bitset_stats.c: Likewise.
1746 * lib/bitsetv-print.c: Likewise.
1747 * lib/bitsetv.c: Likewise.
1748 * lib/ebitset.c: Likewise.
1749 * lib/get-errno.c: Likewise.
1750 * lib/lbitset.c: Likewise.
1751 * lib/subpipe.c: Likewise.
1752 * lib/timevar.c: Likewise.
1753 * lib/vbitset.c: Likewise.
1754 * lib/bitset.c: Include "bitset.h" first, to test interface.
1755 * lib/bitset_stats.c: Include "bitset_stats.h" first.
1756 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
1757 * lib/bitsetv.c: Include "bitsetv.h" first.
1758 * lib/get-errno.c: Include "get-errno.h" first.
1759 * m4/.cvsignore: Add config-h.m4.
1760 * tests/actions.at (Default %printer and %destructor for ...):
1761 Adjust expected line numbers in output to reflect removal of #if
1762 HAVE_CONFIG_H lines.
1763 * tests/glr-regression.at (Missed %merge type warnings when ...):
1765 * tests/regression.at (Braced code in declaration in rules section):
1767 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
1768 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
1769 Include <config.h> unconditionally.
1771 * bootstrap: Sync from coreutils, as follows:
1773 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
1775 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
1776 variable was sometimes used without being initialized. This
1777 messed up the installation of the INSTALL file in some cases.
1779 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
1781 * bootstrap (usage, main program, symlink_to_gnulib): Add option
1782 --copy. Inspired by a suggestion from Bruno Haible.
1784 2006-10-03 Jim Meyering <jim@meyering.net>
1786 * bootstrap: Undo last change to this file, since now gnulib-tool
1787 sticks with the automake default in generating dependencies.
1789 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
1791 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
1792 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
1794 * doc/bison.1: Add copyright notice.
1796 * data/glr.c: Don't include <stdarg.h>; not used.
1798 * NEWS: The -g and --graph options now output graphs in Graphviz
1799 DOT format, not VCG format.
1800 * doc/bison.1: Likewise.
1801 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
1802 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
1804 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
1805 * TODO: Remove Graphviz entry.
1806 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
1807 remove vcg.c, vcg.h, vcg_defaults.h.
1808 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
1809 * src/graphviz.c, src/graphviz.h: New files.
1810 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
1811 * src/files.h: Make comment more generic.
1812 * src/main.c (main): Likewise.
1813 * src/print_graph.h: Likewise.
1814 * src/getargs.c (usage): Make usage description more generic.
1815 * src/print_graph.c: Include graphviz.h rather than vcg.h.
1816 (static_graph, fgraph): Remove. All uses changed to pass
1817 arguments instead of sharing a static var.
1818 (print_core, print_actions, print_state, print_graph):
1819 Output graphviz format rather than VCG format.
1820 * tests/.cvsignore: Remove *.vcg; add *.dot.
1821 * tests/output.at: Expect *.dot files, not *.vcg files.
1823 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
1824 accommodates the 2006-10-08 change.
1826 2006-10-11 Bob Rossi <bob@brasko.net>
1828 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
1829 (b4_yyssa, b4_yyerror_range): New macros.
1830 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
1831 (yypvarsinit): Remove init of removed fields.
1832 (yypushparse): Remove use of removed fields; use new macros instead.
1834 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
1836 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
1837 in a push parser. Reindent slightly to match yacc.c better.
1839 2006-10-11 Bob Rossi <bob@brasko.net>
1841 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
1843 (yypvarsinit, yypushparse): Remove init of removed fields.
1844 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
1846 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
1848 * THANKS: Add Paolo Bonzini and Bob Rossi.
1850 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
1852 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
1853 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
1854 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
1855 b4_define_user_cde and uses): Remove.
1856 (b4_comment, b4_prefix, b4_sync_start): New.
1857 * data/bison.m4: New file, with most of the content removed from c.m4.
1858 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
1859 * src/output.c (output_skeleton): Pass bison.m4.
1860 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
1863 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
1865 Fix test failure reported by Tom Lane in
1866 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
1867 and try to make such failures easier to catch in the future.
1868 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
1869 that's now the caller's responsibility.
1870 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
1871 Set yychar = YYEOF if it's negative.
1872 * tests/actions.at (yylex): Abort if asked to read past EOF.
1873 * tests/conflicts.at (yylex): Likewise.
1874 * tests/cxx-type.at (yylex): Likewise.
1875 * tests/glr-regression.at (yylex): Likewise.
1876 * tests/input.at (yylex): Likewise.
1877 * tests/regression.at (yylex): Likewise.
1878 * tests/torture.at (yylex): Likewise.
1880 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
1882 Fix problems with translating English-language diagnostics.
1883 * bootstrap: Fix bug introduced in recent bootstrap changes, with
1884 respect to bison-runtime pot generation. The YY_ stuff
1885 wasn't being captured.
1886 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
1887 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
1888 * runtime-po/POTFILES.in: Add data/push.c.
1890 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
1892 Merge bootstrap changes from coreutils.
1894 2006-09-28 Jim Meyering <jim@meyering.net>
1896 Automatically generated dependencies are important even
1897 when all of the sources in a directory come from gnulib.
1898 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
1899 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
1901 2006-09-23 Jim Meyering <jim@meyering.net>
1903 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
1905 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
1907 * bootstrap: Add support for --force.
1908 (usage): New function. Describe usage less tersely.
1909 (CVS_only_file): New var.
1911 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
1913 * data/push.c (YYPUSH_MORE): Make it an enum instead.
1914 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
1915 Adjust white space and comments to match GNU style better.
1917 2006-09-20 Bob Rossi <bob@brasko.net>
1919 * data/push.c (yyresult_get): Remove function.
1920 (YYPUSH_MORE): Add #define.
1921 (yypushparse): Modify return value.
1923 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
1925 * stamp-h.in: Remove; no longer needed.
1926 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
1927 Remove config.h, config.hin, intl (no longer created).
1928 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
1931 Sync bootstrap from coreutils, as follows:
1933 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
1935 * bootstrap (symlink_to_gnulib): New function.
1936 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
1937 to copies-of-gnulib.
1938 (cp_mark_as_generated, slurp, gnulib_files):
1939 Avoid making a copy if it's the same as the old version.
1940 (gnulib_files): Add support for this variable (used by Bison).
1942 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
1944 * src/getargs.c (usage): Rework to use conventions similar to
1945 coreutils, to make translation a bit easier and the code a bit
1946 smaller. Problem reported by Tim Van Holder.
1948 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
1950 Use some of gnulib's new modules, taken from coreutils.
1952 * bootstrap: Sync from coreutils, except add support for gnulib_files.
1953 * bootstrap.conf: New file.
1954 (gnulib_modules): Add configmake, inttypes, unistd.
1955 (XGETTEXT_OPTIONS): Add complain, complain_at,
1956 fatal, fatal_at, warn, warn_at, unexpected_end.
1957 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
1958 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
1960 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
1962 (GNULIB_AUTOCONF_SNIPPET): Remove.
1963 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
1965 * lib/.cvsignore: Add inttypes_.h.
1966 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
1967 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
1968 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
1969 no-longer-necessary initializations.
1970 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
1971 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
1972 use the unistd module.
1973 * src/system.h: Likewise.
1974 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
1975 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
1976 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
1977 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
1978 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
1979 * src/system.h: Include inttypes.h unconditionally, now that we
1980 use the inttypes module. Don't bother to include stdint.h, since
1981 inttypes.h now does that for us.
1982 (LOCALEDIR): Remove, now that we use the configmake module.
1983 * src/getargs.c: Include configmake.h.
1984 * src/main.c: Likewise.
1985 * src/output.c: Likewise.
1986 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
1987 not from $abs_top_builddir, since config.h moved.
1990 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
1991 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
1993 * src/parse-gram.y (symbol_declaration): Don't put statements
1994 before declarations; it's not portable to C89.
1995 * src/scan-code.l (handle_action_at): Likewise.
1997 * src/scan-code.l: Always initialize braces_level; the old code
1998 left it uninitialized and therefore had undefined behavior.
2000 Don't attempt to redefine 'assert', since it runs afoul of
2001 systems where standard headers (mistakenly) include <assert.h>.
2002 Instead, define and use our own alternative, called 'aver'.
2003 * src/reader.c: Don't include assert.h, since we no longer
2005 * src/scan-code.l: Likewise.
2006 * src/system.h (assert): Remove, replacing with....
2007 (aver): New function, taking a bool arg. All uses changed.
2008 * src/tables.c (pack_vector): Ensure that aver arg is bool,
2009 not merely an integer.
2011 2006-09-15 Bob Rossi <bob@brasko.net>
2013 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
2014 * data/c.m4 (YYPUSH): New.
2015 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
2016 * src/getargs.c (push_parser): New var.
2017 * src/getargs.h (push_parser): New declaration.
2018 * src/output.c (prepare): Add macro insertion of `push_flag'.
2019 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
2020 (prologue_declaration): Parse %push-parser.
2021 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
2022 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
2023 list of removed lines from the traces observed.
2024 (AT_CHECK_CALC_LALR): Added push parser tests.
2026 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
2028 * NEWS: Version 2.3a.
2029 * configure.ac (AC_INIT): Likewise.
2031 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
2032 "#define YYSTYPE int" that caused "make maintainer-check" to fail
2033 due to header ordering dependencies. I don't know why the #define
2036 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
2037 runtime cost when YYDEBUG is not defined, and so that some tests
2038 that used to fail now work. Problem and initial suggestion by
2040 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
2041 * data/glr.cc (b4_parser_class_name):
2042 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
2043 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
2044 (yydebug_) [YYDEBUG]: New member.
2045 (yycdebug_): Now defined only if YYDEBUG.
2046 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
2047 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
2048 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
2050 (debug_stream, set_debug_stream, debug_level, set_debug_level):
2051 Define only if YYDEBUG.
2052 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
2054 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
2055 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
2056 AT_CHECK_CALC_GLR_CC that are working now.
2058 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
2060 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
2061 We don't need them in glr.cc, and glr.c defines them.
2062 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
2063 assumes that defining it to anything is the same as defining
2064 it to 1. Problem reported by Paolo Bonzini.
2066 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
2068 * data/c.m4 (b4_null, b4_case): Define.
2069 * src/output.c (prepare_symbols): Use b4_null.
2070 (user_actions_output): Use b4_case.
2072 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
2074 * data/glr.c (b4_shared_declarations): Put start-header first,
2075 before any #includes that we generate, so that feature-test
2076 macros work. Problem reported by Michael Deutschmann in
2077 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
2078 * data/lalr1.cc: Likewise.
2079 * doc/bison.texinfo (Prologue): Document that feature-test macros
2080 should be defined before any Bison declarations.
2081 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
2082 that depend on location.hh after, not before, Bison decls, since
2083 we now include location.hh after the first user prologue.
2085 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
2086 Sander Brandenburg in
2087 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
2088 Also, fix minor white space and comment issues.
2089 (Prologue): Mention that it's better to define feature-test macros
2090 before Bison declarations. Problem reported by Michael Deutschmann.
2092 * README-cvs: Fix typo: "&" should be "&&". Problem reported
2094 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
2095 This adjusts to recent gnulib changes.
2097 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
2099 Finish implementation of per-type %destructor/%printer. Discussed
2101 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
2103 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
2104 * NEWS (2.3+): Add a description of this feature to the default
2105 %destructor/%printer description.
2106 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
2107 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
2108 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
2109 list node contains a semantic type.
2110 * src/symtab.c, src/symtab.h: Extend with a table that associates
2111 semantic types with their %destructor's and %printer's.
2112 (semantic_type_from_uniqstr, semantic_type_get,
2113 semantic_type_destructor_set, semantic_type_printer_set): New functions
2114 composing the public interface of that table.
2115 (symbol_destructor_get, symbol_destructor_location_get,
2116 symbol_printer_get, symbol_printer_location_get): If there's no
2117 per-symbol %destructor/%printer, look up the per-type before trying
2119 * tests/actions.at (Per-type %printer and %destructor): New test case.
2120 * tests/input.at (Default %printer and %destructor redeclared):
2121 Extend to check that multiple occurrences of %symbol-default in a
2122 single %destructor/%printer declaration is an error.
2123 (Per-type %printer and %destructor redeclared, Unused values with
2124 per-type %destructor): New test cases.
2126 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
2128 Require default %destructor/%printer to be declared using
2129 %symbol-default instead of an empty symbol list, and start working on
2130 new per-type %destructor/%printer. Discussed at
2131 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
2132 * NEWS (2.3+): Add %symbol-default to example.
2133 * bison.texinfo (Freeing Discarded Symbols): Likewise.
2134 (Table of Symbols): Add entry for %symbol-default.
2135 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
2136 (generic_symlist, generic_symlist_item): New nonterminals for creating
2137 a list in which each item is a symbol, semantic type, or
2139 (grammar_declaration): Use generic_symlist in %destructor and %printer
2140 declarations instead of symbols.1 or an empty list.
2141 (symbol_declaration, precedence_declaration, symbols.1): Update actions
2142 for changes to symbol_list.
2143 * src/reader.c: Update for changes to symbol_list.
2144 * src/scan-code.l: Likewise.
2145 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
2146 * src/symlist.c, src/symlist.h: Extend such that a list node may
2147 represent a semantic type or a %symbol-default in addition to just an
2148 ordinary symbol. Add switched functions for setting %destructor's and
2150 * tests/actions.at, tests/input.at: Add %symbol-default to all default
2151 %destructor/%printer declarations.
2153 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
2155 Whether the default %destructor/%printer applies to a particular symbol
2156 isn't a question of whether the user *declares* that symbol (in %token,
2157 for example). It's a question of whether the user by any means
2158 *defines* the symbol at all (by simply using a char token, for
2159 example). $end is defined by Bison whereas any other token with token
2160 number 0 is defined by the user. The error token is always defined by
2161 Bison regardless of whether the user declares it with %token, but we
2162 may one day let the user define error as a nonterminal instead.
2163 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
2164 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
2165 the meaning of "user-defined".
2166 * tests/actions.at (Default %printer and %destructor for user-declared
2167 end token): Rename to...
2168 (Default %printer and %destructor for user-defined end token): ...
2171 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
2172 computation of whether to apply the default, don't maintain a list of
2173 every Bison-defined symbol. Instead, just check for a first character
2174 of '$', which a user symbol cannot have, and check for the error token.
2176 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
2178 Don't apply the default %destructor or %printer to the error token,
2179 $undefined, or $accept. This change fits the general rule that the
2180 default %destructor and %printer are only for user-declared symbols,
2181 and it solves several difficulties that are described in the new test
2183 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
2184 * tests/actions.at (Default %printer and %destructor are not for error
2185 or $undefined, Default %printer and %destructor are not for $accept):
2188 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
2190 Allow %start after the first rule.
2191 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
2192 when parsing the first rule.
2193 (check_and_convert_grammar): Search for it here after all grammar
2194 declarations have been parsed. Skip midrules, which have dummy LHS
2196 * src/symtab.c (symbol_is_dummy): New function.
2197 * src/symtab.h (symbol_is_dummy): Declare it.
2198 * tests/input.at (%start after first rule): New test.
2200 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
2202 Redo some of the previous commit: add back the ability to use
2203 non-aliased/undeclared string literals since it might be useful to
2204 those declaring %token-table.
2205 * src/reader.c (check_and_convert_grammar): Undo changes in previous
2206 commit: don't worry about complaints from symbols_pack.
2207 * src/symtab.c (symbol_new, symbol_class_set,
2208 symbol_check_alias_consistency): Undo changes in previous commit: count
2209 each string literal as a new symbol and token, assign it a symbol
2210 number, and don't complain about non-aliased string literals.
2211 (symbols_pack): Since symbol_make_alias still does not decrement symbol
2212 and token counts but does still set aliased tokens to the same number,
2213 symbol_pack_processor now leaves empty slots in the symbols array.
2215 * tests/regression.at (Undeclared string literal): Remove test case
2216 added in previous commit since non-aliased string literals are allowed
2218 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
2219 remove unnecessary string literal declarations.
2220 * tests/sets.at (Firsts): Likewise.
2222 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
2224 Don't allow an undeclared string literal, but allow a string literal to
2225 be used before its declaration.
2226 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
2227 symbols_pack complained.
2228 * src/symtab.c (symbol_new): Don't count a string literal as a new
2230 (symbol_class_set): Don't count a string literal as a new token, and
2231 don't assign it a symbol number since symbol_make_alias does that.
2232 (symbol_make_alias): It's not necessary to decrement the symbol and
2233 token counts anymore. Don't assume that an alias declaration occurs
2234 before any uses of the identifier or string, and thus don't assert that
2235 one of them has the highest symbol number so far.
2236 (symbol_check_alias_consistency): Complain if there's a string literal
2237 that wasn't declared as an alias.
2238 (symbols_pack): Bail if symbol_check_alias_consistency failed since
2239 symbol_pack asserts that every token has been assigned a symbol number
2240 although undeclared string literals have not.
2241 * tests/regression.at (String alias declared after use, Undeclared
2242 string literal): New test cases.
2243 (Characters Escapes, Web2c Actions): Declare string literals as
2245 * tests/sets.at (Firsts): Likewise.
2247 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
2249 In the grammar scanner, STRING_FINISH unclosed constructs and return
2250 them to the parser in order to improve error messages.
2251 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
2252 SC_BRACED_CODE, SC_PROLOGUE): Implement.
2253 * tests/input.at (Unclosed constructs): New test case.
2254 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
2257 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
2260 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
2262 Handle string aliases for character tokens correctly.
2263 * src/symtab.c (symbol_user_token_number_set): If the token has an
2264 alias, check and set its alias's user token number instead of its own,
2265 which is set to indicate the alias. Previously, every occurrence of
2266 the character token in the grammar overwrote that alias indicator with
2268 * tests/input.at (String aliases for character tokens): New test.
2270 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
2272 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
2274 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
2276 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
2277 to prevent failures when building on older platforms.
2278 Check for autopoint failure.
2279 Set XGETTEXT_OPTIONS to values that check for C format strings,
2280 so that translators are warned about them (this also helps
2281 prevent core dumps).
2283 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
2284 function, since it simplifies our code a bit.
2286 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
2287 rather than -W, so we don't get bogus warnings about sign comparisons.
2288 Add -Wpointer-arith, since that warning is useful (it reports code
2289 that does not conform to C89 and that some compilers reject).
2290 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
2291 since it's no longer needed.
2293 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
2295 Clean up scanners a bit.
2296 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
2297 definitions so gcc won't warn when obstack_for_string is unused.
2298 * src/scan-code.l: config.h and system.h are already #include'd by
2299 scan-code-c.c, so get rid of them here.
2300 * src/scan-gram.l: Likewise.
2301 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
2302 definitions rather than duplicating the rest of it.
2303 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
2305 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
2307 Suppress signed/unsigned comparison warnings for yycheck.
2308 * data/c.m4 (b4_safest_int_type): New macro.
2309 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
2310 a signed int type, cast it to b4_safest_int_type first.
2311 * data/yacc.c: Likewise.
2312 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
2315 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
2317 * doc/bison.texinfo: Fix some typos.
2319 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
2321 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
2322 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
2324 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
2325 the latest gnulib does this a different way.
2326 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
2327 translation was patched, so stop omitting it.
2329 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
2331 Enable declaration of default %printer/%destructor. Make the parser
2332 use these for all user-declared grammar symbols for which the user does
2333 not declare a specific %printer/%destructor. Thus, the parser uses it
2334 for token 0 if the user declares it but not if Bison generates it as
2335 $end. Discussed starting at
2336 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
2337 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
2339 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
2340 * NEWS (2.3+): Mention.
2341 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
2342 declare a %destructor for a mid-rule's semantic value. It's just
2343 impossible to declare one specific to it.
2344 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
2345 code. Describe default %destructor form.
2346 * src/parse-gram.y (grammar_declaration): Parse default
2347 %printer/%destructor declarations.
2348 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
2349 and symbol_destructor_location_get rather than accessing the destructor
2350 and destructor_location members of struct symbol.
2351 (symbol_printers_output): Likewise but for %printer's.
2352 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
2354 * src/symtab.c (default_destructor, default_destructor_location,
2355 default_printer, default_printer_location): New static global
2356 variables to record the default %destructor and %printer.
2357 (symbol_destructor_get, symbol_destructor_location_get,
2358 symbol_printer_get, symbol_printer_location_get): New functions to
2359 compute the appropriate %destructor and %printer for a symbol.
2360 (default_destructor_set, default_printer_set): New functions to set the
2361 default %destructor and %printer.
2362 * src/symtab.h: Prototype all those new functions.
2363 * tests/actions.at (Default %printer and %destructor): New test to
2364 check that the right %printer and %destructor are called, that they're
2365 not called for $end, and that $$ and @$ work correctly.
2366 (Default %printer and %destructor for user-declared end token): New
2367 test to check that the default %printer and %destructor are called for
2368 a user-declared end token.
2369 * tests/input.at (Default %printer and %destructor redeclared, Unused
2370 values with default %destructor): New tests to check related grammar
2371 warnings and errors.
2373 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
2375 Clean up handling of %destructor for the end token (token 0).
2376 Discussed starting at
2377 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
2379 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
2381 Make the skeletons consistent in how they pop the end token and invoke
2383 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
2384 state, which has token number 0, since this would invoke the
2385 %destructor for the end token.
2386 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
2387 until after shifting the end token, or else it won't be popped.
2388 * data/yacc.c (yyparse): Likewise.
2390 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
2391 it's the end token. Upon termination, destroy an unshifted lookahead
2392 even when it's the end token.
2393 * data/lalr1.cc (yy::parser::parse): Likewise.
2394 * data/yacc.c (yyparse): Likewise.
2396 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
2397 value warnings for the end token when the user gives the end token a
2400 * tests/actions.at (Printers and Destructors): Test all the above.
2402 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
2404 Update to latest gnulib and gettext versions.
2405 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
2407 (gnulib_files): Add m4/warning.m4. Don't worry about files
2408 overwritten by autopoint.
2409 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
2410 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
2412 Don't use autoreconf; instead, invoke autopoint etc. by hand,
2413 so that we can remove the intl files at a better time.
2414 (intl_files_to_remove): Remove aclocal.m4, since it gets
2415 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
2416 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
2417 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
2418 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
2419 Remove datarootdir hack; no longer needed.
2420 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
2421 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
2422 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
2424 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
2425 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
2427 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
2429 * bootstrap: Adjust to today's change to gnulib-tool by invoking
2430 it with --assume-autoconf='latest-stable'.
2432 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
2434 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
2435 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
2437 * src/muscle_tab.h (muscle_grow): Replace the header comments with
2438 those from muscle_tab.c since the old ones are misleading.
2440 2006-07-13 Akim Demaille <akim@epita.fr>
2442 Support %define "KEY" {VALUE}.
2443 * src/scan-code.h, src/scan-code.l (translate_action)
2444 (translate_rule_action, translate_symbol_action, translate_code):
2445 Return char *, not const char *.
2446 * src/parse-gram.y (declaration): Rename as...
2447 (prologue_declaration): this.
2448 (string_content): Remove this nonterminal, use STRING.
2449 (braceless, content, content.opt): New nonterminal.
2451 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
2453 * src/scan-gram.l (getargs.h): Don't include it.
2455 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
2457 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
2458 rather than a for-loop that declares a local bool variable. This
2459 should work around a compatibility problem with a Cray x1e C++
2460 compiler reported by Hung Nguyen in
2461 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
2462 The for-loop was introduced in the 2004-11-17 change but I don't
2463 know why it was needed.
2465 2006-07-12 Akim Demaille <akim@epita.fr>
2467 * data/c.m4: Comment changes.
2469 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
2471 * src/complain.c (error_message, ERROR_MESSAGE): New.
2473 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
2474 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
2476 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
2478 * NEWS: Instead of %union, you can define and use your own union type
2479 YYSTYPE if your grammar contains at least one <type> tag.
2480 Your YYSTYPE need not be a macro; it can be a typedef.
2481 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
2482 (Union Decl, Decl Summary): Document this.
2483 * data/glr.c (YYSTYPE): Implement this.
2484 * data/glr.cc (YYSTYPE): Likewise.
2485 * data/lalr1.cc (YYSTYPE): Likewise.
2486 * data/yacc.c (YYSTYPE): Likewise.
2487 * src/output.c (prepare): Output tag_seen_flag.
2488 * src/parse-gram.y (declaration, grammar_declaration):
2489 Use 'union_seen' rather than 'typed' to determine whether
2490 %union has been seen, since grammars can now be typed without
2492 (symbol_declaration, type.opt, symbol_def):
2493 Keep track of whether a tag has been seen.
2494 * src/reader.c (union_seen, tag_seen): New vars.
2496 * src/reader.h (union_seen, tag_seen, typed): Likewise.
2497 * src/scan-code.l (untyped_var_seen): New variable.
2498 (handle_action_dollar): Adjust to above changes.
2499 (handle_action_dollar, handle_action_at):
2500 Improve overflow checking for outlandish numbers.
2501 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
2502 avoid new diagnostics generated by above changes.
2503 * tests/regression.at (YYSTYPE typedef): Add test to check
2504 for type tags without %union.
2506 * src/symlist.c (symbol_list_length): Return int, not unsigned
2507 int, since callers expect int. This may need to get revisited
2508 once we have proper integer overflow checking.
2510 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
2511 object is now static.
2513 * src/getargs.c (flags_argmatch): Return void, not int,
2514 to pacify ./configure --enable-gcc-warnings.
2516 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
2517 since last_string is already defined to FLEX_PREFIX (last_string).
2519 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
2521 Implement --warnings/-W.
2522 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
2524 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
2526 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
2527 (warnings_args, warnings_types): New.
2528 (getargs, short_options, long_options): Accept -W/--warnings.
2529 Sort the options by alphabetical order, upper case letter right
2530 before its lower case.
2532 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
2534 Change %merge result type clash warnings to errors. Discussed at
2535 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
2536 * src/reader.c (record_merge_function_type): Use complain_at.
2537 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
2538 declared later): Update test case results.
2540 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
2542 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
2543 to be in alphabetical order.
2544 (trace_args): Spelling fixes.
2546 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
2548 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
2549 so they don't collide with user-defined macros.
2550 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
2551 this was never guaranteed, and now that we're using gnulib stdint,
2552 which defines int_fast16_t to long int, the problem is exposed.
2554 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
2556 * data/c.m4 (b4_basename): Simplify a bit, since we don't
2557 need the full POSIX semantics (and weren't implementing them
2560 Adjust to Autoconf 2.60 and today's gnulib.
2561 * bootstrap (gnulib_modules): Add stdint.
2562 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
2563 no longer copies it.
2564 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
2565 since stdint needs the former and wcwidth (which is now required
2566 by mbswidth) needs the latter.
2567 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
2568 work around a compatibility glitch between gettext 0.14.6 and
2570 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
2571 Do not check for uintptr_t, since new stdint module does the right
2573 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
2574 Add stdint.h, stdint_.h, wcwidth.h.
2575 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
2576 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
2577 stdint.m4, wchar_t.m4, wcwidth.m4.
2578 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
2579 usual order for ../lib/*.h files.
2580 (file_name_split): Use last_component, not base_name, to adjust
2582 * src/parse-gram.h: Include <strverscmp.h> in the usual order
2583 for ../lib/*.h files.
2584 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
2585 Define unconditionally, since we now assume the stdint module.
2586 * src/scan-skel.l: Include <dirname.h>.
2587 (BASE_QPUTS): Use last_component, not base_name.
2588 * src/system.h: Include <unlocked-io.h> in the usual order
2589 for ../lib/*.h files. Include <stdint.h> unconditionally,
2590 since we now use the stdint module.
2591 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
2592 HAVE_UINTPTR_T, since we now use the stdint module.
2593 (base_name): Remove decl, since files now include <dirname.h>
2596 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
2598 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
2600 * data/yacc.c, data/glr.c, data/location.cc: Use them.
2601 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
2603 * tests/calc.at: Adjust.
2605 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
2607 * data/c.m4 (b4_basename): New.
2608 (b4_syncline): Also output the location of its invocation (from
2610 (b4_user_action, b4_define_user_action, b4_user_actions)
2611 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
2612 (b4_user_stype): New.
2613 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
2615 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
2617 In the grammar file, the first column is 1 not 0 on the first line as
2618 on every other line.
2619 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
2620 * tests/input.at (Torturing the Scanner): Update output.
2622 * src/scan-gram.l (scanner_cursor): Declare it static.
2624 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
2626 In warnings, say "previous declaration" rather than "first
2628 * src/symtab.c (redeclaration): Do that here.
2629 * src/reader.c (record_merge_function_type): In the case of a result
2630 type clash, report the previous declaration rather than the very first
2631 one in the grammar file.
2632 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
2633 declared later): Add a third declaration to check this behavior.
2634 * tests/input.at (Incompatible Aliases): Update output.
2636 2006-06-27 Akim Demaille <akim@epita.fr>
2638 * doc/Doxyfile.in: New.
2639 * doc/Makefile.am: Use it.
2640 * src/lalr.h, src/symtab.h: Initial doxygenation.
2642 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
2644 Don't miss %merge result type warnings just because the LHS types are
2645 declared after the %merge. This continues the effort of the previous
2647 * src/reader.c (get_merge_function): Don't set the merger type yet.
2648 (record_merge_function_type): New function for setting the merger type
2649 and checking for clashes.
2650 (grammar_current_rule_merge_set): Set the location of the %merge for
2652 (packgram): Invoke record_merge_function_type for each rule now that
2653 all symbol type declarations have been parsed.
2654 * src/reader.h (merger_list.type_declaration_location): New member
2655 storing the location of the first %merge from which the type for this
2656 merging function was derived.
2657 * src/symlist.h (symbol_list.merger_declaration_location): New member
2658 storing the location of a rule's %merge, if any.
2659 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
2660 declared later): New test to catch the error fixed by the above patch.
2662 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
2664 Get action warnings (grammar_rule_check) right even when symbol
2665 declarations appear after the rules. Discussed at
2666 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
2668 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
2669 Don't mistake the type of $$ in a midrule to be that of its parent
2671 * src/reader.c (grammar_current_rule_end): Don't invoke
2672 grammar_rule_check yet since not all symbol declarations may have been
2674 (grammar_midrule_action): Likewise.
2675 Don't record whether the midrule's $$ has been used yet since actions
2676 haven't been translated yet.
2677 Record the midrule's parent rule and its RHS index within the parent
2679 (grammar_current_rule_action_append): Don't translate the action yet
2680 since not all symbol declarations may have been parsed yet and, thus,
2681 warnings about types for $$, $n, @$, and @n can't be reported yet.
2682 (packgram): Translate the action and invoke grammar_rule_check now that
2683 all symbol declarations have been parsed.
2684 * src/scan-code.l (handle_action_dollar): Now that this is invoked
2685 after parsing the entire grammar file, the symbol list here in the case
2686 of a midrule is actually the midrule's empty RHS, so reference its
2687 parent rule's RHS where necessary.
2688 On the other hand, now that you can already know it's a midrule, you
2689 aren't forced to think $$ has the same type as its parent rule's $$.
2690 (handle_action_at): In the case of a midrule, reference the parent rule
2692 * src/symlist.c (symbol_list_new): Initialize new midrule-related
2694 (symbol_list_length): Now that this is invoked after all rules have
2695 been parsed, a NULL symbol (rather than a NULL symbol list node)
2696 terminates a rule. symbol_list_print already does this correctly.
2697 * src/symlist.h (symbol_list.midrule_parent_rule,
2698 symbol_list.midrule_parent_rhs_index): New members so that midrules can
2699 remember their relationships with their parents.
2700 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
2701 fixed by the above patch.
2702 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
2704 (Unused values): ... this old test case and...
2705 (Unused values before symbol declarations): ... this new test case.
2706 This one is the same as `Unused values' except that all symbol
2707 declarations appear after the rules in order to catch the rest of the
2708 errors fixed by the above patch.
2710 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
2713 * src/reader.c (current_rule): Declare it static since it's no longer
2714 used outside this file.
2715 (grammar_current_rule_action_append): Remove redundant arguments from
2716 translate_rule_action invocation.
2717 * src/reader.h (current_rule): Remove this unused extern.
2718 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
2719 * src/scan-code.l (translate_rule_action): Likewise.
2721 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
2723 Clean up yesterday's patch.
2724 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
2726 * src/reader.c (grammar_current_rule_action_append): ... here for
2727 consistency with grammar_current_rule_symbol_append.
2728 * tests/regression.at (Braced code in declaration in rules section):
2729 Make yyerror and yylex static as usual.
2731 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
2733 Fix bug that mistakes braced code in a declaration in the rules section
2734 to be a rule action. Mentioned at
2735 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
2736 * src/scan-gram.l: Move midrule action detection from the start of the
2737 scanning of any braced code to...
2738 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
2739 action. For readability, use $2 and @2 rather than the equivalent
2741 * tests/regression.at (Braced code in declaration in rules section):
2742 New test to catch the error fixed by the above patch.
2744 Work on code readability some.
2745 * src/scan-code.l (current_rule): Get rid of this misleading and
2746 redundant declaration: it's actually extern'ed in reader.h.
2747 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
2748 translate_action): Add a rule argument and use it instead of the global
2750 (translate_rule_action): This already receives current_rule through an
2751 argument, so pass it on to translate_action instead of assigning
2752 current_rule to current_rule.
2753 (translate_symbol_action, translate_code): Pass rule = NULL to
2756 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
2758 Rename %before-definitions to %start-header and %after-definitions to
2759 %end-header. Don't use these declarations to separate pre-prologue
2760 blocks from post-prologue blocks. Add new order-independent
2761 declarations %before-header and %after-header as alternatives to the
2762 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
2763 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
2764 * NEWS (2.3+): Update for these changes.
2765 * data/glr.c (b4_before_definitions): Update to...
2766 (b4_start_header): ... this.
2767 (b4_after_definitions): Update to...
2768 (b4_end_header): ... this.
2769 * data/glr.cc: Likewise.
2770 * data/lalr1.cc: Likewise.
2771 * data/yacc.c: Likewise.
2772 * doc/bison.texinfo (The prologue): Update names, and replace remaining
2773 prologue blocks with %*-header declarations.
2774 (Calc++ Parser): Likewise.
2775 (Bison Declaration Summary): Update names.
2776 (Table of Symbols): Update description.
2777 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
2778 (PERCENT_END_HEADER): ... this.
2779 (PERCENT_BEFORE_DEFINITIONS): Update to...
2780 (PERCENT_START_HEADER): ... this.
2781 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
2782 (declaration): Update token names and m4 macro names.
2783 When parsing %end-header and %start-header, invoke translate_code
2784 before muscle_code_grow, and no longer set global booleans to remember
2785 whether these declarations have been seen.
2786 Parse new %after-header and %before-header.
2787 * src/reader.c (before_definitions, after_definitions): Remove.
2788 (prologue_augment): Accept a new bool argument to specify whether to
2789 augment the pre-prologue or post-prologue.
2790 * src/reader.h (before_definitions, after_definitions): Remove these
2792 (prologue_augment): Add new bool argument.
2793 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
2794 (PERCENT_END_HEADER): ... this.
2795 (PERCENT_BEFORE_DEFINITIONS): Update to...
2796 (PERCENT_START_HEADER): ... this.
2797 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
2798 * tests/actions.at (Printers and Destructors): Update names.
2800 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
2802 Add comparison operators for C++ location classes. Discussed at
2803 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
2804 * data/c++.m4 (b4_define_location_comparison): New boolean %define
2805 declaration indicating whether filename_type has an operator==. If
2806 filename_type is `std::string', it defaults to `1', `0' otherwise.
2807 * data/location.cc: Iff b4_define_location_comparison is `1', add
2808 operator== and operator!= for class position and for class location.
2811 * src/scan-action.l: Remove unused file.
2812 * src/symtab.c (symbol_printer_set): Use printer_location not
2813 destructor_location.
2814 * src/symtab.h (struct symbol): Replace incorrect source comment for
2816 * tests/input.at (Incompatible Aliases): Update output with correct
2819 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
2821 Don't put the pre-prologue in the header file. For the yacc.c code
2822 file and the glr.c header and code files, move the pre-prologue before
2823 the token definitions. Add new %before-definitions and
2824 %after-definitions to declare code that will go in both the header file
2825 and code file. Discussed at
2826 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
2827 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
2829 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
2830 * NEWS (2.3+): Describe these changes.
2831 * data/glr.c (b4_pre_prologue): Move from within to before...
2832 (b4_shared_declarations): ... this.
2833 Add new b4_before_definitions before b4_token_enums.
2834 Add new b4_after_definitions at the end.
2835 * data/glr.cc (b4_pre_prologue): Replace with...
2836 (b4_before_definitions): ... this in the header file.
2837 (b4_after_definitions): New near the end of the header file.
2838 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
2839 code file right before including the header file.
2840 (b4_before_definitions): New in the previous position of
2841 b4_pre_prologue in the header file.
2842 (b4_after_definitions): New near the end of the header file.
2843 * data/yacc.c: Clean up some m4 quoting especially in the header file.
2844 (b4_token_enums_defines): In the code file, move to right before
2845 YYSTYPE for consistency with the header file.
2846 (b4_before_definitions): New right before b4_token_enums_defines in
2847 both the header and code file.
2848 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
2849 header and code file.
2850 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
2851 of prologues for %union dependencies.
2852 (Bison Declaration Summary): In %defines description, mention the
2853 effect of %before-definitions and %after-definitions on the header
2855 (Calc++ Parser): Forward declare driver in a %before-definitions rather
2856 than in the pre-prologue so that make check succeeds.
2857 (Table of Symbols): Add entries for %before-definitions and
2859 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
2860 %before-definitions.
2861 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
2862 (declaration): Parse those declarations and append to
2863 b4_before_definitions and b4_after_definitions, respectively.
2864 * src/reader.c (before_definitions, after_definitions): New bools to
2865 track whether those declarations have been seen.
2866 (prologue_augment): Add to the post-prologue if %union,
2867 %before-definitions, or %after-definitions has been seen.
2868 * src/reader.h (before_definitions, after_definitions): New extern's.
2869 * src/scan-gram.l: Scan the new declarations.
2870 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
2871 prologue block in a %before-definitions or a %after-definitions based
2872 on whether the %union is declared.
2873 * tests/regression.at (Early token definitions with --yacc, Early token
2874 definitions without --yacc): Move tests for token definitions into the
2875 post-prologue since token names are no longer defined in the
2878 2006-06-20 Akim Demaille <akim@epita.fr>
2880 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
2881 (symbol_get): Use it.
2882 * src/parse-gram.y: Use it.
2884 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
2886 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
2887 build succeeds when configured with --enable-gcc-warnings.
2889 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
2891 * src/parse-gram.y (char_name): New function.
2892 (CHAR, STRING, string_content): For %printer, properly escape.
2893 (ID): Prefer fputs to fprintf.
2894 (id): Reindent to be consistent with other rules.
2895 Properly quote char.
2897 The Translation Project changed its way of publishing translations
2898 to maintainers. I haven't received any responses to my request
2899 for supporting the old way, or for documenting the new way. I
2900 have modified 'bootstrap' to use screen scraping
2901 (in this case, HTML scraping). This is unreliable and inelegant,
2902 but I don't see any better way. Yuck.
2903 * bootstrap (TP_URL, WGET_COMMAND): New vars.
2904 (get_translations): New function, which uses HTML scraping to
2905 deduce locations of latest translations.
2906 Use this function to grab both bison and bison-runtime .po files.
2907 Don't bother priming the pump for the runtime-po domain any more,
2908 as it's now translated better than bison is.
2910 2006-06-19 Akim Demaille <akim@epita.fr>
2912 * src/scan-gram.l: No longer "parse" things after `%union' until
2913 `{'. Rather, return a single "%union" token.
2914 No longer make symbols: return strings, and leave the conversion
2915 to symbols to the parser.
2916 (SC_PRE_CODE, token_type): Remove.
2917 * src/parse-gram.y (%union): New field `character'.
2920 (ID, ID_COLON): Now that the scanner no longer makes them
2921 identifiers, adjust all uses to invoke symbol_get.
2922 (id_colon): New, wraps the conversion from string to symbol.
2923 (%union): Accept a possible union_name.
2924 (symbol): Now can be a char.
2925 * data/c.m4 (b4_union_name): Leave a default value.
2926 * data/glr.c, data/yacc.c: Use it.
2928 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
2930 For associating token numbers with token names for "yacc.c", don't use
2931 #define statements unless `--yacc' is specified; always use enum
2932 yytokentype. Most important discussions start at:
2933 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
2934 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
2936 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
2937 * NEWS (2.3+): Mention.
2938 * data/c.m4 (b4_yacc_if): New.
2939 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
2941 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
2942 on token name definitions.
2943 * src/getargs.c (usage): Capitalize `Yacc' in English.
2944 * src/output.c (prepare): Define b4_yacc_flag.
2945 * tests/regression.at (Early token definitions): Test that tokens names
2946 are defined before the pre-prologue not just before the post-prologue.
2947 Remove this test case and copy to...
2948 (Early token definitions with --yacc): ... this to test #define's.
2949 (Early token definitions without --yacc): ... and this to test enums.
2951 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
2953 * NEWS: Reword the post-2.3 change to not be so optimistic about
2954 removing the old "look-ahead" spelling.
2955 Update previous look-ahead/lookahead change reports.
2956 * REFERENCES: look-ahead -> lookahead (since that's
2957 what he actually wrote).
2958 * doc/refcard.tex: look ahead -> lookahead,
2959 look-ahead -> lookahead
2961 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
2963 For consistency, use `lookahead' instead of `look-ahead' or
2964 `look_ahead'. Discussed starting at
2965 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
2967 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
2968 * NEWS: For the next release, note the change to `--report'.
2969 * TODO, doc/bison.1: Update English.
2970 * doc/bison.texinfo: Update English.
2971 (Understanding Your Parser, Bison Options): Document as
2972 `--report=lookahead' rather than `--report=look-ahead'.
2973 * src/conflicts.c: Update English in comments.
2974 (lookahead_set): Rename from look_ahead_set.
2975 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
2976 (resolve_sr_conflict): Rename local look_ahead_tokens to
2977 lookahead_tokens, and update other uses.
2978 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
2979 count_rr_conflicts, conflicts_free): Update uses.
2980 * src/getargs.c (report_args): Move "lookahead" before alternate
2982 (report_types): Update uses.
2983 (usage): For `--report' usage description, state `lookahead' spelling
2984 rather than `look-ahead'.
2985 * src/getargs.h (report.report_lookahead_tokens): Rename from
2986 report_look_ahead_tokens.
2987 * src/lalr.c: Update English in comments.
2988 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
2989 (state_lookahead_tokens_count): Rename from
2990 state_look_ahead_tokens_count.
2991 Rename local n_look_ahead_tokens to n_lookahead_tokens.
2992 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
2993 Rename local n_look_ahead_tokens to n_lookahead_tokens.
2995 Update English in output.
2996 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
2997 * src/print.c: Update English in comments.
2998 (lookahead_set): Rename from look_ahead_set.
2999 (print_reduction): Rename argument lookahead_token from
3001 (print_core, state_default_rule, print_reductions, print_results):
3003 * src/print_graph.c: Update English in comments.
3004 (print_core): Update uses.
3005 * src/state.c: Update English in comments.
3006 (reductions_new): Update uses.
3007 (state_rule_lookahead_tokens_print): Rename from
3008 state_rule_look_ahead_tokens_print, and update other uses.
3009 * src/state.h: Update English in comments.
3010 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
3011 (state_rule_lookahead_tokens_print): Rename from
3012 state_rule_look_ahead_tokens_print.
3013 * src/tables.c: Update English in comments.
3014 (conflict_row, action_row): Update uses.
3015 * tests/glr-regression.at
3016 (Incorrect lookahead during deterministic GLR,
3017 Incorrect lookahead during nondeterministic GLR): Rename
3018 print_look_ahead to print_lookahead.
3019 * tests/torture.at: Update English in comments.
3020 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
3021 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
3022 (Many lookahead tokens): Update uses.
3023 * data/glr.c: Update English in comments.
3024 * lalr1.cc: Likewise.
3026 * src/conflicts.h: Likewise.
3027 * src/lalr.h: Likewise.
3028 * src/main.c: Likewise.
3029 * src/output.c: Likewise.
3030 * src/parse-gram.c: Likewise.
3031 * src/tables.h: Likewise.
3032 * tests/calc.at: Likewise.
3034 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
3036 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
3038 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
3040 * TODO: Add request from Nelson H. F. Beebe to be able to install
3041 Bison without installing the yacc script.
3043 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
3045 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
3046 and yytext if they're already #define'd.
3047 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
3048 * src/scan-code-c.c: ... here.
3049 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
3052 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
3054 Get Bison to build again when configured with --enable-gcc-warnings.
3055 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
3057 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
3058 loc argument as it shadows a global.
3059 * src/scan-gram.l: Remove stray comma that prevents boundary_set
3062 * src/.cvsignore: Add scan-code.c.
3064 2006-06-07 Akim Demaille <akim@epita.fr>
3066 * src/scan-gram.l: Move the "add a trailing ; to actions" code
3068 * src/scan-code.l: here.
3069 * tests/input.at (Torturing the Scanner): Fix another location
3072 2006-06-07 Akim Demaille <akim@epita.fr>
3074 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
3076 2006-06-06 Akim Demaille <akim@epita.fr>
3078 Extract the parsing of user actions from the grammar scanner.
3079 As a consequence, the relation between the grammar scanner and
3080 parser is much simpler. We can also split "composite tokens" back
3082 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
3083 * src/scan-gram.l (add_column_width, adjust_location): Move to and
3085 * src/location.h, src/location.c (add_column_width)
3086 (location_compute): these.
3087 Fix the column count: the initial column is 0.
3088 (location_print): Be robust to ending column being 0.
3089 * src/location.h (boundary_set): New.
3090 * src/main.c: Adjust to scanner_free being renamed as
3092 * src/output.c: Include scan-code.h.
3093 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
3095 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
3096 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
3097 which is now, again, a separate token.
3098 Adjust all dependencies.
3099 Whereever actions with $ and @ are used, use translate_code.
3100 (action): Remove this nonterminal which is now useless.
3101 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
3102 (grammar_current_rule_action_append): Use translate_code.
3103 (packgram): Bound check ruleno, itemno, and rule_length.
3104 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
3105 (last_string, last_braced_code_loc, max_left_semantic_context)
3106 (scanner_initialize, scanner_free, scanner_last_string_free)
3107 (gram_out, gram_lineno, YY_DECL_): Move to...
3108 * src/scan-gram.h: this new file.
3109 (YY_DECL): Rename as...
3111 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
3112 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
3113 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
3114 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
3115 Move these declarations, and...
3116 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
3118 * src/flex-scanner.h: this new file.
3119 * src/scan-gram.l (rule_length, rule_length_overflow)
3120 (increment_rule_length): Remove.
3121 (last_braced_code_loc): Rename as...
3122 (gram_last_braced_code_loc): this.
3123 Adjust to the changes of the parser.
3124 Move all the handling of $ and @ into...
3125 * src/scan-code.l: here.
3126 * src/scan-gram.l (handle_dollar, handle_at): Remove.
3127 (handle_action_dollar, handle_action_at): Move to...
3128 * src/scan-code.l: here.
3129 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
3130 scan-code.h, scan-code-c.c, scan-gram.h.
3131 (EXTRA_bison_SOURCES): Add scan-code.l.
3132 (BUILT_SOURCES): Add scan-code.c.
3133 (yacc): Be robust to white spaces.
3135 * tests/conflicts.at, tests/input.at, tests/reduce.at,
3136 * tests/regression.at: Adjust the column numbers.
3137 * tests/regression.at: Adjust the error message.
3139 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
3141 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
3142 Use Akim's wording from
3143 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
3145 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
3147 Between Bison releases, manually append `+' to the previous Bison
3148 release number, and use that as a signal to automatically print the
3149 ChangeLog's CVS Id keyword from --version. Discussed starting at
3150 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
3151 * ChangeLog: Add Id header.
3152 * configure.ac (AC_INIT): Append `+' to `2.3'.
3153 * src/.cvsignore: Add revision.c.
3154 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
3155 (BUILT_SOURCES): Add revision.c.
3156 (revision.c): New target rule. This file defines a new global variable
3157 named revision. It initializes it with either the Id from ChangeLog
3158 or, if VERSION doesn't contain `+', with the empty string.
3159 * src/getargs.c (version): Print the value of revision.
3160 * src/revision.h: Extern revision.
3162 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
3164 * NEWS: Version 2.3.
3165 * configure.ac (AC_INIT): Likewise.
3167 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
3169 * data/glr.c (YYRECOVERING): Define to be a function-like macro
3170 with no arguments, not as an object-like macro. This is for
3171 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
3172 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
3173 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
3176 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
3178 * src/getargs.c (usage): Back out yesterday's modification of the
3179 --help output so that we don't have to wait for translation before
3182 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
3184 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
3185 Problem reported by Akim Demaille.
3187 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
3189 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
3191 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
3193 * data/yacc.c (yy_reduce_print): Omit trailing white space in
3194 generated source code. Problem reported by Frans Englich in
3195 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
3197 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
3199 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
3200 shell, not within 'make', so that 'make' by an ordinary builder
3201 (using GNU make) does not worry about configuring gzip. This also
3202 works around a bug reported independently by Keith Thompson and by
3203 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
3204 stderr rather than stdout, messing up the build logs.
3206 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
3208 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
3209 to make sure that YYID will never be unused. This fixes a 'make
3210 maintainer-check' failure caused by the recent changes to the 'Trivial
3211 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
3213 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
3215 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
3217 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
3218 state before an empty RHS is always resolved here. Only the location
3219 of that state is guaranteed to be resolved, and that's enough. This
3220 fixes the remaining bug reported by Derek M. Jones in
3221 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
3222 * tests/glr-regression.at (Uninitialized location when reporting
3223 ambiguity): Test the above case.
3224 Also, the embedded comments in this test case claim it checks the case
3225 of an empty RHS that has inherited the initial location. However, the
3226 corresponding LHS was already resolved, so yyresolveLocations didn't
3227 actually have reason to modify it. Fix this by forcing
3228 nondeterministic operation at the beginning of the parse.
3230 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
3232 * data/c.m4 (b4_yy_symbol_print_generate):
3233 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
3234 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
3235 of the bugs reported today by Derek M Jones in
3236 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
3237 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
3238 defined to be a type name without parens or brackets.
3239 (Location Type): Similarly for YYLTYPE.
3240 * tests/regression.at (Trivial grammars): Put in a test for this
3241 bug that will be caught by 'make maintainer-check' (though not,
3242 alas, by 'make check' unless your compiler is picky).
3244 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
3246 * NEWS: Version 2.2.
3247 * configure.ac (AC_INIT): Likewise.
3249 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
3251 * data/glr.c (yyreportTree): Make room in yystates for the state
3252 preceding the RHS. This fixes the segmentation fault reported by Derek
3254 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
3255 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
3256 to the user. Reported for yyreportTree by Derek M. Jones later in the
3258 * THANKS: Add Derek M. Jones.
3259 Update my email address.
3260 Fix typo in Steve Murphy's name.
3262 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
3264 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
3265 checking against YYLAST that caused the parser to miss a potential
3266 alternative in its diagnostic.
3267 Problem reported by Maria Jose Moron Fernandez in
3268 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
3269 * data/lalr1.cc (yysyntax_error_): Likewise.
3270 * data/yacc.c (yysyntax_error): Likewise.
3271 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
3272 tokens, in case we run into an older C compiler.
3273 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
3274 Use them to check for the off-by-one error fixed above.
3276 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
3277 YYSIZE_T, not size_t.
3278 * tests/regression.at (Trivial grammars): New test, to catch
3279 the error fixed by the above patch.
3281 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
3283 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
3285 Reported by Steve Murphy.
3287 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
3289 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
3290 * data/glr.cc: b4_location_flag is now b4_locations_flag.
3292 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
3294 Implement --trace=m4.
3295 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
3296 * src/output.c (output_skeleton): When set, pass -dV to m4.
3298 Factor the handling of flags in m4.
3299 * src/output.c (prepare): Rename the muscle names debug, defines,
3300 error_verbose to debug_flag, defines_flag, error_verbose_flag.
3301 * data/c.m4: Adjust.
3302 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
3303 Use b4_define_flag_if to define other b4_FLAG_if macros.
3304 (b4_location_if): As a consequence, rename as...
3305 (b4_locations_if): this, for consistency.
3306 Adjust all the skeletons.
3308 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
3310 * etc/bench.pm: Shorten bench names.
3312 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
3314 * src/output.h, src/output.c (error_verbose): Move to...
3315 * src/getargs.h, src/getargs.c: here.
3317 Adjust dependencies.
3319 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
3321 * data/c.m4 (b4_copyright): Put the special exception for Bison
3322 skeletons here, so we don't have to put it in each skeleton. All
3323 uses changed. Suggested by Akim Demaille. Also, wrap the
3324 copyright notice, in case it is longer than 80 columns. Replace
3325 comma by newline after title.
3327 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
3329 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
3330 incompatibility, not a bug. Mention that it wasn't fixed as of
3333 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
3335 * examples/extexi: Enforce the precedence of concatenation over
3337 Reported by Tommy Nordgren.
3339 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
3341 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
3342 with the member "token".
3343 Reported by Martin Nylin.
3345 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
3347 * data/glr.c: Switch to Bison 2.2 special-exception language in
3348 the copyright notice. Use more-regular format for titles and
3350 * data/glr.cc: Likewise.
3351 * data/location.cc: Likewise.
3352 * data/yacc.cc: Likewise.
3353 * doc/bison.texinfo (Conditions): Document this.
3354 * NEWS: likewise. Upgrade version to 2.2.
3356 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
3358 * data/glr.cc: Remove dead code.
3360 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
3362 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
3363 that variable and the line breaks the bootstrap. Problem reported
3364 by Juan M. Guerrero.
3366 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
3368 * doc/bison.texinfo (Multiple start-symbols): New.
3370 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
3372 * etc/README, etc/bench.pl: New.
3374 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
3376 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
3378 Reported by Mickael Labau.
3379 * tests/input.at (Torturing the Scanner): Test it.
3381 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
3383 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
3384 Problem reported by Bob Rossi.
3386 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
3388 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
3389 and didn't really work.
3390 For the index, use @ifnotinfo, not @iftex.
3391 Minor cleanups of spacing and terminology.
3393 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
3395 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
3396 of AT_NAME_PREFIX when %name-prefix is not used.
3398 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
3400 Apply --prefix to C++ skeletons too: they change the namespace.
3401 The test suite already exercize these cases.
3402 * data/c++.m4 (b4_namespace): New.
3403 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
3404 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
3405 * data/yacc.c, data/glr.c: Remove a useless `[]'.
3406 * doc/bison.texinfo: Document it.
3407 (Option Cross Key): Use @multitable in all formats. It looks
3408 nicer, even in TeX outputs.
3409 (Rules): Use the same code whatever the output type is.
3410 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
3411 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
3412 * tests/calc.at: Use it, instead of hard coding `yy'.
3414 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
3416 * TODO: Remove dead items.
3418 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
3420 * doc/FAQ: Remove, merged into...
3421 * doc/bison.texinfo (FAQ): this.
3422 * doc/Makefile.am (EXTRA_DIST): Adjust.
3424 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
3426 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
3428 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
3429 * doc/bison.texinfo (Calc++ Scanner): Use it.
3431 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
3433 Fix two nits reported by twlevo, plus one more that I discovered.
3435 * src/assoc.h (assoc_to_string): Give a name to the arg, as
3436 this is the usual Bison style.
3437 * src/location.h (location_print): Likewise.
3439 * src/reader.h (token_name): Likewise.
3441 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
3443 Fix some nits reported by twlevo.
3444 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
3445 and "POSIX". Use more-modern syntax for URLs. Mention C++
3446 and ask for Java. Don't hardwire OS version numbers. Add
3448 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
3449 * src/conflicts.c (solved_conflicts_obstack): Now static.
3451 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
3453 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
3454 page. Say "you can use it" not "you may use it" as on the web page;
3455 we're describing capabilities not granting permission.
3457 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
3459 * data/glr.c (yyresolveLocations): Rename local variables to avoid
3460 shadowing warnings. Use usual patter for iterating through RHS.
3461 * tests/glr-regression.at
3462 (Uninitialized location when reporting ambiguity):
3463 Modify yylex so that it uses its argument, rather than trying
3464 to rely on ARGSUSED (which doesn't work for gcc with warnings).
3465 const char -> char const.
3467 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
3468 Don't use tabs inside commands; it messes up 'ps'.
3469 Problem reported by twlevo.
3471 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
3473 * tests/glr-regression.at (Uninitialized location when reporting
3474 ambiguity): New test case.
3475 * data/glr.c (yyresolveLocations): New function, which uses
3477 (yyresolveValue): Invoke yyresolveLocations before reporting an
3479 * doc/bison.texinfo (Default Action for Locations): Note
3480 YYLLOC_DEFAULT's usage for ambiguity locations.
3481 (GLR Semantic Actions): Cross-reference those notes.
3483 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
3485 * tests/glr-regression.at (Leaked semantic values when reporting
3486 ambiguity): Remove unnecessary union and type declarations.
3487 (Leaked lookahead after nondeterministic parse syntax error): New test
3489 * data/glr.c (yyparse): Check for zero stacks remaining before
3490 attempting to shift the lookahead so that you don't lose it.
3492 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
3494 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
3495 * tests/glr-regression.at (Leaked semantic values when reporting
3496 ambiguity): New test case.
3497 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
3498 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
3499 now unnecessary yystackp parameter.
3500 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
3501 destructors can be called.
3503 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
3504 in existing testcases.
3506 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
3508 Don't leak semantic values for parent RHS when a user action cuts the
3509 parser, and clean up related code a bit.
3510 * tests/glr-regression.at (Leaked merged semantic value if user action
3511 cuts parse): Rename to...
3512 (Leaked semantic values if user action cuts parse): ... this. Add check
3513 for leaked parent RHS values.
3514 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
3515 between an unresolved state (non-empty chain of semantic options) and
3516 an incomplete one (signaled by an empty chain).
3517 (yyresolveStates): Document the interface. Move all manipulation of a
3518 successfully or unsuccessfully resolved yyGLRState to...
3519 (yyresolveValue): ... here so that yyresolveValue always leaves a
3520 yyGLRState with consistent data and thus is easier to understand.
3521 Remove the yyvalp and yylocp parameters since they are always just
3522 taken from the yys parameter. When reporting a discarded merged value
3523 in debugging output, note that it is incompletely merged. Document the
3525 (yyresolveAction): If resolving any of the RHS states fails, destroy
3526 them all rather than leaking them. Thus, as long as user actions are
3527 written to clean up the RHS correctly, yyresolveAction always cleans up
3528 the RHS of a semantic option. Document the interface.
3530 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
3532 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
3533 led to a segmentation fault in GNU Pascal. Problem reported
3536 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
3538 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
3539 mid-rule action inside a nonterminal symbol in order to declare a
3540 destructor for its semantic value.
3542 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
3544 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
3545 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
3546 __cplusplus && ! defined _STDLIB_H && !
3547 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
3548 defined free))]: Include <stdlib.h> rather than rolling our own
3549 declarations of malloc and free, to avoid problems with
3550 incompatible declarations (using 'throw') C++'s stdlib.h. This
3551 should fix Debian bug 340012
3552 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
3553 reported by Guillaume Melquiond.
3555 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
3557 * NEWS: Clarify symbols versus types in unused-value warnings.
3559 * configure.ac (AC_INIT): Bump version number.
3561 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
3563 * NEWS: Version 2.1a.
3564 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
3565 since C99 requires this.
3567 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
3569 * m4/c-working.m4: New file.
3570 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
3572 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
3574 * Makefile.maint: Merge from coreutils.
3576 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
3578 More portability fixes for problems summarized by Nelson H. F. Beebe.
3580 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
3581 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
3582 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
3583 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
3584 messes up because C++ code is compiled in 32-bit mode but linked
3587 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
3589 More portability fixes for problems summarized by Nelson H. F. Beebe.
3591 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
3592 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
3594 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
3595 nodist_PROGRAMS, since we don't need to actually compile the
3596 example if we're just doing a plain 'make'. This avoids bothering
3597 the installer unnecessarily about problems due to weird C++
3600 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
3602 More portability fixes for problems summarized by Nelson H. F. Beebe.
3604 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
3605 than #include "...", and compile with -I'.'. The old method was
3606 not portable, according to Posix and the C standard, and it does
3607 not work with Sun C 5.7, where previous #line directives affect
3608 the working directory used in later #include "..." directives.
3610 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3612 Various DJGGP specific issues in /djgpp
3614 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
3616 More portability fixes for problems summarized by Nelson H. F. Beebe.
3618 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
3619 '#include <map>' works and that you can apply ++ to iterators.
3621 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
3623 Work around portability problems summarized by Nelson H. F. Beebe in
3624 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
3626 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
3627 that '#include <string>' works.
3629 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
3630 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
3631 "warning: sorry: semantics of inline function static data `const
3632 unsigned char translate_table[262]' are wrong (you'll wind up with
3635 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
3636 or, xor to not_, and_, or_, and xor_, respectively. This works
3637 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
3638 random system header somewhere that includes the equivalent of
3641 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
3642 -E" works; it apparently doesn't work with PathScale EKO Compiler
3645 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
3647 During deterministic GLR operation, user actions should be able to
3648 influence the parse by changing yychar. To make this easier to fix and
3649 to make glr.c easier to evolve in general, don't maintain yytoken in
3650 parallel with yychar; just compute yytoken when needed.
3651 * tests/glr-regression.at (Incorrect lookahead during deterministic
3652 GLR): Check that setting yychar in a user action has the intended
3654 * data/glr.c (yyGLRStack): Remove yytokenp member.
3655 (yyclearin): Don't set *yytokenp.
3656 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
3657 yychar rather than *yytokenp to determine the current lookahead.
3658 Compute yytoken locally when needed.
3659 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
3662 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
3663 after `--report' documentation.
3665 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
3667 * src/parse-gram.y (grammar_declaration): Location of printer
3668 symbol is @1, not list->location. Bug reported by twlevo.
3669 * tests/input.at (Incompatible Aliases): Adjust to above change.
3671 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
3673 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
3674 all the test at once. This makes the output easier to read in the
3677 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
3678 got from <http://bro-ids.org/download.html>. The bug is that
3679 when two actions appeared in succession, the second one was
3680 scanned before the first one was added to the grammar rule
3681 as a midrule action. Bison then output the incorrect warning
3682 "parse.y:905.17-906.36: warning: unused value: $3".
3683 * src/parse-gram.y (BRACED_CODE, action): These are no longer
3684 associated with a value.
3685 (rhs): Don't invoke grammar_current_rule_action_append.
3686 (action): Invoke it here instead.
3687 * src/reader.c (grammar_midrule_action): Now extern.
3688 (grammar_current_rule_action_append): Don't invoke
3689 grammar_midrule_action; that is now the scanner's job.
3690 * src/reader.h (last_string, last_braced_code_loc):
3691 (grammar_midrule_action): New decls.
3692 * src/scan-gram.l (last_string): Now extern, sigh.
3693 (last_braced_code_loc): New extern variable.
3694 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
3695 rule already has an action.
3696 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
3697 * tests/input.at (AT_CHECK_UNUSED_VALUES):
3698 Add some tests to check that the above changes fixed the bug.
3700 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
3702 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
3703 All used changed. Check whether the symbol has a destructor,
3704 not whether it is typed.
3705 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
3706 that the values are still reported as unused. All line numbers
3709 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
3711 Work around a bug in bro 0.8, which underparenthesizes its
3712 definition of YYLLOC_DEFAULT.
3713 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
3715 * data/lalr1.cc: Likewise.
3716 * data/yacc.cc: Likewise.
3718 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
3720 Work around a bug in Pike 7.0, and give the Pike folks a
3721 better way to override the usual int widths.
3722 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
3723 user can override the types.
3724 (short): #undef, to work around a bug in Pike 7.0.
3725 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
3726 (union yyalloc.yyss): Use yytype_int16 rather than short.
3728 (yysigned_char): Remove.
3729 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
3730 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
3731 * tests/regression.at (Web2c Actions): Adjust to above changes.
3733 * src/reader.c (check_and_convert_grammar): New function.
3734 (reader): Close the input file even if something went wrong during
3735 parsing. Minor file descriptor leak reported by twlevo.
3737 * src/assoc.c (assoc_to_string): Use a default: abort (); case
3738 to pacify gcc -Wswitch-default.
3739 * src/scan-gram.l (adjust_location): Use a default: break; case
3740 to pacify gcc -Wswitch-default.
3741 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
3742 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
3743 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
3744 Move these decls to scan-skel.l, since they don't need to be
3746 * src/scan-skel.l: Accept the above decls.
3747 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
3750 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
3752 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
3753 since we don't want to insist on a version number at the start
3754 of the changelog every time.
3755 * Makefile.maint: Sync from coreutils a bit better.
3756 (sc_trailing_blank): Renamed from sc_trailing_space.
3758 (sc_no_if_have_config_h, sc_require_config_h):
3759 (sc_prohibit_assert_without_use): New rules.
3760 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
3761 (sc_dd_max_sym_length): Fix leading spaces in rule.
3762 (sc_system_h_headers): Prefix with @.
3763 (sc_useless_cpp_parens, m4-check): Output line numbers.
3764 (changelog-check): Allow version only in head.
3765 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
3766 satisfy new Makefile.maint rule.
3767 * data/glr.c: Likewise.
3768 * data/glr.cc: Likewise.
3769 * data/lalr1.cc: Likewise.
3770 * data/yacc.c: Likewise.
3771 * lib/ebitsetv.c: Likewise.
3772 * lib/lbitset.c: Likewise.
3773 * lib/subpipe.c: Likewise.
3774 * lib/timevar.c: Likewise.
3775 * src/system.h: Likewise.
3776 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
3777 * djgpp/Makefile.maint: Add copyright notice.
3778 * djgpp/README.in: Likewise.
3779 * djgpp/config.bat: Likewise.
3780 * djgpp/config.site: Likewise.
3781 * djgpp/config_h.sed: Likewise.
3782 * djgpp/djunpack.bat: Likewise.
3783 * djgpp/config.sed: Fix copyright notice to match standard format.
3784 * djgpp/subpipe.h: Likewise.
3785 * lib/bitsetv-print.c: Likewise.
3786 * lib/bitsetv.c: Likewise.
3787 * lib/subpipe.h: Likewise.
3788 * lib/timevar.c: Likewise.
3789 * lib/timevar.h: Likewise.
3790 * djgpp/subpipe.c: Use standard recipe for config.h.
3791 * lib/abitset.c: Likewise.
3792 * lib/bitset.c: Likewise.
3793 * lib/bitset_stats.c: Likewise.
3794 * lib/bitsetv-print.c: Likewise.
3795 * lib/bitsetv.c: Likewise.
3796 * lib/ebitsetv.c: Likewise.
3797 * lib/get-errno.c: Likewise.
3798 * lib/lbitset.c: Likewise.
3799 * lib/subpipe.c: Likewise.
3800 * lib/timevar.c: Likewise.
3801 * lib/vbitset.c: Likewise.
3802 * tests/local.at: Likewise.
3803 * src/scan-gram.l: Don't include verify.h, since system.h does
3805 * .x-sc_require_config_h: New file.
3806 * .x-sc_unmarked_diagnostics: New file.
3808 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
3810 Be a bit more systematic about using 'abort'.
3811 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
3812 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
3813 Put 'default: abort ();' before some other case, to satisfy older
3815 * lib/bitset_stats.c (bitset_stats_init): Likewise.
3816 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
3817 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
3818 * src/conflicts.c (resolve_sr_conflict): Likewise.
3819 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
3820 (get_decision_str, get_orientation_str, get_node_alignment_str):
3821 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
3822 (get_linestyle_str, get_arrowstyle_str): Likewise.
3823 * src/conflicts.c (resolve_sr_conflict):
3824 Use a default case rather than one for the one remaining enum
3825 value, to catch invalid enum values as well.
3826 * src/lalr.c (set_goto_map, map_goto):
3827 Prefer "assert (FOO);" to "if (!FOO) abort ();".
3828 * src/nullable.c (nullable_compute, token_definitions_output):
3830 * src/reader.c (packgram, reader): Likewise.
3831 * src/state.c (transitions_to, state_new, state_reduction_find):
3833 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
3834 (symbol_pack): Likewise.
3835 * src/tables.c (conflict_row, pack_vector): Likewise.
3836 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
3837 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
3838 * src/system.h: Don't include <assert.h>.
3839 (assert): New macro.
3841 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
3842 (Destructor Decl, Parser Function, Pure Calling):
3843 Describe rules for braces inside C code more carefully.
3845 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
3847 Fix some porting glitches found by Nelson H. F. Beebe.
3848 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
3849 compilers that don't understand that abort () does not return.
3850 * src/state.c (transitions_to): Likewise.
3851 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
3852 that '#include <cstdlib>' works.
3853 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
3854 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
3855 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
3856 for the benefit of some pre-C99 compilers.
3858 * bootstrap: Undo changes to gnulib files that autoreconf made.
3860 Minor fixups to get 'make maintainer-check' to work.
3861 * configure.ac: Don't use -Wnested-externs, as it's incompatible
3862 with the new verify.h implementation.
3863 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
3864 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
3865 * data/yacc.c (YYUSE): Likewise.
3866 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
3867 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
3868 * src/parse-gram.y (declaration): Don't pass a string constant
3869 to a function that expects char *, since GCC might complain
3870 about the constant value.
3871 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
3872 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
3873 before #defining them.
3874 * tests/glr-regression.at
3875 (Incorrectly initialized location for empty right-hand side in GLR):
3876 In yyerror, use the msg arg.
3877 (Corrupted semantic options if user action cuts parse):
3878 (Incorrect lookahead during deterministic GLR):
3879 (Incorrect lookahead during nondeterministic GLR):
3880 Don't name a local var 'index'; it shadows string.h's 'index'.
3882 2006-01-19 Akim Demaille <akim@epita.fr>
3884 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
3885 location, not just parts of it.
3887 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
3889 * NEWS: Document the fact that multiple %unions are now allowed.
3890 * doc/bison.texinfo (Union Decl): Likewise.
3891 * TODO: This feature is now implemented, so remove it from
3894 * Makefile.maint: Merge with coreutils Makefile.maint.
3895 (CVS_LIST): Use build-aux version if available.
3896 (VERSION_REGEXP): New macro.
3897 (syntax-check-rules): Add sc_no_if_have_config_h,
3898 sc_prohibit_assert_without_use, sc_require_config_h,
3899 sc_useless_cpp_parens.
3900 (sc_obsolete_symbols): Check for O_NDELAY.
3901 (sc_dd_max_sym_length): Track coreutils.
3902 (sc_unmarked_diagnostics): Look in all files, not just *.c.
3903 (sc_useless_cpp_parens): New rule.
3904 (news-date-check): Look for version or today's date.
3905 (changelog-check): Don't require version number near head.
3906 (copyright-check): Use current year instead of hardwiring 2005.
3907 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
3908 (announcement): Add --gpg-key-ID.
3910 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
3913 Avoid undefined behavior that addressed just before the start of an
3914 array. Problem reported by twlevo.
3915 * src/reader.c (packgram): Prepend a new sentinel before ritem.
3916 * src/lalr.c (build_relations): Rely on new sentinel.
3917 * src/gram.c (gram_free): Adjust to new sentinel.
3919 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
3921 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
3922 yylookaheadNeeds. All uses updated.
3923 (yysplitStack): Rename local yynewLookaheadStatuses to
3924 yynewLookaheadNeeds.
3925 * data/glr-regression.at (Incorrect lookahead during nondeterministic
3926 GLR): In comments, change `lookahead status' to `lookahead need'.
3928 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
3930 * data/glr.c (yysplitStack): A little stylistic rewrite.
3932 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
3934 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
3936 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
3938 * doc/bison.texinfo: Fix some typos.
3939 (GLR Semantic Actions): New subsection discussing special
3940 considerations because GLR semantic actions might be deferred.
3941 (Actions): Mention look-ahead usage of yylval.
3942 (Actions and Locations): Mention look-ahead usage of yylloc.
3943 (Special Features for Use in Actions): Add YYEOF entry and mention it
3944 in the yychar entry.
3945 In the yychar entry, remove mention of the local yychar case (pure
3946 parser) since this is irrelevant information when writing semantic
3947 actions and since it's already discussed in `Table of Symbols' where
3948 yychar is otherwise described as an external variable.
3949 In the yychar entry, don't call it the `current' look-ahead since it
3950 isn't when semantic actions are deferred.
3951 In the yychar and yyclearin entries, add note about deferred semantic
3953 Add yylloc and yylval entries discussing look-ahead usage.
3954 (Look-Ahead Tokens): When discussing yychar, don't call it the
3955 `current' look-ahead, and do mention yylval and yylloc.
3956 (Error Recovery): Cross-reference `Action Features' when mentioning
3958 (Table of Symbols): In the yychar entry, don't call it the `current'
3960 In the yylloc and yylval entries, mention look-ahead usage.
3962 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
3964 * tests/glr-regression.at: Update copyright year to 2006.
3966 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
3968 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
3969 use during nondeterministic operation to track which stacks have
3970 actually needed the current lookahead.
3971 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
3972 Allocate, deallocate, resize, and otherwise shuffle space for
3973 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
3974 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
3975 appropriately during nondeterministic operation.
3976 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
3977 members to store the current lookahead to be used by the deferred
3979 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
3980 from which the RHS is taken. Set the lookahead members of the new
3981 yySemanticOption according to the lookahead status for stack yyk.
3982 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
3983 yyaddDeferredAction.
3984 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
3985 members of yySemanticOption before invoking yyuserAction, and then set
3986 them back to their current values afterward.
3987 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
3988 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
3989 * tests/glr-regression.at: Remove `.' from the ends of recent test case
3990 titles for consistency.
3991 (Leaked merged semantic value if user action cuts parse): In order to
3992 suppress lint warnings, use arguments in merge function, and assign
3993 char value < 128 in main.
3994 (Incorrect lookahead during deterministic GLR): New test case.
3995 (Incorrect lookahead during nondeterministic GLR): New test case.
3997 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
3999 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
4000 !yyvaluep as signal that no semantic value is available to print.
4001 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
4002 to print a semantic value.
4004 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4006 * tests/glr-regression.at: For consistency with my newer test cases,
4009 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
4011 * data/glr.c (yyresolveValue): When merging semantic options, if at
4012 least one user action succeeds but a later one cuts the parse, then
4013 destroy the semantic value before returning rather than leaking it.
4014 (yyresolveStates): If a user action cuts the parse and thus
4015 yyresolveValue fails, ignore the (unset) semantic value rather than
4016 corrupting the yyGLRState, and empty the semantic options list since
4017 the user actions should have called all necessary destructors.
4018 Simplify code with YYCHK.
4019 * tests/glr-regression.at (Corrupted semantic options if user action
4020 cuts parse): New test case.
4021 (Undesirable destructors if user action cuts parse): New test case.
4022 Before applying any of this patch, this test case never actually failed
4023 for me... but only because the corrupted semantic options usually
4025 (Leaked merged semantic value if user action cuts parse): New test
4028 2006-01-05 Akim Demaille <akim@epita.fr>
4030 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
4032 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
4034 * data/c.m4 (b4_c_modern): New macro, with a new provision for
4035 _MSC_VER. Problem reported by Cenzato Marco.
4036 (b4_c_function_def): Use it.
4037 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
4039 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
4040 than rolling our own.
4042 2006-01-04 Akim Demaille <akim@epita.fr>
4044 Also warn about non-used mid-rule values.
4045 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
4047 (symbol_list_new): Adjust.
4048 * src/reader.c (symbol_typed_p): New.
4049 (grammar_rule_check): Use it.
4050 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
4052 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
4054 * tests/actions.at (Exotic Dollars): Adjust.
4056 2006-01-04 Akim Demaille <akim@epita.fr>
4058 * src/reader.c (grammar_midrule_action): If $$ is set in a
4059 mid-rule, move the `used' bit to its lhs.
4060 * tests/input.at (Unused values): New.
4061 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
4063 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
4065 * doc/bison.texinfo (Bison Options): Say more accurately what
4067 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
4068 about declarations in the grammar when in Yacc mode, as POSIX does
4069 not require a diagnostic when the grammar uses extensions.
4071 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
4073 Warn about dubious constructions like "%token T T".
4075 * src/symtab.h (struct symbol.declared): New member.
4076 * src/symtab.c (symbol_new): Initialize it to false.
4077 (symbol_class_set): New arg DECLARING, specifying whether
4078 this is a declaration that we want to warn about, if there
4079 is more than one of them. All uses changed.
4081 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
4082 Allow multiple %union directives, whose contents concatenate.
4083 * src/parse-gram.y (grammar_declaration): Likewise.
4084 Use muscle_code_grow, so that we don't need stype_line any more.
4087 * src/muscle_tab.c (muscle_grow): Fix comment.
4089 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
4090 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
4091 Update copyright year to 2006.
4093 2006-01-03 Akim Demaille <akim@epita.fr>
4095 Have glr.cc pass (some of) the calc.at tests.
4096 * data/glr.cc (b4_parse_param_orig): New.
4097 (b4_parse_param): Improve its definition, and bound it more
4098 clearly in the skeleton.
4099 (b4_epilogue): Append, instead of prepending, in order to keep
4101 Simplify the generation of auxiliary functions: locations and
4102 purity are mandated.
4103 (b4_global_tokens_and_yystype): Honor it.
4104 * data/location.cc (c++.m4): Don't include it.
4105 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
4107 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
4109 Be sure to initialize the first position's filename.
4110 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
4112 (AT_CHECK_CALC_GLR_CC): New.
4113 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
4115 2006-01-02 Akim Demaille <akim@epita.fr>
4117 * src/output.c (output_skeleton): Don't hard wire the inclusion of
4119 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
4120 * data/glr.cc: Do not include stack.hh.
4122 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
4124 * data/glr.c: Reformat whitespace with tabs.
4125 (b4_lpure_formals): Remove this unused m4 macro.
4126 * tests/cxx-type.at: Reformat whitespace with tabs.
4127 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
4128 since it's a member. Rename type to isNterm for clarity.
4130 2005-12-29 Akim <akim@sulaco.local>
4132 Let glr.cc catch up with symbol_value_print.
4133 * data/glr.cc (b4_yysymprint_generate): Replace by...
4134 (b4_yy_symbol_print_generate): this.
4135 (yy_symbol_print, yy_symbol_value_print): Declare them.
4137 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
4139 * src/location.h (boundary): Note that a line or column equal
4140 to INT_MAX indicates an overflow.
4141 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
4142 (rule_length_overflow, increment_rule_length, add_column_width):
4144 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
4145 (<SC_BRACED_CODE>"}"):
4146 Use increment_rule_length rather than incrementing it by hand.
4147 (adjust_location, handle_syncline): Diagnose overflow.
4148 (handle_action_dollar, handle_action_at):
4149 Fix bug with monstrosities like $-2147483648.
4150 Remove now-unnecessary checks.
4151 (scan_integer): Verify assumptions and remove now-unnecessary checks.
4152 (convert_ucn_to_byte): Verify assumptions.
4153 (handle_syncline): New arg LOC. All callers changed.
4154 Don't store through a value derived from char const * pointer.
4156 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
4159 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
4161 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
4162 Remove unnecessary forward static decls.
4164 2005-12-27 Akim Demaille <akim@epita.fr>
4166 * src/reader.c (grammar_current_rule_check): Also check that $$
4168 Take the rule to check as argument, hence rename as...
4169 (grammar_rule_check): this.
4170 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
4172 (grammar_rule_begin, grammar_rule_end): these, for consistency.
4173 (grammar_midrule_action, grammar_symbol_append): Now static.
4174 * tests/torture.at (input): Don't rely on the default action
4175 being always performed.
4176 * tests/calc.at: "Set" $$ even when the action is "cut" with
4178 * tests/actions.at (Exotic Dollars): Instead of using unused
4179 values, check that the warning is issued.
4181 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
4183 * NEWS: Improve wording for unused-value warnings.
4185 2005-12-22 Akim Demaille <akim@epita.fr>
4187 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
4188 (b4_yysymprint_generate): Rename as...
4189 (b4_yy_symbol_print_generate): this.
4190 Generate yy_symbol_print instead of yysymprint.
4191 Generate also yy_symbol_value_print, and use it.
4193 2005-12-22 Akim Demaille <akim@epita.fr>
4195 * NEWS: Warn about unused values.
4196 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
4198 (symbol_list_n_get, symbol_list_n_used_set): New.
4199 (symbol_list_n_type_name_get): Use symbol_list_n_get.
4200 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
4201 * src/reader.c (grammar_current_rule_check): Check that values are
4203 * src/symtab.c (symbol_print): Accept 0.
4204 * tests/existing.at: Remove the type information.
4206 Remove useless actions (beware of mid-rule actions: perl -000
4207 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
4208 * tests/actions.at (Exotic Dollars): Use unused values.
4209 * tests/calc.at: Likewise.
4210 * tests/glr-regression.at (No users destructors if stack 0 deleted):
4213 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
4216 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
4218 Undo 2005-12-01 tentative license wording change. The wording is
4219 still being reviewed by the lawyers, and we don't want to wait for
4220 them before publishing a test release. For now, revert to the
4222 * NEWS: Undo 2005-12-01 change.
4223 * data/glr.c: Revert to previous license wording.
4224 * data/glr.cc: Likewise.
4225 * data/lalr1.cc: Likewise.
4226 * data/location.cc: Likewise.
4227 * data/yacc.c: Likewise.
4229 * NEWS: Reword %destructor vs YYABORT etc.
4230 * data/glr.c: Use American spacing, for consistency.
4231 * data/glr.cc: Likewise.
4232 * data/lalr1.cc: Likewise.
4233 * data/yacc.c: Likewise.
4234 * data/yacc.c: Reformat comments slightly.
4235 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
4236 for consistency. Fix some spelling errors and reword recently-included
4238 * tests/cxx-type.at: Cast results of malloc, for C++.
4240 2005-12-21 Joel E. Denny <address@hidden>
4242 * tests/cxx-type.at: Construct a tree, count the parents of shared
4243 nodes, and free each node once and only once. Previously, the memory
4244 for semantic values was leaked instead.
4246 2005-12-21 Joel E. Denny <address@hidden>
4248 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
4249 (yylval, yylloc): If pure, #define to yystackp->yyval and
4250 yystackp->yyloc similar to yychar and yynerrs.
4251 (yyparse): If pure, remove local yylval and yylloc. Add local
4252 yystackp to accommodate pure definitions of yylval and yylloc.
4253 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
4254 yylvalp and yyllocp to &yylval and &yylloc.
4255 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
4256 namespace. Previously, nerrs and char were missing, but lval and lloc
4258 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
4259 yylvalp and yyllocp parameters since, if pure, these are now always
4260 accessible through yystackp. If not pure, they are still accessible
4262 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
4263 `if (YYID (N))' to pacify lint.
4265 2005-12-21 Akim Demaille <akim@epita.fr>
4267 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
4268 destroy the RHS symbols of a rule.
4269 * data/yacc.c (yylen): Initialize to 0.
4270 Keep its value to the number of items to possibly shift.
4271 In particular, a regular successful parse that ends on YYFINAL by
4272 a (internal) YYACCEPT must not have yylen != 0.
4273 (yyerrorlab, yyreturn): Pop the RHS.
4274 Reorder a bit to emphasize the `shifting' bits of code.
4275 (YYPOPSTACK): Now accept a number of items to pop.
4276 * data/lalr1.cc: Likewise.
4277 * data/glr.c: Formatting changes.
4278 Use goto instead of fall through.
4279 * doc/bison.texinfo (Destructor Decl): Complete.
4281 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4283 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
4284 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
4285 * djgpp/config.bat: Replace every occurence of the file name
4286 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
4287 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
4288 * djgpp/config.sed: Replace every occurence of the file name
4289 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
4290 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
4291 * djgpp/djunpack.bat: DJGPP specific file.
4292 * djgpp/fnchange.lst: DJGPP specific file.
4293 * djgpp/README.in: Add new information about how to unpack the bison
4294 source on MSDOS and other systems which have 8.3 file name restrictions
4295 using djunpack.bat and fnchange.lst.
4297 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
4299 * bootstrap (build_cvs_prefix): Remove; unused.
4300 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
4301 when getting gnulib.
4303 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
4305 * data/glr.c: Reorder typedef declarations for structs to match order
4306 of struct declarations.
4307 Rename yystack everywhere to yystackp except in yyparse where it's not
4309 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
4311 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
4312 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
4313 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
4316 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
4318 * tests/sets.at (Accept): Fix typos in regular expression used to
4319 sed out the final state number.
4321 Work around portability problem on Solaris 10: flex-generated
4322 files include <stdio.h> before <config.h>, which messes up
4323 because the latter defines __EXTENSIONS__. Address the problem
4324 by creating two new little files that include <config.h> first,
4325 then include the flex-generated files. Rewrite everyone else
4326 to include <config.h> first, as well.
4327 * lib/timevar.c: Always include "config.h".
4328 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
4329 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
4330 (EXTRA_bison_SOURCES): New macro.
4331 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
4332 * src/system.h: Don't include config.h.
4333 * src/LR0.c: Include <config.h> first.
4334 * src/assoc.c: Likewise.
4335 * src/closure.c: Likewise.
4336 * src/complain.c: Likewise.
4337 * src/conflicts.c: Likewise.
4338 * src/derives.c: Likewise.
4339 * src/files.c: Likewise.
4340 * src/getargs.c: Likewise.
4341 * src/gram.c: Likewise.
4342 * src/lalr.c: Likewise.
4343 * src/location.c: Likewise.
4344 * src/main.c: Likewise.
4345 * src/muscle_tab.c: Likewise.
4346 * src/nullable.c: Likewise.
4347 * src/output.c: Likewise.
4348 * src/parse-gram.y: Likewise.
4349 * src/print.c: Likewise.
4350 * src/print_graph.c: Likewise.
4351 * src/reader.c: Likewise.
4352 * src/reduce.c: Likewise.
4353 * src/relation.c: Likewise.
4354 * src/state.c: Likewise.
4355 * src/symlist.c: Likewise.
4356 * src/symtab.c: Likewise.
4357 * src/tables.c: Likewise.
4358 * src/uniqstr.c: Likewise.
4359 * src/vcg.c: Likewise.
4361 * src/parse-gram.y: Fix minor problems uncovered by lint.
4362 (current_lhs, current_lhs_location): Now static.
4363 (current_assoc): Remove unused variable.
4365 Cleanups so that Bison-generated parsers have less lint.
4366 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
4367 Prepend /*ARGSUSED*/, for lint's sake.
4368 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
4369 definition if 'lint' is defined.
4370 (YYID): New macro (or function, if lint).
4371 All uses of /*CONSTCOND*/0 replaced by YYID(0).
4372 * data/yacc.c: Likewise.
4373 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
4374 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
4375 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
4377 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
4378 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
4379 Use YYID(0) rather than 0, for lint.
4380 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
4381 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
4383 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
4385 * tests/glr-regression.at
4386 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
4387 Close memory leak reported by twlevo.
4389 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
4391 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
4393 (yyparse): Iterate another stack in order to call user destructors.
4394 * tests/glr-regression.at (No users destructors if stack 0 deleted):
4396 (Duplicated user destructor for lookahead): This test now is expected
4399 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
4401 * NEWS: Document the following change.
4402 * data/yacc.c: Say "parser skeleton" rather than "file", since
4403 it's no longer just a file.
4404 * data/glr.c: Grant a special exception for C GLR parsers, that
4405 reads like the already-existing exception for C LALR(1) parsers.
4406 * data/glr.cc: Likewise.
4407 * data/lalr1.cc: Likewise.
4408 * data/location.cc: Likewise.
4409 * data/yacc.c: Reword the "written by" statement to clarify that
4410 it was the parser skeleton, not the entire output file.
4411 * data/glr.c: Written by Paul Hilfinger.
4412 * data/glr.cc: Written by Akim Demaille.
4413 * data/lalr1.cc: Likewise.
4415 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
4417 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
4418 Fix typos in previous change that broke 'make check'.
4419 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
4421 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
4422 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
4423 We can revert this once things settle down.
4425 * src/conflicts.c (conflicts_print): Don't print file name twice
4426 when %expect fails because there were no conflicts.
4427 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
4429 * tests/conflicts.at (%expect not enough, %expect too much):
4430 (%expect with reduce conflicts): Adjust to new behavior.
4432 2005-11-18 Akim Demaille <akim@epita.fr>
4434 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
4436 * NEWS: Document this.
4437 * doc/bison.texinfo (Expect Decl): Likewise.
4439 2005-11-16 Akim Demaille <akim@epita.fr>
4441 Generalize the display of semantic values and locations in traces.
4442 * data/glr.c (yy_reduce_print): Fix indices (again).
4443 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
4445 * data/lalr1.cc (yyreduce_print): Rename as...
4446 (yy_reduce_print): this.
4447 Display values and locations.
4448 * data/yacc.c (yy_reduce_print): Likewise.
4449 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
4450 (yysymprint): Move higher to be visible from yy_reduce_print).
4452 * tests/calc.at: Adjust the expected length of the traces.
4454 2005-11-14 Akim Demaille <akim@epita.fr>
4456 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
4457 from 1 to N, while values and location start at 0.
4458 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
4460 2005-11-14 Akim Demaille <akim@epita.fr>
4462 * data/glr.c (yy_reduce_print): Fix the $ number.
4464 2005-11-14 Akim Demaille <akim@epita.fr>
4466 "Use" parse parameters.
4467 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
4468 * data/glr.c, data/glr.cc: Use them.
4469 * data/glr.c (YYUSE): Have a C++ definition that supports
4472 2005-11-14 Akim Demaille <akim@epita.fr>
4474 * data/glr.c (yyexpandGLRStack): Declare only if defined.
4476 2005-11-14 Akim Demaille <akim@epita.fr>
4479 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
4481 2005-11-12 Akim Demaille <akim@epita.fr>
4483 Let position and location be PODs.
4484 * data/location.cc (position::initialize, location::initialize): New.
4485 (position::position, location::location): Define only if
4486 b4_location_constructors is defined.
4487 * data/lalr1.cc (b4_location_constructors): Define it for backward
4489 * doc/bison.texinfo (Initial Action Decl): Use initialize.
4491 2005-11-12 Akim Demaille <akim@epita.fr>
4493 * data/lalr1.cc: Move the body of the ctor and dtor into the
4494 parser file (instead of the header).
4495 Wrap the implementations in a "namespace yy".
4497 2005-11-12 Akim Demaille <akim@epita.fr>
4499 Have glr.c include its header file when created.
4500 * data/glr.c (b4_shared_declarations): New.
4501 Output them verbatim in the parser if !%defines, otherwise
4502 output then in the header file, and include it instead.
4504 2005-11-11 Akim Demaille <akim@epita.fr>
4506 * data/glr.c: Comment changes.
4508 2005-11-11 Akim Demaille <akim@epita.fr>
4510 When yydebug, report semantic and location values for reductions.
4511 * data/glr.c (yy_reduce_print): Report the semantic values and the
4513 (YY_REDUCE_PRINT): Adjust.
4514 (yyglrReduce): Use them.
4515 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
4516 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
4517 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
4520 2005-11-10 Akim Demaille <akim@epita.fr>
4522 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
4523 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
4524 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
4526 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
4528 * m4/cxx.m4, examples/Makefile.am: Don't build
4529 examples/calc++ if no C++ compiler is available. (trivial change)
4531 2005-11-09 Akim Demaille <akim@epita.fr>
4533 * src/scan-skel.l: Use a couple of asserts.
4535 2005-11-03 Akim Demaille <akim@epita.fr>
4537 In some (weird) cases, the final state number is incorrect.
4538 Reported by Alexandre Duret-Lutz.
4539 * src/LR0.c (state_list_append): Remove the computation of
4541 (save_reductions): Do it here.
4542 (get_state): Alpha conversion.
4543 (generate_states): Use a for loop.
4544 * src/gram.h (item_number_is_rule_number)
4545 (item_number_is_symbol_number): New.
4546 * src/state.c: Use assert.
4547 * src/system.h: Include assert.h.
4548 * tests/sets.at (Accept): New.
4550 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
4552 * data/glr.c (yyfill): Adjust comment.
4553 (yyresolveAction): Initialize default location properly
4554 for empty right-hand sides.
4555 (yydoAction): Ditto.
4556 Add comment explaining apparently dead code.
4557 * tests/glr-regression.at
4558 (Incorrectly initialized location for empty right-hand side in GLR):
4561 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
4563 * bootstrap (cleanup_gnulib): New function. Use it to clean up
4564 gnulib when interrupted. This fixes some race conditions and
4565 works around some portability problems (one noted by Paul
4568 2005-10-22 Akim <akim@epita.fr>
4570 * Makefile.cfg: Adjust to config -> build-aux.
4573 2005-10-21 Akim Demaille <akim@epita.fr>
4575 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
4577 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
4578 * data/yacc.c (b4_Pure_if): Rename as...
4579 (b4_yacc_pure_if): this.
4580 (YY_SYMBOL_PRINT, yyparse): Adjust.
4581 * doc/bison.texinfo: Formatting changes.
4583 2005-10-21 Akim Demaille <akim@epita.fr>
4585 Finish the transition config -> build-aux.
4586 * configure.ac, Makefile.am: Use build-aux.
4587 * config/prev-version, config/announce-gen, config/Makefile.am:
4589 * build-aux/prev-version, build-aux/announce-gen,
4590 * build-aux/Makefile.am: here.
4592 2005-10-14 Akim Demaille <akim@epita.fr>
4594 * examples/calc++/test: Use set -x only when VERBOSE.
4596 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
4598 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
4599 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
4601 2005-10-13 Akim Demaille <akim@epita.fr>
4603 * src/scan-skel.l: Output the base name parts of the parser and
4605 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
4607 Use this to exercise C++ outputs in subdirs.
4608 Reported by Oleg Smolsky.
4610 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
4612 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
4613 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
4614 Problem reported by John P. Hartmann.
4615 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
4618 2005-10-12 Akim Demaille <akim@epita.fr>
4620 * src/parse-gram.y (version_check): Exit 63 to please missing
4621 (stands for "version mismatch).
4622 * tests/input.at, doc/bison.texinfo: Adjust.
4624 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
4626 Work around portability problems with Visual Age C compiler
4627 (xlc and xlC_r) reported by John P. Hartmann.
4628 * data/location.cc (initial_column, initial_line): Remove.
4629 All uses replaced by 0 and 1.
4630 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
4631 that xlc complains about.
4632 * src/scan-skel.l (skel_wrap): Likewise.
4633 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
4635 * data/yacc.c (YYMODERN_C): New macro, which also looks at
4636 __STDC_VERSION__. Use it everywhere instead of looking at
4637 __STDC__ and __cplusplus.
4639 2005-10-10 Akim Demaille <akim@epita.fr>
4641 * examples/calc++/test: Be quiet unless VERBOSE.
4643 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
4645 * data/c.m4 (yydestruct, yysymprint):
4646 Use YYUSE instead of casting to void.
4647 * data/glr.c (YYUSE): New macro.
4648 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
4649 Use it instead of rolling our own.
4650 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
4652 Use /*CONSTCOND*/ to suppress lint warnings.
4653 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
4654 (YY_STACK_PRINT): Use 'false' not '0'.
4656 (yysymprint_, yydestruct_): Use it instead of rolling our own.
4657 * data/yacc.c (YYUSE): New macro.
4658 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
4659 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
4660 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
4663 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
4664 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
4666 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
4668 Undo the parts of the unlocked-I/O change that substituted
4669 putc or puts for printf. This might hurt performance a bit,
4670 but some people prefer the printf style.
4671 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
4672 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
4673 All uses replaced by YYFPRINTF and YYDPRINTF.
4674 * data/yacc.c: Likewise.
4675 * lib/bitset.c (bitset_print): Likewise.
4676 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
4678 * lib/lbitset.c (debug_lbitset): Likewise.
4679 * src/closure.c (print_firsts, print_fderives): Likewise.
4680 * src/gram.c (grammar_dump): Likewise.
4681 * src/lalr.c (look_ahead_tokens_print): Likewise.
4682 * src/output.c (escaped_output): Likewise.
4683 (user_actions_output): Break apart two printfs.
4684 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
4685 * src/reduce.c (reduce_print): Likewise.
4686 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
4687 * src/system.h: Include unlocked-io.h rathe than stdio.h.
4689 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
4690 Use assignments rather than casts-to-void to suppress
4691 unused-variable warnings. This pacifies 'lint'.
4692 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
4693 unused-variable warnings.
4695 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4697 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
4699 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
4701 Use unlocked I/O for a minor performance improvement on hosts like
4702 GNU/Linux and Solaris that support unlocked I/O. The basic idea
4703 is to use the gnlib unlocked-io module, and to prefer putc and
4704 puts to printf when either will work (since the latter doesn't
4705 come in an unlocked flavor).
4706 * bootstrap (gnulib_modules): Add unlocked-io.
4707 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
4708 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
4709 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
4710 and similarly for puts and putc and printf.
4711 * data/yacc.c: Likewise.
4712 * lib/bitset.c (bitset_print): Likewise.
4713 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
4714 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
4716 * lib/lbitset.c (debug_lbitset): Likewise.
4717 * src/closure.c (print_firsts, print_fderives): Likewise.
4718 * src/gram.c (grammar_dump): Likewise.
4719 * src/lalr.c (look_ahead_tokens_print): Likewise.
4720 * src/output.c (escaped_output): Likewise.
4721 (user_actions_output): Coalesce two printfs.
4722 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
4723 * src/reduce.c (reduce_print): Likewise.
4724 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
4725 * src/system.h: Include unlocked-io.h rather than stdio.h.
4727 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
4728 this confuses xgettext.
4730 2005-10-02 Akim Demaille <akim@epita.fr>
4732 * bootstrap (gnulib_modules): Add strverscmp.
4733 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
4734 * m4/.cvsignore: Add strverscmp.m4.
4735 * src/parse-gram.y (%require): New token, new rule.
4736 (version_check): New.
4737 * src/scan-gram.l (%require): Adjust.
4738 * tests/input.at (AT_REQUIRE): New.
4740 * doc/bison.texinfo (Require Decl): New.
4741 (Calc++ Parser): Use %require.
4743 2005-10-02 Akim Demaille <akim@epita.fr>
4745 * data/location.cc: New.
4747 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
4748 Akim Demaille <akim@epita.fr>
4750 Make sure -odir/foo.cc creates dir/location.hh etc.
4751 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
4752 (spec_file_prefix, spec_verbose_file, spec_graph_file)
4753 (spec_defines_file): Now const.
4755 (short_base_name): Remove.
4756 * src/files.c: Adjust.
4757 (dirname.h): Include.
4758 (base_name): Don't prototype it.
4759 (finput): Remove, duplicates gram_in.
4760 (full_base_name, short_base_name): Replace by...
4761 (all_but_ext, all_but_tab_ext): these.
4762 (compute_base_names): Rename as...
4763 (compute_file_name_parts): this.
4764 Update to compute the new variables, including dir_prefix.
4765 Adjust dependencies.
4766 * src/output.c (prepare): Output them.
4767 * src/reader.c: Adjust to use gram_in, not finput.
4768 * src/scan-skel.l (@dir_prefix@): New.
4770 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4772 * lib/subpipe.c: New function end_of_output_subpipe() added
4773 to allow support for non-posix systems. This is a no-op function
4776 * lib/subpipe.h: New function end_of_output_subpipe() added
4777 to allow support for non-posix systems. This is a no-op function
4780 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
4781 handle the lack of pipe/fork functionality on non-posix systems.
4783 * djgpp/Makefile.maint: DJGPP specific file.
4785 * djgpp/README.in: DJGPP specific file.
4787 * djgpp/config.bat: DJGPP specific configuration file.
4789 * djgpp/config.sed: DJGPP specific configuration file.
4791 * djgpp/config.site: DJGPP specific configuration file.
4793 * djgpp/config_h.sed: DJGPP specific configuration file.
4795 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
4797 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
4799 2005-10-02 Akim Demaille <akim@epita.fr>
4801 * data/location.cc: New, extract from...
4802 * data/lalr1.cc: here.
4803 (location.hh): Include it after the user prologue, in case the
4804 filename type is defined by the user.
4805 Forward declation location and position before the pre-prologue.
4806 (yyresult_): Rename as...
4807 (yyresult): this, it's a local variable, not an attribute.
4808 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
4810 2005-10-01 Akim Demaille <akim@epita.fr>
4812 * examples/extexi: Restore the #line generation.
4814 2005-09-30 Akim Demaille <akim@epita.fr>,
4815 Alexandre Duret-Lutz <adl@gnu.org>
4817 Move the token type and YYSTYPE in the parser class.
4818 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
4819 (parser::token): New, from the moved free definition of tokens.
4820 (parser::semantic_value): Now a full definition instead of an
4821 indirection to YYSTYPE.
4822 (b4_post_prologue): No longer included in the header file, but
4823 in the implementation file.
4824 * doc/bison.texi (C+ Language Interface): Update.
4825 * src/parse-gram.y: Support unary %define.
4826 * tests/actions.at: Define global_tokens_and_yystype for backward
4827 compatibility until we update the tests.
4828 * tests/calc.at: Idem.
4829 (first_line, first_column, last_line, last_column): Define for lalr1.cc
4830 to simplify the code.
4832 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
4834 Port to SunOS 4.1.4, which lacks strtoul and strerror.
4835 Ah, the good old days! Problem reported by Peter Klein.
4836 * bootstrap (gnulib_modules): Add strerror, strtoul.
4837 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
4838 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
4840 2005-09-29 Akim Demaille <akim@epita.fr>
4842 * data/c.m4 (b4_error_verbose_if): New.
4843 * data/lalr1.cc: Use it.
4844 (YYERROR_VERBOSE_IF): Remove.
4845 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
4846 parser members, replaced by...
4847 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
4849 (yysyntax_error_): Takes the state number as argument.
4850 (yyreduce_print_): Use the argument yyrule, not the former
4853 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
4855 * bootstrap (gnulib_modules): Add verify.
4856 * lib/.cvsignore: Add verify.h.
4857 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
4858 * src/system.h (verify): Remove.
4859 Include verify.h instead.
4860 * src/tables.c (tables_generate): Use new API for 'verify'.
4862 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
4864 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
4865 local variables whose names begin with 'yy'.
4866 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
4867 Trivial changes from Joel E. Denny.
4869 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
4871 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
4872 don't use alloca any more.
4874 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
4875 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
4876 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
4877 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
4878 to match yacc.c, to test more hosts.
4880 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
4882 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
4883 doesn't affect behavior.
4884 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
4886 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
4887 This works a bit better with glibc, if user code has already included
4889 * doc/bison.texinfo (Bison Parser): Document that users can't
4890 arbitrarily use malloc and free for other purposes. Document
4891 that <alloca.h> and <malloc.h> might be included.
4892 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
4893 user must declare alloca.
4895 * HACKING (release): Forwarn the Translation Project about
4898 2005-09-20 Akim Demaille <akim@epita.fr>
4900 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
4902 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
4904 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
4905 (YYSTACK_ALLOC_MAXIMUM): Use it.
4906 (yysyntax_error): New function.
4907 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
4908 multiple syntax errors are reported, and alloca is being used.
4909 Instead, reallocate buffers twice as big each time, so that
4910 we waste at most half the allocated memory. Start with a small
4911 (128-byte) buffer that will suffice in most cases anyway.
4912 Use yysyntax_error to do most of the work.
4914 * doc/bison.texinfo (Error Reporting, Table of Symbols):
4915 yynerrs is the number of errors reported, not the number of
4918 * tests/glr-regression.at (Duplicated user destructor for lookahead):
4919 Mark it as expected to fail.
4920 Cast result of malloc; problem reported by twlevo@xs4all.nl.
4921 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
4922 Don't start user-code symbols with "yy", to avoid name space problems.
4924 2005-09-19 Akim Demaille <akim@epita.fr>
4926 Remove the traits, failed experiment.
4927 It never proved useful, and anyway because of the current
4928 definition, it was not possible to have several specialization of
4929 this traits, making it useless.
4930 * data/lalr1.cc (yy:traits): Remove.
4931 Inline its definitions in the parser class.
4933 2005-09-19 Akim Demaille <akim@epita.fr>
4935 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
4936 least Mac OSX with a /usr/local install of gettext.
4938 2005-09-19 Akim Demaille <akim@epita.fr>
4940 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
4941 and yytoken for similarity with the other skeletons.
4943 2005-09-19 Akim Demaille <akim@epita.fr>
4945 * NEWS, configure.ac: update version number to 2.1a.
4947 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
4949 * NEWS: Version 2.1.
4951 * NEWS: Remove notice of yytname change, since it was never in an
4953 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
4955 * src/output.c (prepare): Likewise.
4956 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
4957 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
4958 is not defined. This is an awful hack, but it's enough for now.
4959 All callers changed.
4960 * tests/glr-regression-at (make_value): Args are const pointers now,
4961 to avoid GCC warning.
4962 (Duplicated user destructor for lookahead): New test. Currently
4963 skipped. It fails on my host but I'm not sure it'll always fail.
4965 2005-09-16 Akim Demaille <akim@epita.fr>
4967 * src/symtab.h (struct symbol): Declare the printer and destructor
4968 as const, to avoid accidental calls to free.
4969 (symbol_destructor_set, symbol_printer_set): Adjust.
4970 * src/symtab.c: Adjust.
4972 2005-09-16 Akim Demaille <akim@epita.fr>
4974 * data/c.m4 (b4_token_enums): New.
4975 (b4_token_defines): Rename as...
4976 (b4_token_enums_defines): this.
4977 (b4_token_defines): New, output only the #defines.
4978 * data/yacc.c, data/glr.c: Adjust.
4979 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
4980 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
4983 2005-09-16 Akim Demaille <akim@epita.fr>
4985 * data/lalr1.cc (yylex_): Remove, inline its code.
4986 (yyreport_syntax_error_): Remove, replaced by...
4987 (yysyntax_error_): this which returns a string and leaves to the
4988 caller the call to the users' error function.
4989 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
4990 Move from members of the parser object...
4991 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
4992 to local variables of the parse function.
4994 2005-09-16 Akim Demaille <akim@epita.fr>
4996 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
4997 since it's in Bison's name space.
4999 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
5001 * data/glr.c (yyresolveValue): Add default case to pacify
5002 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
5004 * NEWS: Document when yyparse started to return 2.
5005 * doc/bison.texinfo (Parser Function): Document when yyparse
5008 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
5009 (b4_filename_type): Renamed back from b4_file_name_type. All uses
5011 (class position): file_name -> filename (reverting). All uses changed.
5013 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
5015 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
5016 do anything if $@ exists. This reverts part of the 2005-07-07
5019 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
5021 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
5022 contains obsolete information and isn't worth distributing as a
5023 separate file anyway.
5024 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
5025 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
5026 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
5027 (yyparse): Abort if user code uses longjmp to throw an unexpected
5030 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
5032 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
5033 Suggested by twlevo@xs4all.nl.
5035 * data/glr.c (YYCHK1): Do not assume YYE is in range.
5036 This avoids a diagnostic from gcc -Wswitch-enum.
5037 Problem reported by twlevo@xs4all.nl.
5039 * doc/bison.texinfo: Don't use "filename", as per GNU coding
5040 standards. Use "file name" or "file" or "name", depending on
5042 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
5043 not to hack/foo.tab.c.
5044 (Calc++ Top Level): 2nd arg of main is not const.
5045 * data/glr.c: b4_filename -> b4_file_name.
5046 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
5048 (class position): filename -> file_name. All uses changed.
5049 * data/yacc.c: b4_filename -> b4_file_name.
5050 * lib/bitset.h: filename -> file_name in local vars.
5051 * lib/bitset_stats.c: Likewise.
5052 * src/files.c: Likewise.
5053 * src/scan-skel.l ("@output ".*\n): Likewise.
5054 * src/files.c (file_name_split): Renamed from filename_split.
5055 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
5057 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
5059 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
5060 to accommodate latest gnulib.
5062 * tests/glr-regression.at (Duplicate representation of merged trees):
5063 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
5065 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
5068 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
5070 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
5071 All uses changed. Invoke user destructor after an error during a
5072 split parse (trivial change from Joel E. Denny).
5074 * tests/glr-regression.at
5075 (User destructor after an error during a split parse): New test case.
5076 Problem reported by Joel E. Denny in:
5077 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
5079 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
5081 * README-cvs: Give URLs for recommended tools.
5082 Mention Gzip version problem, and bootstrapping issues.
5083 Remove troubleshooting section, as it's somewhat obsolete.
5085 * bootstrap (no_cache): New var, to accommodate different wget
5086 variants. Use it instead of '-C off'. Problem reported by
5089 * data/glr.c (yydestroyStackItem): New function.
5090 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
5091 debugging information. Problem reported by Joel E. Denny.
5093 2005-08-25 Akim Demaille <akim@epita.fr>
5095 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
5097 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
5099 * data/glr.c (yyrecoverSyntaxError, yyreturn):
5100 Don't invoke destructor on unresolved entries.
5101 * tests/glr-regression.at
5102 (User destructor for unresolved GLR semantic value): New test case.
5103 Problem reported by Joel E. Denny in:
5104 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
5106 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
5108 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
5110 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
5111 lib-prefix.m4, po.m4.
5113 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
5114 in yydestruct diagnostic, since it might not be an error.
5115 Problem reported by Joel Denny near end of
5116 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
5117 * data/lalr1.cc (yyerturn): Likewise.
5118 * data/yacc.c (yyreturn): Likewise.
5119 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
5121 * src/files.c: Remove obsolete FIXME comment.
5123 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
5124 with the other templates, and to fix bogus run-on messages such
5125 as the one reported at the end of
5126 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
5127 All callers changed to avoid the newline.
5128 (yyprocessOneStack): Output two lines rather than one, to accommodate
5129 the above change. This changes the debug output format slightly.
5131 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
5132 reported by Joel E. Denny in
5133 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
5135 * tests/glr-regression.at (Duplicate representation of merged trees):
5136 New test, from Joel E. Denny in:
5137 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
5138 * THANKS: Add Joel E. Denny.
5140 * configure.ac (AC_INIT): Bump to 2.0c.
5142 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
5144 * NEWS: Version 2.0b.
5146 * Makefile.am (SUBDIRS): Put examples before tests, so that
5147 "make check" doesn't finish with "All 1 tests passed".
5149 * tests/regression.at (Token definitions): Don't rely on
5150 AT_PARSER_CHECK for data that contains backslashes. It currently
5151 uses 'echo', and 'echo' isn't portable if its argument contains
5152 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
5153 that the byte '\0xff' is not printable in the C locale; it is,
5154 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
5155 not printable, so use '\0x81' to test.
5157 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
5158 version of GCC, since the macro is used with non-GCC compilers.
5160 Fix core dump reported by Pablo De Napoli in
5161 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
5162 * tests/regression.at (Invalid inputs with {}): New test.
5163 * src/parse-gram.y (token_name): Translate type before using
5166 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
5167 the user's name space. All uses changed to __attribute__
5169 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
5170 Add __attribute__ ((__noreturn__)).
5172 * etc/clcommit: Remove. We weren't using it, and it failed
5173 "make maintainer-distcheck".
5174 * Makefile.maint: Merge from coreutils.
5175 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
5176 (syntax-check-rules): Change list of rules as described below.
5177 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
5178 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
5179 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
5180 (sc_trailing_space): New rules.
5181 (sc_xalloc_h_in_src): Remove.
5182 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
5183 (sc_space_tab, sc_error_exit_success, sc_changelog):
5184 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
5185 (makefile-check, po-check, author_mark_check):
5186 (makefile_path_separator_check, copyright-check):
5187 Use grep -n, to make it easier to find violations.
5188 Use CVS_LIST and CVS_LIST_EXCEPT.
5189 (header_regexp, h_re): Remove.
5191 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
5192 (my-distcheck): Use more-modern GCC flags.
5193 (signatures, %.asc): Remove.
5194 (rel-files, announcement): Remove signatures.
5195 Restore old updating code, even though we don't use it, so
5196 that we're the same as coreutils.
5197 (alpha, beta, major): Depend on news-date-check.
5198 Make the upload commands.
5200 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
5201 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
5202 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
5203 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
5204 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
5205 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
5206 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
5207 * tests/sets.at: Likewise.
5209 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
5210 we comment out the Autoconf version number.
5211 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
5212 it's error-prone and "make maintainer-distcheck" rejects it.
5214 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
5215 Indent calls to "error" to pacify "make maintainer-distcheck",
5216 when the calls are not intended to be translated.
5217 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
5219 * src/Makefile.am (DEFS): Use +=, to pacify
5220 "make maintainer-distcheck".
5221 (bison_SOURCES): Add scan-skel.h.
5222 (sc_tight_scope): New rule, from coreutils.
5224 * src/files.c (src_extension, header_extension):
5225 Now static, not extern.
5226 * src/getargs.c (short_options): Likewise.
5227 * src/muscle_tab.c (muscle_table): Likewise.
5228 * src/parse-gram.y (current_class, current_type, current_prec):
5230 * src/reader.c (grammar_end, previous_rule_end): Likewise.
5231 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
5232 * src/main.c (main): Cast bindtextdomain and textdomain calls to
5233 void, to avoid warning when NLS is disabled.
5234 * src/output.c: Include scan-skel.h.
5235 (scan_skel): Remove decl, since scan-skel.h does this.
5237 Indent calls to "error" to pacify "make maintainer-distcheck".
5238 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
5239 * src/reader.h (gram_end, gram_lineno): New decls to pacify
5240 "make maintainer-distcheck".
5241 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
5242 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
5243 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
5244 (skel_lex_destroy, scan_skel): Move these decls to...
5245 * src/scan-skel.h: New file.
5246 * src/uniqstr.c (uniqstr_assert):
5247 Indent calls to "error" to pacify "make maintainer-distcheck".
5249 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
5252 * tests/torture.at: Revamp to avoid misuse of atoi that
5253 "make maintainer-distcheck" complained about.
5255 * examples/extexi (message): Don't print a message more than once,
5256 and omit line-number decoration that makes Emacs compile think
5257 that informative messages are worth worrying about.
5259 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
5261 * configure.ac: Update version number.
5263 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
5265 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
5266 autogenerated by the maintainer.
5267 * examples/calc++/.cvsignore: Add *.yy.
5269 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
5270 * lib/bitset_stats.c (bitset_stats_init): Likewise.
5271 * lib/bitsetv.c (bitsetv_alloc): Likewise.
5273 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
5275 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
5276 from maintainer-distcheck about casting the argument of 'free'.
5278 * NEWS: Mention recent yytname changes.
5279 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
5281 * bootstrap: For translations that have not yet been upgraded to
5282 the new runtime-po domain, prime the pump by extracting the
5283 relevant strings from the obsolete translations. This code can be
5284 removed once the bison-runtime domain has been translated by each
5287 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
5288 now that token names are already quoted.
5290 Fix problem reported by Anthony Heading.
5291 * data/glr.c (YYTOKEN_TABLE): New macro.
5292 (yytname): Define if YYTOKEN_TABLE.
5293 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
5294 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
5295 (YYERROR_VERBOSE): Define the same way the other skeletons do.
5296 * src/output.c (prepare_symbols): Output token_table_flag.
5298 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
5300 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
5301 again if the first call fails.
5303 * data/glr.c (yytnamerr): New function.
5304 (yyreportSyntaxError): Use it to dequote most string literals.
5305 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
5306 with other skeletons. All uses changed.
5307 (yytnameerr_): New function.
5308 (yyreport_syntax_error): Use it to dequote most string literals.
5309 * data/yacc.c (yytnamerr): New function.
5310 (yyerrlab): Use it to decode most string literals.
5311 * doc/bison.texinfo (Decl Summary, Calling Convention):
5312 Clarify quoting convention of yytname.
5313 * src/output.c (prepare_symbols): Quote all names. This undoes
5314 the 2005-04-17 change, which is now accomplished (mostly) via
5315 changes in the parsers as described above.
5316 * tests/regression.at (Token definitions, Web2c Actions):
5317 Undo most 2005-04-17 change here, too.
5319 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
5321 Fix more problems reported by twlevo@xs4all.nl.
5322 * tests/cxx-type.at: Don't pipe output of ./types through sed to
5323 remove trailing spaces. This loses the exit status of ./types,
5324 and isn't needed since ./types shouldn't be emitting trailing
5326 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
5327 as the stack isn't valid in that case.
5329 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
5330 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
5331 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
5332 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
5334 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
5335 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
5336 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
5339 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
5340 overly-picky compilers that reject 'char *foo = "bar";'.
5342 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
5343 to FILE * parameter, not to stderr. This fixes a typo introduced
5344 in the 2005-07-12 change.
5346 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
5347 warnings from GCC 4.
5349 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
5350 (yyglrShiftDefer, yysplitStack):
5351 Remove unused parameters b4_pure_formals. All uses changed.
5352 (yyglrShift): Remove unused parameters b4_user_formals.
5354 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
5356 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
5358 Destructor cleanups and regularization among the three skeletons.
5359 * NEWS: Document the behavior changes.
5360 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
5361 stack before failing, as the cleanup code will do it for us now.
5362 * data/lalr1.cc (yyerrlab): Likewise.
5363 * data/glr.c (yyparse): Pop everything off the stack before
5364 freeing it, so that destructors get called properly.
5365 * data/lalr1.cc (yyreturn): Likewise.
5366 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
5367 This is more consistent.
5368 * doc/bison.texinfo (Destructor Decl): Mention more reasons
5369 why destructors might be called. 1.875 -> 2.1.
5370 (Destructor Decl, Decl Summary, Table of Symbols):
5371 Some English-language cleanups for %destructor.
5372 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
5373 Add output line for destructor of start symbol.
5374 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
5375 because of that same extra output line.
5377 * NEWS: Document minor wording changes in diagnostics of
5378 Bison-generated parsers.
5379 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
5380 Remove unused formals. All uses changed.
5381 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
5382 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
5383 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
5384 Rename yyoverflowab to yyexhaustedlab.
5385 When memory exhaustion occurs during syntax-error reporting,
5386 report it separately rather than in a single diagnostic; this
5388 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
5389 (Memory Exhausted): Renamed from Parser Stack Overflow.
5390 Revamp wording slightly to prefer "memory exhaustion".
5391 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
5393 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
5395 Add i18n support to the GLR skeleton. Partially fix the C++
5396 skeleton; a C++ expert needs to finish this. Remove debugging
5397 msgids; there's little point to having them translated, since they
5398 can be understood only by someone who can read the
5399 (English-language) source code.
5401 Generate runtime-po/bison-runtime.pot automatically, so that we
5402 don't have to worry about garbage getting in that file. We'll
5403 make sure after the next official release that old msgids don't
5405 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
5407 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
5409 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
5410 Fix typos in explanations of the runtime file.
5411 * bootstrap: Change gettext keyword from YYI18N to YY_.
5412 Use standard Makefile.in.in in runtime-po, since we'll arrange
5413 for backward-compatible bison-runtime.po files in a different way.
5414 * data/glr.c (YY_): New macro, from yacc.c.
5415 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
5416 Translate messages intended for users.
5417 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
5418 the wording in the other skeletons. We don't know that the memory
5420 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
5421 Use same method that yacc.c uses.
5422 Don't translate debugging messages.
5423 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
5424 it doesn't work (yet), and requires C++ expertise to fix.
5425 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
5426 Move defn to a more logical place, to be consistent with other
5428 Don't translate debugging messages.
5429 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
5430 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
5431 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
5432 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
5434 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
5435 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
5437 * tests/glr-regression.at (Badly Collapsed GLR States):
5439 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
5440 yylex should return 0 at EOF rather than aborting.
5442 Improve tests for stack overflow in GLR parser.
5443 Problem reported by twlevo@xs4all.nl.
5444 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
5446 (yyStackOverflow): Just longjmp, but with value 2 so that caller
5447 can handle the problem.
5448 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
5449 (yyparse): New local variable yyresult to record the result.
5450 Use result of setjmp to set it, rather than storing itinto
5452 (yyDone): Remove label.
5453 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
5454 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
5455 if YYABORT is used).
5456 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
5457 yyparse status; put status > 1 into diagnostic.
5458 Check that status==2 works.
5459 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
5460 Use exit status 3 for failure to open (which shouldn't happen).
5462 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
5464 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
5465 1 on syntax error; just let yyparse do its thing.
5466 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
5467 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
5468 (Exploding the Stack Size with Alloca):
5469 (Exploding the Stack Size with Malloc):
5470 Expect exit status 2, not 1, since the parser is supposed to blow
5471 its stack. Problem reported by twlevo@xs4all.nl.
5473 * data/glr.c (yyparse): Don't assume that the initial calls
5474 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
5475 Print a stack-overflow message and fail instead.
5476 Initialize the line-number information before creating the stack,
5477 so that the stack-overflow message can report line zero safely.
5479 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
5481 Fix problems reported by twlevo@xs4all.nl.
5482 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
5483 (yyuserMerge): Provide a default case if b4_mergers is empty.
5484 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
5485 * tests/glr-regression.at
5486 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
5487 Add casts to pacify C++ compilers.
5488 * tests/glr-regression.at (Improper merging of GLR delayed action
5489 sets): Declare yylex before using it.
5490 * tests/Makefile.am (maintainer-check-g++): Fix a stray
5491 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
5492 test for valgrind; valgrind is independent of g++.
5493 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
5494 for compatibility with POSIX 1003.1-2001 (if running coreutils).
5495 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
5496 Use a destructor, so that we can expand the stack. Change
5497 YYSTYPE to char * so that we can free it. Cast result of malloc.
5499 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
5501 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
5502 a valgrind failure. Problem reported by twlevo@xs4all.nl.
5504 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
5506 * PACKAGING: New file, suggested by Bruno Haible and taken from
5507 similar wording in gettext's PACKAGING file.
5508 * NEWS: Mention PACKAGING.
5509 * Makefile.am (EXTRA_DIST): Add PACKAGING.
5511 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
5513 * NEWS: Document recent i18n improvements.
5514 * bootstrap: Get runtime translations into runtime-po.
5515 Create runtime-po files automatically, if possible.
5516 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
5517 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
5518 does not infringe on the user's name space.
5519 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
5520 * doc/bison.texinfo (Internationalization): Revamp the English
5521 and Texinfo syntax a bit, to try to make it clearer.
5522 (Bison Options, Option Cross Key): Mention --print-localedir.
5523 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
5524 YYENABLE_NLS. Quote a bit more.
5525 * runtime-po/.cvsignore: New file.
5526 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
5527 * runtime-po/Rules-quot: Remove; now created by bootstrap.
5528 * runtime-po/quot.sed: Likewise.
5529 * runtime-po/boldquot.sed: Likewise.
5530 * runtime-po/en@quot.header: Likewise.
5531 * runtime-po/en@boldquot.header: Likewise.
5532 * runtime-po/insert-header.sin: Likewise.
5533 * runtime-po/remove-potcdate.sin: Likewise.
5534 * runtime-po/Makevars: Likewise.
5535 * runtime-po/LINGUAS: Likewise.
5536 * runtime-po/de.po: Likewise; we will rely on the translation project
5537 to maintain this, so "bootstrap" should get it.
5538 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
5540 * src/main.c (main): Bind the bison-runtime domain, too.
5542 2005-07-12 Bruno Haible <bruno@clisp.org>
5544 * data/yacc.c: Include <libintl.h> when NLS is enabled.
5545 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
5546 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
5547 * runtime-po: New directory.
5548 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
5549 $(DOMAIN).pot-update rule, so that old messages are never dropped.
5550 * runtime-po/Rules-quot: New file, copied from po/.
5551 * runtime-po/quot.sed: Likewise.
5552 * runtime-po/boldquot.sed: Likewise.
5553 * runtime-po/en@quot.header: Likewise.
5554 * runtime-po/en@boldquot.header: Likewise.
5555 * runtime-po/insert-header.sin: Likewise.
5556 * runtime-po/remove-potcdate.sin: Likewise.
5557 * runtime-po/Makevars: New file.
5558 * runtime-po/POTFILES.in: New file.
5559 * runtime-po/LINGUAS: New file.
5560 * runtime-po/bison-runtime.pot: New file.
5561 * runtime-po/de.po: New file.
5562 * m4/bison.m4: New file.
5563 * Makefile.am (SUBDIRS): Add runtime-po.
5564 (aclocaldir, aclocal_DATA): New variables.
5565 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
5567 * src/getargs.c (usage): Document --print-localedir option.
5568 (PRINT_LOCALEDIR_OPTION): New enum item.
5569 (long_options): Add --print-localedir option.
5570 (getargs): Handle --print-localedir option.
5571 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
5572 (Internationalization): New section.
5574 2005-07-12 Akim Demaille <akim@epita.fr>
5576 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
5577 for consistency with the rest of the code.
5578 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
5581 2005-07-12 Akim Demaille <akim@epita.fr>
5583 * src/parse-gram.y: Use %printer instead of YYPRINT.
5585 2005-07-12 Akim Demaille <akim@epita.fr>
5587 * src/symtab.h, src/symtab.c (symbol_print): New.
5588 * src/symlist.h, src/symlist.c (symbol_list_print): New.
5589 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
5591 2005-07-12 Akim Demaille <akim@epita.fr>
5593 * data/glr.c (b4_syncline): Fix (swap) the definitions of
5594 b4_at_dollar and b4_dollar_dollar.
5596 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
5598 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
5599 and Pennello's paper.
5601 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
5603 * data/yacc.c (yyparse): Undo previous patch. Instead,
5604 set yylsp[0] and yyvsp[0] only if the initial action
5605 sets yylloc and yylval, respectively.
5607 * data/yacc.c (yyparse): In the initial action, set
5608 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
5609 This avoids the use of undefined variables if the initial
5610 action does not set yylloc and/or yylval.
5612 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
5614 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
5615 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
5616 Remove from CVS. These files are automatically generated.
5617 * examples/extexi: Clarify that this file is now part of Bison,
5618 not GNU M4, and that it works with any POSIX-compatible Awk.
5619 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
5620 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
5621 so that we also get calc++-parser.yy. Geneate it.
5622 Use $(AWK), not gawk, since any conforming Awk will do.
5623 Put comment before action, since older 'make' can't handle comment
5625 $(BUILT_SOURCES): List all built sources, not just some of them.
5626 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
5627 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
5628 $($(calc_sources_generated)): Remove unnecessary test for existence
5629 of target. (This had a shell syntax error anyway; a stray "x".)
5630 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
5632 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
5634 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
5635 implied by the other modules.
5637 2005-07-06 Akim Demaille <akim@epita.fr>
5639 Bind examples/calc++ to the package.
5640 * examples/calc++/Makefile: Remove, replaced by...
5641 * examples/calc++/Makefile.am: ... this new file.
5642 * examples/calc++/test: Remove input.
5643 * examples/calc++/compile: Remove.
5644 * examples/Makefile.am: New.
5645 * configure.ac, Makefile.am: Adjust.
5646 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
5648 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
5650 * data/glr.c (yyFail): Drastically simplify; since the format argument
5651 never had any % directives, we can simply pass it to yyerror.
5652 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
5653 be modified later, as that is the usual style in glr.c.
5654 Problems reported by Paul Hilfinger.
5656 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
5657 and size overflow errors.
5658 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
5659 in case the user prolog sets feature-test macros like _GNU_SOURCE.
5660 (YYSIZEMAX): New macro.
5661 (yystpcpy): New function, taken from yacc.c.
5662 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
5663 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
5664 so that we don't have to maintain their signatures.
5665 (yyFail): Check for buffer overflow, by using vsnprintf rather
5666 than vsprintf. Allocate a bigger buffer if possible.
5667 Report an error if buffer allocation fails.
5668 (yyStackOverflow): New function.
5669 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
5670 the initialization was successful. It might fail if storage was
5672 (yyexpandGLRStack): Add more checks for storage allocation failure.
5673 Use yyStackOverflow to report failures.
5674 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
5675 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
5676 Don't assume stack number fits in int.
5677 (yysplitStack): Check for storage allocation failure.
5678 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
5679 can print diagnostics on storage allocation failure. All callers
5681 (yyresolveValue): Use yybool for boolean.
5682 (yyreportSyntaxError): Check for size-calculation overflow.
5683 This code is taken from yacc.c.
5684 (yyparse): Check for storage allocation errors when allocating
5687 2005-07-05 Akim Demaille <akim@epita.fr>
5689 Extract calc++ from the documentation.
5690 * doc/bison.texinfo (Calc++): Add the extraction marks.
5691 * examples/extexi: New, from the aborted GNU Programming 2E.
5692 Separate the different paragraph of a file with empty lines.
5693 * examples/Makefile: Use it to extract the whole calc++ example.
5695 2005-06-24 Akim Demaille <akim@epita.fr>
5697 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
5700 2005-06-22 Akim Demaille <akim@epita.fr>
5702 * doc/bison.texinfo (C++ Language Interface): First stab.
5703 (C++ Parsers): Remove.
5705 2005-06-22 Akim Demaille <akim@epita.fr>
5707 * data/lalr1.cc (yylex_): Honor %lex-param.
5709 2005-06-22 Akim Demaille <akim@epita.fr>
5711 Start a set of simple examples.
5712 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
5713 * examples/calc++/calc++-driver.hh,
5714 * examples/calc++/calc++-parser.yy,
5715 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
5716 * examples/calc++/compile, examples/calc++/test: New.
5718 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
5720 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
5721 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
5722 which stems from the 2005-05-27 patch.
5724 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5726 * data/glr.c: Modify treatment of unused parameters to permit use
5727 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
5729 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
5731 Fix infringement on user name space reported by Janos Zoltan Szabo.
5732 * data/yacc.c (yyparse): strlen -> yystrlen.
5734 2005-05-30 Akim Demaille <akim@epita.fr>
5736 * data/lalr1.cc (_): New.
5737 Translate the various messages.
5739 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
5741 Fix infringement on user name space reported by Bruno Haible.
5742 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
5743 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
5744 the user's name space.
5745 (alloca): Include <stdlib.h> to get it, if it's not built in.
5746 (YYMALLOC, YYFREE): Define only if needed.
5747 (malloc, free): Declare, but only if needed, as this infringes on
5748 the user name space.
5750 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
5752 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
5753 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
5755 * lib/ebitset.c (min, max): Undef before defining.
5756 * lib/vbitset.c (min, max): Likewise.
5757 * lib/subpipe.c (create_subpipe): Save local variables in case
5758 vfork clobbers them.
5760 2005-05-24 Bruno Haible <bruno@clisp.org>
5762 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
5763 error message syntax used by gcc-4.0.
5765 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
5767 * README: Mention m4 1.4.3. Remove obsolete advice about
5768 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
5770 * bootstrap: Remove workaround for problem I encountered with
5771 gettext 0.14.1; it seems to be fixed now.
5773 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
5775 * NEWS: Version 2.0a.
5777 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
5778 the previous change.
5780 Various maintainer cleanups.
5781 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
5782 conftest*, for benefit of CVS commands run at the same time as
5783 "configure". Add build-aux, since "bootstrap" now creates it and
5785 * Makefile.cfg (move_if_change): Remove.
5786 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
5787 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
5788 (po_repo, do-po-update, po-update, wget_files, get-targets):
5789 (config.guess-url_prefix, config.sub-url_prefix):
5790 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
5791 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
5792 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
5794 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
5795 this is now the recommended name.
5796 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
5797 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
5798 ylwrap. These files now go into build-aux.
5799 * config/move-if-change: Remove.
5800 * config/prev-version.txt: Bump from 1.75 to 2.0.
5802 * bootstrap: Add stdio-safer, unistd-safer modules.
5803 Remove m4/glibc2.m4 (introduced by latest gnulib, but
5805 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
5806 fopen-safer.c, stdio-safer.h, unistd-safer.h.
5807 * lib/subpipe.c: Include "unistd-safer.h".
5808 (create_subpipe): Make sure all the newly-created
5809 file descriptors are > 2, so that diagnostics don't
5810 get sent down them (which might cause Bison to hang, in theory).
5811 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
5812 * src/files.c (xfopen): Use fopen_safer, not fopen.
5814 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
5815 yesterday's yacc.c fix.
5817 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
5819 * data/glr.c, data/lalr1.cc: Update copyright date.
5821 Fix a destructor bug reported by Wolfgang Spraul in
5822 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
5823 * data/yacc.c (yyabortlab): Don't call destructor, and
5824 don't set yychar to EMPTY.
5825 (yyoverflowlab): Don't call destructor.
5826 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
5827 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
5828 since we no longer output the message "discarding lookahead token
5831 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
5833 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
5834 fix a small glitch in debugging output.
5835 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
5836 after YY_SYMBOL_PRINT where needed.
5838 (struct yyGLRState): Add some comments.
5839 (struct yySemanticOption): Add some comments.
5840 (union yyGLRStackItem): Add comment.
5842 (yymergeOptionSets): Correct this to properly perform the union,
5843 avoiding infinite reported by Michael Rosien.
5846 * tests/glr-regression.at: Add test for GLR merging error reported
5849 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
5851 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
5852 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
5853 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
5854 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
5855 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
5856 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
5857 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
5858 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
5859 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
5860 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
5861 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
5862 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
5863 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
5864 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
5865 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
5866 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
5867 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
5868 src/derives.h, src/files.c, src/files.h, src/getargs.c,
5869 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
5870 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
5871 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
5872 src/output.h, src/parse-gram.c, src/parse-gram.h,
5873 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
5874 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
5875 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
5876 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
5877 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
5878 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
5879 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
5880 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
5881 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
5882 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
5883 tests/reduce.at, tests/regression.at, tests/sets.at,
5884 tests/synclines.at, tests/testsuite.at, tests/torture.at:
5885 Update FSF postal mail address.
5887 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
5889 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
5890 Problem reported by Ralf Menzel.
5892 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
5894 * tests/actions.at: Test that stack overflow invokes destructors.
5895 From Marcus Holland-Moritz.
5896 * data/yacc.c (yyerrlab): Move the code that destroys the stack
5898 (yyreturn): to here. That way, destructors are called properly
5899 even if the stack overflows, or the user calls YYACCEPT or
5900 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
5901 (yyoverflowlab): Destroy the lookahead.
5903 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
5905 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
5907 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
5909 * NEWS: Bison-generated C parsers no longer quote literal strings
5910 associated with tokens.
5911 * src/output.c (prepare_symbols): Don't escape strings,
5912 since users don't want to see C escapes.
5913 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
5915 * tests/input.at (Torturing the Scanner): Likewise.
5916 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
5918 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
5920 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
5921 the data size is known to be too small and we can't increase it.
5922 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
5924 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
5926 * src/parse-gram.y: Include quotearg.h.
5927 (string_as_id): Quote $1 before using it as a key, since the
5928 lexer no longer quotes it for us.
5929 (string_content): Don't strip quotes, since lexer no longer
5931 * src/scan-gram.l: Include quotearg.h.
5933 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
5934 a key, since the rest of the lexer doesn't quote it.
5935 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
5936 * tests/regression.at (Token definitions): Check for backslashes
5939 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
5940 (YYSIZE_T): Define to unsigned long int when using an older compiler.
5941 (yyparse): Revamp code to generate long syntax error message, to
5942 make it easier to translate, and to avoid problems with arithmetic
5943 overflow. Change "virtual memory" to "memory" in diagnostic, since
5944 we don't know whether the memory is virtual.
5946 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
5948 * NEWS: Bison-generated C parsers now use the _ macro to
5950 * data/yacc.c (_) [!defined _]: New macro.
5951 All English strings wrapped inside this macro.
5952 * doc/bison.texinfo (Bison Parser): Document _.
5953 * po/POTFILES.in: Include src/parse-gram.c, since it now
5954 includes translateable strings that parse-gram.y doesn't.
5956 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
5958 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
5959 reverting the 2004-10-11 change to this function.
5960 (symbol_check_alias_consistency): Don't call symbol_type_set
5961 if the type name is already correct.
5962 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
5964 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
5966 * tests/regression.at (Token definitions): Don't use a token named
5967 c, as that generates a "#define c ..." that runs afoul of buggy
5968 stdlib.h that uses the identifier c as a member of struct
5969 drand48_data. Problem reported by Horst Wente.
5971 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
5973 * bootstrap: Change translation URL from
5974 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
5975 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
5976 redirection glitches. Problem reported by twlevo@xs4all.nl.
5978 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
5980 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
5981 after operands; POSIX says this isn't portable for the c99 command.
5983 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
5985 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
5986 immediately if a data overrun has occurred; this may help us track
5987 down what may be a spurious failure on MacOS.
5989 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
5991 Respond to problems reported by twlevo@xs4all.nl.
5993 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
5995 * src/vcg.h: Comment fix.
5996 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
5997 (G_CMAX): Change to -1 instead of INT_MAX.
5999 * data/yacc.c (yyparse): Omit spaces before #line.
6001 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
6003 * src/tables.c (state_number_to_vector_number): Put it inside an
6004 "#if 0", since it's not currently used. Problem reported by
6007 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
6009 * src/output.c (escaped_output): Renamed from
6010 escaped_file_name_output, since we now use it for symbol tags as
6011 well. All uses changed.
6012 (symbol_destructors_output, symbol_printers_output):
6013 Escape symbol tags too.
6014 Problem reported by Matyas Forstner in
6015 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
6017 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
6019 * src/output.c (user_actions_output, token_definitions_output,
6020 symbol_destructors_output, symbol_printers_output): Likewise.
6021 * src/reader.c (prologue_augment): Likewise.
6022 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
6024 * src/vcg.c (output_edge): Don't quote linestyle arg.
6025 Problem reported by twlevo@xs4all.nl.
6027 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
6029 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
6030 example, reported by Derek M Jones. Also, make the example even
6031 more outrageous, to better illustrate how bad the problem is.
6033 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
6035 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
6036 putsym. Typo reported by Sebastian Piping.
6038 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
6040 * doc/bison.texinfo (Language and Grammar): some -> same
6041 (Epilogue): int he -> in the
6042 Typos reported by Sebastian Piping via Justin Pence.
6044 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
6046 * tests/glr-regression.at (Improper handling of embedded actions
6047 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
6048 embedded actions and $-N in GLR parsers", work around an Autoconf bug
6049 with dollar signs in test names.
6050 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
6051 for a similar reason.
6053 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
6055 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
6056 wants to redefine G_VIEW.
6058 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
6060 * src/vcg.c (get_view_str): Remove case for normal_view.
6061 Problem reported by twlevo@xs4all.nl.
6063 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
6065 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
6066 Problem reported by twlevo@xs4all.nl.
6068 * doc/bison.texinfo: Change @dircategory from "GNU programming
6069 tools" to "Software development". Requested by Richard Stallman
6072 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
6074 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
6075 Problem reported by twlevo@xs4all.nl.
6077 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
6079 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
6080 keyword; it's not needed with modern compilers, and it doesn't
6081 affect correctness with older compilers. Suggested by
6084 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
6086 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
6087 gcc -Wswitch-default.
6088 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
6089 * data/yacc.c (yyparse): Likewise.
6091 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
6093 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
6094 already. Let config.h define any nonstandard values.
6096 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
6098 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
6099 for the benefit of slower hosts. Problem reported by
6102 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
6104 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
6105 being defined and not used.
6106 * data/lalr1.cc (yyparse): Likewise.
6107 Use "if (false)" rather than "if (0)".
6109 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
6111 * TODO: Mention that we should allow NUL bytes in tokens.
6113 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
6115 * src/scan-skel.l (<<EOF>>): Don't close standard output.
6116 Problem reported by Hans Aberg.
6118 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
6120 * src/getargs.c (version): Happy new year; update overall
6121 program copyright date from 2004 to 2005.
6123 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
6124 Problem reported by Hans Aberg.
6125 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
6126 (Output file names.): Add a test for the case when standard output
6129 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
6131 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
6132 to fix an oversight in the Bison 2.0 manual.
6134 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
6136 * NEWS: Version 2.0. Reformat the existing news items since
6137 1.875, so that related items are grouped together.
6138 * configure.ac (AC_INIT): Bump version to 2.0.
6139 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
6141 * tests/torture.at (Exploding the Stack Size with Alloca): Set
6142 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
6143 otherwise, we're not testing alloca. Unfortunately there's no
6144 simple way to consult HAVE_ALLOCA here.
6146 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
6149 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
6150 hand. This avoids a warning about comparing int to size_t when
6151 GCC warnings are enabled.
6153 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
6155 * NEWS: Bison-generated parsers no longer default to using the
6156 alloca function (when available) to extend the parser stack, due
6157 to widespread problems in unchecked stack-overflow detection.
6158 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
6159 responsibility to set it to a positive value. This lets the user
6160 specify a value that is not a preprocessor constant.
6161 * data/yacc.c (YYMAXDEPTH): Likewise.
6162 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
6163 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
6164 to be a compile-time constant. However, explain the constraints on it.
6165 Also, explain the constraints on YYINITDEPTH.
6166 (Table of Symbols): Explain that alloca is no longer the default.
6167 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
6170 * doc/bison.texinfo (Location Default Action): Mention that n must
6171 be zero when k is zero. Suggested by Frank Heckenbach.
6173 2004-12-22 Akim Demaille <akim@epita.fr>
6175 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
6176 (parser::state_type, parser::semantic_type, parser::location_type):
6177 Private, not public.
6178 (parser::parse): Return ints, not bool.
6179 Returning a bool introduces a problem: 0 corresponds to false, and
6180 it seems weird to return false on success. Returning true changes
6181 the conventions for yyparse.
6182 Alternatively we could return void and send an exception.
6183 There is no clear consensus (yet?).
6184 (state_stack, semantic_stack, location_stack): Rename as...
6185 (state_stack_type, semantic_stack_type, location_stack_type): these.
6186 Private, not public.
6187 * tests/c++.at: New.
6188 * tests/testsuite.at, tests/Makefile.am: Adjust.
6190 2004-12-21 Akim Demaille <akim@epita.fr>
6192 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
6194 2004-12-21 Akim Demaille <akim@epita.fr>
6196 Don't impose std::string for filenames.
6198 * data/lalr1.cc (b4_filename_type): New.
6199 (position::filename): Use it.
6200 (parser.hh): Move the inclusion of stack.hh and location.hh below
6201 the user code, so that needed headers for the filename type can be
6203 Forward declare them before the user code.
6204 * tests/Makefile.am (check-local, installcheck-local): Pass
6205 TESTSUITEFLAGS to the TESTSUITE.
6207 2004-12-20 Akim Demaille <akim@epita.fr>
6209 Use more STL like names: my_class instead of MyClass.
6211 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
6212 (SemanticStack, SemanticType, StateStack, StateType)
6213 (TokenNumberType, Stack, Slice, Traits, Parser::location)
6214 (Parser::value): Rename as...
6215 (location_stack, location_type, rhs_number_type, semantic_stack)
6216 (semantic_type, state_stack, state_type, token_number_type, stack)
6217 (slice, traits, parser::yylloc, parser::yylval): these.
6219 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
6221 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
6223 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
6224 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
6226 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
6228 Remove uses of 'short int' and 'unsigned short int'. This raises
6229 some arbitrary limits. It uses more memory but nowadays that's
6230 not much of an issue.
6232 This change does not affect the generated parsers; that's a different
6233 task, as some users will want to conserve memory there.
6235 Ideally we should use size_t to represent all object counts, and
6236 something like ptrdiff_t to represent signed differences of object
6237 counts; but that will require more code-cleanup than I have the
6238 time to do right now.
6240 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
6241 Use size_t, not int or short int, to count objects.
6242 * src/closure.c (nritemset, closure): Likewise.
6243 * src/closure.h (nritemset, closure): Likewise.
6244 * src/nullable.c (nullable_compute): Likewise.
6245 * src/print.c (print_core): Likewise.
6246 * src/print_graph.c (print_core): Likewise.
6247 * src/state.c (state_compare, state_hash): Likewise.
6248 * src/state.h (struct state): Likewise.
6249 * src/tables.c (default_goto, goto_actions): Likewise.
6251 * src/gram.h (rule_number, rule): Use int, not short int.
6252 * src/output.c (prepare_rules): Likewise.
6253 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
6254 errs, reductions): Likewise.
6255 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
6257 * src/tables.c (vector_number, tally, action_number,
6258 ACTION_NUMBER_MINIMUM): Likewise.
6259 * src/output.c (muscle_insert_short_int_table): Remove.
6261 2004-12-17 Akim Demaille <akim@epita.fr>
6263 * data/lalr1.cc: Extensive Doxygenation.
6264 (error_): Rename as...
6265 (error): this, since it is visible to the user.
6267 (Parser::message): Now an automatic variable from...
6268 (Parser::yyreport_syntax_error_): here.
6269 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
6271 * tests/input.at: Escape $.
6273 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
6275 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
6276 Parenthesize rhs to avoid obscure problems with mistakes like
6277 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
6278 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
6279 b4_rhs_location): Likewise.
6280 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
6281 b4_rhs_location): Likewise.
6283 2004-12-16 Akim Demaille <akim@epita.fr>
6285 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
6286 yacc.c: be sure to stay within yycheck_.
6287 * tests/actions.at: Re-enable C++ tests.
6289 2004-12-16 Akim Demaille <akim@epita.fr>
6291 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
6294 2004-12-16 Akim Demaille <akim@epita.fr>
6296 Use #define to handle the %name-prefix.
6298 * data/glr.c, data/yacc.c: Comment changes.
6299 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
6300 so that one can refer to yylex in the parser file, and have it
6301 renamed, as is the case with other skeletons.
6303 2004-12-16 Akim Demaille <akim@epita.fr>
6305 Move lalr1.cc internals into yy*.
6307 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
6308 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
6309 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
6310 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
6311 (empty_, final_, terror_, errcode_, ntokens_)
6312 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
6313 (looka_, ilooka_, error_range_, nerrs_):
6315 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
6316 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
6317 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
6318 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
6319 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
6320 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
6321 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
6322 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
6325 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
6327 Fix some problems reported by twlevo at xs4all.
6328 * src/symtab.c (symbol_new): Report an error if the input grammar
6329 contains too many symbols. This is better than calling abort() later.
6330 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
6331 (struct node, struct graph):
6332 Rename member expand to stretch. All uses changed.
6333 (struct graph): Remove member layoutalgorithm. All uses removed.
6334 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
6335 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
6337 (N_STRETCH): Rename from N_EXPAND. All uses changed.
6339 2004-12-15 Akim Demaille <akim@epita.fr>
6341 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
6342 Add more Doxygen comments.
6343 (symprint_, stack_print_, reduce_print_, destruct_, pop)
6344 (report_syntax_error_, translate_): Rename as...
6345 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
6346 (yypop_, yyreport_syntax_error_, yytranslate_): this.
6348 2004-12-15 Akim Demaille <akim@epita.fr>
6350 * data/lalr1.cc (lex_): Rename as...
6352 Move the trace here.
6353 Take the %name-prefix into account.
6354 Reported by Alexandre Duret-Lutz.
6356 2004-12-15 Akim Demaille <akim@epita.fr>
6358 Simplify the C++ parser constructor.
6360 * data/lalr1.cc (debug_): Rename as...
6361 (yydebug_): so that the parser's internals are always in the yy*
6364 (b4_parse_param_decl): Remove the leading comma as it is now only
6365 called as unique argument list.
6366 (Parser::Parser): Remove the constructor accepting a location and
6367 an initial debugging level.
6368 Remove from the other ctor the argument for the debugging level.
6369 (debug_level_type, debug_level, set_debug_level): New.
6371 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
6374 2004-12-15 Akim Demaille <akim@epita.fr>
6376 Remove b4_root related material: failure experiment
6377 (which goal was to allow to derive from a class).
6379 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
6380 definitions and uses.
6382 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
6384 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
6385 not 2, since it's not portable to subtract 1 from the start of an
6386 array. The new item 0 is never set or used. All uses changed.
6388 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
6389 the default definition of YYLLOC_DEFAULT. Problem reported
6390 by Frank Heckenbach.
6392 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
6394 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
6395 the normal case and one for the error case. Just use the
6396 first one uniformly. Problem reported by Frank Heckenbach.
6397 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
6398 use exactly the same macro in both places.
6399 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
6400 so that the normal-case YYRHSLOC works for the error case too.
6402 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
6403 (YYLLOC_DEFAULT): Use the same macro as glr.c.
6404 * doc/bison.texinfo (Location Default Action): Don't claim that
6405 we have an array of locations. Use the same macro for both glr
6406 and lalr parsers. Mention YYRHSLOC. Mention what happens when
6409 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
6411 * HACKING: Update email addresses to send announcements to.
6413 * configure.ac (AC_INIT): Bump version to 1.875f.
6415 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
6417 * NEWS: Version 1.875e.
6418 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
6420 * src/scan-skel.l: Include "complain.h", for "fatal".
6422 * src/relation.h (relation_print, relation_digraph):
6423 Relation sizes are of type relation_node, not size_t (this is
6424 merely a doc fix, since the two types are equivalent).
6425 (relation_transpose): Relation sizes are of type relation_node,
6427 * src/relation.c: Likewise.
6428 (top, infinity): Now of type relation_node, not int.
6429 (traverse, relation_transpose): Use relation_node, not int.
6431 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
6432 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
6433 (yyparse): Remove unused local introduced in 2004-10-25 patch.
6435 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
6436 specifying whether the test should be skipped. Use it tp
6437 specify that the [%defines %skeleton "lalr1.cc"] tests currently
6438 fail on some hosts, and should be skipped.
6440 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
6442 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
6443 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
6444 unless otherwise specified below.
6446 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
6447 to allocate kernel_base, kernel_items, kernel_size, since
6448 they needn't be initialized to 0.
6449 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
6450 * src/closure.c (new_closure): Likewise, for itemset.
6451 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
6452 * src/lalr.c (set_goto_map): Likewise, for temp_map.
6453 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
6454 (build_relations): Likewise for edge, states1, includes.
6455 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
6456 * src/reader.c (packgram): Likewise, for ritem, rules.
6457 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
6458 * src/relation.c (relation_digraph): Likewise for VERTICES.
6459 (relation_transpose): Likewise for new_R, end_R.
6460 * src/symtab.c (symbols_token_translations_init): Likewise for
6462 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
6463 (token_actions): Likewise for yydefact, actrow, conflrow,
6465 (save_column): Likewise for froms[symno], tos[symno].
6466 (goto_actions): Likewise for state_count.
6467 (pack_table): Likewise for base, pos, check.
6468 (tables_generate): Likewise for width.
6470 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
6471 for initial core. Just have a separate core, so we needn't worry
6472 about whether kernel_size and kernel_base are initialized.
6474 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
6475 kernel_size, kernel_items): Remove unnecessary initialization.
6476 * src/conflicts.c (conflicts): Likewise.
6477 * src/derives.c (derives): Likewise.
6478 * src/muscle_tablc (muscle_insert): Likewise.
6479 * src/relation.c (relation_digraph): Likewise.
6480 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
6481 conflrow, conflict_table, conflict_list, table, check):
6484 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
6485 This is because all callers pass unsigned int.
6486 * src/closure.h (new_closure): Likewise.
6488 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
6489 (build_relations): Initialize includes[i] in all cases.
6490 * src/reader.c (packgram): Always initialize rules[ruleno].prec
6491 and rules[ruleno].precsym. Initialize members in order.
6492 * src/relation.c (relation_transpose): Always initialize new_R[i]
6494 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
6496 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
6497 conflict_list[0] was always 0, but now it isn't initialized.
6499 * src/table.c (table_grow): When conflict_table grew, the grown
6500 area wasn't cleared. Fix this.
6502 * lib/.cvsignore: Add strdup.c, strdup.h.
6503 * m4/.cvsignore: Add strdup.m4.
6505 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
6507 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
6508 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
6509 GOTO_NUMBER_MAXIMUM, since we occasionally compute
6510 ngotos + 1 without checking for overflow.
6511 (build_relations): Use END_NODE, not -1, to denote end of edges.
6512 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
6513 build_relations): Use goto_number, not int, for goto numbers.
6514 * src/tables.c (save_column, default_goto): Likewise.
6516 2004-11-23 Akim Demaille <akim@epita.fr>
6518 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
6519 of #defining from yystype.
6520 Don't typedef yystype, C++ does not need it.
6521 This lets it possible to forward declare it as union.
6523 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
6525 * bootstrap (gnulib_modules): Add extensions.
6526 Problem reported by Jim Meyering.
6528 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
6530 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
6531 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
6532 src/system.h, src/tables.c: XFREE -> free, to accommodate
6533 recent change to gnulib xalloc.h.
6534 Problem reported by Jim Meyering.
6536 2004-11-17 Akim Demaille <akim@epita.fr>
6538 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
6540 2004-11-17 Akim Demaille <akim@epita.fr>,
6541 Alexandre Duret-Lutz <adl@gnu.org>
6543 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
6546 Use it instead of cdebug_.
6547 (Parser::debug_stream, Parser::set_debug_stream): New.
6548 (Parser::symprint_): Define cdebug_ for temporary backward
6550 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
6553 2004-11-17 Akim Demaille <akim@epita.fr>
6555 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
6556 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
6557 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
6558 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
6560 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
6562 * data/glr.c (yyloc_default): Remove; not used.
6563 Problem reported by Frank Heckenbach.
6565 2004-10-25 Akim Demaille <akim@epita.fr>
6567 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
6568 Introduce another definition to address simple location arrays.
6569 (yyGLRStack): New member: yyerror_range.
6570 (yyrecoverSyntaxError, yyparse): Update it.
6571 (yyrecoverSyntaxError): Use it when shifting the error token to
6572 have an accurate range, equivalent to the one computed by both
6573 yacc.c and lalr1.cc.
6574 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
6575 that column numbers start at column 0, as per GNU Coding
6576 Standards, the others tests, and the doc.
6577 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
6578 Adjust to the above change (first column is 0).
6579 And adjust the location of the "<error>", now covering the whole
6582 2004-10-22 Akim Demaille <akim@epita.fr>
6583 and Paul Eggert <eggert@cs.ucla.edu>
6585 Remove some arbitrary limits on goto numbers and relations.
6586 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
6587 initial values, since they're never used.
6588 (set_goto_map): ngotos is now unsigned, so test for overflow
6589 by seeing whether it wraps around to zero.
6590 * src/lalr.h (goto_number): Now size_t, not short int.
6591 (GOTO_NUMBER_MAXIMUM): Remove.
6592 * src/relation.c (relation_print, traverse, relation_transpose):
6593 Check for END_NODE rather than looking at sign.
6594 * src/relation.h (END_NODE): New macro.
6595 (relation_node): Now size_t, not short int.
6597 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
6599 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
6600 keyword, not an identifier. Problem reported by Baron Schwartz in
6601 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
6603 2004-10-11 Akim Demaille <akim@epita.fr>
6605 * src/symtab.c (symbol_check_alias_consistency): Also check
6606 type names, destructors, and printers.
6607 Reported by Alexandre Duret-Lutz.
6608 Recode the handling of associativity and precedence in terms
6609 of symbol_precedence_set.
6610 Accept no redeclaration at all, not even equal to the previous
6612 (redeclaration): New.
6613 Use it to factor redeclaration complaints.
6614 (symbol_make_alias): Don't set the type of the alias, let
6615 symbol_check_alias_consistency do it as for other features.
6616 * src/symtab.h (symbol): Add new member prec_location, and
6618 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
6619 * tests/input.at (Incompatible Aliases): New.
6621 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
6623 .cvsignore fixes to accommodate gnulib changes,
6624 and the practice of naming build directories "_build".
6625 * .cvsignore: Add "_*". Sort.
6626 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
6627 * m4/.cvsignore: Add "*_gl.m4".
6629 2004-10-06 Akim Demaille <akim@epita.fr>
6631 * src/parse-gram.y (add_param): Fix the truncation of trailing
6634 2004-10-05 Akim Demaille <akim@epita.fr>
6636 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
6637 whether the reducion was empty or not. This leaves room to
6638 improve the use of YYLLOC_DEFAULT in such a case.
6639 lalr1.cc is still experimental, so changing this is acceptable.
6640 And finally, there are probably not many users who changed the
6641 handling of locations in GLR, so changing is admissible too.
6643 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
6644 empty reduction, set @$ to an empty location ending the previously
6646 Adjust uses to make sure the code is triggered on empty
6648 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
6649 expected output: empty reductions have empty locations.
6651 2004-09-29 Akim Demaille <akim@epita.fr>
6653 * data/lalr1.cc: Move towards a more standard C++ coding style
6654 for templates: Class < T > -> Class<T>.
6656 2004-09-29 Akim Demaille <akim@epita.fr>
6658 * data/lalr1.cc: Reinstall the former ctor, for sake of
6659 compatibility, but warn it will be removed.
6660 Move towards a more standard C++ coding style (i.e., type *var ->
6663 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
6665 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
6666 since it's less likely to work if NULs are involved in the future.
6668 2004-09-27 Akim Demaille <akim@epita.fr>
6670 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
6672 2004-09-27 Akim Demaille <akim@epita.fr>
6674 * data/lalr1.cc (b4_parse_param_decl_1): New.
6675 (b4_parse_param_decl): Use it to have different names between attribute
6677 (b4_cc_constructor_call): Likewise.
6679 2004-09-24 Akim Demaille <akim@epita.fr>
6681 * src/parse-gram.y (add_param): Strip the leading and trailing
6682 blanks from a formal argument declaration.
6683 (YY_LOCATION_PRINT): New.
6685 2004-09-24 Akim Demaille <akim@epita.fr>
6687 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
6690 2004-09-24 Akim Demaille <akim@epita.fr>
6692 * doc/bison.texinfo (Table of Symbols): Sort.
6694 2004-09-21 Akim Demaille <akim@epita.fr>
6696 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
6697 the useless parentheses.
6698 Suggested by Paul Eggert.
6700 2004-09-20 Akim Demaille <akim@epita.fr>
6702 Let the initial-action act on the look-ahead, and use it for the
6703 "initial push" (corresponding to an hypothetical beginning-of-file).
6704 And let lalr1.cc honor %initial-action.
6706 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
6708 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
6709 (Parser::Parser): Remove the ctor that used to initialize it.
6710 (Parser::parse): Like in the other skeletons, issue the "starting
6711 parse" message before any action.
6712 Honor %initial-action.
6713 Initialize the stacks with the lookahead.
6714 * data/yacc.c: Let $$ and @$ in %initial-action designate the
6716 Push them in the stacks.
6717 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
6719 2004-09-20 Akim Demaille <akim@epita.fr>
6721 * doc/bison.texinfo (Initial Action Decl): New.
6723 2004-09-20 Akim Demaille <akim@epita.fr>
6725 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
6726 clearer criterion to define it.
6727 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
6728 When reducing on an empty RHS, use the latest stacked location as
6730 yylloc is not always available.
6731 * data/glr.c: Likewise.
6732 Also, honor initial-actions.
6734 2004-09-20 Akim Demaille <akim@epita.fr>
6736 * data/yacc.c (YY_LOCATION_PRINT): New.
6737 Define when we know YYLTYPE's structure, i.e., when the default
6738 YYLLOC_DEFAULT is used.
6739 * data/c.m4 (b4_yysymprint_generate): Use it.
6740 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
6741 value of the result.
6742 (error_start_): Replace with...
6743 (error_range_): this location array.
6744 This allows to replace code relying on the implementation of
6745 locations by portable code.
6746 * data/yacc.c (yylerrsp): Replace with...
6747 (yyerror_range): this.
6748 Every time a token is popped, update yyerror_range[0], to have an
6749 accurate location for the error token.
6750 * data/glr.c (YY_LOCATION_PRINT): New.
6751 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
6752 deference a pointer.
6753 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
6754 report the location in %printers.
6756 * src/scan-skel.l: Instead of abort, report error messages to ease
6757 understanding skeleton scanning failures.
6759 2004-09-16 Akim Demaille <akim@epita.fr>
6761 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
6762 (iterator, const_iterator): these, to be more in the C++ spirit.
6763 Also, return reverse iterators so that when displaying the stack
6764 we display its bottom first.
6765 (Parser::stack_print_, Parser::reduce_print_): Match the messages
6767 We should probably use vector here though.
6769 2004-09-16 Akim Demaille <akim@epita.fr>
6771 Have more complete shift traces.
6773 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
6774 to report Shifts instead of ad hoc YYDPRINTF invocations,
6775 including for the error token.
6776 * data/lalr1.cc (symprint_): Output the location.
6777 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
6778 output the location within the %printer.
6779 Activate GLR tests, at least to make sure they compile properly.
6780 They still don't pass though.
6781 * tests/calc.at: Adjust expect verbose output, since now "Entering
6782 state..." is on a different line than the "Shifting" message.
6784 2004-09-08 Akim Demaille <akim@epita.fr>
6786 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
6787 Bison directive from the Bison file to the invocation of this
6788 macro, so that these directives are passed to
6789 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
6790 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
6791 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
6792 the extra Bison directives instead of the whole series.
6793 Change the grammar so that there are recoverable errors, and
6794 unrecoverable errors. Now we can have the parser give up before
6795 consuming the whole input. As a result we now can observe that
6796 the lookahead is freed when needed.
6797 Change the parser source to parse argv[1] instead of a hard coded
6799 Simplify yylex, and give a value and location to EOF.
6800 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
6801 passed directives already coded in the file.
6802 Add some tests to check the location of "error".
6803 For some tests, the C++ parser is correct, and not yacc.c.
6804 For other tests, they provide different, but unsatisfying, values,
6805 so keep the C++ value so that at least one parser is "correct"
6806 according to the test suite.
6807 (Actions after errors): Remove, this is subsumed by the
6808 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
6810 2004-09-06 Akim Demaille <akim@epita.fr>
6812 * data/lalr1.cc: Adjust the indentation of the labels.
6816 2004-09-06 Akim Demaille <akim@epita.fr>
6818 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
6819 argument, an informative message.
6820 Call YY_SYMBOL_PRINT.
6821 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
6822 * data/lalr1.cc (destruct_): Likewise.
6823 In addition, no longer depend on b4_yysymprint_generate and
6824 b4_yydestruct_generate to generate these functions, do it "by
6827 2004-09-03 Akim Demaille <akim@epita.fr>
6829 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
6830 invoked, yydestruct the lookahead.
6831 * tests/calc.at (Calculator $1): Update the expected lengths of
6832 traces: there is an added line for the discarded lookahead.
6833 * doc/bison.texinfo (Destructor Decl): Some rewording.
6834 Define "discarded" symbols.
6836 2004-09-02 Akim Demaille <akim@epita.fr>
6838 * data/lalr1.cc (translate_, destruct_): No reason to be static.
6840 2004-09-02 Akim Demaille <akim@epita.fr>
6842 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
6843 (YYDSYMPRINTF): Rename as...
6844 (YY_SYMBOL_PRINT): this.
6845 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
6847 Use it instead of direct symprint_ calls.
6848 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
6851 2004-09-02 Akim Demaille <akim@epita.fr>
6853 * data/lalr1.cc (b4_yysymprint_generate): New.
6854 (symprint_): New member function, defined when YYDEBUG.
6855 Use it consistently instead of token/nterm debugging output by
6857 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
6858 %printer calls to use cdebug_ when using lalr1.cc.
6860 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
6862 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
6863 with #ifdef YYDEBUG.
6865 2004-08-26 Akim Demaille <akim@epita.fr>
6867 * doc/bison.texinfo (Implementing Loops): Rename as...
6868 (Implementing Gotos/Loops): this.
6870 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
6872 Adjust to latest gnulib.
6873 * bootstrap (gnulib_modules): Add xalloc-die.
6874 Set LC_ALL=C so that file names sort consistently.
6875 Prefer the gnulib copies of gettext.m4, glibc21.m4,
6876 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
6877 uintmax_t.m4, ulonglong.m4.
6878 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
6879 po.m4 since we are now using _gl.m4 instead.
6881 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
6883 * src/scan-action.l: Remove. Scanning of semantic actions is
6884 handled in scan-gram.l.
6886 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
6888 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
6890 * src/location.h (struct): The file member is a uniqstr.
6891 (equal_boundaries): Use UNIQSTR_EQ for comparison.
6893 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
6895 Fix bug with non-%union parsers that have printers or destructors,
6896 which led to a Bison core dump. Reported by Peter Fales in
6897 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
6899 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
6900 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
6901 not to our own type.
6902 * src/output.c (symbol_destructors_output, symbol_printers_output):
6903 Don't assume %union.
6904 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
6905 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
6906 UNION-FLAG. All callers changed.
6907 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
6908 Use type char, not unsigned int, when declaring an array of char;
6909 this lets us remove a cast.
6910 (Printers and Destructors): Add non-%union test cases.
6912 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
6914 * doc/bison.texinfo: Minor editorial changes, mostly to the new
6915 GLR writeups. E.g., avoid frenchspacing and the future tense,
6916 change "lookahead" to "look-ahead", and change "wrt" to "with
6919 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
6921 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
6922 New sections, split off from the GLR Parsers section. Put the new
6923 Simple GLR Parser near the start of the GLR section, for clarity.
6924 Rewrite connective text.
6926 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
6928 * doc/bison.texinfo (Simple GLR Parsers): New section.
6930 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
6932 * NEWS, TODO, doc/bison.texinfo:
6933 Use "look-ahead" instead of "lookahead", to be consistent.
6934 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
6935 while we're fixing "look-ahead".
6936 * src/conflicts.c (shift_set): Renamed from shiftset.
6937 (look_ahead_set): Renamed from lookaheadset.
6938 * src/print.c: Likewise.
6939 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
6940 name for "lookahead".
6941 (report_types, usage): Likewise.
6942 * src/getargs.h (report_look_ahead_tokens): Renamed from
6944 * src/lalr.c (compute_look_ahead_tokens): Renamed from
6946 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
6947 (look_ahead_tokens_print): Renamed from lookaheads_print.
6948 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
6949 state_rule_lookaheads_print.
6950 * src/state.h: Likewise.
6951 (reductions.look_ahead_tokens): Renamed from lookaheads.
6952 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
6953 AT_DATA_LOOKAHEADS_GRAMMAR.
6955 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
6957 * README: Update location of patched M4 distribution.
6959 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
6961 Don't assume the C++ compiler takes the same arguments as the C compiler
6963 * configure.ac (O0CXXFLAGS): New var.
6964 * tests/atlocal.in (CXXFLAGS): Use it.
6966 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
6968 Fix some "make check" problems with C++ reported by
6969 Albert Chin-A-Young for Tru64 C++ in this thread:
6970 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
6972 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
6973 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
6974 Output to a .cc file for C++, not to a .c file.
6975 * tests/calc.at (AT_CHECK_CALC): Likewise.
6976 * tests/regression.at (AT_CHECK_DANCER): Likewise.
6977 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
6979 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
6981 * tests/calc.at, tests/actions.at: Workaround for SGI
6982 C++ compiler. (trivial change)
6984 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
6986 Spent a few hours checking out which prerequisite versions the
6987 current sources actually require. I went all the way back to
6988 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
6989 a seemingly endless set of combinations of versions more recent
6990 than that. The bottom line is that the current sources require
6991 fairly recent versions of the build tools, and it'll be some work
6993 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
6994 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
6995 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
6996 Add comments explaining why those particular versions are
6999 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
7000 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
7001 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
7003 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
7004 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
7006 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
7008 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
7009 0.11.5. Suggested by Bruno Haible.
7010 * bootstrap: Remove gettext version checking.
7012 * doc/bison.texinfo (Decl Summary): Also mention that %union
7013 can depend on prerequisite types. Problem reported by Tim
7016 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
7018 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
7019 * README-alpha: Don't tell people not to package this.
7021 * bootstrap: Don't assume $(...) works; use `...` instead.
7022 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
7025 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
7026 put into the -d output file, and mention what to do if YYSTYPE is
7029 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
7031 Undo change made earlier today: it caused autopoint to not bring
7032 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
7035 * bootstrap: Check that gettext version matches what's in
7036 configure.ac. Warn users to ignore robots.txt ERROR 404.
7037 * bootstrap: Undo today's earlier change (logged below).
7038 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
7040 The gettext version checking is causing more trouble than it's
7041 curing; remove it. Problem reported by Paul Hilfinger.
7043 * bootstrap: Issue a warning that one can expect a message
7044 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
7045 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
7047 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
7049 Ensure that the C++ compiler used for testing actually works on a
7050 simple test program; if not, skip the C++-related tests. Problem
7051 reported by Vin Shelton in:
7052 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
7054 * m4/cxx.m4: New file.
7055 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
7056 * tests/atlocal.in (BISON_CXX_WORKS): Add.
7057 * tests/local.at (AT_COMPILE_CXX): Use it.
7059 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
7061 * data/glr.c (yylloc): Output this macro even if locations are not
7062 being generated, as the GLR parser needs it even in that case.
7063 Problem reported by Troy A. Johnson
7064 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
7066 * configure.ac (AC_INIT): Update to 1.875e.
7068 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
7070 * NEWS: Version 1.875d.
7071 * configure.ac (AC_INIT): Likewise.
7072 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
7074 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
7075 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
7076 lalr1.cc runs afoul of the first, and the last two are no longer
7077 supported by GCC 3.4.0.
7078 * README: Mention GNU m4 1.4 or later; mention m4 patches.
7079 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
7081 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
7083 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
7084 unsigned int, for compatibility with latest gnulib hash module.
7085 * src/state.c (state_hash, state_hasher): Likewise.
7086 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
7087 * src/uniqstr.c (hash_uniqstr): Likewise.
7089 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
7091 * NEWS: Unescaped newlines are no longer allowed in char & strings.
7093 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
7094 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
7095 character and string literals.
7096 (unexpected_end): New function.
7097 (unexpected_eof): Use it.
7098 (unexpected_newline): New function.
7099 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
7102 * NEWS: Document %expect-rr.
7104 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
7105 Fix typo by replacing $1 with $option.
7106 Remove more 'intl'-related files.
7107 Don't DEFUN AM_INTL_SUBDIR twice.
7109 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
7110 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
7112 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
7113 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
7114 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
7115 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
7116 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
7117 * src/.cvsignore: Add *.output.
7119 * src/parse-gram.y: Put copyright notice inside %{ %} so it
7120 gets copied to the output file.
7122 2004-04-28 Paul Eggert <eggert@twinsun.com>
7124 Get files from the gnulib and po repositories, instead of relying
7125 on them being in our CVS. Upgrade to latest versions of gnulib
7128 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
7129 * bootstrap: Bootstrap from gnulib and po repositories.
7130 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
7131 * README-cvs: Document these changes. Remove version numbers from
7132 mentions of build tools, since they change so often. Mention Flex.
7134 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
7135 (gl_USE_SYSTEM_EXTENSIONS): Add.
7136 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
7137 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
7139 (AC_ISC_POSIX): Remove; we no longer support this
7140 ancient OS, as it gets in the way of latest Autoconf & gnulib.
7141 (AC_HEADER_STDC): Remove: we now assume C89 or better.
7142 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
7143 Do not check for C89 headers, except for locale.h which is used
7144 by the Yacc library and must port to K&R hosts.
7145 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
7146 Do not check for C89 functions, except for setlocale which is
7147 used by the Yacc library.
7148 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
7149 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
7150 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
7151 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
7152 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
7153 AM_GNU_GETTEXT): Remove; now done by:
7154 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
7155 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
7158 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
7159 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
7160 Define to empty, as gnulib.mk will do the rest for us.
7161 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
7163 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
7164 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
7166 * src/files.c: Include gnulib's xstrndup.h.
7168 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
7169 (REALLOC): Use xnrealloc, for likewise.
7170 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
7171 (strnlen, memrchr): Remove decls; functions no longer used.
7174 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
7175 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
7176 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
7177 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
7178 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
7179 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
7180 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
7181 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
7182 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
7183 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
7184 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
7185 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
7186 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
7187 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
7188 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
7189 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
7190 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
7191 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
7192 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
7193 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
7194 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
7195 Remove, as these files are now generated automatically
7196 by bootstrap or automake.
7198 * po/ChangeLog: Remove: all but one entry was a duplicate
7199 of this file, and I moved that 2000-11-02 entry here.
7201 * config/.cvsignore: Add Makefile, depcomp, install-sh.
7202 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
7203 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
7204 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
7205 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
7206 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
7207 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
7208 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
7209 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
7210 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
7211 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
7213 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
7214 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
7215 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
7216 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
7217 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
7218 * src/.cvsignore: Remove *_.c.
7221 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
7222 support it. (The latest stable gzip doesn't.)
7224 2004-04-27 Paul Eggert <eggert@twinsun.com>
7226 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
7227 case, as stos_ is now used by destructors due to the 2004-02-09
7230 Remove more K&R C support.
7231 * lib/libiberty.y (PARAMS): Remove. All uses removed.
7232 * lib/subpipe.c (errno): Remove decl.
7233 Include <stdlib.h> unconditionally.
7234 (EXIT_FAILURE): Remove macro.
7235 * src/complain.c (vfprintf, strerror): Remove.
7236 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
7238 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
7239 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
7240 (strchr, strspn, memchr): Remove decls.
7241 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
7242 unconditionally. Do not declare perror.
7243 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
7246 * src/complain.c (_): Remove useless defn, as system.h defines this.
7248 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
7249 with latest obstack.h.
7250 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
7251 to procedure types, as obstack.h now does that for us.
7252 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
7254 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
7255 so that this include file can stand alone.
7256 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
7257 does this now. Include subpipe.h first after config.h, to
7258 test whether it can stand alone.
7260 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
7261 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
7264 * tests/synclines.at (%union synch line): Put a dummy member in
7265 the union, because empty unions aren't allowed in C. Caught
7268 2004-04-13 Jim Meyering <jim@meyering.net>
7270 * src/conflicts.c (conflicts_print): Correct format string typo:
7271 use `%%' to produce literal `%'. (trivial change)
7273 2004-03-30 Paul Eggert <eggert@twinsun.com>
7275 * src/getargs.c (version): Update copyright year to 2004.
7277 * data/c.m4 (b4_int_type): Use 'short int' rather than
7278 'short', and similarly for 'long', 'unsigned', etc.
7279 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
7280 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
7281 yy_yypstack, yydumpstack): Likewise.
7282 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
7283 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
7285 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
7286 yy_stack_print, yyparse): Likewise.
7287 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
7288 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
7289 * lib/bitset.c (bitset_print): Likewise.
7290 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
7291 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
7292 * lib/bitsetv.c (bitsetv_dump): Likewise.
7293 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
7294 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
7296 * src/LR0.c (allocate_itemsets): Likewise.
7297 * src/gram.h (rule_number, rule): Likewise.
7298 * src/lalr.h (goto_number): Likewise.
7299 * src/nullable.c (nullable_compute): Likewise.
7300 * src/output.c (prepare_rules): Likewise.
7301 * src/relation.c (relation_print, relation_digraph): Likewise.
7302 * src/relation.h (relation_node): Likewise.
7303 * src/state.h (state_number, transitions, errs, reductions,
7304 struct state): Likewise.
7305 * src/symtab.h (symbol_number, struct symbol): Likewise.
7306 * src/tables.c (vector_number, tally, action_number,
7307 default_goto, goto_actions): Likewise.
7308 * tests/existing.at (GNU Cim Grammar): Likewise.
7309 * tests/regression.at (Web2c Actions): Likewise.
7311 * src/output.c (muscle_insert_short_int_table): Renamed from
7312 muscle_insert_short_table. All uses changed.
7314 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7316 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
7317 (declaration): Replace expected_conflicts with expected_sr_conflicts.
7318 Add %expect-rr rule.
7320 * src/scan-gram.l: Recognize %expect-rr.
7322 * src/conflicts.h (expected_sr_conflicts): Rename from
7324 (expected_rr_conflicts): Declare.
7326 * src/conflicts.c (expected_sr_conflicts): Rename from
7328 (expected_rr_conflicts): Define.
7329 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
7331 Use expected_sr_conflicts in place of expected_conflicts.
7332 Warn if expected_rr_conflicts used in non-GLR parser.
7334 * doc/bison.texinfo: Add documentation for %expect-rr.
7336 2004-03-08 Paul Eggert <eggert@gnu.org>
7338 Add support for hex token numbers. Suggested by Odd Arild Olsen in
7339 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
7341 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
7343 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
7344 * src/scan-gram.l (scan_integer): New function.
7346 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
7347 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
7348 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
7349 Say "long int", not "long", for uniformity with GNU style.
7351 2004-02-25 Paul Eggert <eggert@twinsun.com>
7353 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
7354 compilers. This fixes a problem with Intel's C++ compiler being
7355 chatty, reported by Guido Trentalancia in
7356 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
7358 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
7360 Support %destructor and merge error locations in lalr1.cc.
7362 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
7363 (Parser::stos_): Define unconditionally.
7364 (Parser::destruct_): New method. Generate its body with
7365 b4_yydestruct_generate.
7366 (Parser::error_start_): New attribute.
7367 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
7368 token which are discarded.
7369 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
7370 error_start_ when erroneous token are discarded.
7371 (Parser::parse) <yyerrlab1>: Compute the location of the error
7372 token so that it covers all the discarded tokens.
7373 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
7374 it can be called with `%skeleton "lalr1.cc"', and do that.
7376 2004-02-02 Paul Eggert <eggert@twinsun.com>
7378 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
7379 $(top_srcdir)/lib and ../lib. This fixes a bug reported
7380 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
7381 There's no need to mention top_builddir since Automake does that
7383 (INCLUDES): Remove, as Automake says it's obsolescent.
7384 Contents migrated into AM_CPPFLAGS as described above.
7385 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
7387 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
7389 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
7390 (yyreportSyntaxError): Handle case where lookahead token is
7393 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7395 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
7396 resulting parsers are compilable with C++.
7398 2003-12-23 Paul Eggert <eggert@twinsun.com>
7400 * config/depcomp, config/install-sh: Sync with Automake 1.8.
7401 * src/output.c (output_skeleton): Rename local var.
7402 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
7403 Bison tokens, as this runs afoul of the 2003-10-07 change that
7404 disallowed NUL bytes in character constants or string literals.
7406 * tests/local.at: Require Autoconf 2.59's Autotest.
7407 * tests/testsuite.at: Don't include local.at, since we now assume
7408 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
7410 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
7411 multiple inclusion warnings.
7413 2003-12-02 Akim Demaille <akim@epita.fr>
7415 * doc/bison.texinfo (How Can I Reset the Parser): More about start
7419 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
7421 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
7423 2003-10-07 Paul Eggert <eggert@twinsun.com>
7425 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
7426 if testsuite doesn't exist.
7428 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
7429 literals, unfortunately.
7430 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
7431 Complain about NUL bytes in character constants or string literals.
7433 2003-10-05 Paul Eggert <eggert@twinsun.com>
7435 * NEWS: Don't document %no-default-prec, as it's still
7437 * doc/bison.texinfo: Document %no-default-prec only if
7438 the defaultprec flag is set. Normally it's not.
7440 2003-10-04 Paul Eggert <eggert@twinsun.com>
7442 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
7443 non-modifiable lvalue, instead of a modifiable one.
7444 * doc/bison.texinfo (Actions): Document that $$ can
7445 be assigned to. Do not claim that $$ and $N are
7446 array element references: user code should not rely on this.
7448 2003-10-01 Paul Eggert <eggert@twinsun.com>
7450 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
7451 (grammar_declaration): Use it.
7452 * src/scan-gram.l: New token %no-default-prec.
7453 * tests/conflicts.at: Revamp tests to use %no-default-prec.
7454 * NEWS, doc/bison.texinfo: Document the above.
7456 2003-10-01 Akim Demaille <akim@epita.fr>
7458 VCG no longer supports long_straight_phase.
7460 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
7461 * src/print_graph.c (print_graph): Adjust.
7463 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
7464 and Paul Eggert <eggert@twinsun.com>
7466 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
7467 Table of Symbols): Document %default-prec.
7468 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
7469 (grammar_declaration): Set default_prec on %default-prec.
7470 * src/scan-gram.l (%default-prec): New token.
7471 * src/reader.h (default_prec): New flag.
7472 * src/reader.c: Likewise.
7473 (packgram): Handle it.
7474 * tests/conflicts.at (%default-prec without %prec,
7475 %default-prec with %prec, %default-prec 1): New tests.
7477 2003-09-30 Paul Eggert <eggert@twinsun.com>
7479 * tests/testsuite.at: Include local.at, not input.at, fixing
7480 a typo in the 2003-08-25 patch.
7482 2003-08-27 Akim Demaille <akim@epita.fr>
7484 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
7487 2003-08-26 Akim Demaille <akim@epita.fr>
7489 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
7490 "<\#" to avoid magic from Gnus when posting parts of this script.
7492 2003-08-26 Akim Demaille <akim@epita.fr>
7494 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
7495 (Parser::parse): here.
7496 Adjust: nerrs and errstatus is now replaced by...
7497 (Parser::nerrs_, Parser::errstatus_): New.
7499 2003-08-25 Akim Demaille <akim@epita.fr>
7501 * config/announce-gen, Makefile.cfg: New.
7502 * Makefile.am: Adjust.
7503 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
7504 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
7506 2003-08-25 Akim Demaille <akim@epita.fr>
7508 When reducing initial empty rules, Bison parser read an initial
7509 location that is not defined. This results in garbage, and that
7510 affects Bison's own parser. Therefore we need (i) to extend Bison
7511 to support a means to initialize this location, and (ii) to use
7512 this CVS Bison to fix CVS Bison's parser.
7514 * src/reader.h, reader.c (epilogue_augment): Remove, replace
7516 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
7517 * src/parse-gram.y: Adjust.
7518 (%initial-action): New.
7519 (%error-verbose): Since we require CVS Bison, there is no reason
7521 * src/scan-gram.l: Adjust.
7522 * src/Makefile.am (YACC): New, to make sure we use our own parser.
7523 * data/yacc.c (yyparse): Use b4_initial_action.
7525 2003-08-25 Akim Demaille <akim@epita.fr>
7527 * doc/bison.texinfo: Don't promote stdout for error messages.
7529 2003-08-25 Akim Demaille <akim@epita.fr>
7531 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
7532 From Alexandre Duret-Lutz.
7534 2003-08-25 Akim Demaille <akim@epita.fr>
7538 2003-08-25 Akim Demaille <akim@epita.fr>
7540 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
7543 2003-08-25 Akim Demaille <akim@epita.fr>
7545 * data/lalr1.cc (Parser::reduce_print_): New.
7548 2003-08-25 Akim Demaille <akim@epita.fr>
7550 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
7551 error recovery loops. This patch is based on
7552 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
7553 Also, augment the similarity between lalr1.cc and yacc.c.
7554 Note: the locations of error recovery rules are not correct yet.
7556 * data/lalr1.cc: Comment changes to augment the similarity between
7557 lalr1.cc and yacc.c.
7558 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
7559 (yyerrlab1): Remove, but where it used to be (now the bottom part of
7560 yyerrlab), when hitting EOF, pop the whole stack here instead of
7561 merely falling thru the default error handling mechanism.
7562 (yyerrorlab): New label, with the old contents of YYERROR,
7563 plus the following change: pop the stack of rhs corresponding
7564 to the production that invoked YYERROR. That is how Yacc
7565 behaves (required by POSIX).
7566 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
7569 2003-08-25 Akim Demaille <akim@epita.fr>
7571 Tune local.at so that people can "autom4te -l autotest calc.at -o
7572 calc" for instance, to extract a sub test suite.
7574 * tests/testsuite.at: Move the initialization, Autotest version
7575 requirement, and AT_TESTED invocation into...
7576 * tests/local.at: here.
7577 * tests/testsuite.at: Include it for compatibility with Autoconf
7579 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
7582 2003-08-04 Paul Eggert <eggert@twinsun.com>
7584 Rework code slightly to avoid gcc -Wtraditional warnings.
7585 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
7586 The returned value is now stored in *YY0. All callers changed.
7587 * src/output.c (merge_output): Adjust to the above change.
7589 2003-07-26 Paul Eggert <eggert@twinsun.com>
7591 * data/glr.c (YYASSERT): New macro.
7592 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
7593 yyresolveStates, yyprocessOneStack):
7594 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
7595 Derived from a suggestion by Frank Heckenbach.
7597 2003-07-25 Paul Eggert <eggert@twinsun.com>
7599 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
7600 for portability to K&R C (after ansi2knr, presumably). See
7601 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
7602 by Frank Heckenbach, though I have omitted the structure-initialization
7603 part of his glr-knr.diff patch since I recall that the Portable
7604 C Compiler didn't require that change.
7606 Let the user specify how to allocate and free memory.
7607 Derived from a suggestion by Frank Heckenbach in
7608 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
7609 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
7610 All uses of free, malloc, realloc changed to use these macros,
7611 and unnecessary casts removed.
7612 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
7614 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
7616 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
7617 use s.empty() rather than s == "" to test for empty string; see
7618 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
7621 2003-06-25 Akim Demaille <akim@epita.fr>
7623 * config/depcomp, config/install-sh: Update from masters.
7625 2003-06-20 Paul Eggert <eggert@twinsun.com>
7627 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
7628 and return properly parenthesized result.
7629 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
7630 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
7631 Remove unnecessary parentheses from uses.
7632 * doc/bison.texinfo (Location Default Action): Describe the
7633 conventions for parentheses.
7635 2003-06-19 Paul Eggert <eggert@twinsun.com>
7637 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
7638 yyreportTree): Do not assume that size_t is the same width as int,
7639 when printing sizes. Print sizes using an unsigned format.
7640 Problem reported by Frank Heckenbach in
7641 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
7643 Port to Forte Developer 7 C compiler.
7644 * data/glr.c (struct YYLTYPE): If locations are not being used,
7645 declare a single dummy member, as empty structs do not conform
7647 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
7648 the Forte Developer 7 C compiler complains that end-of-loop
7649 code is not reached.
7651 2003-06-17 Paul Eggert <eggert@twinsun.com>
7653 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
7654 avoid warnings from picky compilers about redefinition of PARAMS.
7656 2003-06-17 Paul Eggert <eggert@twinsun.com>
7660 * NEWS: Document 1.875b.
7662 * lib/bbitset.h: Do not include config.h; that's the includer's job.
7663 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
7664 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
7665 Don't use 'index' in comments, as it's a builtin fn on some hosts.
7666 * lib/bitset_stats.c: Include gettext.h unconditionally, as
7667 per recent gettext manual's suggestion.
7668 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
7669 Use prototypes, not old-style definitions.
7670 * lib/lbitset.c (lbitset_unused_clear): Likewise.
7671 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
7672 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
7673 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
7674 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
7675 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
7676 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
7677 vbitset_or_and_cmp, vbitset_copy): Likewise.
7679 * lib/libiberty.h: Do not include config.h; that's the includer's job.
7680 Do not include <stdlib.h>.
7681 (PARAMS): Define unconditionally for C89.
7682 (ATTRIBUTE_NORETURN): Remove.
7683 (ATTRIBUTE_UNUSED): Define unconditionally.
7685 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
7686 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
7687 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
7688 * lib/vbitset.c, lib/vbitset.h: New files.
7689 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
7690 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
7693 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
7694 `How Can I Reset @code{yyparse}', since texinfo does not allow
7695 arbitrary @ in node names.
7697 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
7698 shouldn't be needed according to the gettext 0.12.1 documentation
7699 but which seem to be needed anyway: codeset.m4 glibc21.m4
7700 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
7701 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
7702 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
7704 * lib/.cvsignore: Add stdbool.h.
7705 * m4/.cvsignore: Add nls.m4, po.m4.
7707 Upgrade to CVS gnulib.
7708 * stdbool_.h: File renamed from stdbool.h.in.
7709 * configure.ac (AM_STDBOOL_H): Invoke this instead of
7711 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
7712 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
7713 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
7714 (MOSTLYCLEANFILES): New var.
7715 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
7716 (stdbool.h): New rule.
7717 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
7718 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
7719 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
7720 m4/quote.m4: Upgrade to today's gnulib.
7722 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
7723 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
7724 the tests right now.
7725 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
7726 yyerror are declared before use; C99 requires this.
7728 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7730 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
7732 (yyrecoverSyntaxError): Correct the logic for setting and testing
7734 Correct comment on handling EOF.
7735 Allow states with only a default reduction, rather than failing
7736 (I can't quite reconstruct why these were not allowed before).
7738 Fixes to avoid problem that $-N rules in GLR parsers can cause
7739 buffer overruns, corrupting state.
7741 * src/output.c (prepare_rules): Output max_left_semantic_context
7743 * src/reader.h (max_left_semantic_context): New variable declaration.
7744 * src/scan-gram.l (max_left_semantic_context): Define.
7745 (handle_action_dollar): Update max_left_semantic_context.
7746 * data/glr.c (YYMAXLEFT): New definition.
7747 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
7748 (yyresolveAction): Ditto.
7750 Fixes to problems with location handling in GLR parsers reported by
7751 Frank Heckenbach (2003/06/05).
7753 * data/glr.c (YYLTYPE): Make trivial if locations not used.
7754 (YYRHSLOC): Add parentheses, and define only if locations used.
7755 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
7757 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
7758 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
7760 * tests/cxx-type.at: Exercise location information; update tests
7761 to differentiate output with and without locations.
7762 Remove forward declarations of yylex and yyerror---caused errors
7763 because default YYLTYPE not yet defined.
7764 Change semantic actions to compute strings, rather than printing
7765 them directly (to test proper passing of semantics values). Change
7766 output to prefix notation and update test data and expected results.
7767 (yylex): Track locations.
7768 (stmtMerge): Return value rather than printing, and include arguments
7771 2003-06-03 Paul Eggert <eggert@twinsun.com>
7773 Avoid warnings generated by GCC 2.95.4 when Bison is
7774 configured with --enable-gcc-warnings.
7775 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
7776 yy::]b4_parser_class_name[::translate_,
7777 yy::Stack::operator[] (unsigned),
7778 yy::Stack::operator[] (unsigned) const,
7779 yy::Slice::operator[] (unsigned),
7780 yy::Slice::operator[] (unsigned) const):
7781 Rename local vars to avoid warnings.
7782 * tests/glr-regression.at (Improper handling of embedded actions
7783 and $-N in GLR parsers): Remove unused local variable from yylex.
7784 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
7785 (void) as arg when not pure, since we now assume C89 when building
7786 Bison. Pacify GCC by using parameter.
7788 2003-06-02 Paul Eggert <eggert@twinsun.com>
7790 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
7791 yy::Location::lines, yy::Location::columns): Rename arguments
7792 to avoid shadowing; this removes a warning generated by GCC 3.3.
7794 2003-06-01 Paul Eggert <eggert@twinsun.com>
7796 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
7797 to g++, as GCC 3.3 complains if you do it.
7798 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
7799 everything that WARNING_CFLAGS has, except omit warnings
7800 not suitable for C++.
7801 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
7802 * tests/atlocal.in (CXXFLAGS): New var.
7803 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
7805 Fix a GLR parser bug I reported in February; see
7806 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
7807 The problem was that GLR parsers did not conform to the C standard,
7808 because actions like { $1 = $2 + $3; } expanded to expressions
7809 that invoked YYFILL in separate subexpressions, and YYFILL assigned
7810 to a local variable. The C standard says that expressions
7811 like (var = f ()) + (var = f ()) have undefined behavior.
7812 Another problem was that GCC sometimes issues warnings that
7813 yyfill and its parameters are unused.
7815 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
7817 (yyfill): New function.
7819 (yyuserAction): Change type of yynormal to bool, so that it matches
7820 the new yyfill signature. Mark it as possibly unused.
7823 Follow up on a bug I reported in February, where a Bison-generated
7824 parser can loop. Provide a test case and a fix for yacc.c. I
7825 don't have a fix for lalr1.cc or for glr.c, unfortunately.
7826 The original bug report is in:
7827 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
7829 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
7830 macro's size was becoming unwieldy.
7831 (yyerrlab): Do not discard an empty lookahead symbol, as this
7832 might destroy garbage.
7833 (yyerrorlab): New label, with the old contents of YYERROR,
7834 plus the following change: pop the stack of rhs corresponding
7835 to the production that invoked YYERROR. That is how Yacc
7836 behaves, and POSIX requires this behavior.
7837 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
7838 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
7839 Define 'alarm' to do nothing if unistd.h is not available.
7840 Add a new rule "exp: '-' error;" to test the above change to
7841 data/yacc.c. Use 'alarm' to abort any test taking longer than
7842 10 seconds, as it's probably looping.
7843 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
7844 Also, the new yacc.c generates two fewer diagnostics for an
7847 2003-05-24 Paul Eggert <eggert@twinsun.com>
7849 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
7850 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
7851 This fixes a problem reported by John Bowman when the Compaq/HP
7852 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
7854 * data/yacc.c (union yyalloc): Likewise.
7855 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
7857 Switch from 'int' to 'bool' where that makes sense.
7859 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
7860 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
7861 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
7862 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
7863 Return or accept bool, not int. All callers changed.
7864 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
7865 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
7866 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
7867 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
7868 bitset_or_and_cmp_): Likewise.
7869 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
7870 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
7871 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
7872 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
7873 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
7874 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
7875 bitset_stats_or_and_cmp): Likewise.
7876 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
7877 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
7878 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
7879 ebitset_xor_cmp): Likewise.
7880 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
7881 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
7882 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
7883 lbitset_xor_cmp): Likewise.
7884 * lib/bbitset.h: Include <stdbool.h>.
7885 (struct bitset_vtable): The following members now return bool, not
7886 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
7887 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
7889 * src/conflicts.c (count_rr_conflicts): Likewise.
7890 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
7892 * lib/ebitset.c (ebitset_obstack_init): Likewise.
7893 * lib/lbitset.c (lbitset_obstack_init): Likewise.
7894 * src/getargs.c (debug_flag, defines_flag, locations_flag,
7895 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
7896 graph_flag): Likewise.
7897 * src/getargs.h (debug_flag, defines_flag, locations_flag,
7898 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
7899 graph_flag): Likewise.
7900 * src/output.c (error_verbose): Likewise.
7901 * src/output.h (error_verbose): Likewise.
7902 * src/reader.c (start_flag, typed): Likewise.
7903 * src/reader.h (typed): Likewise.
7904 * src/getargs.c (LOCATIONS_OPTION): New constant.
7905 (long_options, getargs): Use it.
7906 * src/lalr.c (build_relations): Use bool, not int.
7907 * src/nullable.c (nullable_compute): Likewise.
7908 * src/print.c (print_reductions): Likewise.
7909 * src/tables.c (action_row, pack_vector): Likewise.
7910 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
7911 * src/output.c (prepare): Use it.
7912 * src/output.c (token_definitions_output,
7913 symbol_destructors_output, symbol_destructors_output): Use string,
7914 not boolean integer, to keep track of whether to output separator.
7915 * src/print_graph.c (print_core): Likewise.
7916 * src/state.c (state_rule_lookaheads_print): Likewise.
7918 * config/install-sh: Sync from automake 1.7.5.
7920 2003-05-14 Paul Eggert <eggert@twinsun.com>
7922 * src/parse-gram.y (rules_or_grammar_declaration): Require a
7923 semicolon after a grammar declaration, in the interest of possible
7924 future changes to the Bison input language.
7925 Do not allow a stray semicolon at the start of the grammar.
7926 (rhses.1): Allow one or more semicolons after any rule, including
7927 just before "|" as required by POSIX.
7928 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
7931 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
7933 %parse-param support for lalr1.cc.
7935 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
7936 b4_cc_constructor_calls, b4_cc_constructor_call,
7937 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
7939 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
7940 parse-param arguments.
7941 (yy::b4_parser_class_name): Declare instance variables to
7942 hold parse-param arguments.
7943 * tests/calc.at: s/value/semantic_value/ because value clashes
7944 with a member of yy::b4_parser_class_name. Adjust C++ code
7945 to handle %parse-param. Enable %parse-param test in C++.
7947 2003-05-12 Paul Eggert <eggert@twinsun.com>
7949 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
7950 English a bit. Fix fclose typo. Change "const char" to "char
7951 const", and use ANSI C rather than K&R for "main". Suggest
7952 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
7953 and suggest yy_switch_to_buffer.
7955 2003-05-05 Paul Eggert <eggert@twinsun.com>
7957 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
7958 C89. This avoids a diagnostic on compilers that define __STDC__
7959 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
7960 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
7962 2003-05-03 Paul Eggert <eggert@twinsun.com>
7964 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
7965 Do not overrun array bounds.
7966 This should fix a bug reported today by Olatunji Oluwabukunmi in
7967 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
7969 2003-04-29 Akim Demaille <akim@epita.fr>
7971 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
7972 * src/getargs.c, src/getargs.h: here, as bool, not int.
7973 (nondeterministic_parser): New.
7974 * src/parse-gram.y, src/scan-gram.l: Support
7975 %nondeterministic-parser.
7976 * src/output.c (prepare): Use nondeterministic_parser instead
7977 of glr_parser where appropriate.
7978 * src/tables.c (conflict_row, action_row, save_row)
7979 (token_actions, token_actions, pack_vector): Ditto.
7981 2003-04-29 Akim Demaille <akim@epita.fr>
7983 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
7985 2003-04-29 Akim Demaille <akim@epita.fr>
7987 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
7988 with %pure-parser and %locations to exercise the patch from Yakov
7991 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
7993 * data/yacc.c: (b4_lex_param): Corrected for the case where
7994 %lex-param is provided and %pure-parser isn't.
7996 2003-04-27 Paul Eggert <eggert@twinsun.com>
7998 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
7999 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
8000 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
8001 if it is not defined.
8002 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
8004 2003-04-26 Paul Eggert <eggert@twinsun.com>
8006 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
8007 Declare to be of type suitable for the ninf value itself, not of
8008 type suitable for the corresponding table, since the latter might
8009 be unsigned but the ninf value might be negative. This fixes a
8010 bug reported by Alexandre Duret-Lutz in
8011 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
8013 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
8014 invokes it. We shouldn't invoke it twice because it will attempt
8015 to put error.o in the archive twice. This fixes a glitch reported
8016 by Martin Mokrejs in
8017 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
8019 2003-04-21 Paul Eggert <eggert@twinsun.com>
8021 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
8024 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
8026 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
8027 Fix obvious typo that results in uncompilable GLR parsers
8028 when both %pure-parser and %locations are used. (trivial change)
8030 2003-04-17 Paul Eggert <eggert@twinsun.com>
8032 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
8033 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
8034 Do not insert the expected token via unput, as this runs afoul
8035 of a POSIX-compatibility bug in flex 2.5.31.
8036 All uses changed to BEGIN the parent state,
8037 since we no longer insert the expected token via unput.
8038 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
8039 that is no longer emitted after the above change.
8041 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
8042 the first one. This change is from Paul Hilfinger, and it fixes
8043 regression reported by Werner Lemberg in
8044 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
8046 (resolve_sr_conflict): Don't invoke state_errs_set
8047 unless one or more tokens have been explicitly made errors.
8048 Otherwise, the above change causes Bison to abort.
8050 * tests/existing.at (GNU pic Grammar): New test case, taken from
8053 2003-03-31 Akim Demaille <akim@epita.fr>
8055 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
8057 2003-03-31 Akim Demaille <akim@epita.fr>
8059 * src/output.c (prepare_symbols): Avoid trailing spaces in the
8062 2003-03-31 Akim Demaille <akim@epita.fr>
8064 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
8065 From Paul Hilfinger.
8067 2003-03-29 Akim Demaille <akim@epita.fr>
8069 * m4/error.m4: Do not put under dynamic conditions some code which
8070 expansion is under static control.
8072 2003-03-29 Akim Demaille <akim@epita.fr>
8074 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
8076 2003-03-29 Akim Demaille <akim@epita.fr>
8078 * doc/bison.texinfo (Strings are Destroyed): New.
8080 2003-03-13 Paul Eggert <eggert@twinsun.com>
8082 * .cvsignore: Add configure.lineno.
8083 * src/.cvsignore: Add yacc.
8084 * tests/.cvsignore: Add testsuite.log.
8085 * doc/fdl.texi: Sync with latest FSF version.
8087 2003-03-12 Paul Eggert <eggert@twinsun.com>
8089 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
8090 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
8091 cursor, instead of leaving it undefined. This fixes a bug
8092 reported by Tim Van Holder in
8093 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
8094 * tests/input.at (Torturing the Scanner): Test the scanner on
8095 an empty input file, which was Tim Van Holder's test case.
8097 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
8098 <sys/resource.h> can be included, include sys/time.h and
8099 sys/times.h first, if available. This works around the SunOS
8100 4.1.4 porting bug reported by Bruce Becker in
8101 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
8103 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
8104 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
8107 Merge changes from gnulib. This was prompted because the CVS
8108 snapshot didn't build on Solaris 7 due to strnlen problems.
8110 These changes need to be merged back into gnulib:
8111 * lib/hash.c: Include <stdbool.h> unconditionally.
8112 * m4/onceonly.m4 (m4_quote): New macro.
8113 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
8114 Quote AC_FOREACH variable-expansions properly.
8115 The 2003-01-03 obstack.h change also needs merging.
8116 {end of changes requiring merging}
8118 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
8119 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
8120 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
8121 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
8122 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
8123 New files, imported from gnulib.
8124 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
8127 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
8128 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
8131 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
8133 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
8134 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
8135 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
8136 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
8137 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
8138 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
8139 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
8140 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
8141 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
8142 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
8143 (jm_PREREQ_ARGMATCH): Remove.
8144 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
8145 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
8147 * src/system.h: Include <stdbool.h> unconditionally.
8149 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
8150 assuming at least C89 in the bitset code for some time now.
8152 2003-03-03 Akim Demaille <akim@epita.fr>
8156 2003-03-02 Akim Demaille <akim@epita.fr>
8158 * doc/bison.texinfo (Table of Symbols): Reactivate the
8159 documentation for %lex-param, and %parse-param.
8161 2003-03-02 Akim Demaille <akim@epita.fr>
8163 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
8164 generate verbose error messages.
8165 Use the number of tokens as an upper bound in yytname, as it
8166 cannot be a non terminal.
8168 2003-03-02 Akim Demaille <akim@epita.fr>
8170 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
8173 2003-03-02 Akim Demaille <akim@epita.fr>
8175 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
8176 Use them to exercise yycheck overrun.
8177 Based on Andrew Suffield's grammar.
8179 2003-03-02 Akim Demaille <akim@epita.fr>
8181 Create tests/local.at for Bison generic testing macros.
8183 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
8184 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
8186 * tests/calc.at (AT_CHECK_CALC): Adjust.
8187 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
8188 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
8189 * tests/local.at: here.
8190 (AT_COMPILE_CXX): Tags the tests using it as c++.
8191 Ignore the test if CXX is not functional.
8193 2003-03-01 Paul Eggert <eggert@twinsun.com>
8195 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
8196 not loc->end, since loc->end might contain garbage and this leads
8197 to undefined behavior on some platforms.
8198 (id_loc, token_start): Use (IF_LINTed) initial values that do not
8199 depend on *loc, so that the reader doesn't give the the false
8200 impression that *loc is initialized.
8201 (<INITIAL>"%%"): Do not bother setting code_start, since its value
8202 does not survive the return.
8204 2003-03-01 Akim Demaille <akim@epita.fr>
8206 * src/scan-gram.l (code_start): Always initialize it when entering
8207 into yylex, as SC_EPILOGUE is activated *before* the corresponding
8208 yylex invocation. An alternative would be making it static, but
8209 then it starts with the second %%'s beginning, instead of its end.
8211 2003-02-28 Paul Eggert <eggert@twinsun.com>
8213 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
8214 around a UnixWare 7.1.1 porting bug reported by John Hughes in
8215 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
8217 2003-02-26 Paul Eggert <eggert@twinsun.com>
8219 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
8220 Remove Sequent/Pyramid discussion (nobody uses them any more).
8221 Merge VMS and MS-DOS discussion; these ports may well be dead
8222 but let's keep mentioning them for now. Put <> around email
8223 addresses. Add copyright notice.
8225 2003-02-24 Paul Eggert <eggert@twinsun.com>
8227 * data/glr.c (yy_reduce_print): yylineno -> yylno,
8228 to avoid collision with flex use of yylineno.
8229 Problem reported by Bruce Lilly in
8230 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
8231 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
8232 * data/yacc.c (yy_reduce_print): Likewise.
8234 * config/depcomp: Sync with Automake 1.7.3.
8236 2003-02-21 Akim Demaille <akim@epita.fr>
8238 * data/lalr1.cc: Use temporary variables instead of casts to
8239 change integer types.
8240 Suggested by Paul Eggert.
8242 2003-02-21 Akim Demaille <akim@epita.fr>
8244 * doc/bison.texinfo: Use "location" consistently to refer to @n,
8245 to avoid confusions with lalr1.cc's notion of Position.
8246 Suggested by Paul Eggert.
8248 2003-02-20 Akim Demaille <akim@epita.fr>
8250 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
8251 before initial_columns.
8252 (location.hh): Use consistent variable names when defining the
8254 Use "last" so that we subtract from Positions, not from unsigned.
8256 2003-02-20 Akim Demaille <akim@epita.fr>
8258 * data/lalr1.cc (position.hh): New subfile, including the extended
8259 and Doxygen'ed documentation of class Position.
8260 (location.hh): Use it.
8261 Document a` la Doxygen.
8262 With the help of Benoit Perrot.
8264 2003-02-20 Akim Demaille <akim@epita.fr>
8266 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
8268 Redefine AT_YYERROR_SEES_LOC_IF using it.
8269 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
8271 Don't use the location in yy::Parser::error_ and
8272 yy::Parser::print_ when not %locations.
8273 Activate more lalr1.cc tests.
8275 2003-02-19 Akim Demaille <akim@epita.fr>
8277 * data/lalr1.cc: When displaying a line number, be sure to make it
8280 2003-02-19 Akim Demaille <akim@epita.fr>
8282 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
8284 (YYABORT, YYACCEPT, YYERROR): New.
8285 * tests/calc.at: Renable the lalr1.cc test.
8287 2003-02-19 Akim Demaille <akim@epita.fr>
8289 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
8290 error recovery, mixing with/without pops and discarding of the
8293 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
8295 2003-02-17 Paul Eggert <eggert@twinsun.com>
8297 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
8298 * tests/testsuite.at (AT_COMPILE): Use them.
8299 This fixes the testsuite problem reported by Robert Lentz in
8300 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
8302 2003-02-12 Paul Eggert <eggert@twinsun.com>
8304 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
8305 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
8306 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
8307 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
8308 Check for malloc failure, for consistency with yacc.c.
8309 (yytname_size): Remove, for consistency with yacc.c.
8311 The bug still remains in data/lalr1.cc, as I didn't have time
8314 2003-02-06 Akim Demaille <akim@epita.fr>
8316 * configure.ac (GXX): Rename as...
8317 (CXX): this, to keep the original Autoconf semantics.
8319 * data/lalr1.cc: Fix b4_copyright invocations.
8320 If YYDEBUG is not defined, don't depend upon name_ being defined.
8321 (location.hh): Include string and iostream.
8322 (Position::filename): New member.
8323 (Position::Position ()): New.
8324 (operator<< (Position)): New.
8325 (operator- (Position, int)): New.
8326 (Location::first, Location::last): Rename as...
8327 (Location::begin, Location::end): these, to mock the conventional
8329 (operator<< (Location)): New.
8330 * tests/atlocal.in (CXX): New.
8331 * tests/testsuite.at (AT_COMPILE_CXX): New.
8332 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
8333 locations in a more synthetic way.
8334 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
8336 Adjust the C locations to match those from Emacs: first column is
8338 Change all the expected results.
8339 Conform to the GCS: simplify the locations when applicable.
8340 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
8341 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
8342 these CPP macros with the m4 macros new defined by...
8343 (AT_CHECK_PUSHDEFS): this, i.e.:
8344 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
8345 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
8347 (AT_CHECK_POPDEFS): Undefine them.
8348 (AT_CHECK_CALC_LALR1_CC): New.
8349 Use it for the first lalr1.cc test.
8351 2003-02-04 Akim Demaille <akim@epita.fr>
8353 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
8354 Location as is defined.
8356 2003-02-04 Akim Demaille <akim@epita.fr>
8358 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
8359 name_ being defined.
8361 2003-02-03 Paul Eggert <eggert@twinsun.com>
8363 * src/gram.h (start_symbol): Remove unused decl.
8365 Use more-consistent naming conventions for local vars.
8367 * src/derives.c (derives_compute): Change type of local var from
8369 * src/gram.c (grammar_rules_partial_print): Likewise.
8370 * src/print.c (print_core): Likewise.
8371 * src/reduce.c (reduce_grammar_tables): Likewise.
8373 * src/gram.c (grammar_dump): Change name of item_number *
8374 local var from r to rp.
8375 * src/nullable.c (nullable_compute): Likewise.
8377 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
8379 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
8380 for symbol or symbol_number var.
8381 * src/reader.c (grammar_start_symbol_set): Likewise.
8382 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
8384 * src/state.c (transitions_to): Likewise.
8385 * src/state.h: Likewise.
8386 * src/tables.c (symbol_number_to_vector_number): Likewise.
8388 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
8391 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
8394 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
8397 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
8398 Use str, not s, for char * var. Use ch, not c, for character var.
8399 Use size for size var.
8401 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
8403 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
8405 * src/uniqstr.h: Likewise.
8407 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
8408 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
8409 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
8410 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
8411 param to have same name as that of enum, so that we don't use
8412 "s" to stand for a non-state.
8414 2003-02-02 Akim Demaille <akim@epita.fr>
8416 * src/scan-skel.l: Scan more than one inert character per yylex
8419 2003-02-01 Paul Eggert <eggert@twinsun.com>
8423 * po/LINGUAS: Add ms.
8425 2003-01-30 Akim Demaille <akim@epita.fr>
8427 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
8429 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8431 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
8434 Changes in response to error report by S. Eken: GLR mode does not
8435 handle negative $ indices or $ indices in embedded rules correctly.
8436 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
8438 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
8439 (b4_rhs_location): Ditto.
8440 (yyfill): New function to copy from stack tree into array
8442 (yyuserAction): Modify to allow incremental move of semantic values
8443 to rhs array when in GLR mode.
8444 Define YYFILL to use in user-defined actions to fill semantic array
8446 Remove dummy use of yystack, as there is now a guaranteed use.
8447 (yydoAction): Modify to allow incremental move of semantic values
8448 to rhs array when in GLR mode.
8449 (yyresolveAction): Ditto.
8450 (yyglrShiftDefer): Update comment.
8451 (yyresolveStates): Use X == NULL for pointers, not !X.
8452 (yyglrReduce): Ditto.
8455 * tests/glr-regr1.at: Rename to ...
8456 * tests/glr-regression.at: Add new regression test for the problems
8457 described above (adapted from S. Eken).
8458 Update copyright notice.
8459 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
8460 * tests/Makefile.am: Ditto.
8462 2003-01-28 Paul Eggert <eggert@twinsun.com>
8464 * data/lalr1.cc: Do not use @output_header_name@ unless
8465 b4_defines_flag is set. This fixes two bugs reported by
8467 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
8468 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
8470 2003-01-21 Paul Eggert <eggert@twinsun.com>
8472 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
8473 we don't need to worry about yyerrlab1 being reported as an
8474 "unused label" by non-GCC C compilers. The downside is that if
8475 locations are used then a couple of statements are duplicated each
8476 time YYERROR is invoked, but the upside is that the warnings
8478 (yyerrlab1): Move code to YERROR.
8479 (yyerrlab2): Remove. Change uses back to yyerrlab1.
8480 This reverts some of the 2002-12-27 change.
8482 2003-01-17 Paul Eggert <eggert@twinsun.com>
8484 * src/output.c (symbol_printers_output): Fix typo that led
8485 to core dump. Problem reported by Antonio Rus in
8486 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
8488 2003-01-13 Akim Demaille <akim@epita.fr>,
8489 Quoc Peyrot <chojin@lrde.epita.fr>,
8490 Robert Anisko <anisko_r@lrde.epita.fr>
8492 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
8493 when the stacks contain one element, as the loop would otherwise
8494 free the last state, and then use the top state (the one we just
8495 popped). This means that the initial elements will not be freed
8496 explicitly, as is the case in yacc.c; it is not a problem, as
8497 these elements have fake values.
8499 2003-01-11 Paul Eggert <eggert@twinsun.com>
8501 * NEWS: %expect-violations are now just warnings, reverting
8502 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
8503 bootstrapping problem reported by Matthias Klose; see
8504 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
8505 * src/conflicts.c (conflicts_print): Likewise.
8506 * tests/conflicts.at (%expect not enough, %expect too much,
8507 %expect with reduce conflicts): Likewise.
8508 * doc/bison.texinfo (Expect Decl): Document this. Also mention
8509 that the warning is enabled if the number of conflicts changes
8510 (not necessarily increases).
8512 * src/getargs.c (version): Update copyright year.
8514 2003-01-09 Akim Demaille <akim@epita.fr>
8516 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
8518 2003-01-08 Paul Eggert <eggert@twinsun.com>
8520 * Makefile.maint (WGETFLAGS):
8521 New macro, containing "-C off" to disable proxy caches.
8522 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
8523 (rel-check): Use $(WGET) instead of wget.
8525 2003-01-06 Paul Eggert <eggert@twinsun.com>
8527 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
8528 the GLR paper of Scott, Johnstone and Hussain.
8530 2003-01-04 Paul Eggert <eggert@twinsun.com>
8532 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
8533 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
8534 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
8535 (EXTRA_LIBRARIES): New var, for liby.a.
8536 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
8537 (EXTRA_SCRIPTS): New var, for yacc.
8539 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
8540 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
8541 Problem reported by Nelson H. F. Beebe.
8543 2003-01-03 Paul Eggert <eggert@twinsun.com>
8545 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
8546 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
8547 when compiling Bison 1.875's `bitset bset = obstack_alloc
8548 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
8550 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
8551 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
8552 grow to a huge size with typical invocation.
8554 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
8555 Use the pattern recommended by Autoconf 2.57, except also protect
8556 against double-definition.
8557 * src/system.h: Likewise.
8558 Portability issues reported by Nelson H. F. Beebe.
8560 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
8561 All uses changed. Provide a definition in both C and C++.
8562 (yytrue, yyfalse): Define even if defined (__cplusplus).
8564 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
8565 Reported by Nelson H. F. Beebe.
8567 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
8569 2003-01-02 Paul Eggert <eggert@twinsun.com>
8571 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
8572 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
8573 Bug reported by Nelson H. F. Beebe.
8575 2003-01-01 Paul Eggert <eggert@twinsun.com>
8579 2002-12-30 Paul Eggert <eggert@twinsun.com>
8581 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
8583 (<INITIAL>","): Here. This causes stray "," to be treated
8586 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
8587 last brace in braced code when not in Yacc mode, for compatibility
8588 with Bison 1.35. This resurrects the 2001-12-15 patch to
8591 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
8592 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
8594 2002-12-28 Paul Eggert <eggert@twinsun.com>
8596 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
8597 that of SYM's type. This fixes Debian bug 168069, reported by
8600 2002-12-28 Paul Eggert <eggert@twinsun.com>
8604 Switch back to the Yacc style of conflict reports, undoing some
8605 of the 2002-07-30 change.
8606 * doc/bison.texinfo (Understanding): Use Yacc style for
8607 conflict reports. Also, use new way of locating rules.
8608 * src/conflicts.c (conflict_report):
8609 Renamed from conflict_report_yacc, removing the old
8610 'conflict_report'. Translate the entire conflict report at once,
8611 so that we don't assume that "," has the same interpretation in
8613 (conflicts_output): Use Yacc-style conflict report for each state,
8614 instead of our more-complicated style.
8615 (conflicts_print): Use Yacc-style conflict report, except print
8616 the input file name when not emulating Yacc.
8617 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
8618 Conflicted Reduction, %expect not enough, %expect too much,
8619 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
8620 * tests/existing.at (GNU Cim Grammar): Likewise.
8621 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
8623 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
8624 fatal): Don't invoke fflush; it's not needed and it might even be
8625 harmful for stdout, as stdout might not be open.
8626 * src/reduce.c (reduce_print): Likewise.
8628 2002-12-27 Paul Eggert <eggert@twinsun.com>
8630 Fix a bug where error locations were not being recorded correctly.
8631 This problem was originally reported by Paul Hilfinger in
8632 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
8634 * data/yacc.c (yyparse): New local var yylerrsp, to record the
8635 top of the location stack's error locations.
8636 (yyerrlab): Set it. When discarding a token, push its location
8637 onto yylerrsp so that we don't lose track of the error's end.
8638 (yyerrlab1): Now is only the target of YYERROR, so that we can
8639 properly record the location of the action that failed. For GCC
8640 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
8641 GCC warning about yyerrlab1 being unused if YYERROR is unused.
8642 (yyerrlab2): New label, which yyerrlab now falls through to.
8643 Compute the error's location by applying YYLLOC_DEFAULT to
8644 the locations of all the symbols that went into the error.
8645 * doc/bison.texinfo (Location Default Action): Mention that
8646 YYLLOC_DEFAULT is also invoked for syntax errors.
8647 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
8648 Error locations include the locations of all the tokens that were
8649 discarded, not just the last token.
8651 2002-12-26 Paul Eggert <eggert@twinsun.com>
8653 * src/files.c: Include quote.h.
8654 (compute_output_file_names): Warn if we detect conflicting
8655 outputs to the same file. This should catch the misunderstanding
8656 exemplified by Debian Bug 165349, reported by Bruce Stephens..
8658 * src/conflicts.c (conflicts_print): If the user specifies
8659 "%expect N", report an error if there are any reduce/reduce
8660 conflicts. This is what the manual says should happen.
8661 This fixes Debian bug 130890, reported by Anthony DeRobertis.
8662 * tests/conflicts.at (%expect with reduce conflicts): New test.
8664 Don't use m4_include on relative file names, as it doesn't work as
8665 desired if there happens to be a file with that name under ".".
8667 * m4sugar/version.m4: Remove; it was included but it wasn't used.
8668 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
8669 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
8670 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
8671 * src/output.c (output_skeleton): Use full path names when
8672 specifying a file to include; don't rely on include path, as
8673 it's unreliable when the working file contains a file with
8676 2002-12-25 Paul Eggert <eggert@twinsun.com>
8678 Remove obsolete references to bison.simple and bison.hairy.
8679 Problem mentioned by Aubin Mahe in
8680 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
8681 * data/glr.c: Comment fix.
8682 * doc/bison.1: Remove references. Also, mention "yacc".
8684 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
8687 * src/parse-gram.y (declaration): Use enum "report_states" rather
8688 than its numeric value 1.
8690 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
8691 opening a new one. This fixes Debian bug 165349, reported by
8694 2002-12-24 Paul Eggert <eggert@twinsun.com>
8698 * Makefile.maint (cvs-update): Don't assume that the shell
8699 supports $(...), as Solaris sh doesn't.
8701 * src/parse-gram.y (lloc_default): Remove test for empty
8702 nonterminals at the end, since it didn't change the result.
8704 2002-12-24 Paul Eggert <eggert@twinsun.com>
8706 If the user does not define YYSTYPE as a macro, Bison now declares it
8707 using typedef instead of defining it as a macro. POSIX requires this.
8708 For consistency, YYLTYPE is also declared instead of defined.
8710 %union directives can now have a tag before the `{', e.g., the
8711 directive `%union foo {...}' now generates the C code
8712 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
8713 The default union tag is `YYSTYPE', for compatibility with Solaris 9
8714 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
8715 instead of `yyltype'.
8717 `yystype' and `yyltype' are now obsolescent macros instead of being
8718 typedefs or tags; they are no longer documented and will be
8719 withdrawn in a future release.
8721 * data/glr.c (b4_location_type): Remove.
8722 (YYSTYPE): Renamed from yystype.
8723 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
8724 (struct YYLTYPE): Renamed from struct yyltype.
8725 (YYLTYPE): Renamed from yyltype.
8726 (yyltype, yystype): New (and obsolescent) macros,
8727 for backward compatibility.
8728 * data/yacc.c: Likewise.
8730 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
8731 does not specify a union tag. This is for compatibility with
8734 * src/parse-gram.y (add_param): 2nd arg is now char * not char
8735 const *, since it is now modified by stripping surrounding { }.
8736 (current_braced_code): Remove.
8737 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
8738 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
8739 trailing " {...}". Now of type <chars>.
8740 (grammar_declaration): Adjust to bundled tokens.
8741 (code_content): Remove; stripping is now done by add_param.
8742 (print_token_value): Print contents of bundled tokens.
8743 (token_name): New function.
8745 * src/reader.h (braced_code, current_braced_code): Remove.
8746 (token_name): New decl.
8748 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
8749 token_type, not braced_code code_kind. All uses changed.
8750 (SC_PRE_CODE): New state, for scanning after a keyword that
8751 has (or usually has) an immediately-following braced code.
8752 (token_type): New local var, to keep track of which token type
8753 to return when scanning braced code.
8754 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
8755 <INITIAL>"%parse-param", <INITIAL>"%printer",
8756 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
8757 instead of returning a token type immediately.
8758 (<INITIAL>"{"): Set token type.
8759 (<SC_BRACED_CODE>"}"): Use it.
8760 (handle_action_dollar, handle_action_at): Now returns bool
8761 indicating success. Fail if ! current_rule; this prevents a core dump.
8762 (handle_symbol_code_dollar, handle_symbol_code_at):
8763 Remove; merge body into caller.
8764 (handle_dollar, handle_at): Complain in invalid contexts.
8766 * NEWS, doc/bison.texinfo: Document the above.
8767 * NEWS: Fix years and program names in copyright notice.
8769 2002-12-17 Paul Eggert <eggert@twinsun.com>
8771 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
8772 Reporting, Table of Symbols): Omit mentions of %lex-param and
8773 %parse-param from the documentation for now.
8775 2002-12-15 Paul Eggert <eggert@twinsun.com>
8777 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
8778 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
8779 lookahead symbol, and which sets yychar in parser actions) and it
8780 disagreed with the Bison documentation. Bug
8781 reported by Andrew Walrond.
8783 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
8784 as the caller now does that.
8785 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
8786 (YYEMPTY): Parenthesize right hand side, since others use it.
8787 (yyparse): Don't assume that our generated code is the only code
8790 2002-12-13 Paul Eggert <eggert@twinsun.com>
8794 POSIX requires a "yacc" command.
8795 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
8796 (MOSTLYCLEANFILES): Add yacc.
8798 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
8799 as an alias for bison y.
8801 * po/LINGUAS: Add da.
8803 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
8804 problem with latest <getopt.h>.
8805 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
8807 * doc/fdl.texi: Upgrade to 1.2.
8808 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
8809 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
8810 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
8812 * config/install-sh: Sync with autotools.
8814 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
8815 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
8816 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
8817 locations are requested.
8818 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
8819 locations are requested.
8821 2002-12-12 Paul Eggert <eggert@twinsun.com>
8823 Remove unportable casts and storage allocation tricks.
8824 While we're at it, remove almost all casts, since they
8825 usually aren't needed and are a sign of trouble.
8827 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
8829 * src/derives.c (derives_compute): Do not subtract NTOKENS from
8830 the pointer DSET returned by malloc; this isn't portable.
8831 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
8832 Similarly for DERIVES.
8833 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
8834 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
8835 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
8837 * src/derives.c (derives_compute): Do not bother invoking
8838 int_of_rule_number, since rule numbers are integers.
8840 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
8841 rather than XMALLOC (char, N).
8843 * src/files.c (filename_split): Rewrite to avoid cast.
8845 * src/gram.h (symbol_number_as_item_number,
8846 item_number_as_symbol_number, rule_number_as_item_number,
8847 item_number_as_rule_number):
8848 Now inline functions rather than macros, to avoid casts.
8849 * src/state.h (state_number_as_int): Likewise.
8850 * src/tables.c (state_number_to_vector_number,
8851 symbol_number_to_vector_number): Likewise.
8853 * src/gram.h (int_of_rule_number): Remove; no longer used.
8855 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
8856 since the resulting storage is always stored into.
8858 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
8861 * src/muscle_tab.c (muscle_m4_output):
8862 Now inline. Return bool, not int.
8863 * src/state.c (state_compare): Likewise.
8864 * src/symtab.c (symbol_check_defined,
8865 symbol_check_alias_consistency, symbol_pack, symbol_translation,
8866 hash_compare_symbol, hash_symbol):
8868 * src/uniqstr.c (uniqstr_print): Likewise.
8869 * src/muscle_tab.c (muscle_m4_output_processor):
8870 New function, to avoid casts.
8871 * src/state.c (state_comparator, stage_hasher): Likewise.
8872 * src/symtab.c (symbol_check_defined_processor,
8873 symbol_check_alias_consistency_processor, symbol_pack_processor,
8874 symbol_translation_processor, hash_symbol_comparator,
8875 hash_symbol_hasher): Likewise.
8876 * src/uniqstr.c (uniqstr_print_processor): Likewise.
8877 * src/muscle_tab.c (muscles_m4_output):
8878 Use new functions instead of casting old functions unportably.
8879 * src/state.c (state_hash_new): Likewise.
8880 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
8881 symbols_token_translations_init):
8883 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
8885 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
8886 var instead of casting to long, to avoid casts.
8887 (prepare_states): Use MALLOC rather than alloca, so that we don't
8888 have to worry about alloca.
8889 * src/state.c (state_hash_lookup): Likewise.
8891 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
8892 local var instead of casting to unsigned char, to avoid casts.
8894 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
8895 STATE_ALLOC): Remove.
8896 (transitions_new, errs_new, reductions_new, state_new): Use malloc
8897 rather than calloc, and use offsetof to avoid allocating slightly
8899 (state_new): Initialize all members.
8901 * src/state.c (state_hash): Use unsigned accumulator, not signed.
8903 * src/symtab.c (symbol_free): Remove; unused.
8904 (symbol_get): Remove cast in lhs of assignment.
8905 (symbols_do): Now static. Accept generic arguments, not
8906 hashing-related ones.
8908 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
8909 (symbol_processor): Remove.
8910 (symbols_do): Remove decl; now static.
8912 * src/system.h (alloca): Remove; decl no longer needed.
8913 (<stddef.h>): Include, for offsetof.
8914 (<inttypes.>, <stdint.h>): Include if available.
8915 (uintptr_t): New type, if system lacks it.
8916 (CALLOC, MALLOC, REALLOC): New macros.
8917 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
8920 * src/tables.c (table_size): Now int, to pacify GCC.
8921 (table_grow, table_ninf_remap): Use signed table size.
8922 (save_row): Don't bother initializing locals when not needed.
8923 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
8924 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
8926 * src/vcg.h: Correct misspellings.
8928 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
8931 * src/getargs.c (getargs): Don't assume EOF == -1.
8933 2002-12-09 Paul Eggert <eggert@twinsun.com>
8935 Change identifier spellings to avoid collisions with names
8936 that are reserved by POSIX.
8938 Don't use names ending in _t, since POSIX reserves them.
8939 For consistency, remove _e and _s endings -- they're weren't
8940 needed to remove ambiguity. All uses changed.
8941 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
8942 turn was just renamed from struniq_t.
8943 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
8944 which in turn was just renamed from struniq_processor_t.
8945 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
8946 in turn was renamed from hash_compare_struniq_t.
8947 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
8948 (state_list): Renamed from state_list_t.
8949 * src/assoc.h (assoc): Renamed from assoc_t.
8950 * src/conflicts.c (enum conflict_resolution): Renamed from
8951 enum conflict_resolution_e.
8952 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
8953 (rule_list): Renamed from rule_list_t.
8954 * src/getargs.h (enum trace): Renamed from enum trace_e.
8955 (enum report): Renamed from enum report_e.
8956 * src/gram.h (item_number): Renamed from item_number_t.
8957 (rule_number): Renamed from rule_number_t.
8958 (struct rule_s): Remove the "rule_s" part; not used.
8959 (rule): Renamed from rule_t.
8960 (rule_filter): Renamed from rule_filter_t.
8961 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
8962 (goto_list): Renamed from goto_list_t.
8963 * src/lalr.h (goto_number): Renamed from goto_number_t.
8964 * src/location.h (location): Renamed from location_t.
8965 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
8966 and moved here from:
8967 * src/muscle_tab.h (muscle_entry_t): here.
8968 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
8969 (rule_list): Renamed from rule_list_t.
8970 * src/print_graph.c (static_graph): Renamed from graph.
8971 * src/reader.h (braced_code): Renamed from braced_code_t.
8972 Remove brace_code_e tag.
8973 * src/relation.h (relation_node): Renamed from relation_node_t.
8974 (relation_nodes): Renamed from relation_nodes_t.
8975 (relation): Renamed from relation_t.
8976 * src/state.h (state_number): Renamed from state_number_t.
8977 (struct state): Renamed from struct state_s.
8978 (state): Renamed from state_t.
8979 (transitions): Renamed from transitions_t. Unused (and
8980 misspelled) transtion_s tag removed.
8981 (errs): Renamed from errs_t. Unused errs_s tag removed.
8982 (reductions): Renamed from reductions_t. Unused tag
8983 reductions_s removed.
8984 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
8985 (struct symbol_list): Renamed from struct symbol_list_s.
8986 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
8987 (struct symbol): Renamed from struct symbol_s.
8988 (symbol): Renamed from symbol_t.
8989 * src/tables.c (vector_number): Renamed from vector_number_t.
8990 (action_number): Renamed from action_t.
8991 * src/tables.h (base_number): Renamed from base_t.
8992 * src/vcg.h (enum color): Renamed from enum color_e.
8993 (enum textmode): Renamed from enum textmode_e.
8994 (enum shape): Renamed from enum shape_e.
8995 (struct colorentry): Renamed from struct colorentry_s.
8996 (struct classname): Renamed from struct classname_s.
8997 (struct infoname): Renamed from struct infoname_s.
8998 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
8999 (enum decision): Renamed from enum decision_e.
9000 (enum orientation): Renamed from enum orientation_e.
9001 (enum alignment): Renamed from enum alignment_e.
9002 (enum arrow_mode): Renamed from enum arrow_mode_e.
9003 (enum crossing_type): Renamed from enum crossing_type_e.
9004 (enum view): Renamed from enum view_e.
9005 (struct node): Renamed from struct node_s.
9006 (node): Renamed from node_t.
9007 (enum linestyle): Renamed from enum linestyle_e.
9008 (enum arrowstyle): Renamed from enum arrowstyle_e.
9009 (struct edge): Renamed from struct edge.
9010 (edge): Renamed from edge_t.
9011 (struct graph): Renamed from struct graph_s.
9012 (graph): Renamed from graph_t.
9013 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
9014 Rename value_t -> value.
9015 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
9016 value_t_as_yystype -> value_as_yystype.
9018 Don't include <errno.h> in the mainstream code, since it
9019 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
9020 * lib/get-errno.c, lib/get-errno.h: New files.
9021 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
9023 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
9024 * src/output.c (output_skeleton): Likewise.
9025 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
9027 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
9029 (handle_action_dollar, handle_action_at): Likewise.
9030 * src/system.h: Do not include <errno.h>.
9031 (TAB_EXT): Renamed from EXT_TAB.
9032 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
9034 Avoid str[a-z]*, since <string.h> reserves that name space.
9035 Change all instances of "struniq" in names to "uniqstr", and
9036 likewise for "STRUNIQ" and "UNIQSTR".
9037 * src/uniqstr.c: Renamed from src/struniq.c.
9038 * src/uniqstr.h: Renamed from src/struniq.h.
9039 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
9040 * src/files.c (strsuffix): Remove; unused.
9041 (concat2): Renamed from stringappend. Now static.
9042 * src/files.h (strsuffix, stringappend): Remove; unused.
9043 * src/parse-gram.y (<chars>): Renamed from <string>.
9044 (<uniqstr>): Renamed from <struniq>.
9045 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
9046 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
9047 (struct graph_s.expand): Renamed from struct graph_s.stretch.
9048 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
9049 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
9050 (N_EXPAND): Renamed from N_STRETCH.
9052 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
9053 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
9054 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
9056 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
9057 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
9058 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
9059 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
9060 (BASE_MAXIMUM): Renamed from BASE_MAX.
9061 (BASE_MINIMUM): Renamed from BASE_MIN.
9062 (ACTION_MAX): Remove; unused.
9063 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
9064 Unnecessary casts removed from above defines.
9067 Fix misspelling in names.
9068 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
9069 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
9073 * lib/timevar.c (timevar_report): Renamed from time_report,
9074 for consistency with other names.
9075 * lib/timevar.h (timevar_report): New decl.
9076 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
9079 Sort include-file uses.
9081 Reorder all include files under src to be in the order "system.h".
9082 then the ../lib include files in angle brackets (alphabetized),
9083 then the . include files in double-quotes (alphabetized). Fix
9084 dependency breakages encountered in this process, as follows:
9085 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
9086 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
9087 * src/state.h: Include "symtab.h".
9089 2002-12-08 Paul Eggert <eggert@twinsun.com>
9091 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
9092 since this causes problems when __file__ contains character
9093 sequences like "@" that are treated specially by src/scan-skel.l.
9094 Instead, just use the file's basename. This fixes the bug
9095 reported by Martin Mokrejs in
9096 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
9098 2002-12-06 Paul Eggert <eggert@twinsun.com>
9100 Add support for rules that do not have trailing semicolons, as
9101 POSIX requires. Improve the quality of locations in Bison
9104 * src/location.c: Include <quotearg.h>.
9105 (empty_location): Now const.
9106 (location_print): New function. Follow the recommendation of the
9107 GNU Coding Standards for locations that span file boundaries.
9108 * src/location.h: Do not include <quotearg.h>; no longer needed.
9109 (boundary): New type.
9110 (location_t): Use it. This allows locations to span file boundaries.
9111 All member uses changed: file -> start.file or end.file (as needed),
9112 first_line -> start.line, first_column -> start.column,
9113 last_line -> end.line, last_column -> end.column.
9114 (equal_boundaries): New function.
9115 (LOCATION_RESET, LOCATION_STEP): Remove.
9116 (LOCATION_PRINT): Remove. All callers changed to use location_print.
9117 (empty_location): Now const.
9118 (location_print): New decl.
9119 * src/parse-gram.y (lloc_default): New function, which handles
9120 empty locations more accurately.
9121 (YYLLOC_DEFAULT): Use it.
9122 (%token COLON): Remove.
9123 (%token ID_COLON): New token.
9125 (declarations, rules): Remove trailing semicolon.
9126 (declaration, rules_or_grammar_declaration):
9127 Allow empty (";") declaration.
9128 (symbol_def): Remove empty actions; no longer needed.
9129 (rules_or_grammar_declaration): Remove trailing semicolon.
9130 (semi_colon.opt): Remove.
9131 * src/reader.h: Include location.h.
9132 (scanner_cursor): New decl.
9133 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
9135 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
9137 (STEP): Remove. No longer needed, now that adjust_location does
9138 the work. All uses removed.
9139 (scanner_cursor): New var.
9140 (adjust_location): Renamed from extend_location. It now sets
9141 *loc and adjusts the scanner cursor. All uses changed.
9142 Don't bother testing for CR.
9143 (handle_syncline): Remove location arg; now updates scanner cursor.
9144 All callers changed.
9145 (unexpected_end_of_file): Now accepts start boundary of token or
9146 comment, not location. All callers changed. Update scanner cursor,
9148 (SC_AFTER_IDENTIFIER): New state.
9149 (context_state): Renamed from c_context. All uses changed.
9150 (id_loc, code_start, token_start): New local vars.
9151 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
9152 processing of Yacc white space and equivalents here.
9153 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
9154 instead of returning ID immediately, since we need to search for
9156 (<INITIAL>"'", "\""): Save token_start.
9157 (<INITIAL>"%{", "{", "%%"): Save code_start.
9158 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
9159 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
9160 BEGIN context_state at end, not INITIAL.
9161 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
9162 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
9163 Return correct token start.
9164 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
9165 the start of a character, string or multiline comment is found.
9166 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
9167 Reduction): Adjust reported locations to match the more-precise
9168 results now expected.
9169 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
9170 * tests/reduce.at (Useless Rules, Reduced Automaton,
9171 Underivable Rules): Likewise.
9172 * tests/regression.at (Invalid inputs): No longer `expecting ";"
9173 or "|"' now that so many other tokens are allowed by the new grammar.
9175 * src/complain.h (current_file): Remove duplicate decl;
9176 current_file is now owned by files.h.
9177 * src/complain.c, src/scan-gram.l: Include files.h.
9179 2002-12-06 Paul Eggert <eggert@twinsun.com>
9181 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
9182 promotes to int; it might be unsigned int.
9183 * data/yacc.c (yy_reduce_print): Likewise.
9185 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
9186 be #defined in the prologue, not in the Bison declarations.
9187 This fixes Debian Bug 102878, reported by Shaul Karl.
9189 2002-12-02 Paul Eggert <eggert@twinsun.com>
9191 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
9192 * lib/strtoul.c: New file, from gnulib.
9193 This fixes a porting bug reported by Peter Klein in
9194 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
9196 2002-11-30 Paul Eggert <eggert@twinsun.com>
9198 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
9199 and put only a forward declaration in the prologue. This is for
9200 consistency with the other scanner helper functions.
9202 Type clashes now generate warnings, not errors, since it
9203 appears that POSIX may allow some grammars with type clashes.
9204 * src/reader.c (grammar_current_rule_check): Warn about
9205 type clashes instead of complaining.
9206 * tests/input.at (Type Clashes): Expect warnings, not complaints.
9208 Add Yacc library, since POSIX requires it.
9209 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
9210 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
9211 * lib/main.c, lib/yyerror.c: New files.
9213 gram_error can be static; it need not be extern.
9214 * src/reader.h (gram_error): Remove decl.
9215 * src/parse-gram.y (gram_error): Now static. Add static decl.
9216 (print_token_value): Omit parameter names from forward decl,
9219 2002-11-29 Paul Eggert <eggert@twinsun.com>
9221 * doc/bison.texinfo: Emphasize that yylex and yyerror must
9222 be declared before being used. E.g., one should typically
9223 declare them in the prologue. Use GNU coding style in examples.
9224 Put "const" consistently after the type it modifies. Mention
9225 that C99 supports "inline". Mention that yyerror traditionally
9228 %parse-param and %lex-param now take just one argument, the
9229 declaration; the argument name is deduced from the declaration.
9231 * doc/bison.texinfo (Parser Function, Pure Calling, Error
9232 Reporting, Table of Symbols): Document this.
9233 * src/parse-gram.y (add_param): New function.
9235 (declaration): Implement new rule for %parse-param and %lex-param.
9236 * src/scan-gram.l: "," now elicits a warning, rather than being
9237 a token; this is more compatible with byacc.
9238 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
9240 2002-11-27 Paul Eggert <eggert@twinsun.com>
9242 Rename identifiers to avoid real and potential collisions.
9244 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
9245 to avoid collision with lex macro described by Bruce Lilly in
9246 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
9247 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
9248 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
9249 * src/parse-gram.y (print_token_value): Renamed from yyprint.
9251 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
9252 The name "yycontrol" violates the name space rules, and this stuff
9253 wasn't being used anyway.
9254 (input): Remove action; this stuff wasn't being used.
9255 (gram_error): Rename local variable yylloc -> loc.
9256 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
9257 (YY_DECL): Don't use "yy" at start of local variables.
9258 All uses changed, e.g., yylloc -> loc.
9259 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
9260 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
9261 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
9262 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
9264 * src/parse-gram.y (gram_error): loc is now const *.
9265 * src/reader.h (gram_error): Likewise.
9267 2002-11-24 Paul Eggert <eggert@twinsun.com>
9271 * tests/actions.at (Actions after errors): Use an output format
9272 more similar to that of the Printers and Destructors test.
9273 Test the position of the ';' token too.
9274 (Printers and Destructors): Likewise.
9275 (Printers and Destructors: %glr-parser): Remove for now, to avoid
9276 unnecessarily alarming people when the test fails.
9278 * data/yacc.c (yyerrlab1): Move this label down, so that the
9279 parser does not discard the lookahead token if the user code
9280 invokes YYERROR. This change is required for POSIX conformance.
9282 * lib/error.c: Sync with gnulib.
9284 2002-11-22 Paul Eggert <eggert@twinsun.com>
9286 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
9287 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
9288 * lib/xmalloc.c: Likewise.
9290 2002-11-20 Paul Eggert <eggert@twinsun.com>
9292 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
9294 2002-11-20 Paul Eggert <eggert@twinsun.com>
9296 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
9297 should use `if (! x) abort ();' rather than `assert (x);', and
9298 anyway it's one less thing to worry about configuring.
9300 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
9301 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
9302 and replace all instances of assert with abort.
9303 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
9304 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
9306 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
9307 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
9308 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
9309 hash_find_entry, hash_rehash, hash_insert): Likewise.
9310 * src/conflicts.c (resolve_sr_conflict): Likewise.
9311 * src/lalr.c (set_goto_map, map_goto): Likewise.
9312 * src/nullable.c (nullable_compute): Likewise.
9313 * src/output.c (prepare_rules, token_definitions_output): Likewise.
9314 * src/reader.c (packgram, reader): Likewise.
9315 * src/state.c (state_new, state_free, state_transitions_set,
9316 state_reduction_find): Likewise.
9317 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
9318 symbol_pack): Likewise.
9319 * src/tables.c (conflict_row, pack_vector): Likewise.
9320 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
9321 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
9322 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
9323 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
9325 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
9326 (ARGMATCH_CONSTRAINT): New macro.
9327 (ARGMATCH_ASSERT): Use it.
9329 * src/system.h (verify): New macro.
9330 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
9332 * src/tables.c (tables_generate): Likewise.
9334 * src/struniq.c (struniq_assert): Now returns void, and aborts
9335 if the assertion is false.
9336 (struniq_assert_p): Remove.
9337 * src/struniq.h: Likewise.
9339 2002-11-18 Paul Eggert <eggert@twinsun.com>
9341 * data/glr.c (yygetLRActions): Replace `yyindex' with
9342 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
9343 This fixes the regression with Sun ONE Studio 7 cc that I reported in
9344 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
9346 2002-11-18 Akim Demaille <akim@epita.fr>
9348 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
9350 From Tim Van Holder.
9352 2002-11-17 Paul Eggert <eggert@twinsun.com>
9354 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
9355 to "SyntaxError" for consistency with my 2002-11-15 change.
9357 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
9358 not define to {}, since this breaks the common use of `YYDPRINTF
9359 ((...));' if a single statement is desired (e.g. before `else').
9360 Work around GCC warnings by surrounding corresponding calls with
9362 (yyhasResolvedValue): Remove unused function.
9363 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
9365 (yyreportSyntaxError): Renamed from yyreportParseError.
9366 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
9368 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
9369 extern when possible. Remove unused initializations.
9371 2002-11-16 Akim Demaille <akim@epita.fr>
9373 Augment the similarity between GLR and LALR traces.
9375 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
9376 (YY_REDUCE_PRINT): New.
9377 (yyparse): Use them.
9378 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
9380 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
9381 state reached after the reduction/recovery, since...
9382 (yyparse, yyprocessOneStack): Report the state we are entering in.
9384 2002-11-16 Akim Demaille <akim@epita.fr>
9386 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
9387 Add support for --trace=skeleton.
9388 * src/scan-skel.l: %option debug.
9389 Scan strings of non-@ or \n instead of character by character.
9390 (scan_skel): Handle trace_skeleton.
9392 (@output_parser_name@, @output_header_name@): ``Restore'' their
9393 support (used to be M4 macros).
9394 * data/yacc.c: Quote larger chunks, a la glr.c.
9395 * data/lalr1.cc: Likewise.
9396 The header guards are no longer available, so use some other
9397 string than `YYLSP_NEEDED'.
9399 2002-11-16 Akim Demaille <akim@epita.fr>
9401 Make the ``Printers and Destructors'' test more verbose, taking
9402 `yacc.c''s behavior as (possibly wrong) reference.
9404 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
9405 instead of fprint on stdout.
9406 Set and report the last_line of the symbols.
9407 Consistently display values and locations.
9409 2002-11-16 Paul Eggert <eggert@twinsun.com>
9411 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
9413 2002-11-15 Paul Eggert <eggert@twinsun.com>
9415 * tests/actions.at (Actions after errors): New test case.
9417 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
9418 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
9419 tests/action.at, tests/calc.at, tests/conflicts.at,
9420 tests/cxx-type.at, tests/regression.at:
9421 "parse error" -> "syntax error" for POSIX compatibility.
9422 "parsing stack overflow..." -> "parser stack overflow" so
9423 that code matches Bison documentation.
9425 2002-11-15 Akim Demaille <akim@epita.fr>
9427 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
9428 take two BRACED_CODE, not two string_content.
9429 Free the scanner's obstack when we are done.
9430 (code_content): New.
9431 * tests/calc.at: Adjust.
9432 * doc/bison.texinfo: Adjust.
9433 Also, make sure to include the `,' for these declarations.
9435 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
9437 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
9438 definition; avoids potential autoreconf problems.
9440 2002-11-15 Akim Demaille <akim@epita.fr>
9442 Always check the value returned by yyparse.
9444 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
9445 returned by yyparse.
9446 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
9448 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
9449 returned by yyparse.
9451 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9453 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
9456 2002-11-14 Paul Eggert <eggert@twinsun.com>
9458 * src/output.c (output_skeleton): Call xfopen instead of
9459 duplicating xfopen's body.
9461 Fix bugs reported by Nelson H. F. Beebe in
9462 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
9464 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
9465 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
9466 Group compiler. Instead, use "$CC -E bar.c". Include the .h
9467 file twice in the grammar, as an extra check.
9469 * tests/input.at (Torturing the Scanner): Surround the
9470 backslash-newline tests with "#if 0", to make it less likely that
9471 we'll run into compiler bugs. Bring back solitary \ inside
9472 comment, but add a closing comment to work around HP C bug. Don't
9473 test backslash-newline in C character constant.
9475 2002-11-14 Akim Demaille <akim@epita.fr>
9477 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
9478 status of the compiler.
9479 Calling `exit 1' is no longer needed.
9480 Reported by Nelson H. F. Beebe.
9482 2002-11-14 Akim Demaille <akim@epita.fr>
9484 * tests/atlocal.in (CPPFLAGS): We have config.h.
9485 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
9487 * tests/actions.at, tests/calc.at, tests/conflicts.at,
9488 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
9489 * tests/regression.at, tests/torture.at: Use them for all the
9490 grammars that are to be compiled.
9491 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
9492 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
9493 * doc/bison.texinfo (GLR Parsers): Document `inline'.
9495 2002-11-14 Akim Demaille <akim@epita.fr>
9497 * doc/bison.texinfo: Various formatting changes (alignments in
9498 samples, additional @group/@end group, GCS in samples.
9499 Use @deffn instead of simple @table to define the directives,
9500 macros, variables etc.
9502 2002-11-13 Paul Eggert <eggert@twinsun.com>
9504 Fix some bugs reported by Albert Chin-A-Young in
9505 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
9507 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
9508 -o c"; the HP C compiler chatters during compilation.
9509 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
9510 * tests/headers.at (export YYLTYPE): Likewise.
9512 * tests/input.at (Torturing the Scanner): Remove lines containing
9513 solitary backslashes, as they tickle a bug in the HP C compiler.
9515 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
9516 comments, since they're not portable. Use GNU coding style.
9518 2002-11-13 Akim Demaille <akim@epita.fr>
9520 * data/yacc.c: Leave bigger chunks of quoted text.
9521 (YYDSYMPRINTF): New.
9522 Use it to report symbol activities.
9523 * data/glr.c (YYDSYMPRINTF): New.
9526 2002-11-12 Paul Eggert <eggert@twinsun.com>
9530 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
9531 (yyglrReduce): Return yyok, not 0.
9532 This should avoid the enumerated-type warnings reported
9533 by Nelson H. F. Beebe in
9534 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
9536 * lib/bbitset.h (BITSET_INLINE): Remove.
9537 * lib/bitset.h [! BITSET_INLINE]: Remove.
9538 (bitset_set, bitset_reset, bitset_test): Rename local vars
9539 to avoid shadowing warnings by GCC.
9541 * data/glr.c (inline): Remove #define. It's the user's
9542 responsibility to #define it away, just like 'const'.
9543 This fixes one of the bugs reported by Nelson H. F. Beebe in
9544 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
9546 * Makefile.maint (po-check): Scan .l and .y files instead of the
9547 .c and the .h files that they generate. This fixes the bug
9548 reported by Tim Van Holder in:
9549 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
9550 Look for N_ as well as for _. Try to avoid matching #define for
9552 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
9553 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
9554 * src/scan-gram.l: Revamp regular expressions so that " and '
9555 do not confuse xgettext.
9557 * src/struniq.h (struniq_new): Do not declare the return type
9558 to be 'const'; this violates the C standard.
9559 * src/struniq.c (struniq_new): Likewise.
9561 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
9563 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
9564 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
9567 2002-11-12 Akim Demaille <akim@epita.fr>
9569 * Makefile.maint: Sync with Autoconf:
9570 (local_updates): New.
9572 2002-11-12 Akim Demaille <akim@epita.fr>
9574 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
9576 2002-11-12 Akim Demaille <akim@epita.fr>
9578 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
9581 2002-11-12 Akim Demaille <akim@epita.fr>
9583 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
9586 2002-11-12 Akim Demaille <akim@epita.fr>
9588 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
9589 Use it to test the GLR parser.
9591 2002-11-12 Akim Demaille <akim@epita.fr>
9593 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
9595 * data/glr.c (yystos): New.
9596 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
9598 (yyval): Don't define it, it is handled via M4.
9599 (yyrecoverParseError): Free verbosely the discarded symbols.
9600 * data/yacc.c (yysymprint): Remove, rather...
9601 (b4_yysymprint_generate): invoke.
9602 * data/c.m4 (b4_yysymprint_generate): New.
9603 Accept pointers as arguments, as opposed to the version from
9605 (b4_yydestruct_generate): Likewise.
9606 * tests/cations.at (Printers and Destructors): Use Bison directives
9607 instead of CPP macros.
9608 Don't rely on internal details.
9610 2002-11-12 Akim Demaille <akim@epita.fr>
9612 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
9613 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
9614 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
9615 it against YYEMPTY and so forth), work on yytoken (i.e., set
9616 it to YYEMPTY etc.).
9617 (yydestruct): Replace with a b4_yydestruct_generate invocation.
9618 (b4_symbol_actions): Remove.
9619 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
9620 for 0, end-of-input.
9622 2002-11-12 Akim Demaille <akim@epita.fr>
9624 * doc/bison.texinfo (Destructor Decl): New.
9626 2002-11-12 Akim Demaille <akim@epita.fr>
9628 * src/tables.c (tables_generate): Use free for pointers that
9629 cannot be NULL, not XFREE.
9630 (pack_vector): Use assert, not fatal, for bound violations.
9631 * src/state.c (state_new): Likewise.
9632 * src/reader.c (reader): Likewise.
9633 * src/lalr.c (set_goto_map): Likewise.
9634 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
9637 2002-11-12 Akim Demaille <akim@epita.fr>
9639 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
9641 * src/scan-gram.l (last_string): Is global to the file, not to
9643 * src/parse-gram.y (input): Don't append the epilogue here,
9644 (epilogue.opt): do it here, and free the scanner's obstack.
9645 * src/reader.c (epilogue_set): Rename as...
9646 (epilogue_augment): this.
9647 * data/c.m4 (b4_epilogue): Defaults to empty.
9649 2002-11-12 Akim Demaille <akim@epita.fr>
9651 * src/getargs.c (long_options): Remove duplicates.
9652 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
9654 * doc/bison.rnh: Remove.
9655 * doc/bison.texinfo (VMS Invocation): Remove.
9657 2002-11-12 Akim Demaille <akim@epita.fr>
9659 * src/struniq.h, src/struniq.c (struniq_t): Is const.
9660 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
9662 Use struniq for symbols.
9664 * src/symtab.h (symbol_t): The tag member is a struniq.
9665 (symbol_type_set): Adjust.
9666 * src/symtab.c (symbol_new): Takes a struniq.
9667 (symbol_free): Don't free the tag member.
9668 (hash_compare_symbol_t, hash_symbol_t): Rename as...
9669 (hash_compare_symbol, hash_symbol): these.
9670 Use the fact that tags as struniqs.
9671 (symbol_get): Use struniq_new.
9672 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
9674 * src/reader.h (merger_list, grammar_currentmerge_set): The name
9675 and type members are struniqs.
9676 * src/reader.c (get_merge_function)
9677 (grammar_current_rule_merge_set): Adjust.
9678 (TYPE, current_type): Are struniq.
9680 Use struniq for file names.
9682 * src/files.h, src/files.c (infile): Split into...
9683 (grammar_file, current_file): these.
9684 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
9685 * src/reduce.c (reduce_print): Likewise.
9686 * src/getargs.c (getargs): Likewise.
9687 * src/complain.h, src/complain.c: Likewise.
9688 * src/main.c (main): Call struniqs_new early enough to use it for
9690 Don't free the input file name.
9692 2002-11-12 Akim Demaille <akim@epita.fr>
9694 * src/symtab.c (symbol_free): Remove dead deactivated code:
9695 type_name are properly removed.
9696 Don't use XFREE to free items that cannot be NULL.
9697 * src/struniq.h, src/struniq.c: New.
9698 * src/main.c (main): Initialize/free struniqs.
9699 * src/parse-gram.y (%union): Add astruniq member.
9701 * src/scan-gram.l (<{tag}>): Return a struniq.
9702 Free the obstack bit that used to store it.
9703 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
9705 2002-11-11 Paul Eggert <eggert@twinsun.com>
9707 Revamp to fix many (but not all) of the C- and M4-related quoting
9708 problems. Among other things, this fixes the Bison bug reported
9709 by Jan Hubicka when processing the Bash grammar; see:
9710 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
9712 Use new @ escapes consistently. Represent brackets with @{ and @}
9713 rather than @<:@ and @:>@, since this works a bit better with dumb
9714 editors like vi. Represent @ with @@, since @ is now consistently
9715 an escape. Use @oline@ and @ofile@ rather than __oline__ and
9716 __ofile__, to avoid unexpected expansions. Similarly, use @output
9717 rather than #output.
9719 * data/c.m4 (b4_copyright): Omit file name from comment, since
9720 the file name could contain "*/".
9721 (b4_synclines_flag): Don't quote the 2nd argument; it should already
9722 be quoted. All uses changed.
9724 * data/glr.c: Use new @ escapes consistently.
9725 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
9726 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
9727 Remove, since they couldn't handle arbitrary characters in file
9729 * data/lalr1.cc: Likewise.
9730 * data/yacc.c: Likewise.
9732 * src/files.c (output_infix): Remove; all uses removed.
9733 * src/files.h: Likewise.
9735 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
9736 mishandled funny characters in file names, and anyway it isn't
9738 * data/yacc.c: Likewise.
9739 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
9741 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
9742 * data/yacc.c: Likewise.
9744 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
9746 (muscle_init): Quote filename as a C string.
9747 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
9748 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
9749 * src/output.c (escaped_file_name_output): New function.
9750 (prepare_symbols): Quote tokens for M4.
9751 (prepare): Don't insert output_infix, output_prefix,
9752 output_parser_name, output_header_name; this is now down by scan-skel.
9753 Insert skeleton as a C string.
9755 * src/output.c (user_actions_output, symbol_destructors_output,
9756 symbol_printers_output): Quote filenames for C and M4.
9757 * src/reader.c (prologue_augment, epilogue_set): Likewise.
9759 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
9760 escapes other than \\ and \'; this simplifies the code.
9761 (<SC_STRING>): Likewise, for \\ and \".
9762 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
9763 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
9764 Use new escapes @{ and @} for [ and ].
9766 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
9767 them with auto vars.
9768 Switch to new escape scheme, where @ is the escape character uniformly.
9769 Abort if a stray escape character is found. Avoid unbounded input
9770 buffer when parsing non-escaped text.
9772 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
9773 __oline__, #output, $@, and @{ do not have unintended meanings.
9775 2002-11-09 Paul Eggert <eggert@twinsun.com>
9777 Fix the test failure due to GCC warnings described in
9778 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
9779 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
9780 evaluate to 0 if it's impossible for NINF to be in the respective
9782 (yygetLRActions, yyrecoverParseError): Use them.
9784 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
9785 counted in the token inserted at end of file. Now takes
9786 location_t *, not location_t, so that the location can be
9787 adjusted. All uses changed.
9789 * tests/regression.at (Invalid inputs): Adjust wording in
9790 diagnostic to match the new behavior.
9792 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
9793 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
9794 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
9795 abort ();'. This reduces the runtime of the "Many lookaheads"
9796 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
9799 2002-11-07 Paul Eggert <eggert@twinsun.com>
9801 * src/parse-gram.y (CHARACTER): Remove unused token.
9804 * src/scan-gram.l: Remove stack option. We no longer use the
9805 stack, since the stack was never deeper than 1; instead, use the
9806 new auto var c_context to record the stacked value.
9808 Remove nounput option. At an unexpected end of file, we now unput
9809 the minimal input necessary to end cleanly; this simplifies the
9812 Avoid unbounded token sizes where this is easy.
9814 (unexpected_end_of_file): New function.
9815 Use it to systematize the error message on unexpected EOF.
9816 (last-string): Now auto, not static.
9817 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
9818 (scanner_last_string_free): Remove; not used.
9819 (percent_percent_count): Move decl to just before use.
9820 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
9821 not the (never otherwised-used) CHARACTER.
9823 2002-11-07 Akim Demaille <akim@epita.fr>
9825 Let yyerror always receive the msg as last argument, so that
9826 yyerror can be variadic.
9828 * data/yacc.c (b4_yyerror_args): New.
9829 Use it when calling yyerror.
9830 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
9831 Use it when calling yyerror.
9832 * doc/bison.texinfo (Error Reporting): Adjust.
9833 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
9834 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
9836 2002-11-06 Akim Demaille <akim@epita.fr>
9838 #line should have quoted strings.
9839 Ideally, this should be done by m4_quotearg.
9841 * src/scan-skel.l: Include quotearg.h.
9843 * src/output.c (symbol_printers_output)
9844 (symbol_destructors_output): Quote the file name.
9846 2002-11-06 Akim Demaille <akim@epita.fr>
9848 * tests/regression.at (Invalid inputs): Adjust to the recent
9851 2002-11-06 Akim Demaille <akim@epita.fr>
9854 Reported by Jim Kent.
9856 * data/c.m4 (b4_syncline): New.
9857 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
9858 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
9859 * src/output.c (user_actions_output): Likewise.
9860 (prepare): Define 'b4_synclines_flag'.
9861 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
9863 2002-11-06 Akim Demaille <akim@epita.fr>
9865 * src/main.c (main): Free `infile'.
9866 * src/scan-gram.l (handle_syncline): New.
9868 * src/output.c (user_actions_output, symbol_destructors_output)
9869 (symbol_printers_output): Use the location's file name, not
9871 * src/reader.c (prologue_augment, epilogue_set): Likewise.
9873 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9875 * src/tables.c (matching_state): Don't allow states to match if
9876 either has GLR conflict entries.
9878 2002-11-05 Paul Eggert <eggert@twinsun.com>
9880 * src/scan-gram.l: Use more accurate diagnostics, e.g.
9881 "integer out of range" rather than "invalid value".
9882 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
9885 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
9886 Also, remove one static variable in the scanner.
9888 * src/scan-gram.l (braces_level): Now auto, not static.
9889 Initialize to zero if the compiler is being picky.
9890 (INITIAL): Clear braces_level instead of incrementing it.
9891 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
9892 as POSIX 1003.1-2001 requires.
9893 * src/system.h (IF_LINT): New macro, taken from coreutils.
9894 * configure.ac: Define "lint" if --enable-gcc-warnings.
9896 2002-11-05 Akim Demaille <akim@epita.fr>
9898 * src/scan-gram.l: When it starts with `%', complain about the
9899 whole directive, not just that `invalid character: %'.
9901 2002-11-04 Akim Demaille <akim@epita.fr>
9903 * Makefile.maint: Update from Autoconf.
9904 (update, cvs-update, po-update, do-po-update): New.
9906 2002-11-04 Akim Demaille <akim@epita.fr>
9908 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
9910 Have yyerror `use' its arguments.
9911 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
9912 returns true when location & yacc & pure & parse-param.
9913 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
9915 2002-11-04 Akim Demaille <akim@epita.fr>
9917 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
9919 * src/scan-gram.l: Use [\'] instead of ['] to pacify
9922 Use quote, not quote_n since LOCATION_PRINT no longer uses the
9925 2002-11-03 Paul Eggert <eggert@twinsun.com>
9927 * src/reader.c (get_merge_function, grammar_current_rule_check):
9928 Use consistent diagnostics for reporting type name clashes.
9929 Quote the types with <>, for consistency with Yacc.
9930 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
9932 2002-11-03 Akim Demaille <akim@epita.fr>
9934 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
9936 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
9937 (b4_parse_param): Remove.
9938 Use b4_identification.
9939 Propagate b4_pure_args where needed to pass them to yyerror.
9940 * data/glr.m4 (b4_parse_param): Remove.
9941 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
9942 (b4_lpure_formals): New.
9943 Use b4_identification.
9944 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
9945 b4_user_formals and b4_user_args.
9946 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
9947 (yyreportAmbiguity): When using a pure parser, also need
9948 the location, and the parse-params.
9950 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
9951 When using a pure parser, also need the parse-params.
9953 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
9954 (%pure-parser + %parse-param) LALR and GLR parsers.
9955 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
9956 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
9957 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
9958 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
9959 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
9960 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
9961 * doc/bison.texinfo: Untabify the whole file.
9962 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
9963 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
9964 (Error Reporting): Adjust to these new directives.
9965 Document %error-verbose, deprecate YYERROR_VERBOSE.
9967 2002-11-03 Akim Demaille <akim@epita.fr>
9969 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
9970 AT_CHECK_CALC_GLR invocations to use % directives, instead of
9971 command line options.
9972 * tests/cxx-type.at: Formatting changes.
9974 2002-11-03 Paul Eggert <eggert@twinsun.com>
9976 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
9977 to count columns correctly, and to check for invalid inputs.
9979 Use mbsnwidth to count columns correctly. Account for tabs, too.
9981 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
9982 (extend_location): New function.
9985 Handle CRLF in C code rather than in Lex code.
9986 (YY_INPUT): New macro.
9987 (no_cr_read): New function.
9989 Scan UCNs, even though we don't fully handle them yet.
9990 (convert_ucn_to_byte): New function.
9992 Handle backslash-newline correctly in C code.
9993 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
9994 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
9996 (tag, splice): New EREs. Do not allow NUL or newline in tags.
9997 Use {splice} wherever C allows backslash-newline.
9998 YY_STEP after space, newline, vertical-tab.
9999 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
10001 (letter, id): Don't assume ASCII; e.g., spell out a-z.
10003 ({int}, handle_action_dollar, handle_action_at): Check for integer
10006 (YY_STEP): Omit trailing semicolon, so that it's more like C.
10008 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
10009 as well as \000. Check for UCHAR_MAX, not 255.
10010 Allow \x with an arbitrary positive number of digits, as in C.
10011 Check for overflow here.
10012 Allow \? and UCNs, for compatibility with C.
10014 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
10015 with quote slot used by complain_at.
10017 * tests/input.at: Add tests for backslash-newline, m4 quotes
10018 in symbols, long literals, and funny escapes in strings.
10020 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
10021 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
10022 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
10023 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
10024 * m4/mbswidth.m4: New file, from GNU coreutils.
10026 * doc/bison.texinfo (Grammar Outline): Document // comments.
10027 (Symbols): Document that trigraphs have no special meaning in Bison,
10028 nor is backslash-newline allowed.
10029 (Actions): Document that trigraphs have no special meaning.
10031 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
10034 2002-11-02 Paul Eggert <eggert@twinsun.com>
10036 * src/reader.c: Don't include quote.h; not needed.
10037 (get_merge_function): Reword warning to be consistent with
10038 type clash diagnostic in grammar_current_rule_check.
10040 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
10041 bug in trigraph handling.
10043 * src/output.c (prepare_symbols): When printing token names,
10044 escape "[" as "@<:@" and likewise for "]".
10046 * src/system.h (errno): Remove declaration, as we are now
10047 assuming C89 or better, and C89 guarantees errno.
10049 2002-10-30 Paul Eggert <eggert@twinsun.com>
10051 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
10052 Check for close failures.
10053 * src/files.h (xfclose): Return void, not int, since it always
10055 * src/files.c (xfclose): Likewise. Report I/O error if ferror
10057 * src/output.c (output_skeleton): Use xfclose rather than fclose
10058 and ferror. xfclose now checks ferror.
10060 * data/glr.c (YYLEFTMOST_STATE): Remove.
10061 (yyreportTree): Use a stack-based leftmost state. This avoids
10062 our continuing battles with bogus warnings about initializers.
10064 2002-10-30 Akim Demaille <akim@epita.fr>
10066 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
10069 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10071 * tests/glr-regr1.at: New test for reported regressions.
10072 * tests/testsuite.at: Add glr-regr1.at test.
10073 * tests/Makefile.am: Add glr-regr1.at test.
10075 2002-10-24 Paul Eggert <eggert@twinsun.com>
10079 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
10080 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
10081 we use malloc. Don't assume 'A' through 'Z' are contiguous.
10082 Don't assume strdup exists; POSIX says its an XSI extension.
10083 Check for buffer overflow on input.
10085 2002-10-24 Akim Demaille <akim@epita.fr>
10087 * src/output.c (output_skeleton): Don't disable M4sugar comments
10088 too soon: it results in comments being expanded.
10089 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
10092 2002-10-24 Akim Demaille <akim@epita.fr>
10094 * data/yacc.c (m4_int_type): New.
10095 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
10096 char' as only yacc.c wants K&R portability.
10097 * data/glr.c (yysigned_char): Remove.
10098 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
10099 Reported by Quoc Peyrot.
10101 2002-10-23 Paul Eggert <eggert@twinsun.com>
10103 * src/main.c (main): With --trace=time, report times even if a
10104 non-fatal error occurs. Formerly, the times were reported in some
10105 such cases but not in others.
10106 * src/reader.c (reader): Just return if a complaint has been issued,
10107 instead of exiting, so that 'main' can report times.
10109 2002-10-22 Akim Demaille <akim@epita.fr>
10111 * src/system.h: Include sys/types.
10112 Reported by Bert Deknuydt.
10114 2002-10-23 Paul Eggert <eggert@twinsun.com>
10116 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
10117 Suggested by Art Haas.
10119 2002-10-22 Paul Eggert <eggert@twinsun.com>
10121 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
10122 decl; not needed any more.
10123 * src/main.c (main): Use return to exit, undoing yesterday's change.
10124 The last OS that we could find where this wouldn't work is
10125 SunOS 3.5, and that's too old to worry about now.
10127 * data/glr.c (struct yyltype): Define members even when not
10128 doing locations. This is more consistent with yacc.c, and it
10129 works around the following bug reports:
10130 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
10131 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
10133 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
10134 @acronym consistently. Standardize on "Yacc" instead of "YACC",
10135 "Algol" instead of "ALGOL". Give a bit more history about BNF.
10137 2002-10-22 Akim Demaille <akim@epita.fr>
10139 * data/README: New.
10141 2002-10-21 Paul Eggert <eggert@twinsun.com>
10143 Be consistent about 'bool'; the old code used an enum in one
10144 module and an int in another, and this violates the C standard.
10145 * m4/stdbool.m4: New file, from coreutils 4.5.3.
10146 * configure.ac (AC_HEADER_STDBOOL): Add.
10147 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
10148 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
10149 * src/symtab.c (hash_compare_symbol_t): Likewise.
10150 * src/system.h (bool, false, true): Use a definition consistent
10151 with ../lib/hash.c. All uses changed.
10153 * src/complain.c (warning_issued): Renamed from warn_message_count,
10154 so that we needn't worry about integer overflow (!).
10155 Now of type bool. All uses changed.
10156 (complaint_issued): Renamed from complain_message_count; likewise.
10158 * src/main.c (main): Use exit to exit with failure.
10160 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
10161 rather than 1 and 0.
10162 * src/main.c (main): Likewise.
10163 * src/getargs.c (getargs): Likewise.
10164 * src/reader.c (reader): Likewise.
10166 * src/getarg.c (getargs): Remove duplicate code for
10167 "Try `bison --help'".
10169 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
10170 What was that "2" for?
10172 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
10173 * src/getargs.c (usage): Likewise.
10175 * src/getargs.c (getargs): When there are too few operands, report
10176 the last one. When there are too many, report the first extra
10177 one. This is how diffutils does it.
10179 2002-10-20 Paul Eggert <eggert@twinsun.com>
10181 Remove K&R vestiges.
10182 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
10183 * src/complain.c (VA_START): Remove. Assume prototypes.
10184 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
10185 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
10186 fatal): Assume prototypes.
10187 * src/complain.h: Assume prototypes.
10188 * src/system.h (PARAMS): Remove.
10189 Include <limits.h> unconditionally, since it's guaranteeed even
10190 for a freestanding C89 compiler.
10191 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
10192 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
10194 2002-10-20 Akim Demaille <akim@epita.fr>
10196 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
10197 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
10198 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
10199 (yyresolveStates, yyresolveAction, yyresolveStack)
10200 (yyprocessOneStack): Use them.
10201 (yy_reduce_print): New.
10202 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
10204 2002-10-20 Akim Demaille <akim@epita.fr>
10206 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
10207 arguments and output `void'.
10208 (b4_c_function): Rename as...
10209 (b4_c_function_def): this.
10210 (b4_c_function_decl, b4_c_ansi_function_def)
10211 (b4_c_ansi_function_decl): New.
10212 Change the interpretation of the arguments: before `int, foo', now
10214 * data/yacc.c (yyparse): Prototype and define thanks to these.
10215 Adjust b4_c_function_def uses.
10216 * data/glr.c (yyparse): Likewise, but ANSI only.
10218 2002-10-20 Akim Demaille <akim@epita.fr>
10220 * src/output.c (prepare): Move the definition of `tokens_number',
10221 `nterms_number', `undef_token_number', `user_token_number_max'
10223 (prepare_tokens): Here.
10224 (prepare_tokens): Rename as...
10225 (prepare_symbols): this.
10226 (prepare): Move the definition of `rules_number' to...
10227 (prepare_rules): here.
10228 (prepare): Move the definition of `last', `final_state_number',
10229 `states_number' to...
10230 (prepare_states): here.
10231 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
10233 2002-10-20 Akim Demaille <akim@epita.fr>
10235 * src/tables.h, src/tables.c, src/output.c: Comment changes.
10237 2002-10-20 Akim Demaille <akim@epita.fr>
10239 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
10242 2002-10-20 Akim Demaille <akim@epita.fr>
10244 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
10245 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
10247 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
10249 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
10250 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
10253 2002-10-19 Paul Eggert <eggert@twinsun.com>
10255 Do not create a temporary file, as that involves security and
10256 cleanup headaches. Instead, use a pair of pipes.
10257 Derived from a suggestion by Florian Krohm.
10258 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
10259 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
10260 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
10261 (BISON_PREREQ_SUBPIPE): Add.
10262 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
10263 Add subpipe.h, subpipe.c.
10264 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
10265 * po/POTFILES.in: Add lib/subpipe.c.
10266 * src/output.c: Include "subpipe.h".
10267 (m4_invoke): Remove decl.
10268 (scan_skel): New decl.
10269 (output_skeleton): Use pipe rather than temporary file for m4 input.
10270 Check that m4sugar.m4 is readable, to avoid deadlock.
10271 Check for pipe I/O error.
10272 * src/scan-skel.l (readpipe): Remove decl.
10273 (scan_skel): New function, to be used in place of m4_invoke.
10274 Read from stream rather than file.
10276 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
10277 float, as this generates a warning on Solaris 8 + GCC 3.2 with
10278 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
10279 this generates a more-accurate value anyway.
10281 * lib/timevar.c (timervar_accumulate): Rename locals to
10282 avoid confusion with similarly-named more-global.
10283 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
10285 * src/output.c (prepare): Use xstrdup to convert char const *
10286 to char *, to avoid GCC warning.
10288 2002-10-19 Akim Demaille <akim@epita.fr>
10290 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
10291 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
10292 Use them to have `calc.y' ready for %pure-parser.
10293 * data/yacc.c (YYLEX): Pass a yylex return type to
10294 b4_c_function_call.
10296 2002-10-19 Akim Demaille <akim@epita.fr>
10298 Prototype support of %lex-param and %parse-param.
10300 * src/parse-gram.y: Add the definition of the %lex-param and
10301 %parse-param tokens, plus their rules.
10302 Drop the `_' version of %glr-parser.
10304 * src/scan-gram.l (INITIAL): Scan them.
10305 * src/muscle_tab.c: Comment changes.
10306 (muscle_insert, muscle_find): Rename `pair' as `probe'.
10307 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
10308 (muscle_entry_s): The `value' member is no longer const.
10309 Adjust all dependencies.
10310 * src/muscle_tab.c (muscle_init): Adjust: use
10311 MUSCLE_INSERT_STRING.
10312 Initialize the obstack earlier.
10313 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
10314 (muscle_pair_list_grow): New.
10315 * data/c.m4 (b4_c_function_call, b4_c_args): New.
10316 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
10317 * tests/calc.at: Use %locations, not --locations.
10318 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
10320 2002-10-19 Akim Demaille <akim@epita.fr>
10322 * src/getargs.c (usage): Take status as argument and exit
10324 Report the traditional `Try ... --help' message when status != 0.
10325 (usage, version): Don't take a FILE * as arg, it is pointless.
10326 (getargs): When there is an incorrect number of arguments, make it
10327 an error, and report it GNUlically thanks to `usage ()'.
10329 2002-10-18 Paul Eggert <eggert@twinsun.com>
10331 * data/glr.c (yyreportParseError): Don't assume that sprintf
10332 yields the length of the printed string, as this is not true
10333 on SunOS 4.1.4. Reported by Peter Klein.
10335 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
10336 * tests/conflicts.at (%nonassoc and eof): Likewise.
10337 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
10339 2002-10-17 Akim Demaille <akim@epita.fr>
10341 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
10342 * src/getargs.c (trace_types, trace_args): Adjust.
10343 * src/reader.c (grammar_current_rule_prec_set)
10344 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
10345 Standardize error messages.
10346 And s/@prec/%prec/!
10347 (reader): Use trace_flag to enable scanner/parser debugging,
10348 instead of an adhoc scheme.
10349 * src/scan-gram.l: Remove trailing debugging code.
10351 2002-10-16 Paul Eggert <eggert@twinsun.com>
10353 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
10356 * NEWS: Officially drop support for building Bison with K&R C,
10357 since it didn't work anyway and it's not worth worrying about.
10358 * Makefile.maint (wget_files): Remove ansi2knr.c.
10359 (ansi2knr.c-url_prefix): Remove.
10360 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
10361 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
10362 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
10364 2002-10-15 Paul Eggert <eggert@twinsun.com>
10366 Stop using the "enum_" trick for K&R-style function definitions;
10367 it confused me, and I was the author! Instead, assume that people
10368 who want to use K&R C compilers (when using these modules in GCC,
10369 perhaps?) will run ansi2knr.
10371 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
10372 All uses of "enum_" changed to "enum ".
10373 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
10374 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
10376 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
10377 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
10378 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
10379 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
10380 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
10381 abitset_not, abitset_ones, abitset_or, abitset_or_and,
10382 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
10383 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
10384 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
10385 Use function prototypes; this removes the need for declaring
10386 static functions simply to provide their prototypes.
10387 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
10388 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
10389 bitset_count_, bitset_create, bitset_dump, bitset_first,
10390 bitset_free, bitset_init, bitset_last, bitset_next,
10391 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
10392 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
10393 bitset_print, bitset_release_memory, bitset_toggle_,
10394 bitset_type_choose, bitset_type_get, bitset_type_name_get,
10395 debug_bitset): Likewise.
10396 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
10397 * lib/bitset_stats.c (bitset_log_histogram_print,
10398 bitset_percent_histogram_print, bitset_stats_and,
10399 bitset_stats_and_cmp, bitset_stats_and_or,
10400 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
10401 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
10402 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
10403 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
10404 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
10405 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
10406 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
10407 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
10408 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
10409 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
10410 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
10411 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
10412 bitset_stats_zero): Likewise.
10413 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
10414 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
10415 bitsetv_dump, debug_bitsetv): Likewise.
10416 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
10417 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
10418 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
10419 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
10420 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
10421 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
10422 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
10423 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
10424 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
10425 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
10426 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
10428 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
10429 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
10430 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
10431 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
10432 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
10433 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
10434 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
10435 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
10436 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
10437 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
10438 lbitset_xor_cmp, lbitset_zero): Likewise.
10440 2002-10-14 Akim Demaille <akim@epita.fr>
10444 2002-10-14 Akim Demaille <akim@epita.fr>
10446 * tests/Makefile.am (maintainer-check-posix): New.
10448 2002-10-14 Akim Demaille <akim@epita.fr>
10450 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
10453 2002-10-14 Akim Demaille <akim@epita.fr>
10455 * src/tables.c (table_ninf_remap): base -> tab.
10456 Reported by Matt Rosing.
10458 2002-10-14 Paul Eggert <eggert@twinsun.com>
10460 * tests/action.at, tests/calc.at, tests/conflicts.at,
10461 tests/cxx-type.at, tests/headers.at, tests/input.at,
10462 tests/regression.at, tests/synclines.at, tests/torture.at:
10463 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
10464 so that the tests still work even if POSIXLY_CORRECT is set.
10465 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
10467 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
10468 for portability to K&R hosts. Fix typo: signed char is guaranteed
10469 only to 127, not to 128.
10470 * data/glr.c (yysigned_char): New type.
10471 * data/yacc.c (yysigned_char): Likewise.
10472 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
10474 2002-10-13 Paul Eggert <eggert@twinsun.com>
10476 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
10477 true due to limited range of data type" warning from GCC.
10479 * data/c.m4 (b4_token_defines): Protect against double-inclusion
10480 by wrapping enum yytokentype's definition inside #ifndef
10481 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
10483 2002-10-13 Akim Demaille <akim@epita.fr>
10485 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
10486 Un yy- yyrhs to avoid the name clash with the global YYRHS.
10488 2002-10-13 Akim Demaille <akim@epita.fr>
10490 * Makefile.maint: Update from Autoconf 2.54.
10491 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
10493 2002-10-13 Akim Demaille <akim@epita.fr>
10495 * src/print.c (print_state): Separate the list of solved conflicts
10496 from the other items.
10497 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
10499 2002-10-13 Akim Demaille <akim@epita.fr>
10501 Let nondeterministic skeletons be usable with deterministic
10504 With the patch, GAWK compiled by GCC without -O2 passes its test
10505 suite using a GLR parser driven by LALR tables. It fails with -O2
10506 because `struct stat' gives two different answers on my machine:
10507 88 (definition of an auto var) and later 96 (memset on this var).
10508 Hence the stack is badly corrumpted. The headers inclusion is to
10509 blame: if I move the awk.h inclusion before GLR's system header
10510 inclusion, the two struct stat have the same size.
10512 * src/tables.c (pack_table): Always create conflict_table.
10513 (token_actions): Always create conflict_list.
10514 * data/glr.c (YYFLAG): Remove, unused.
10516 2002-10-13 Akim Demaille <akim@epita.fr>
10518 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
10520 (VALGRIND, GXX): New.
10521 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
10522 * tests/bison.in: Run $PREBISON a pre-command.
10523 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
10524 (maintainer-check-g++): New.
10525 * Makefile.am (maintainer-check): New.
10527 2002-10-13 Akim Demaille <akim@epita.fr>
10529 * data/glr.c: Formatting changes.
10530 Tweak some trace messages to match yacc.c's.
10532 2002-10-13 Akim Demaille <akim@epita.fr>
10534 GLR parsers sometimes raise parse errors instead of performing the
10536 Reported by Charles-Henry de Boysson.
10538 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
10539 check the length of the traces when %glr.
10540 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
10542 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
10544 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
10545 (yyltype): Remove the yy prefix from the member names.
10546 (yytable): Complete its comment.
10547 (yygetLRActions): Map error action number from YYTABLE from
10549 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
10550 (which was a bug: it should have been YYTABEL_NINF, and yet it was
10551 not satisfying as we could compare an YYACTION computed from
10552 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
10553 only value for error actions.
10554 (yyreportParseError): In verbose parse error messages, don't issue
10555 `error' in the list of expected tokens.
10556 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
10557 next action to perform to match glr.c's decoding.
10558 (yytable): Complete its comment.
10560 2002-10-13 Paul Eggert <eggert@twinsun.com>
10562 Fix problem reported by Henrik Grubbstroem in
10563 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
10564 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
10565 because the Bison parser reads the second action before reducing
10567 * src/scan-gram.l (rule_length): New static var.
10568 Use it to keep track of the rule length in the scanner, since
10569 we can't expect the parser to be in lock-step sync with the scanner.
10570 (handle_action_dollar, handle_action_at): Use this var.
10571 * tests/actions.at (Exotic Dollars): Test for the problem.
10573 2002-10-12 Paul Eggert <eggert@twinsun.com>
10575 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
10576 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
10577 Include <sys/time.h> when checking for clock_t and struct tms.
10578 Use same include order as source.
10579 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
10580 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
10582 * lib/timevar.c: Update copyright date and clarify comments.
10583 (get_time) [IN_GCC]: Keep the GCC version for reference.
10585 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
10586 GCC version as of today, then merge Bison's changes.
10587 Change "GCC" to "Bison" in copyright notice. timevar.def's
10588 author is Akim, so change that too.
10590 * src/reader.c (grammar_current_rule_check):
10591 Don't worry about the default action if $$ is untyped.
10592 Prevents bogus warnings reported by Jim Gifford in
10593 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
10595 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
10596 * data/glr.c, data/lalr1.cc, data/yacc.c:
10597 Output token definitions before the first part of user declarations.
10598 Fixes compatibility problem reported by Jim Gifford for kbd in
10599 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
10601 2002-10-11 Paul Eggert <eggert@twinsun.com>
10603 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
10604 (yyparse): here. This undoes some of the 2002-07-25 change.
10605 Compatibility problem reported by Ralf S. Engelschall with
10606 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
10608 2002-10-11 Akim Demaille <akim@epita.fr>
10610 * tests/regression.at Characters Escapes): New.
10611 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
10613 Reported by Jan Nieuwenhuizen.
10615 2002-10-11 Akim Demaille <akim@epita.fr>
10619 2002-10-10 Paul Eggert <eggert@twinsun.com>
10621 Portability fixes for bitsets; this also avoids several GCC
10624 * lib/abitset.c: Include <stddef.h>, for offsetof.
10625 * lib/lbitset.c: Likewise.
10627 * lib/abitset.c (abitset_bytes): Return a size that is aligned
10628 properly for vectors of objects. Do not assume that adding a
10629 header size to a multiple of a word size yields a value that is
10630 properly aligned for the whole union.
10631 * lib/bitsetv.c (bitsetv_alloc): Likewise.
10633 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
10634 unique names for structures.
10635 * lib/ebitset.c (ebitset_bytes): Likewise.
10636 * lib/lbitset.c (lbitset_bytes): Likewise.
10638 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
10639 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
10640 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
10641 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
10642 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
10643 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
10644 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
10645 to improve the type-checking that GCC can do.
10646 * lib/bitset.c (bitset_op4_cmp): Likewise.
10647 * lib/bitset_stats.c (bitset_stats_count,
10648 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
10649 bitset_stats_copy, bitset_stats_disjoint_p,
10650 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
10651 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
10652 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
10653 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
10654 bitset_stats_and_or_cmp, bitset_stats_andn_or,
10655 bitset_stats_andn_or_cmp, bitset_stats_or_and,
10656 bitset_stats_or_and_cmp): Likewise.
10657 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
10658 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
10659 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
10660 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
10662 * lib/abitset.h: Include bitset.h, not bbitset.h.
10663 * lib/ebitset.h: Likewise.
10664 * lib/lbitset.h: Likewise.
10666 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
10667 All instances of parameters of type enum bitset_opts are now of
10668 type enum_bitset_opts, to conform to the C Standard, and similarly
10669 for enum_bitset_type.
10670 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
10671 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
10673 Do not use "struct bitset_struct" to mean different things in
10674 different modules. Not only is this confusing, it violates
10675 the C Standard, which requires that structure types in different
10676 modules must be compatible if one is to be passed to the other.
10677 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
10678 All instances of "struct bitset_struct *" replaced with "bitset".
10679 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
10680 (union bitset_union, struct abitset_struct, struct ebitset_struct,
10681 struct lbitset_struct, struct bitset_stats_struct): New types.
10682 All uses of struct bitset_struct changed to union bitset_union,
10684 * lib/abitset.c (struct abitset_struct, abitset,
10685 struct bitset_struct): Remove.
10686 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
10687 struct bitset_struct): Remove.
10688 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
10689 bitset_struct): Remove.
10690 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
10693 Do not call a function of type T using a call that assumes the
10694 function is of a different type U. Standard C requires that a
10695 function must be called with a type that is compatible with its
10697 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
10699 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
10701 * lib/ebitset.c (PFV): Remove.
10702 * lib/lbitset.c (PFV): Likewise.
10703 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
10704 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
10706 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
10707 (ebitset_vtable): Use them.
10708 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
10709 lbitset_xor): New functions.
10710 (lbitset_vtable): Use them.
10712 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
10715 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
10717 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
10718 Use offsetof, for simplicity.
10720 2002-10-06 Paul Eggert <eggert@twinsun.com>
10722 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
10723 the same width as int. This reapplies a hunk of the 2002-08-12 patch
10724 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
10725 which was inadvertently undone by the 2002-09-30 patch.
10726 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
10727 the same width as int.
10729 2002-10-04 Paul Eggert <eggert@twinsun.com>
10733 * configure.ac (AC_INIT), NEWS: Increment version number.
10735 * doc/bison.texinfo: Minor spelling, grammar, and white space
10737 (Symbols): Mention that any negative value returned from yylex
10738 signifies end-of-input. Warn about negative chars. Mention
10739 the portable Standard C character set.
10741 The GNU coding standard says CFLAGS and YFLAGS are reserved
10742 for the installer to set.
10743 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
10744 * src/Makefile.am (AM_CFLAGS): Likewise.
10745 (AM_YFLAGS): Renamed from YFLAGS.
10747 Fix some MAX and MIN problems.
10748 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
10749 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
10750 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
10751 * src/reader.c (reader): Use it.
10753 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
10754 POSIX 1003.1-2001 has removed fgrep.
10756 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
10758 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
10759 interpreted as signed.
10760 * lib/ebitset.c (ebitset_list): Fix bug.
10762 2002-10-01 Paul Eggert <eggert@twinsun.com>
10764 More fixes for 64-bit hosts and large bitsets.
10766 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
10767 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
10768 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
10769 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
10770 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
10771 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
10772 bitset_count_): Likewise.
10773 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
10774 bitset_first, bitset_last): Likewise.
10775 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
10776 bitset_stats_list_reverse, bitset_stats_size,
10777 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
10779 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
10780 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
10781 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
10782 bitsetv_reflexive_transitive_closure): Likewise.
10783 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
10784 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
10786 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
10789 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
10790 Use size_t, not unsigned int, to count bytes.
10791 * lib/abitset.h (abitset_bytes): Likewise.
10792 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
10794 * lib/bitset.h (bitset_bytes): Likewise.
10795 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
10796 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
10797 * lib/bitsetv.c (bitsetv_alloc): Likewise.
10798 * lib/ebitset.c (ebitset_bytes): Likewise.
10799 * lib/ebitset.h (ebitset_bytes): Likewise.
10800 * lib/lbitset.c (lbitset_bytes): Likewise.
10801 * lib/lbitset.h (lbitset_bytes): Likewise.
10803 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
10804 abitset_subset_p, abitset_disjoint_p, abitset_and,
10805 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
10806 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
10807 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
10808 abitset_or_and, abitset_or_and_cmp):
10809 Use bitset_windex instead of unsigned int.
10810 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
10811 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
10812 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
10813 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
10815 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
10817 * lib/bitset.c (bitset_print):
10818 Use proper printf formats for widths of integer types.
10819 * lib/bitset_stats.c (bitset_percent_histogram_print,
10820 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
10821 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
10822 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
10823 * lib/lbitset.c (lbitset_bytes): Likewise.
10825 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
10826 BITSET_SIZE_MAX): New macros.
10827 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
10828 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
10829 to BITSET_WINDEX_MAX.
10831 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
10832 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
10833 since we now return the bitset_bindex type (not int).
10835 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
10836 when computing sizes.
10837 * lib/ebitset.c (ebitset_elts_grow): Likewise.
10839 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
10840 and avoid cast to unsigned.
10842 2002-09-30 Akim Demaille <akim@epita.fr>
10844 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
10845 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
10846 Updates from Michael Hayes.
10848 2002-09-30 Art Haas <ahaas@neosoft.com>
10850 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
10852 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
10855 2002-09-27 Akim Demaille <akim@epita.fr>
10859 2002-09-27 Akim Demaille <akim@epita.fr>
10861 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
10862 (Because of AC_LIBSOURCE).
10864 2002-09-27 Akim Demaille <akim@epita.fr>
10866 Playing with Autoscan.
10868 * configure.ac: Remove the old LIBOBJ tweaks.
10869 (AC_REPLACE_FUNCS): Add strrchr and strtol.
10870 * lib/strrchr.c: New.
10871 * lib/strtol.c: New, from the Coreutils 4.5.1.
10873 2002-09-27 Akim Demaille <akim@epita.fr>
10875 Playing with Autoscan.
10877 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
10878 * lib/Makefile.am (libbison_a_SOURCES): No longer include
10879 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
10880 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
10883 2002-09-24 Akim Demaille <akim@epita.fr>
10885 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
10886 (Frequently Asked Questions, Parser Stack Overflow): New.
10888 2002-09-13 Akim Demaille <akim@epita.fr>
10890 Playing with autoscan.
10892 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
10893 * src/files.c (skeleton_find): Remove, unused.
10894 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
10895 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
10897 2002-09-13 Akim Demaille <akim@epita.fr>
10899 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
10900 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
10902 2002-09-13 Akim Demaille <akim@epita.fr>
10904 * configure.ac: Require 2.54.
10905 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
10906 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
10907 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
10908 Remove, provided by Autoconf macros.
10910 2002-09-12 Akim Demaille <akim@epita.fr>
10912 * m4/prereq.m4: Update, from Coreutils 4.5.1.
10914 2002-09-12 Akim Demaille <akim@epita.fr>
10916 * m4/prereq.m4: Update, from Fileutils 4.1.5.
10917 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
10918 Reported by Martin Mokrejs.
10920 2002-09-10 Akim Demaille <akim@epita.fr>
10922 * src/parse-gram.y: Associate a human readable string to each
10924 * tests/regression.at (Invalid inputs): Adjust.
10926 2002-09-10 Gary V. Vaughan <gary@gnu.org>
10928 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
10929 with an Autoconf-2.5x style configure.ac.
10931 2002-09-06 Paul Eggert <eggert@twinsun.com>
10933 * doc/bison.texinfo (Conditions): Make explicit that the GPL
10934 exception applies only to yacc.c. This is a modification of a
10935 patch originally suggested by Akim Demaille.
10937 2002-09-06 Akim Demaille <akim@epita.fr>
10939 * data/c.m4 (b4_copyright): Move the GPL exception comment from
10941 * data/yacc.c: here.
10943 * data/lalr1.cc (struct yyltype): Don't define it, since we use
10945 (b4_ltype): Default to yy::Location from location.hh.
10947 2002-09-04 Jim Meyering <jim@meyering.net>
10949 * data/yacc.c: Guard the declaration of yytoknum also with
10950 `#ifdef YYPRINT', so it is declared only when used.
10952 2002-09-04 Akim Demaille <akim@epita.fr>
10954 * configure.in: Rename as...
10955 * configure.ac: this.
10958 2002-09-04 Akim Demaille <akim@epita.fr>
10960 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
10961 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
10962 translate maintainer only messages.
10964 2002-08-12 Paul Eggert <eggert@twinsun.com>
10968 * Makefile.am (SUBDIRS): Remove intl.
10969 (DISTCLEANFILES): Remove.
10970 * NEWS: Mention that GNU M4 is now required. Clarify what is
10971 meant by "larger grammars". Mention the pt_BR translation.
10972 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
10973 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
10974 Bump version from 0.11.2 to 0.11.5.
10975 (BISON_PREREQ_STAGE): Remove.
10976 (AM_GNU_GETTEXT): Use external gettext.
10977 (AC_OUTPUT): Remove intl/Makefile.
10979 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
10981 * data/glr.c: Include string.h, for strlen.
10982 (yyreportParseError): Use size_t for yysize.
10983 (yy_yypstack): No longer nested inside yypstates, as nested
10984 functions are not portable. Do not assume size_t is the
10986 (yypstates): Do not assume that ptrdiff_t is the same width
10987 as int, and similarly for yyposn and YYINDEX.
10989 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
10991 * lib/Makefile.am (INCLUDES): Do not include from the intl
10992 directory, which has been removed.
10993 * src/Makefile.am (INCLUDES): Likewise.
10995 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
10996 (bitsets_sources, additional_bitsets_sources, timevars_sources):
10999 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
11000 * tests/Makefile.am (EXTRA_DIST): Likewise.
11002 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
11003 Do not assume that bitset_windex is the same width as unsigned.
11005 * lib/abitset.c (abitset_unused_clear): Do not assume that
11006 bitset_word is the same width as int.
11007 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
11008 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
11009 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
11010 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
11011 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
11013 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
11014 portability to one's complement hosts!).
11015 * lib/ebitset.c (ebitset_op1): Likewise.
11016 * lib/lbitset.c (lbitset_op1): Likewise.
11018 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
11019 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
11020 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
11021 Sync with fileutils.
11022 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
11023 lib/gettext.h: Sync with diffutils.
11025 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
11026 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
11028 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
11029 PROTOTYPES to check for prototypes, and "defined __STDC__" to
11032 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
11033 size_t; the old version tried to do this but casted improperly.
11034 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
11035 (bitset_test): Now returns int, not unsigned long.
11037 * lib/bitset_stats.c: Include "gettext.h".
11039 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
11040 name locals "index", as it generates unnecessary warnings on some
11041 hosts that have an "index" function.
11043 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
11044 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
11045 they need translation.
11046 * src/LR0.c (state_list_append, new_itemsets, get_state,
11047 append_states, generate_states): Likewise.
11048 * src/assoc.c (assoc_to_string): Likewise.
11049 * src/closure.c (print_closure, set_firsts, closure): Likewise.
11050 * src/gram.c (grammar_dump): Likewise.
11051 * src/injections.c (injections_compute): Likewise.
11052 * src/lalr.c (lookaheads_print): Likewise.
11053 * src/relation.c (relation_transpose): Likewise.
11054 * src/scan-gram.l: Likewise.
11055 * src/tables.c (table_grow, pack_vector): Likewise.
11057 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
11058 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
11059 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
11060 * m4/mbstate_t.m4: Sync with fileutils.
11061 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
11063 * po/LINGUAS: Add pt_BR.
11064 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
11065 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
11067 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
11069 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
11071 * src/complain.c (strerror_r): Remove decl; not needed.
11072 (strerror): Use same pattern as ../lib/error.c.
11074 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
11076 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
11078 * src/main.c (main): Cast result of bindtextdomain and textdomain
11079 to void, to avoid a GCC warning when --disable-nls is in effect.
11081 * src/scan-gram.l: Use strings rather than escapes when possible,
11082 to minimize the number of warnings from xgettext.
11083 (handle_action_dollar, handle_action_at): Don't use isdigit,
11084 as it mishandles negative chars and it may not work as expected
11085 outside the C locale.
11087 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
11088 this is a GCC extension and is not portable to other compilers.
11090 * src/system.h (alloca): Use same pattern as ../lib/error.c.
11091 Do not include <ctype.h>; no longer needed.
11092 Do not include <malloc.h>; no longer needed (and generates
11093 warnings on OpenBSD 3.0).
11095 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
11098 * tests/regression.at: Do not use 'cc -c input.c -o input';
11099 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
11101 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
11102 exit status as failure, not just exit status 1. Sun C exits
11103 with status 2 sometimes.
11105 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
11106 Use it for the two large tests.
11108 2002-08-02 Akim Demaille <akim@epita.fr>
11110 * src/conflicts.c (conflicts_output): Don't output rules never
11111 reduced here, since anyway that computation doesn't work.
11112 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
11113 (rule_useless_p, rule_never_reduced_p): New.
11114 (grammar_rules_partial_print): Use a filter instead of a range.
11115 Display the title only if needed.
11116 (grammar_rules_print): Adjust.
11117 (grammar_rules_never_reduced_report): New.
11118 * src/tables.c (action_row): Move the computation of rules never
11120 (token_actions): here.
11121 * src/main.c (main): Make the parser before making the report, so
11122 that rules never reduced are computed.
11123 Call grammar_rules_never_reduced_report.
11124 * src/print.c (print_results): Report rules never reduced.
11125 * tests/conflicts.at, tests/reduce.at: Adjust.
11127 2002-08-01 Akim Demaille <akim@epita.fr>
11129 Instead of attaching lookaheads and duplicating the rules being
11130 reduced by a state, attach the lookaheads to the reductions.
11132 * src/state.h (state_t): Remove the `lookaheads',
11133 `lookaheads_rule' member.
11134 (reductions_t): Add a `lookaheads' member.
11135 Use a regular array for the `rules'.
11136 * src/state.c (reductions_new): Initialize the lookaheads member
11138 (state_rule_lookaheads_print): Adjust.
11139 * src/state.h, src/state.c (state_reductions_find): New.
11140 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
11141 (count_rr_conflicts): Adjust.
11142 * src/lalr.c (LArule): Remove.
11143 (add_lookback_edge): Adjust.
11144 (state_lookaheads_count): New.
11145 (states_lookaheads_initialize): Merge into...
11146 (initialize_LA): this.
11147 (lalr_free): Adjust.
11148 * src/main.c (main): Don't free nullable and derives too early: it
11149 is used by --verbose.
11150 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
11152 2002-08-01 Akim Demaille <akim@epita.fr>
11154 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
11156 (set_derives, free_derives): Rename as...
11157 (derives_compute, derives_free): this.
11158 Adjust all dependencies.
11159 * src/nullable.c (set_nullable, free_nullable): Rename as...
11160 (nullable_compute, nullable_free): these.
11161 (rule_list_t): Store rule_t *, not rule_number_t.
11162 * src/state.c (state_rule_lookaheads_print): Directly compare rule
11163 pointers, instead of their numbers.
11164 * src/main.c (main): Call nullable_free, and derives_free earlier,
11165 as they were lo longer used.
11167 2002-08-01 Akim Demaille <akim@epita.fr>
11169 * lib/timevar.c (get_time): Include children time.
11170 * src/lalr.h (LA, LArule): Don't export them: used with the
11172 * src/lalr.c (LA, LArule): Static.
11173 * src/lalr.h, src/lalr.c (lalr_free): New.
11174 * src/main.c (main): Call it.
11175 * src/tables.c (pack_vector): Check whether loc is >= to the
11177 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
11178 (tables_generate): do it, since that's also it which allocates
11180 Don't free LA and LArule, main does.
11182 2002-07-31 Akim Demaille <akim@epita.fr>
11184 Separate parser tables computation and output.
11186 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
11187 (conflict_list, conflict_list_cnt, table, check, table_ninf)
11188 (yydefgoto, yydefact, high): Move to...
11189 * src/tables.h, src/tables.c: here.
11190 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
11191 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
11192 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
11193 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
11194 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
11195 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
11196 (action_row, save_row, token_actions, save_column, default_goto)
11197 (goto_actions, sort_actions, matching_state, pack_vector)
11198 (table_ninf_remap, pack_table, prepare_actions): Move to...
11199 * src/tables.c: here.
11200 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
11201 * src/output.c (token_actions, output_base, output_conflicts)
11202 (output_check): Merge into...
11203 (prepare_actions): this.
11204 (actions_output): Rename as...
11205 (user_actions_output): this.
11206 * src/main.c (main): Call tables_generate and tables_free.
11208 2002-07-31 Akim Demaille <akim@epita.fr>
11210 Steal GCC's --time-report support.
11212 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
11213 stolen/adjusted from GCC.
11214 * m4/stage.m4: Remove time related checks.
11215 * m4/timevar.m4: New.
11216 * configure.in: Adjust.
11217 * src/system.h: Adjust to using timevar.h.
11218 * src/getargs.h, src/getargs.c: Support trace_time for
11220 * src/main.c (stage): Remove.
11221 (main): Replace `stage' invocations with timevar calls.
11222 * src/output.c: Insert pertinent timevar calls.
11224 2002-07-31 Akim Demaille <akim@epita.fr>
11226 Let --trace have arguments.
11228 * src/getargs.h (enum trace_e): New.
11229 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
11230 (long_options, short_options): --trace/-T takes an optional
11232 Change all the uses of trace_flag to reflect the new flags.
11233 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
11235 Strengthen `stage' portability.
11237 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
11238 * configure.in: Use it.
11239 Don't check for malloc.h and sys/times.h.
11240 * src/system.h: Include them when appropriate.
11241 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
11242 times and struct tms are available.
11244 2002-07-30 Akim Demaille <akim@epita.fr>
11246 In verbose parse error message, don't report `error' as an
11248 * tests/actions.at (Printers and Destructors): Adjust.
11249 * tests/calc.at (Calculator $1): Adjust.
11250 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
11251 error message, do not report the parser accepts the error token in
11254 2002-07-30 Akim Demaille <akim@epita.fr>
11256 Normalize conflict related messages.
11258 * src/complain.h, src/complain.c (warn, complain): New.
11259 * src/conflicts.c (conflicts_print): Use them.
11260 (conflict_report_yacc): New, extracted from...
11261 (conflicts_print): here.
11262 * tests/conflicts.at, tests/existing.at: Adjust.
11264 2002-07-30 Akim Demaille <akim@epita.fr>
11266 Report rules which are never reduced by the parser: those hidden
11269 * src/LR0.c (save_reductions): Don't make the final state too
11270 different: save its reduction (accept) instead of having a state
11271 without any action (no shift or goto, no reduce).
11272 Note: the final state is now a ``regular'' state, i.e., the
11273 parsers now contain `reduce 0' as default reduction.
11274 Nevertheless, since they decide to `accept' when yystate =
11275 final_state, they still will not reduce rule 0.
11276 * src/print.c (print_actions, print_reduction): Adjust.
11277 * src/output.c (action_row): Track reduced rules.
11278 (token_actions): Report rules never reduced.
11279 * tests/conflicts.at, tests/regression.at: Adjust.
11281 2002-07-30 Akim Demaille <akim@epita.fr>
11283 `stage' was accidently included in a previous patch.
11284 Initiate its autoconfiscation.
11286 * configure.in: Look for malloc.h and sys/times.h.
11287 * src/main.c (stage): Adjust.
11288 Report only when trace_flag.
11290 2002-07-29 Akim Demaille <akim@epita.fr>
11292 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
11294 (errs_t): symbol_t*, not symbol_number_t.
11295 (reductions_t): rule_t*, not rule_number_t.
11296 (FOR_EACH_SHIFT): New.
11297 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
11298 * src/print.c, src/print_graph.c: Adjust.
11300 2002-07-29 Akim Demaille <akim@epita.fr>
11302 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
11304 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
11305 (endtoken, accept): these.
11306 * src/reader.c (reader): Set endtoken's default tag to "$end".
11307 Set undeftoken's tag to "$undefined" instead of "$undefined.".
11308 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
11311 2002-07-29 Akim Demaille <akim@epita.fr>
11313 * src/reduce.c (reduce_grammar): When the language is empty,
11314 complain about the start symbol, not the axiom.
11316 * tests/reduce.at (Empty Language): New.
11318 2002-07-26 Akim Demaille <akim@epita.fr>
11320 * src/reader.h, src/reader.c (gram_error): ... can't get
11321 yycontrol without making too strong assumptions on the parser
11323 * src/output.c (prepare_tokens): Use the real 0th value of
11324 token_translations instead of `0'.
11325 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
11327 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
11328 for the time being: %locations ought to provide it to yyerror.
11330 2002-07-25 Akim Demaille <akim@epita.fr>
11332 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
11333 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
11334 * tests/regression.at (Web2c Actions): Adjust.
11336 2002-07-25 Akim Demaille <akim@epita.fr>
11338 Stop storing rules from 1 to nrules + 1.
11340 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
11341 * src/nullable.c, src/output.c, src/print.c, src/reader.c
11342 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
11343 Iterate from 0 to nrules.
11344 Use rule_number_as_item_number and item_number_as_rule_number.
11345 Adjust to `derive' now containing possibly 0.
11346 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
11347 Handle the `- 1' part in rule numbers from/to item numbers.
11348 * src/conflicts.c (log_resolution): Fix the message which reversed
11350 * src/output.c (action_row): Initialize default_rule to -1.
11351 (token_actions): Adjust.
11352 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
11354 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
11356 2002-07-25 Akim Demaille <akim@epita.fr>
11358 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
11359 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
11360 (b4_c_knr_arg_decl): New.
11361 * data/yacc.c: Use it to define yysymprint, yydestruct, and
11362 yyreport_parse_error.
11364 2002-07-25 Akim Demaille <akim@epita.fr>
11366 * data/yacc.c (yyreport_parse_error): New, extracted from...
11368 (yydestruct, yysymprint): Move above yyparse.
11371 2002-07-25 Akim Demaille <akim@epita.fr>
11373 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
11375 (b4_sint_type, b4_uint_type): these.
11376 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
11377 * tests/regression.at (Web2c Actions): Adjust.
11379 2002-07-25 Akim Demaille <akim@epita.fr>
11381 * src/gram.h (TIEM_NUMBER_MAX): New.
11382 (item_number_of_rule_number, rule_number_of_item_number): Rename
11384 (rule_number_as_item_number, item_number_as_rule_number): these.
11385 Adjust dependencies.
11386 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
11387 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
11388 (symbol_number_to_vector_number): New.
11389 (order): Of vector_number_t* type.
11390 (base_t, BASE_MAX, BASE_MIN): New.
11391 (froms, tos, width, pos, check): Of base_t type.
11392 (action_number_t, ACTION_MIN, ACTION_MAX): New.
11393 (actrow): Of action_number_t type.
11394 (conflrow): Of unsigned int type.
11395 (table_ninf, base_ninf): New.
11396 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
11397 (muscle_insert_int_table, muscle_insert_base_table)
11398 (muscle_insert_rule_number_table): New.
11399 (prepare_tokens): Output `toknum' as int_table.
11400 (action_row): Returns a rule_number_t.
11401 Use ACTION_MIN, not SHRT_MIN.
11402 (token_actions): yydefact is rule_number_t*.
11403 (table_ninf_remap): New.
11404 (pack_table): Use it for `base' and `table'.
11405 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
11407 (YYPACT_NINF, YYTABLE_NINF): these.
11408 (yypact, yytable): Compute their types instead of hard-coded
11410 * tests/regression.at (Web2c Actions): Adjust.
11412 2002-07-19 Akim Demaille <akim@epita.fr>
11414 * src/scan-gram.l (id): Can start with an underscore.
11416 2002-07-16 Akim Demaille <akim@epita.fr>
11418 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
11419 Adjust all former `associativity' dependencies.
11420 * src/symtab.c (symbol_new): Default associativity is `undef', not
11422 (symbol_check_alias_consistence): Adjust.
11424 2002-07-09 Akim Demaille <akim@epita.fr>
11426 * doc/bison.texinfo: Properly set the ``header'' part.
11427 Use @dircategory ``GNU programming tools'' as per Texinfo's
11431 2002-07-09 Akim Demaille <akim@epita.fr>
11433 * lib/quotearg.h: Protect against multiple inclusions.
11434 * src/location.h (location_t): Add a `file' member.
11435 (LOCATION_RESET, LOCATION_PRINT): Adjust.
11436 * src/complain.c (warn_at, complain_at, fatal_at): Drop
11437 `error_one_per_line' support.
11439 2002-07-09 Akim Demaille <akim@epita.fr>
11441 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
11442 * src/reader.c (lineno): Remove.
11443 Adjust all dependencies.
11444 (get_merge_function): Take a location and use complain_at.
11445 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
11446 * tests/regression.at (Invalid inputs, Mixing %token styles):
11449 2002-07-09 Akim Demaille <akim@epita.fr>
11451 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
11452 recovery rule, and forbid extensions when --yacc.
11453 (gram_error): Use complain_at.
11454 * src/reader.c (reader): Exit if there were parse errors.
11456 2002-07-09 Akim Demaille <akim@epita.fr>
11458 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
11459 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
11460 Reported by R Blake <blakers@mac.com>.
11462 2002-07-09 Akim Demaille <akim@epita.fr>
11464 * data/yacc.c: Output the copyright notive in the header.
11466 2002-07-03 Akim Demaille <akim@epita.fr>
11468 * src/output.c (froms, tos): Are state_number_t.
11469 (save_column): sp, sp1, and sp2 are state_number_t.
11470 (prepare): Rename `final' as `final_state_number', `nnts' as
11471 `nterms_number', `nrules' as `rules_number', `nstates' as
11472 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
11474 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
11475 * data/lalr1.cc (nsym_): Remove, unused.
11477 2002-07-03 Akim Demaille <akim@epita.fr>
11479 * src/lalr.h, src/lalr.c (goto_number_t): New.
11480 * src/lalr.c (goto_list_t): New.
11482 * src/nullable.c (rule_list_t): New.
11484 * src/types.h: Remove.
11486 2002-07-03 Akim Demaille <akim@epita.fr>
11488 * src/closure.c (print_fderives): Use rule_rhs_print.
11489 * src/derives.c (print_derives): Use rule_rhs_print.
11490 (rule_list_t): New, replaces `shorts'.
11491 (set_derives): Add comments.
11492 * tests/sets.at (Nullable, Firsts): Adjust.
11494 2002-07-03 Akim Demaille <akim@epita.fr>
11496 * src/output.c (prepare_actions): Free `tally' and `width'.
11497 (prepare_actions): Allocate and free `order'.
11498 * src/symtab.c (symbols_free): Free `symbols'.
11499 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
11500 * src/output.c (m4_invoke): Move to...
11501 * src/scan-skel.l: here.
11502 (<<EOF>>): Close yyout, and free its name.
11504 2002-07-03 Akim Demaille <akim@epita.fr>
11506 Fix some memory leaks, and fix a bug: state 0 was examined twice.
11508 * src/LR0.c (new_state): Merge into...
11509 (state_list_append): this.
11510 (new_states): Merge into...
11511 (generate_states): here.
11512 (set_states): Don't ensure a proper `errs' state member here, do it...
11513 * src/conflicts.c (conflicts_solve): here.
11514 * src/state.h, src/state.c: Comment changes.
11515 (state_t): Rename member `shifts' as `transitions'.
11516 Adjust all dependencies.
11517 (errs_new): For consistency, also take the values as argument.
11518 (errs_dup): Remove.
11519 (state_errs_set): New.
11520 (state_reductions_set, state_transitions_set): Assert that no
11521 previous value was assigned.
11523 (states_free): Use it.
11524 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
11525 temporary storage: use `errs' and `nerrs' as elsewhere.
11526 (set_conflicts): Allocate and free this `errs'.
11528 2002-07-02 Akim Demaille <akim@epita.fr>
11530 * lib/libiberty.h: New.
11531 * lib: Update the bitset implementation from upstream.
11532 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
11533 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
11534 * src/main.c: Adjust bitset stats calls.
11536 2002-07-01 Paul Eggert <eggert@twinsun.com>
11538 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
11539 char, so that negative chars don't collide with $.
11541 2002-06-30 Akim Demaille <akim@epita.fr>
11543 Have the GLR tests be `warning' checked, and fix the warnings.
11545 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
11546 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
11547 (yyremoveDeletes): `yyi' and `yyj' are size_t.
11548 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
11549 (yyaddDeferredAction): static.
11550 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
11551 (yyreportParseError): yyprefix is const.
11552 yytokenp is used only when verbose.
11553 (yy__GNUC__): Replace with __GNUC__.
11554 (yypdumpstack): yyi is size_t.
11555 (yypreference): Un-yy local variables and arguments, to avoid
11556 clashes with `yyr1'. Anyway, we are not in the user name space.
11557 (yytname_size): be an int, as is compared with ints.
11558 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
11560 * tests/cxx-gram.at: Use quotation to protect $1.
11561 Use AT_COMPILE to enable warnings hunts.
11562 Prototype yylex and yyerror.
11564 Include `string.h', not `strings.h'.
11565 Produce and prototype stmtMerge only when used.
11566 yylex takes a location.
11568 2002-06-30 Akim Demaille <akim@epita.fr>
11570 We spend a lot of time in quotearg, in particular when --verbose.
11572 * src/symtab.c (symbol_get): Store a quoted version of the key.
11573 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
11574 Adjust all callers.
11576 2002-06-30 Akim Demaille <akim@epita.fr>
11578 * src/state.h (reductions_t): Rename member `nreds' as num.
11579 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
11580 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
11582 2002-06-30 Akim Demaille <akim@epita.fr>
11584 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
11585 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
11586 (shifts_to): Rename as...
11587 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
11588 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
11589 (TRANSITION_IS_DISABLED, transitions_to): these.
11591 2002-06-30 Akim Demaille <akim@epita.fr>
11593 * src/print.c (print_shifts, print_gotos): Merge into...
11594 (print_transitions): this.
11595 (print_transitions, print_errs, print_reductions): Align the
11596 lookaheads columns.
11597 (print_core, print_transitions, print_errs, print_state,
11598 print_grammar): Output empty lines separator before, not after.
11599 (state_default_rule_compute): Rename as...
11600 (state_default_rule): this.
11601 * tests/conflicts.at (Defaulted Conflicted Reduction),
11602 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
11603 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
11605 2002-06-30 Akim Demaille <akim@epita.fr>
11607 Display items as we display rules.
11609 * src/gram.h, src/gram.c (rule_lhs_print): New.
11610 * src/gram.c (grammar_rules_partial_print): Use it.
11611 * src/print.c (print_core): Likewise.
11612 * tests/conflicts.at (Defaulted Conflicted Reduction),
11613 (Unresolved SR Conflicts): Adjust.
11614 (Unresolved SR Conflicts): Adjust and rename as...
11615 (Resolved SR Conflicts): this, as was meant.
11616 * tests/regression.at (Web2c Report): Adjust.
11618 2002-06-30 Akim Demaille <akim@epita.fr>
11620 * src/print.c (state_default_rule_compute): New, extracted from...
11621 (print_reductions): here.
11622 Pessimize, but clarify the code.
11623 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
11625 2002-06-30 Akim Demaille <akim@epita.fr>
11627 * src/output.c (action_row): Let default_rule be always a rule
11630 2002-06-30 Akim Demaille <akim@epita.fr>
11632 * src/closure.c (print_firsts, print_fderives, closure):
11633 Use BITSET_EXECUTE.
11634 * src/lalr.c (lookaheads_print): Likewise.
11635 * src/state.c (state_rule_lookaheads_print): Likewise.
11636 * src/print_graph.c (print_core): Likewise.
11637 * src/print.c (print_reductions): Likewise.
11638 * src/output.c (action_row): Likewise.
11639 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
11641 2002-06-30 Akim Demaille <akim@epita.fr>
11643 * src/print_graph.c: Use report_flag.
11645 2002-06-30 Akim Demaille <akim@epita.fr>
11647 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
11649 * src/relation.h, src/relation.c (traverse, relation_digraph)
11650 (relation_print, relation_transpose): New.
11652 2002-06-30 Akim Demaille <akim@epita.fr>
11654 * src/state.h, src/state.c (shifts_to): New.
11655 * src/lalr.c (build_relations): Use it.
11657 2002-06-30 Akim Demaille <akim@epita.fr>
11659 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
11660 (item_number_of_rule_number, rule_number_of_item_number): New.
11661 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
11662 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
11663 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
11664 Propagate their use.
11665 Much remains to be done, in particular wrt `shorts' from types.h.
11667 2002-06-30 Akim Demaille <akim@epita.fr>
11669 * src/symtab.c (symbol_new): Initialize the `printer' member.
11671 2002-06-30 Akim Demaille <akim@epita.fr>
11673 * src/LR0.c (save_reductions): Remove, replaced by...
11674 * src/state.h, src/state.c (state_reductions_set): New.
11675 (reductions, errs): Rename as...
11676 (reductions_t, errs_t): these.
11677 Adjust all dependencies.
11679 2002-06-30 Akim Demaille <akim@epita.fr>
11681 * src/LR0.c (state_list_t, state_list_append): New.
11682 (first_state, last_state): Now symbol_list_t.
11683 (this_state): Remove.
11684 (new_itemsets, append_states, save_reductions): Take a state_t as
11686 (set_states, generate_states): Adjust.
11687 (save_shifts): Remove, replaced by...
11688 * src/state.h, src/state.c (state_shifts_set): New.
11689 (shifts): Rename as...
11691 Adjust all dependencies.
11692 * src/state.h (state_t): Remove the `next' member.
11694 2002-06-30 Akim Demaille <akim@epita.fr>
11696 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
11699 2002-06-30 Akim Demaille <akim@epita.fr>
11701 Use hash.h for the state hash table.
11703 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
11704 (allocate_storage): Use state_hash_new.
11705 (free_storage): Use state_hash_free.
11706 (new_state, get_state): Adjust.
11707 * src/lalr.h, src/lalr.c (states): Move to...
11708 * src/states.h (state_t): Remove the `link' member, no longer
11710 * src/states.h, src/states.c: here.
11711 (state_hash_new, state_hash_free, state_hash_lookup)
11712 (state_hash_insert, states_free): New.
11713 * src/states.c (state_table, state_compare, state_hash): New.
11714 * src/output.c (output_actions): Do not free states now, since we
11715 still need to know the final_state number in `prepare', called
11716 afterwards. Do it...
11717 * src/main.c (main): here: call states_free after `output'.
11719 2002-06-30 Akim Demaille <akim@epita.fr>
11721 * src/state.h, src/state.c (state_new): New, extracted from...
11722 * src/LR0.c (new_state): here.
11723 * src/state.h (STATE_ALLOC): Move to...
11724 * src/state.c: here.
11725 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
11726 * src/state.h, src/state.c: here.
11728 2002-06-30 Akim Demaille <akim@epita.fr>
11730 * src/reader.c (gensym): Rename as...
11731 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
11732 (getsym): Rename as...
11733 (symbol_get): this.
11735 2002-06-30 Akim Demaille <akim@epita.fr>
11737 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
11738 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
11739 * src/output.c, src/print.c, src/print_graph.c: Propagate.
11740 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
11742 2002-06-30 Akim Demaille <akim@epita.fr>
11744 Make the test suite pass with warnings checked.
11746 * tests/actions.at (Printers and Destructors): Improve.
11747 Avoid unsigned vs. signed issues.
11748 * tests/calc.at: Don't exercise the scanner here, do it...
11749 * tests/input.at (Torturing the Scanner): here.
11751 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11753 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
11754 reorganize first lines parallel to yacc.c.
11756 2002-06-28 Akim Demaille <akim@epita.fr>
11758 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
11759 (b4_token_enum, b4_token_defines): New, factored from...
11760 * data/lalr1.cc, data/yacc.c, glr.c: here.
11762 2002-06-28 Akim Demaille <akim@epita.fr>
11764 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
11766 * src/output.c (merger_output): static.
11768 2002-06-28 Akim Demaille <akim@epita.fr>
11770 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
11771 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
11773 * src/output.c (save_row): Initialize all the variables to pacify GCC.
11775 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11777 Accumulated changelog for new GLR parsing features.
11779 * src/conflicts.c (count_total_conflicts): Change name to
11780 conflicts_total_count.
11781 * src/conflicts.h: Ditto.
11782 * src/output.c (token_actions): Use the new name.
11783 (output_conflicts): Change conflp => conflict_list_heads, and
11784 confl => conflict_list for better readability.
11785 * data/glr.c: Use the new names.
11786 * NEWS: Add self to GLR announcement.
11788 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
11790 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
11793 * data/bison.glr: Change name to glr.c
11794 * data/glr.c: Renamed from bison.glr.
11795 * data/Makefile.am: Add glr.c
11799 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
11800 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
11802 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11804 * data/bison.glr: Be sure to restore the
11805 current #line when returning to the skeleton contents after having
11806 exposed the input file's #line.
11808 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11810 * data/bison.glr: Bring up to date with changes to bison.simple.
11812 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11814 * data/bison.glr: Correct definitions that use b4_prefix.
11815 Various reformatting.
11816 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
11817 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
11818 yytokenp argument; now part of stack.
11819 (yychar): Define to behave as documented.
11820 (yyclearin): Ditto.
11822 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11824 * src/reader.h: Add declaration for free_merger_functions.
11826 * src/reader.c (merge_functions): New variable.
11827 (get_merge_function): New function.
11828 (free_merger_functions): New function.
11829 (readgram): Check for %prec that is not followed by a symbol.
11830 Handle %dprec and %merge declarations.
11831 (packgram): Initialize dprec and merger fields in rules array.
11833 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
11834 conflict_list_cnt, conflict_list_free): New variables.
11835 (table_grow): Also grow conflict_table.
11836 (prepare_rules): Output dprec and merger tables.
11837 (conflict_row): New function.
11838 (action_row): Output conflict lists for GLR parser. Don't use
11839 default reduction in conflicted states for GLR parser so that there
11840 are spaces for the conflict lists.
11841 (save_row): Also save conflict information.
11842 (token_actions): Allocate conflict list.
11843 (merger_output): New function.
11844 (pack_vector): Pack conflict table, too.
11845 (output_conflicts): New function to output yyconflp and yyconfl.
11846 (output_check): Allocate conflict_tos.
11847 (output_actions): Output conflict tables, also.
11848 (output_skeleton): Output b4_mergers definition.
11849 (prepare): Output b4_max_rhs_length definition.
11850 Use 'bison.glr' as default skeleton for GLR parsers.
11852 * src/gram.c (glr_parser): New flag.
11853 (grammar_free): Call free_merger_functions.
11855 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
11856 all pairs of conflicting reductions, rather than just all tokens
11857 causing conflicts. Needed to size conflict tables.
11858 (conflicts_output): Modify call to count_rr_conflicts for new
11860 (conflicts_print): Ditto.
11861 (count_total_conflicts): New function.
11863 * src/reader.h (merger_list): New type.
11864 (merge_functions): New variable.
11866 * src/lex.h (tok_dprec, tok_merge): New token types.
11868 * src/gram.h (rule_s): Add dprec and merger fields.
11869 (glr_parser): New flag.
11871 * src/conflicts.h (count_total_conflicts): New function.
11873 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
11875 * doc/bison.texinfo (Generalized LR Parsing): New section.
11876 (GLR Parsers): New section.
11877 (Language and Grammar): Mention GLR parsing.
11878 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
11879 Correct typo ("tge" -> "the").
11881 * data/bison.glr: New skeleton for GLR parsing.
11883 * tests/cxx-gram.at: New tests for GLR parsing.
11885 * tests/testsuite.at: Include cxx-gram.at.
11887 * tests/Makefile.am: Add cxx-gram.at.
11889 * src/parse-gram.y:
11891 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
11893 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
11895 2002-06-27 Akim Demaille <akim@epita.fr>
11897 * src/options.h, src/options.c: Remove.
11898 * src/getargs.c (short_options, long_options): New.
11900 2002-06-27 Akim Demaille <akim@epita.fr>
11902 * data/bison.simple, data/bison.c++: Rename as...
11903 * data/yacc.c, data/lalr1.cc: these.
11904 * doc/bison.texinfo (Environment Variables): Remove.
11906 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
11908 * src/getargs.c (report_argmatch): Initialize strtok().
11910 2002-06-20 Akim Demaille <akim@epita.fr>
11912 * data/bison.simple (b4_symbol_actions): New, replaces...
11913 (b4_symbol_destructor, b4_symbol_printer): these.
11914 (yysymprint): Be sure to call YYPRINT only for tokens, and using
11915 user token numbers.
11917 2002-06-20 Akim Demaille <akim@epita.fr>
11919 * data/bison.simple (yydestructor): Rename as...
11920 (yydestruct): this.
11922 2002-06-20 Akim Demaille <akim@epita.fr>
11924 * src/symtab.h, src/symtab.c (symbol_type_set)
11925 (symbol_destructor_set, symbol_precedence_set): The location is
11927 Adjust all callers.
11929 2002-06-20 Akim Demaille <akim@epita.fr>
11931 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
11933 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
11935 * src/symtab.h, src/symtab.c (symbol_class_set)
11936 (symbol_user_token_number_set): Likewise.
11937 Adjust all callers.
11938 Promote complain_at.
11939 * tests/input.at (Type Clashes): Adjust.
11941 2002-06-20 Akim Demaille <akim@epita.fr>
11943 * data/bison.simple (YYLEX): Fix the declaration when
11946 2002-06-20 Akim Demaille <akim@epita.fr>
11948 * data/bison.simple (yysymprint): Don't print the token number,
11950 * tests/actions.at (Destructors): Rename as...
11951 (Printers and Destructors): this.
11952 Also exercise %printer.
11954 2002-06-20 Akim Demaille <akim@epita.fr>
11956 * data/bison.simple (YYDSYMPRINT): New.
11957 Use it to remove many of the #if YYDEBUG/if (yydebug).
11959 2002-06-20 Akim Demaille <akim@epita.fr>
11961 * src/symtab.h, src/symtab.c (symbol_t): printer and
11962 printer_location are new members.
11963 (symbol_printer_set): New.
11964 * src/parse-gram.y (PERCENT_PRINTER): New token.
11965 Handle its associated rule.
11966 * src/scan-gram.l: Adjust.
11967 (handle_destructor_at, handle_destructor_dollar): Rename as...
11968 (handle_symbol_code_at, handle_symbol_code_dollar): these.
11969 * src/output.c (symbol_printers_output): New.
11970 (output_skeleton): Call it.
11971 * data/bison.simple (yysymprint): New. Cannot be named yyprint
11972 since there are already many grammar files with a user `yyprint'.
11973 Replace the calls to YYPRINT to calls to yysymprint.
11974 * tests/calc.at: Adjust.
11975 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
11976 taking advantage of parser very internal details (stack size!).
11978 2002-06-20 Akim Demaille <akim@epita.fr>
11980 * src/scan-gram.l: Complete the scanner with the missing patterns
11982 Use `quote' and `symbol_tag_get' where appropriate.
11984 2002-06-19 Akim Demaille <akim@epita.fr>
11986 * tests/actions.at (Destructors): Augment to test locations.
11987 * data/bison.simple (yydestructor): Pass it the current location
11988 if locations are enabled.
11989 Prototype only when __STDC__ or C++.
11990 Change the argument names to move into the yy name space: there is
11993 2002-06-19 Akim Demaille <akim@epita.fr>
11995 * data/bison.simple (b4_pure_if): New.
11996 Use it instead of #ifdef YYPURE.
11998 2002-06-19 Akim Demaille <akim@epita.fr>
12000 * data/bison.simple (b4_location_if): New.
12001 Use it instead of #ifdef YYLSP_NEEDED.
12003 2002-06-19 Akim Demaille <akim@epita.fr>
12005 Prepare @$ in %destructor, but currently don't bind it in the
12006 skeleton, as %location use is not cleaned up yet.
12008 * src/scan-gram.l (handle_dollar, handle_destructor_at)
12009 (handle_action_at): New.
12010 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
12011 a braced_code_t and a location as additional arguments.
12012 (handle_destructor_dollar): Instead of requiring `b4_eval', just
12013 unquote one when outputting `b4_dollar_dollar'.
12015 * data/bison.simple (b4_eval): Remove.
12016 (b4_symbol_destructor): Adjust.
12017 * tests/input.at (Invalid @n): Adjust.
12019 2002-06-19 Zack Weinberg <zack@codesourcery.com>
12021 * doc/bison.texinfo: Document ability to have multiple
12024 2002-06-18 Akim Demaille <akim@epita.fr>
12026 * src/files.c (compute_base_names): When computing the output file
12027 names from the input file name, strip the directory part.
12029 2002-06-18 Akim Demaille <akim@epita.fr>
12031 * data/bison.simple.new: Comment changes.
12032 Reported by Andreas Schwab.
12034 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
12036 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
12037 there are no `label `yyoverflowlab' defined but not used' warnings
12038 when yyoverflow is defined.
12040 2002-06-18 Akim Demaille <akim@epita.fr>
12042 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
12044 (symbol_destructor_set): Adjust.
12045 * src/output.c (symbol_destructors_output): Output the destructor
12047 Output the symbol name.
12048 * data/bison.simple (b4_symbol_destructor): Adjust.
12050 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
12051 and Akim Demaille <akim@epita.fr>
12053 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
12054 what's left on the stack when the error recovery hits EOF.
12055 * tests/actions.at (Destructors): Complete to exercise this case.
12057 2002-06-17 Akim Demaille <akim@epita.fr>
12059 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
12060 arguments is really empty, not only equal to `[]'.
12061 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
12063 (symbol_destructor_set): New.
12064 * src/output.c (symbol_destructors_output): New.
12065 * src/reader.h (brace_code_t, current_braced_code): New.
12066 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
12067 (handle_dollar): Rename as...
12068 (handle_action_dollar): this.
12069 (handle_destructor_dollar): New.
12070 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
12071 (grammar_declaration): Use it.
12072 * data/bison.simple (yystos): Is always defined.
12073 (yydestructor): New.
12074 * tests/actions.at (Destructors): New.
12075 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
12077 2002-06-17 Akim Demaille <akim@epita.fr>
12079 * src/symlist.h, src/symlist.c (symbol_list_length): New.
12080 * src/scan-gram.l (handle_dollar, handle_at): Compute the
12081 rule_length only when needed.
12082 * src/output.c (actions_output, token_definitions_output): Output
12084 * src/symtab.c: Don't access directly to the symbol tag, use
12086 * src/parse-gram.y: Use symbol_list_free.
12088 2002-06-17 Akim Demaille <akim@epita.fr>
12090 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
12091 (symbol_list_prepend, get_type_name): Move to...
12092 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
12093 (symbol_list_prepend, symbol_list_n_type_name_get): here.
12094 Adjust all callers.
12095 (symbol_list_free): New.
12096 * src/scan-gram.l (handle_dollar): Takes a location.
12097 * tests/input.at (Invalid $n): Adjust.
12099 2002-06-17 Akim Demaille <akim@epita.fr>
12101 * src/reader.h, src/reader.c (symbol_list_new): Export it.
12102 (symbol_list_prepend): New.
12103 * src/parse-gram.y (%union): `list' is a new member.
12104 (symbols.1): New, replaces...
12105 (terms_to_prec.1, nterms_to_type.1): these.
12106 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
12107 Take a location as additional argument.
12108 Adjust all callers.
12110 2002-06-15 Akim Demaille <akim@epita.fr>
12112 * src/parse-gram.y: Move %token in the declaration section so that
12113 we don't depend upon CVS Bison.
12115 2002-06-15 Akim Demaille <akim@epita.fr>
12117 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
12118 * src/print.c (print_core): Use it.
12120 2002-06-15 Akim Demaille <akim@epita.fr>
12122 * src/conflicts.c (log_resolution): Accept the rule involved in
12123 the sr conflicts instead of the lookahead number that points to
12125 (flush_reduce): Accept the current lookahead vector as argument,
12126 instead of the index in LA.
12127 (resolve_sr_conflict): Accept the current number of lookahead
12128 bitset to consider for the STATE, instead of the index in LA.
12129 (set_conflicts): Adjust.
12130 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
12132 2002-06-15 Akim Demaille <akim@epita.fr>
12134 * src/state.h (state_t): Replace the `lookaheadsp' member, a
12135 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
12136 Adjust all dependencies.
12137 * src/lalr.c (initialize_lookaheads): Split into...
12138 (states_lookaheads_count, states_lookaheads_initialize): these.
12141 2002-06-15 Akim Demaille <akim@epita.fr>
12143 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
12145 (grammar_rules_print): here.
12146 * src/reduce.c (reduce_output): Use it.
12147 * tests/reduce.at (Useless Rules, Reduced Automaton)
12148 (Underivable Rules): Adjust.
12150 2002-06-15 Akim Demaille <akim@epita.fr>
12152 Copy BYacc's nice way to report the grammar.
12154 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
12156 Don't print the rules' location, it is confusing and useless.
12157 (rule_print): Use grammar_rhs_print.
12158 * src/print.c (print_grammar): Use grammar_rules_print.
12160 2002-06-15 Akim Demaille <akim@epita.fr>
12162 Complete and rationalize `useless thing' warnings.
12164 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
12165 (symbol_tag_print): New.
12166 Use them everywhere in place of accessing directly the tag member.
12167 * src/gram.h, src/gram.c (rule_print): New.
12168 Use it where a rule used to be printed `by hand'.
12169 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
12170 (reduce_grammar_tables): Report the useless rules.
12171 (reduce_print): Useless things are a warning, not an error.
12173 * tests/reduce.at (Useless Nonterminals, Useless Rules):
12174 (Reduced Automaton, Underivable Rules): Adjust.
12175 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
12176 * tests/conflicts.at (Unresolved SR Conflicts)
12177 (Solved SR Conflicts): Adjust.
12179 2002-06-15 Akim Demaille <akim@epita.fr>
12181 Let symbols have a location.
12183 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
12185 Adjust all callers.
12186 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
12187 Use location_t, not int.
12188 * src/symtab.c (symbol_check_defined): Take advantage of the
12190 * tests/regression.at (Invalid inputs): Adjust.
12192 2002-06-15 Akim Demaille <akim@epita.fr>
12194 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
12195 (input): Don't try to initialize yylloc here, do it in the
12197 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
12198 * src/gram.h (rule_t): Change line and action_line into location
12199 and action_location, of location_t type.
12200 Adjust all dependencies.
12201 * src/location.h, src/location.c (empty_location): New.
12202 * src/reader.h, src/reader.c (grammar_start_symbol_set)
12203 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
12204 (grammar_current_rule_symbol_append)
12205 (grammar_current_rule_action_append): Expect a location as argument.
12206 * src/reader.c (grammar_midrule_action): Adjust to attach an
12207 action's location as dummy symbol location.
12208 * src/symtab.h, src/symtab.c (startsymbol_location): New.
12209 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
12212 2002-06-14 Akim Demaille <akim@epita.fr>
12214 Grammar declarations may be found in the grammar section.
12216 * src/parse-gram.y (rules_or_grammar_declaration): New.
12217 (declarations): Each declaration may end with a semicolon, not
12219 (grammar_declaration): `"%union"'.
12220 (grammar): Branch to rules_or_grammar_declaration.
12222 2002-06-14 Akim Demaille <akim@epita.fr>
12224 * src/main.c (main): Invoke scanner_free.
12226 2002-06-14 Akim Demaille <akim@epita.fr>
12228 * src/output.c (m4_invoke): Extracted from...
12229 (output_skeleton): here.
12232 2002-06-14 Akim Demaille <akim@epita.fr>
12234 * src/parse-gram.y (directives, directive, gram)
12235 (grammar_directives, precedence_directives, precedence_directive):
12237 (declarations, declaration, grammar, grammar_declaration)
12238 (precedence_declaration, precedence_declarator): these.
12239 (symbol_declaration): New.
12241 2002-06-14 Akim Demaille <akim@epita.fr>
12243 * src/files.c (action_obstack): Remove, unused.
12244 (output_obstack): Remove it, and all its dependencies, as it is no
12246 * src/reader.c (epilogue_set): Build the epilogue in the
12248 * src/output.h, src/output.c (muscle_obstack): Move to...
12249 * src/muscle_tab.h, src/muscle_tab.h: here.
12250 (muscle_init): Initialize muscle_obstack.
12251 (muscle_free): New.
12252 * src/main.c (main): Call it.
12254 2002-06-14 Akim Demaille <akim@epita.fr>
12256 * src/location.h: New, extracted from...
12257 * src/reader.h: here.
12258 * src/Makefile.am (noinst_HEADERS): Merge into
12259 (bison_SOURCES): this.
12261 * src/parse-gram.y: Use location_t instead of Bison's.
12262 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
12263 Use location_t instead of ints.
12265 2002-06-14 Akim Demaille <akim@epita.fr>
12267 * data/bison.simple, data/bison.c++: Be sure to restore the
12268 current #line when returning to the skeleton contents after having
12269 exposed the input file's #line.
12271 2002-06-12 Akim Demaille <akim@epita.fr>
12273 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
12275 * tests/actions.at (Exotic Dollars): New.
12277 2002-06-12 Akim Demaille <akim@epita.fr>
12279 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
12281 * tests/input.at (Torturing the Scanner): New.
12283 2002-06-11 Akim Demaille <akim@epita.fr>
12285 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
12286 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
12287 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
12288 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
12289 * src/reader.c (reader): Use it.
12291 2002-06-11 Akim Demaille <akim@epita.fr>
12293 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
12294 Adjust all callers.
12295 (scanner_last_string_free): New.
12297 2002-06-11 Akim Demaille <akim@epita.fr>
12299 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
12300 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
12301 (last_string, YY_OBS_FREE): New.
12302 Use them when returning an ID.
12304 2002-06-11 Akim Demaille <akim@epita.fr>
12306 Have Bison grammars parsed by a Bison grammar.
12308 * src/reader.c, src/reader.h (prologue_augment): New.
12309 * src/reader.c (copy_definition): Remove.
12311 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
12312 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
12313 (grammar_current_rule_prec_set, grammar_current_rule_check)
12314 (grammar_current_rule_symbol_append)
12315 (grammar_current_rule_action_append): Export.
12316 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
12317 (symbol_list_action_append): Remove.
12318 Hook the routines from reader.
12319 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
12320 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
12322 * src/reader.c (read_declarations): Remove, unused.
12324 * src/parse-gram.y: Handle the epilogue.
12325 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
12326 (grammar_start_symbol_set): this.
12327 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
12328 * src/reader.c (readgram): Remove, unused.
12329 (reader): Adjust to insert eoftoken and axiom where appropriate.
12331 * src/reader.c (copy_dollar): Replace with...
12332 * src/scan-gram.h (handle_dollar): this.
12333 * src/parse-gram.y: Remove `%thong'.
12335 * src/reader.c (copy_at): Replace with...
12336 * src/scan-gram.h (handle_at): this.
12338 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
12341 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
12344 * src/reader.h, src/reader.c (grammar_rule_end): New.
12346 * src/parse.y (current_type, current_class): New.
12347 Implement `%nterm', `%token' support.
12348 Merge `%term' into `%token'.
12349 (string_as_id): New.
12350 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
12353 * src/parse-gram.y: Be sure to handle properly the beginning of
12356 * src/parse-gram.y: Handle %type.
12357 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
12359 * src/parse-gram.y: More directives support.
12360 * src/options.c: No longer handle source directives.
12362 * src/parse-gram.y: Fix %output.
12364 * src/parse-gram.y: Handle %union.
12365 Use the prologue locations.
12366 * src/reader.c (parse_union_decl): Remove.
12368 * src/reader.h, src/reader.c (epilogue_set): New.
12369 * src/parse-gram.y: Use it.
12371 * data/bison.simple, data/bison.c++: b4_stype is now either not
12372 defined, then default to int, or to the contents of %union,
12373 without `union' itself.
12375 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
12377 * src/output.c (actions_output): Don't output braces, as they are
12378 already handled by the scanner.
12380 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
12381 characters to themselves.
12383 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
12384 that the epilogue has a proper #line.
12386 * src/parse-gram.y: Handle precedence/associativity.
12388 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
12390 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
12391 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
12392 at all to define terminals that cannot be emitted.
12394 * src/scan-gram.l: Escape M4 characters.
12396 * src/scan-gram.l: Working properly with escapes in user
12397 strings/characters.
12399 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
12400 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
12402 Use more modest sizes, as for the time being the parser does not
12403 release memory, and therefore the process swallows a huge amount
12406 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
12407 stricter %token grammar.
12409 * src/symtab.h (associativity): Add `undef_assoc'.
12410 (symbol_precedence_set): Do nothing when passed an undef_assoc.
12411 * src/symtab.c (symbol_check_alias_consistence): Adjust.
12413 * tests/regression.at (Invalid %directive): Remove, as it is now
12415 (Invalid inputs): Adjust to the new error messages.
12416 (Token definitions): The new grammar doesn't allow too many
12419 * src/lex.h, src/lex.c: Remove.
12420 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
12421 (copy_character, copy_string2, copy_string, copy_identifier)
12422 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
12423 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
12424 (parse_action): Remove.
12425 * po/POTFILES.in: Adjust.
12427 2002-06-11 Akim Demaille <akim@epita.fr>
12429 * src/reader.c (parse_action): Don't store directly into the
12430 rule's action member: return the action as a string.
12431 Don't require `rule_length' as an argument: compute it.
12432 (grammar_current_rule_symbol_append)
12433 (grammar_current_rule_action_append): New, eved out from
12435 Remove `action_flag', `rulelength', unused now.
12437 2002-06-11 Akim Demaille <akim@epita.fr>
12439 * src/reader.c (grammar_current_rule_prec_set).
12440 (grammar_current_rule_check): New, eved out from...
12442 Remove `xaction', `first_rhs': useless.
12443 * tests/input.at (Type clashes): New.
12444 * tests/existing.at (GNU Cim Grammar): Adjust.
12446 2002-06-11 Akim Demaille <akim@epita.fr>
12448 * src/reader.c (grammar_midrule_action): New, Eved out from
12451 2002-06-11 Akim Demaille <akim@epita.fr>
12453 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
12455 (readgram): Use them as replacement of inlined code, crule and
12458 2002-06-11 Akim Demaille <akim@epita.fr>
12460 * src/reader.c (grammar_end, grammar_symbol_append): New.
12461 (readgram): Use them.
12462 Make the use of `p' as local as possible.
12464 2002-06-10 Akim Demaille <akim@epita.fr>
12466 GCJ's parser requires the tokens to be defined before the prologue.
12468 * data/bison.simple: Output the token definition before the user's
12470 * tests/regression.at (Braces parsing, Duplicate string)
12471 (Mixing %token styles): Check the output from bison.
12472 (Early token definitions): New.
12474 2002-06-10 Akim Demaille <akim@epita.fr>
12476 * src/symtab.c (symbol_user_token_number_set): Don't complain when
12477 assigning twice the same user number to a token, so that we can
12479 * src/lex.c (lex): here.
12480 Also use `symbol_class_set' instead of hand written code.
12481 * src/reader.c (parse_assoc_decl): Likewise.
12483 2002-06-10 Akim Demaille <akim@epita.fr>
12485 * src/symtab.c, src/symtab.c (symbol_class_set)
12486 (symbol_user_token_number_set): New.
12487 * src/reader.c (parse_token_decl): Use them.
12488 Use a switch instead of ifs.
12489 Use a single argument.
12491 2002-06-10 Akim Demaille <akim@epita.fr>
12493 Remove `%thong' support as it is undocumented, unused, duplicates
12494 `%token's job, and creates useless e-mail traffic with people who
12495 want to know what it is, why it is undocumented, unused, and
12496 duplicates `%token's job.
12498 * src/reader.c (parse_thong_decl): Remove.
12499 * src/options.c (option_table): Remove "thong".
12500 * src/lex.h (tok_thong): Remove.
12502 2002-06-10 Akim Demaille <akim@epita.fr>
12504 * src/symtab.c, src/symtab.c (symbol_type_set)
12505 (symbol_precedence_set): New.
12506 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
12507 (value_components_used): Remove, unused.
12509 2002-06-09 Akim Demaille <akim@epita.fr>
12511 Move symbols handling code out of the reader.
12513 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
12514 (axiom): Move to...
12515 * src/symtab.h, src/symtab.c: here.
12517 * src/gram.c (start_symbol): Remove: use startsymbol->number.
12518 * src/reader.c (startval): Rename as...
12519 * src/symtab.h, src/symtab.c (startsymbol): this.
12520 * src/reader.c: Adjust.
12522 * src/reader.c (symbol_check_defined, symbol_make_alias)
12523 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
12524 (token_translations_init)
12526 * src/symtab.c: here.
12527 * src/reader.c (packsymbols): Move to...
12528 * src/symtab.h, src/symtab.c (symbols_pack): here.
12529 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
12532 2002-06-03 Akim Demaille <akim@epita.fr>
12534 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
12537 2002-06-03 Akim Demaille <akim@epita.fr>
12539 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
12540 structs with non literals.
12541 * src/scan-skel.l: never-interactive.
12542 * src/conflicts.c (enum conflict_resolution_e): No trailing
12544 * src/getargs.c (usage): Split long literal strings.
12545 Reported by Hans Aberg.
12547 2002-05-28 Akim Demaille <akim@epita.fr>
12549 * data/bison.c++: Use C++ ostreams.
12550 (cdebug_): New member.
12552 2002-05-28 Akim Demaille <akim@epita.fr>
12554 * src/output.c (output_skeleton): Be sure to allocate enough room
12555 for `/' _and_ for `\0' in full_skeleton.
12557 2002-05-28 Akim Demaille <akim@epita.fr>
12559 * data/bison.c++: Catch up with bison.simple:
12560 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12561 and Paul Eggert <eggert@twinsun.com>: `error' handing.
12562 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
12563 and popping traces.
12565 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12567 * src/output.c (output_skeleton): Put an explicit path in front of
12568 the skeleton file name, rather than relying on the -I directory,
12569 to partially alleviate effects of having a skeleton file lying around
12570 in the current directory.
12572 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12574 * src/conflicts.c (log_resolution): Correct typo:
12575 obstack_printf should be obstack_fgrow1.
12577 2002-05-26 Akim Demaille <akim@epita.fr>
12579 * src/state.h (state_t): `solved_conflicts' is a new member.
12580 * src/LR0.c (new_state): Set it to 0.
12581 * src/conflicts.h, src/conflicts.c (print_conflicts)
12582 (free_conflicts, solve_conflicts): Rename as...
12583 (conflicts_print, conflicts_free, conflicts_solve): these.
12585 * src/conflicts.c (enum conflict_resolution_e)
12586 (solved_conflicts_obstack): New, used by...
12587 (log_resolution): this.
12588 Adjust to attach the conflict resolution to each state.
12589 Complete the description with the precedence/associativity
12591 (resolve_sr_conflict): Adjust.
12592 * src/print.c (print_state): Output its solved_conflicts.
12593 * tests/conflicts.at (Unresolved SR Conflicts)
12594 (Solved SR Conflicts): Exercise --report=all.
12596 2002-05-26 Akim Demaille <akim@epita.fr>
12598 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
12599 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
12600 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
12601 (token_number_t, item_number_as_token_number)
12602 (token_number_as_item_number, muscle_insert_token_number_table):
12604 (symbol_number_t, item_number_as_symbol_number)
12605 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
12606 these, since it is more appropriate.
12608 2002-05-26 Akim Demaille <akim@epita.fr>
12610 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
12612 * data/bison.simple (yystos) [YYDEBUG]: New.
12613 (yyparse) [YYDEBUG]: Display the symbols which are popped during
12615 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
12617 2002-05-25 Akim Demaille <akim@epita.fr>
12619 * doc/bison.texinfo (Debugging): Split into...
12620 (Tracing): this new section, its former contents, and...
12621 (Understanding): this new section.
12622 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
12624 (report_flag): this.
12625 Adjust all dependencies.
12626 (report_args, report_types, report_argmatch): New.
12627 (usage, getargs): Report/support -r, --report.
12629 (struct option_table_struct): Rename as..,
12630 (struct option_table_s): this.
12631 Rename the `set_flag' member to `flag' to match with getopt_long's
12633 * src/options.c (option_table): Split verbose into an entry for
12634 %verbose, and another for --verbose.
12635 Support --report/-r, so remove -r from the obsolete --raw.
12636 * src/print.c: Attach full item sets and lookaheads reports to
12637 report_flag instead of trace_flag.
12638 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
12640 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12641 and Paul Eggert <eggert@twinsun.com>
12643 * data/bison.simple (yyparse): Correct error handling to conform to
12644 POSIX and yacc. Specifically, after syntax error is discovered,
12645 do not reduce further before shifting the error token.
12646 Clean up the code a bit by removing the labels yyerrdefault,
12647 yyerrhandle, yyerrpop.
12648 * NEWS: Document the above.
12650 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12652 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
12653 type; it isn't always big enough, since it doesn't necessarily
12654 include non-terminals.
12655 (yytranslate): Expand definition of yy_token_number_type, so that
12656 the latter can be removed.
12657 (yy_token_number_type): Remove, only one use.
12658 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
12659 don't use TokenNumberType as element type.
12661 * tests/regression.at: Modify expected output to agree with change
12662 to yyr1 and yytranslate.
12664 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
12666 * src/reader.c (parse_action): Use copy_character instead of
12669 2002-05-13 Akim Demaille <akim@epita.fr>
12671 * tests/regression.at (Token definitions): Prototype yylex and
12674 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12676 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
12677 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
12679 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
12681 2002-05-07 Akim Demaille <akim@epita.fr>
12683 * tests/synclines.at: Be sure to prototype yylex and yyerror to
12684 avoid GCC warnings.
12686 2002-05-07 Akim Demaille <akim@epita.fr>
12690 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
12691 over the RHS of each rule.
12692 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
12693 * src/state.h (state_t): Member `nitems' is unsigned short.
12694 * src/LR0.c (get_state): Adjust.
12695 * src/reader.c (packgram): Likewise.
12696 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
12698 (muscle_insert_int_table): Remove, unused.
12699 (prepare_rules): Remove `max'.
12701 2002-05-06 Akim Demaille <akim@epita.fr>
12703 * src/closure.c (print_firsts): Display of the symbol tags.
12704 (bitmatrix_print): Move to...
12705 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
12707 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
12709 2002-05-06 Akim Demaille <akim@epita.fr>
12711 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
12714 2002-05-06 Akim Demaille <akim@epita.fr>
12716 * src/LR0.c (new_state, get_state): Instead of using the global
12717 `kernel_size' and `kernel_base', have two new arguments:
12718 `core_size' and `core'.
12721 2002-05-06 Akim Demaille <akim@epita.fr>
12723 * src/reader.c (packgram): No longer end `ritem' with a 0
12724 sentinel: it is not used.
12726 2002-05-05 Akim Demaille <akim@epita.fr>
12728 New experimental feature: display the lookaheads in the report and
12731 * src/print (print_core): When --trace-flag, display the rules
12733 * src/print_graph.c (print_core): Likewise.
12734 Swap the arguments.
12737 2002-05-05 Akim Demaille <akim@epita.fr>
12739 * tests/torture.at (Many lookaheads): New test.
12741 2002-05-05 Akim Demaille <akim@epita.fr>
12743 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
12744 (GENERATE_MUSCLE_INSERT_TABLE): this.
12745 (output_int_table, output_unsigned_int_table, output_short_table)
12746 (output_token_number_table, output_item_number_table): Replace with...
12747 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
12748 (muscle_insert_short_table, muscle_insert_token_number_table)
12749 (muscle_insert_item_number_table): these.
12750 Adjust all callers.
12751 (prepare_tokens): Don't free `translations', since...
12752 * src/reader.h, src/reader.c (grammar_free): do it.
12754 * src/gram.h, src/gram.c (grammar_free): here.
12755 * data/bison.simple, data/bison.c++: b4_token_number_max is now
12758 2002-05-05 Akim Demaille <akim@epita.fr>
12760 * src/output.c (output_unsigned_int_table): New.
12761 (prepare_rules): `i' is unsigned.
12762 `prhs', `rline', `r2' are unsigned int.
12763 Rename muscle `rhs_number_max' as `rhs_max'.
12764 Output muscles `prhs_max', `rline_max', and `r2_max'.
12766 * data/bison.simple, data/bison.c++: Adjust to use these muscles
12767 to compute types instead of constant types.
12768 * tests/regression.at (Web2c Actions): Adjust.
12770 2002-05-04 Akim Demaille <akim@epita.fr>
12772 * src/symtab.h (SALIAS, SUNDEF): Rename as...
12773 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
12774 Adjust dependencies.
12775 * src/output.c (token_definitions_output): Be sure not to output a
12776 `#define 'a'' when fed with `%token 'a' "a"'.
12777 * tests/regression.at (Token definitions): New.
12779 2002-05-03 Paul Eggert <eggert@twinsun.com>
12781 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
12784 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
12786 * Makefile.am (SUBDIRS): Remove intl.
12787 (EXTRA_DIST): Add config/config.rpath.
12789 2002-05-03 Akim Demaille <akim@epita.fr>
12791 * data/bison.simple (m4_if): Don't output empty enums.
12792 And actually, output valid enum definitions :(.
12794 2002-05-03 Akim Demaille <akim@epita.fr>
12796 * configure.bat: Remove, completely obsolete.
12797 * Makefile.am (EXTRA_DIST): Adjust.
12798 Don't distribute config.rpath...
12799 * config/Makefile.am (EXTRA_DIST): Do it.
12801 2002-05-03 Akim Demaille <akim@epita.fr>
12803 * configure.in (GETTEXT_VERSION): New.
12804 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
12806 2002-05-03 Akim Demaille <akim@epita.fr>
12808 * data/bison.simple (b4_token_enum): New.
12809 (b4_token_defines): Use it to output tokens both as #define and
12811 Suggested by Paul Eggert.
12812 * src/output.c (token_definitions_output): Don't output spurious
12815 2002-05-03 Akim Demaille <akim@epita.fr>
12817 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
12819 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
12821 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
12822 Update the stack class, give a try to deque as the default container.
12824 2002-05-02 Akim Demaille <akim@epita.fr>
12826 * data/bison.simple (yyparse): Do not implement @$ = @1.
12827 (YYLLOC_DEFAULT): Adjust to do it.
12828 * doc/bison.texinfo (Location Default Action): Fix.
12830 2002-05-02 Akim Demaille <akim@epita.fr>
12832 * src/reader.c (parse_braces): Merge into...
12833 (parse_action): this.
12835 2002-05-02 Akim Demaille <akim@epita.fr>
12837 * configure.in (ALL_LINGUAS): Remove.
12838 * po/LINGUAS, hr.po: New.
12840 2002-05-02 Akim Demaille <akim@epita.fr>
12842 Remove the so called hairy (semantic) parsers.
12844 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
12845 * src/gram.h, src/gram.c (semantic_parser): Remove.
12846 (rule_t): Remove the guard and guard_line members.
12847 * src/lex.h (token_t): remove tok_guard.
12848 * src/options.c (option_table): Remove %guard and %semantic_parser
12850 * src/output.c, src/output.h (guards_output): Remove.
12852 (token_definitions_output): Don't output the `T'
12854 (output_skeleton): Don't output the guards.
12855 * src/files.c, src/files.c (attrsfile): Remove.
12856 * src/reader.c (symbol_list): Remove the guard and guard_line
12858 Adjust dependencies.
12859 (parse_guard): Remove.
12860 * data/bison.hairy: Remove.
12861 * doc/bison.texinfo (Environment Variables): Remove occurrences of
12864 2002-05-02 Akim Demaille <akim@epita.fr>
12866 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
12867 (parse_guard): Rename the formal argument `stack_offset' as
12868 `rule_length', which is more readable.
12870 (copy_at, copy_dollar): Instead of outputting the hard coded
12871 values of $$, $n and so forth, output invocation to b4_lhs_value,
12872 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
12873 Note: this patch partially drops `semantic-parser' support: it
12874 always does `rule_length - n', where semantic parsers ought to
12876 * data/bison.simple, data/bison.c++ (b4_lhs_value)
12877 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
12879 2002-05-02 Akim Demaille <akim@epita.fr>
12881 * configure.in (AC_INIT): Bump to 1.49b.
12882 (AM_INIT_AUTOMAKE): Short invocation.
12884 2002-05-02 Akim Demaille <akim@epita.fr>
12888 2002-05-01 Akim Demaille <akim@epita.fr>
12890 * src/skeleton.h: Remove.
12892 2002-05-01 Akim Demaille <akim@epita.fr>
12894 * src/skeleton.h: Fix the #endif.
12895 Reported by Magnus Fromreide.
12897 2002-04-26 Paul Eggert <eggert@twinsun.com>
12899 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
12900 Define if we define YYSTYPE and YYLTYPE, respectively.
12901 (YYCOPY): Fix [] quoting problem in the non-GCC case.
12903 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
12905 * src/scan-skel.l: Postprocess quadrigraphs.
12907 * src/reader.c (copy_character): New function, used to output
12908 single characters while replacing `[' and `]' with quadrigraphs, to
12909 avoid troubles with M4 quotes.
12910 (copy_comment): Output characters with copy_character.
12911 (read_additionnal_code): Likewise.
12912 (copy_string2): Likewise.
12913 (copy_definition): Likewise.
12915 * tests/calc.at: Exercise M4 quoting.
12917 2002-04-25 Akim Demaille <akim@epita.fr>
12919 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
12920 between `!' and the command.
12921 Reported by Paul Eggert.
12923 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
12925 * tests/calc.at: Exercise prologue splitting.
12927 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
12928 `b4_post_prologue' instead of `b4_prologue'.
12930 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
12932 (output): Free pre_prologue_obstack and post_prologue_obstack.
12933 * src/files.h, src/files.c (attrs_obstack): Remove.
12934 (pre_prologue_obstack, post_prologue_obstack): New.
12935 * src/reader.c (copy_definition): Add a parameter to specify the
12936 obstack to fill, instead of using attrs_obstack unconditionally.
12937 (read_declarations): Pass pre_prologue_obstack to copy_definition if
12938 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
12940 2002-04-23 Paul Eggert <eggert@twinsun.com>
12942 * data/bison.simple: Remove unnecessary commentary and white
12943 space differences from 1_29-branch.
12944 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
12946 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
12947 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
12948 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
12949 constructors or destructors.
12951 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
12953 2002-04-23 Akim Demaille <akim@epita.fr>
12955 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
12956 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
12957 location with columns.
12958 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
12959 All reported by Paul Eggert.
12961 2002-04-22 Akim Demaille <akim@epita.fr>
12963 * src/reduce.c (dump_grammar): Move to...
12964 * src/gram.h, src/gram.c (grammar_dump): here.
12965 Be sure to separate long item numbers.
12966 Don't read the members of a rule's prec if its nil.
12968 2002-04-22 Akim Demaille <akim@epita.fr>
12970 * src/output.c (table_size, table_grow): New.
12971 (MAXTABLE): Remove, replace uses with table_size.
12972 (pack_vector): Instead of dying when the table is too big, grow it.
12974 2002-04-22 Akim Demaille <akim@epita.fr>
12976 * data/bison.simple (yyr1): Its type is that of a token number.
12977 * data/bison.c++ (r1_): Likewise.
12978 * tests/regression.at (Web2c Actions): Adjust.
12980 2002-04-22 Akim Demaille <akim@epita.fr>
12982 * src/reader.c (token_translations_init): 256 is now the default
12983 value for the error token, i.e., it will be assigned another
12984 number if the user assigned 256 to one of her tokens.
12985 (reader): Don't force 256 to error.
12986 * doc/bison.texinfo (Symbols): Adjust.
12987 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
12988 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
12989 etc. instead of 10, 20, 30 (which was used to `jump' over error
12990 (256) and undefined (2)).
12992 2002-04-22 Akim Demaille <akim@epita.fr>
12994 Propagate more token_number_t.
12996 * src/gram.h (token_number_as_item_number)
12997 (item_number_as_token_number): New.
12998 * src/output.c (GENERATE_OUTPUT_TABLE): New.
12999 Use it to create output_item_number_table and
13000 output_token_number_table.
13001 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
13002 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
13003 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
13004 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
13006 2002-04-22 Akim Demaille <akim@epita.fr>
13008 * src/output.h, src/output.c (get_lines_number): Remove.
13010 2002-04-19 Akim Demaille <akim@epita.fr>
13012 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
13014 (Debugging): More details about enabling the debugging features.
13015 (Table of Symbols): Describe $$, $n, @$, and @n.
13016 Suggested by Tim Josling.
13018 2002-04-19 Akim Demaille <akim@epita.fr>
13020 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
13022 2002-04-10 Akim Demaille <akim@epita.fr>
13024 * src/system.h: Rely on HAVE_LIMITS_H.
13025 Suggested by Paul Eggert.
13027 2002-04-09 Akim Demaille <akim@epita.fr>
13029 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
13030 full stderr, and strip it according to the bison options, instead
13031 of composing the error message from different bits.
13032 This makes it easier to check for several error messages.
13033 Adjust all the invocations.
13034 Add an invocation exercising the error token.
13035 Add an invocation demonstrating a stupid error message.
13036 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
13038 Error message are for stderr, not stdout.
13040 2002-04-09 Akim Demaille <akim@epita.fr>
13042 * src/gram.h, src/gram.c (error_token_number): Remove, use
13044 * src/reader.c (reader): Don't specify the user token number (2)
13045 for $undefined, as it uselessly prevents using it.
13046 * src/gram.h (token_number_t): Move to...
13047 * src/symtab.h: here.
13048 (state_t.number): Is a token_number_t.
13049 * src/print.c, src/reader.c: Use undeftoken->number instead of
13051 (Even though this 2 is not the same as above: the number of the
13052 undeftoken remains being 2, it is its user token number which
13054 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
13055 `user_token_number_max'.
13056 Output `undef_token_number'.
13057 * data/bison.simple, data/bison.c++: Use them.
13058 Be sure to map invalid yylex return values to
13059 `undef_token_number'. This saves us from gratuitous SEGV.
13061 * tests/conflicts.at (Solved SR Conflicts)
13062 (Unresolved SR Conflicts): Adjust.
13063 * tests/regression.at (Web2c Actions): Adjust.
13065 2002-04-08 Akim Demaille <akim@epita.fr>
13067 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
13069 Remove the duplicate `typedefs'.
13070 (RhsNumberType): Fix the declaration and various other typos.
13072 * data/bison.simple: Use __ofile__.
13073 * src/scan-skel.l: Handle __ofile__.
13075 2002-04-08 Akim Demaille <akim@epita.fr>
13077 * src/gram.h (item_number_t): New, the type of item numbers in
13078 RITEM. Note that it must be able to code symbol numbers as
13079 positive number, and the negation of rule numbers as negative
13081 Adjust all dependencies (pretty many).
13082 * src/reduce.c (rule): Remove this `short *' pointer: use
13084 * src/system.h (MINSHORT, MAXSHORT): Remove.
13085 Include `limits.h'.
13086 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
13087 (shortcpy): Remove.
13088 (MAXTABLE): Move to...
13089 * src/output.c (MAXTABLE): here.
13090 (prepare_rules): Use output_int_table to output rhs.
13091 * data/bison.simple, data/bison.c++: Adjust.
13092 * tests/torture.at (Big triangle): Move the limit from 254 to
13094 * tests/regression.at (Web2c Actions): Ajust.
13096 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
13097 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
13098 passes, but produces negative #line number, once fixed, GCC is
13099 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
13101 * src/state.h (state_h): Code input lines on ints, not shorts.
13103 2002-04-08 Akim Demaille <akim@epita.fr>
13105 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
13106 and then the grammar.
13108 2002-04-08 Akim Demaille <akim@epita.fr>
13110 * src/system.h: No longer using strndup.
13112 2002-04-07 Akim Demaille <akim@epita.fr>
13114 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
13115 * src/output.c (output_table_data): Return the longest number.
13116 (prepare_tokens): Output `token_number_max').
13117 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
13119 Use them to define yy_token_number_type/TokenNumberType.
13120 Use this type for yytranslate.
13121 * tests/torture.at (Big triangle): Push the limit from 124 to
13123 * tests/regression.at (Web2c Actions): Adjust.
13125 2002-04-07 Akim Demaille <akim@epita.fr>
13127 * tests/torture.at (Big triangle): New.
13128 (GNU AWK Grammar, GNU Cim Grammar): Move to...
13129 * tests/existing.at: here.
13131 2002-04-07 Akim Demaille <akim@epita.fr>
13133 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
13135 Adjust dependencies.
13137 2002-04-07 Akim Demaille <akim@epita.fr>
13139 * src/reader.c: Normalize increments to prefix form.
13141 2002-04-07 Akim Demaille <akim@epita.fr>
13143 * src/reader.c, symtab.c: Remove debugging code.
13145 2002-04-07 Akim Demaille <akim@epita.fr>
13147 Rename all the `bucket's as `symbol_t'.
13149 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
13150 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
13151 * src/symtab.c, src/symtab.h (bucket): Rename as...
13153 (symbol_list_new, bucket_check_defined, bucket_make_alias)
13154 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
13155 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
13156 (buckets_new, buckets_free, buckets_do): Rename as...
13157 (symbol_list_new, symbol_check_defined, symbol_make_alias)
13158 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
13159 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
13160 (symbols_new, symbols_free, symbols_do): these.
13162 2002-04-07 Akim Demaille <akim@epita.fr>
13164 Use lib/hash for the symbol table.
13166 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
13168 * src/lex.c (lex): Set the `number' member of new terminals.
13169 * src/reader.c (bucket_check_defined, bucket_make_alias)
13170 (bucket_check_alias_consistence, bucket_translation): New.
13171 (reader, grammar_free, readgram, token_translations_init)
13172 (packsymbols): Adjust.
13173 (reader): Number the predefined tokens.
13174 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
13175 for predefined tokens.
13176 * src/symtab.h (bucket): Remove all the hash table related
13178 * src/symtab.c (symtab): Replace by...
13179 (bucket_table): this.
13180 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
13181 (buckets_new, buckets_do): New.
13183 2002-04-07 Akim Demaille <akim@epita.fr>
13185 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
13186 (start_symbol, max_user_token_number, semantic_parser)
13187 (error_token_number): Initialize.
13188 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
13191 (errtoken, eoftoken, undeftoken, axiom): Extern.
13193 2002-04-07 Akim Demaille <akim@epita.fr>
13195 * src/gram.h (rule_s): prec and precsym are now pointers
13196 to the bucket giving the priority/associativity.
13197 Member `associativity' removed: useless.
13198 * src/reduce.c, src/conflicts.c: Adjust.
13200 2002-04-07 Akim Demaille <akim@epita.fr>
13202 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
13203 Properly escape the symbols' TAG when outputting them.
13205 2002-04-07 Akim Demaille <akim@epita.fr>
13207 * src/lalr.h (LA): Is a bitsetv, not bitset*.
13209 2002-04-07 Akim Demaille <akim@epita.fr>
13211 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
13212 (LArule): this, which is an array to rule_t*.
13213 * src/print.c, src/conflicts.c: Adjust.
13215 2002-04-07 Akim Demaille <akim@epita.fr>
13217 * src/gram.h (rule_t): Rename `number' as `user_number'.
13218 `number' is a new member.
13219 Adjust dependencies.
13220 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
13222 2002-04-07 Akim Demaille <akim@epita.fr>
13224 As a result of the previous patch, it is no longer needed
13225 to reorder ritem itself.
13227 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
13229 2002-04-07 Akim Demaille <akim@epita.fr>
13231 Be sure never to walk through RITEMS, but use only data related to
13232 the rules themselves. RITEMS should be banished.
13234 * src/output.c (output_token_translations): Rename as...
13235 (prepare_tokens): this.
13236 In addition to `translate', prepare the muscles `tname' and
13237 `toknum', which were handled by...
13238 (output_rule_data): this.
13239 Remove, and move the remainder of its outputs into...
13240 (prepare_rules): this new routines, which also merges content from
13241 (output_gram): this.
13242 (prepare_rules): Be sure never to walk through RITEMS.
13243 (output_stos): Rename as...
13244 (prepare_stos): this.
13245 (output): Always invoke prepare_states, after all, just don't use it
13246 in the output if you don't need it.
13248 2002-04-07 Akim Demaille <akim@epita.fr>
13250 * src/LR0.c (new_state): Display `nstates' as the name of the
13251 newly created state.
13252 Adjust to initialize first_state and last_state if needed.
13253 Be sure to distinguish the initial from the final state.
13254 (new_states): Create the itemset of the initial state, and use
13256 * src/closure.c (closure): Now that the initial state has its
13257 items properly set, there is no need for a special case when
13258 creating `ruleset'.
13260 As a result, now the rule 0, reducing to $axiom, is visible in the
13261 outputs. Adjust the test suite.
13263 * tests/conflicts.at (Solved SR Conflicts)
13264 (Unresolved SR Conflicts): Adjust.
13265 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
13266 * tests/conflicts.at (S/R in initial): New.
13268 2002-04-07 Akim Demaille <akim@epita.fr>
13270 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
13271 the RHS of the rules.
13272 * src/output.c (output_gram): Likewise.
13274 2002-04-07 Akim Demaille <akim@epita.fr>
13276 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
13278 Adjust all dependencies.
13279 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
13280 `number' of the buckets too.
13281 * src/gram.h: Include `symtab.h'.
13282 (associativity): Move to...
13283 * src/symtab.h: here.
13284 No longer include `gram.h'.
13286 2002-04-07 Akim Demaille <akim@epita.fr>
13288 * src/gram.h, src/gram.c (rules_rhs_length): New.
13289 (ritem_longest_rhs): Use it.
13290 * src/gram.h (rule_t): `number' is a new member.
13291 * src/reader.c (packgram): Set it.
13292 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
13293 the end of `rules', and count them out of `nrules'.
13294 (reduce_output, dump_grammar): Adjust.
13295 * src/print.c (print_grammar): It is no longer needed to check for
13296 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
13297 * tests/reduce.at (Reduced Automaton): New test.
13299 2002-04-07 Akim Demaille <akim@epita.fr>
13301 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
13302 lacking `+ 1' to nrules, Bison reported as useless a token if it
13303 was used solely to set the precedence of the last rule...
13305 2002-04-07 Akim Demaille <akim@epita.fr>
13307 * data/bison.c++, data/bison.simple: Don't output the current file
13308 name in #line, to avoid useless diffs between two identical
13309 outputs under different names.
13311 2002-04-07 Akim Demaille <akim@epita.fr>
13313 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
13314 Normalize loops to using `< nrules + 1', not `<= nrules'.
13316 2002-04-07 Akim Demaille <akim@epita.fr>
13320 2002-04-07 Akim Demaille <akim@epita.fr>
13322 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
13323 bucket.value as bucket.number.
13325 2002-04-07 Akim Demaille <akim@epita.fr>
13327 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
13328 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
13329 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
13330 RHS, instead of being an index in RITEMS.
13332 2002-04-04 Paul Eggert <eggert@twinsun.com>
13334 * doc/bison.texinfo: Update copyright date.
13335 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
13336 (Symbols): Warn about running Bison in one character set,
13337 but compiling and/or running in an incompatible one.
13338 Warn about character code 256, too.
13340 2002-04-03 Paul Eggert <eggert@twinsun.com>
13342 * src/bison.data (YYSTACK_ALLOC): Depend on whether
13343 YYERROR_VERBOSE is nonzero, not whether it is defined.
13345 Merge changes from bison-1_29-branch.
13347 2002-03-20 Paul Eggert <eggert@twinsun.com>
13349 Merge fixes from Debian bison_1.34-1.diff.
13351 * configure.in (AC_PREREQ): 2.53.
13353 2002-03-20 Akim Demaille <akim@epita.fr>
13355 * src/conflicts.c (log_resolution): Argument `resolution' is const.
13357 2002-03-19 Paul Eggert <eggert@twinsun.com>
13359 * src/bison.simple (YYCOPY): New macro.
13360 (YYSTACK_RELOCATE): Use it.
13361 Remove Type arg; no longer needed. All callers changed.
13362 (yymemcpy): Remove; no longer needed.
13364 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
13365 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
13367 2002-03-19 Akim Demaille <akim@epita.fr>
13369 Test and fix the #line outputs.
13371 * tests/atlocal.at (GCC): New.
13372 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
13373 (Prologue synch line, %union synch line, Postprologue synch line)
13374 (Action synch line, Epilogue synch line): New tests.
13375 * src/reader.c (parse_union_decl): Define the muscle stype_line.
13376 * data/bison.simple, data/bison.c++: Use it.
13378 2002-03-19 Akim Demaille <akim@epita.fr>
13380 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
13381 (Solved SR Conflicts, %expect not enough, %expect right)
13382 (%expect too much): Move to...
13383 * tests/conflicts.at: this new file.
13385 2002-03-19 Akim Demaille <akim@epita.fr>
13387 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
13388 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
13389 that we can move to enums for instance.
13390 * src/output.c (token_definitions_output): Output a list of
13391 `token-name, token-number' instead of the #define.
13392 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
13394 2002-03-14 Akim Demaille <akim@epita.fr>
13396 Use Gettext 0.11.1.
13398 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
13400 * data/bison.c++: Make the user able to add members to the generated
13401 parser by subclassing.
13403 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
13405 * src/reader.c (read_additionnal_code): `c' should be an integer, not
13407 Reported by Nicolas Tisserand and Nicolas Burrus.
13409 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
13411 * src/reader.c: Warn about lacking semi-colons, do not complain.
13413 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
13415 * data/bison.c++: Remove a debug line.
13417 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
13419 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
13420 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
13421 provide a default implementation.
13423 2002-03-04 Akim Demaille <akim@epita.fr>
13425 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
13426 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
13427 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
13428 * tests/semantic.at (Parsing Guards): Similarly.
13429 * src/reader.at (readgram): Complain if the last rule is not ended
13432 2002-03-04 Akim Demaille <akim@epita.fr>
13434 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
13435 * src/closure.c: here.
13436 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
13438 * src/warshall.h, src/warshall.c: Remove.
13439 * tests/sets.at (Broken Closure): Adjust.
13441 2002-03-04 Akim Demaille <akim@epita.fr>
13443 * src/output.c (output_skeleton): tempdir is const.
13444 bytes_read is unused.
13446 2002-03-04 Akim Demaille <akim@epita.fr>
13448 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
13449 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
13451 From Michael Hayes.
13453 2002-03-04 Akim Demaille <akim@epita.fr>
13455 * src/closure.c (closure): `r' is unused.
13457 2002-03-04 Akim Demaille <akim@epita.fr>
13459 * tests/sets.at (Broken Closure): Add the ending `;'.
13460 * src/reader.at (readgram): Complain if a rule is not ended with a
13463 2002-03-04 Akim Demaille <akim@epita.fr>
13465 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
13466 (count_sr_conflicts): Use bitset_count.
13467 * src/reduce.c (inaccessable_symbols): Ditto.
13468 (bits_size): Remove.
13469 * src/warshall.h, src/warshall.c: Convert to bitsetv.
13471 2002-03-04 Akim Demaille <akim@epita.fr>
13473 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
13474 * src/reduce.c: Remove the `bitset_zero's following the
13475 `bitset_create's, as now it is performed by the latter.
13477 2002-03-04 Akim Demaille <akim@epita.fr>
13479 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
13480 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
13481 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
13482 latest sources from Michael.
13484 2002-03-04 Akim Demaille <akim@epita.fr>
13486 * src/output.c (output): Don't free the grammar.
13487 * src/reader.c (grammar_free): New.
13488 * src/main.c (main): Call it and don't free symtab here.
13490 2002-03-04 Akim Demaille <akim@epita.fr>
13492 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
13494 Reported by Benoit Perrot.
13496 2002-03-04 Akim Demaille <akim@epita.fr>
13498 Use bitset operations when possible, not loops over bits.
13500 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
13502 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
13503 * src/reduce.c (useless_nonterminals): Formatting changes.
13504 * src/warshall.c (TC): Use bitset_or.
13506 2002-03-04 Akim Demaille <akim@epita.fr>
13508 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
13509 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
13512 2002-03-04 Akim Demaille <akim@epita.fr>
13514 * src/lalr.c (F): Now a bitset*.
13515 Adjust all dependencies.
13517 2002-03-04 Akim Demaille <akim@epita.fr>
13519 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
13520 Adjust all dependencies.
13522 2002-03-04 Akim Demaille <akim@epita.fr>
13524 * src/L0.c, src/LR0.h (nstates): Be size_t.
13525 Adjust comparisons (signed vs unsigned).
13526 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
13528 Adjust all dependencies.
13530 2002-03-04 Akim Demaille <akim@epita.fr>
13532 * src/closure.c (firsts): Now, also a bitset.
13533 Adjust all dependencies.
13534 (varsetsize): Remove, now unused.
13535 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
13537 2002-03-04 Akim Demaille <akim@epita.fr>
13539 * src/print.c: Convert to use bitset.h, not hand coded iterations
13542 2002-03-04 Akim Demaille <akim@epita.fr>
13544 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
13546 2002-03-04 Akim Demaille <akim@epita.fr>
13548 * src/closure.c (ruleset): Be a bitset.
13549 (rulesetsize): Remove.
13551 2002-03-04 Akim Demaille <akim@epita.fr>
13553 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
13554 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
13555 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
13556 * src/closure.c (fderives): Be an array of bitsets.
13558 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
13560 * data/bison.c++: Merge the two generated headers. Insert a copyright
13561 notice in each output file.
13563 2002-02-28 Akim Demaille <akim@epita.fr>
13565 * data/bison.c++: Copy the prologue of bison.simple to fetch
13566 useful M4 definitions, such as b4_header_guard.
13568 2002-02-25 Akim Demaille <akim@epita.fr>
13570 * src/getargs.c (version): Give the name of the authors, and use a
13571 translator friendly scheme for the bgr
13574 2002-02-25 Akim Demaille <akim@epita.fr>
13576 * src/output.c (header_output): Remove, now handled completely via
13579 2002-02-25 Akim Demaille <akim@epita.fr>
13581 * m4/m4.m4: New, from CVS Autoconf.
13582 * configure.in: Invoke it.
13583 * src/output.c (output_skeleton): Use its result instead of the
13586 2002-02-25 Akim Demaille <akim@epita.fr>
13588 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
13590 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
13591 * src/output.c (output_skeleton): Use mkstemp to create a real
13593 Move the filling of `skeleton' and its muscle to...
13595 (output): Move the definition of the prologue muscle to...
13597 * src/system.h (DEFAULT_TMPDIR): New.
13599 2002-02-14 Paul Eggert <eggert@twinsun.com>
13601 Remove the support for C++ namespace cleanliness; it was
13602 causing more problems than it was curing, since it didn't work
13603 properly on some nonstandard C++ compilers. This can wait
13604 for a proper C++ parser.
13606 * NEWS: Document this.
13607 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
13608 of C++, as it's treated like C now.
13609 * src/bison.simple (YYSTD): Remove.
13610 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
13611 Treat C++ just like Standard C instead of trying to support
13612 namespace cleanliness.
13614 2002-02-14 Akim Demaille <akim@epita.fr>
13616 * tests/regression.at (else): Adjust to Andreas' change.
13618 2002-02-14 Akim Demaille <akim@epita.fr>
13620 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
13622 2002-02-13 Andreas Schwab <schwab@suse.de>
13624 * src/output.c (output_rule_data): Don't output NULL, it might
13625 not be defined yet.
13627 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
13629 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
13630 (Copyright notice): Update.
13632 2002-02-11 Akim Demaille <akim@epita.fr>
13634 * tests/regression.at (%nonassoc and eof): Don't include
13635 nonportable headers.
13637 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
13639 * data/bison.c++: Correct error recovery. Make the user able to
13640 initialize the starting location.
13642 2002-02-07 Akim Demaille <akim@epita.fr>
13644 * tests/input.at: New.
13646 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
13648 * data/bison.c++: Replace some direct m4 expansions by constants. Be
13649 more consistent when naming methods and variables. Put preprocessor
13650 directives around tables only needed for debugging.
13652 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
13654 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
13656 (yy::b4_name::parse): Use print_.
13658 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
13660 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
13662 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
13664 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
13666 (yy::b4_name::parse): Build verbose error messages, and use error_.
13668 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
13670 * data/bison.c++: Fix m4 quoting in comments.
13672 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
13674 * data/bison.c++: Adjust the parser code. Fix some muscles that were
13675 not expanded by m4.
13677 2002-02-05 Akim Demaille <akim@epita.fr>
13679 * data/bison.c++: Adjust to the M4 back end.
13680 More is certainly needed.
13682 2002-02-05 Akim Demaille <akim@epita.fr>
13684 Give a try to M4 as a back end.
13686 * lib/readpipe.c: New, from wdiff.
13687 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
13689 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
13690 specific values. Now it is m4 that performs the lookup.
13691 * src/parse-skel.y: Remove.
13692 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
13693 * src/output.c (actions_output, guards_output)
13694 (token_definitions_output): No longer keeps track of the output
13695 line number, hence remove the second argument.
13696 (guards_output): Check against the guard member of a rule, not the
13699 (output_skeleton): Don't look for the skeleton location, let m4 do
13701 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
13703 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
13704 (prepare): Given that for the time being changesyntax is not
13705 usable in M4, rename the muscles using `-' to `_'.
13706 Define `defines_flag', `output_parser_name' and `output_header_name'.
13707 * src/output.h (actions_output, guards_output)
13708 (token_definitions_output): Adjust prototypes.
13709 * src/scan-skel.l: Instead of scanning the skeletons, it now
13710 processes the output of m4: `__oline__' and `#output'.
13711 * data/bison.simple: Adjust to be used by M4(sugar).
13712 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
13714 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
13715 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
13716 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
13717 shamelessly stolen from CVS Autoconf.
13719 2002-02-05 Akim Demaille <akim@epita.fr>
13721 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
13722 * configure.in: Check for the declarations of free and malloc.
13723 * src/muscle_tab.c: Adjust.
13725 2002-02-05 Akim Demaille <akim@epita.fr>
13727 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
13728 which have no values.
13730 2002-02-05 Akim Demaille <akim@epita.fr>
13732 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
13735 2002-01-29 Paul Eggert <eggert@twinsun.com>
13737 * src/bison.simple (YYSIZE_T): Do not define merely because
13738 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
13739 On some platforms, <alloca.h> does not declare YYSTD (size_t).
13741 2002-01-27 Akim Demaille <akim@epita.fr>
13743 Fix `%nonassoc and eof'.
13745 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
13746 which were not properly copied! Replace
13747 memcpy (res->errs, src->errs, src->nerrs);
13749 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
13751 * tests/regression.at (%nonassoc and eof): Adjust to newest
13752 Autotest: `.' is not in the PATH.
13754 2002-01-27 Akim Demaille <akim@epita.fr>
13756 * tests/sets.at (AT_EXTRACT_SETS): New.
13757 (Nullable): Use it.
13760 2002-01-26 Akim Demaille <akim@epita.fr>
13762 * tests/actions.at, tests/calc.at, tests/headers.at,
13763 * tests/torture.at: Adjust to the newest Autotest which no longer
13764 forces `.' in the PATH.
13766 2002-01-25 Akim Demaille <akim@epita.fr>
13768 * tests/regression.at (%nonassoc and eof): New.
13769 Suggested by Robert Anisko.
13771 2002-01-24 Akim Demaille <akim@epita.fr>
13773 Bison dumps core when trying to complain about broken input files.
13774 Reported by Cris van Pelt.
13776 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
13777 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
13779 (Invalid inputs): Strengthen: exercise parse_percent_token.
13781 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
13783 * src/Makefile.am: Add bison.c++.
13784 * src/bison.c++: New skeleton.
13786 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
13790 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
13792 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
13794 2002-01-20 Marc Autret <marc@gnu.org>
13796 * src/files.c (compute_output_file_names): Fix
13798 2002-01-20 Marc Autret <marc@gnu.org>
13800 * tests/output.at: New test.
13801 * src/files.c (compute_base_names): Don't map extensions when
13802 the YACC flag is set, use defaults.
13803 Reported by Evgeny Stambulchik.
13805 2002-01-20 Marc Autret <marc@gnu.org>
13807 * src/system.h: Need to define __attribute__ away for non-GCC
13808 compilers as well (i.e., the vendor C compiler).
13809 Suggested by Albert Chin-A-Young.
13811 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
13813 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
13814 canonical definition.
13815 * src/system.h: Use the canonical definition for PARAMS (avoids
13816 a conflict with the macro from lib/hash.h).
13818 2002-01-11 Akim Demaille <akim@epita.fr>
13820 * configure.in: Use AC_FUNC_STRNLEN.
13821 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
13823 2002-01-09 Akim Demaille <akim@epita.fr>
13825 * src/files.c, src/files.h (output_infix): New.
13826 (tab_extension): Remove.
13827 (compute_base_names): Compute the former, drop the latter.
13828 * src/output.c (prepare): Insert the muscles `output-infix', and
13830 * src/parse-skel.y (string, string.1): New.
13831 (section.header): Use it.
13832 (section.yacc): Remove.
13833 (prefix): Remove too.
13834 * src/scan-skel.l: Adjust.
13835 * src/bison.simple, src/bison.hairy: Adjust.
13837 2002-01-09 Akim Demaille <akim@epita.fr>
13839 * configure.in (WERROR_CFLAGS): Compute it.
13840 * src/Makefile.am (CFLAGS): Pass it.
13841 * tests/atlocal.in (CFLAGS): Idem.
13842 * src/files.c: Fix a few warnings.
13843 (get_extension_index): Remove, unused.
13845 2002-01-08 Akim Demaille <akim@epita.fr>
13847 * src/getargs.c (AS_FILE_NAME): New.
13848 (getargs): Use it to convert DOSish file names.
13849 * src/files.c (base_name): Rename as full_base_name to avoid
13850 clashes with `base_name ()'.
13851 (filename_split): New.
13852 (compute_base_names): N-th rewrite, using filename_split.
13854 2002-01-08 Akim Demaille <akim@epita.fr>
13856 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
13857 New, stolen from the Fileutils 4.1.
13858 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
13859 * configure.in: Check for the presence of memrchr, and of its
13862 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
13864 * lib/hash.h (__P): Added definition for this macro.
13865 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
13866 BUILT_SOURCES, to ensure they are generated first.
13867 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
13868 %error-verbose to allow bootstrapping with bison 1.30x.
13870 2002-01-06 Akim Demaille <akim@epita.fr>
13872 * src/reader.c (parse_braces): Don't fetch the next char, the
13873 convention is to fetch on entry.
13874 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
13875 'switch' without a following semicolon.
13876 * tests/regression.at (braces parsing): New.
13878 2002-01-06 Akim Demaille <akim@epita.fr>
13880 Bison is dead wrong in its RR conflict reports.
13882 * tests/torture.at (GNU Cim Grammar): New.
13883 * src/conflicts.c (count_rr_conflicts): Fix.
13885 2002-01-06 Akim Demaille <akim@epita.fr>
13887 Creating package.m4 from configure.ac causes too many problems.
13889 * tests/Makefile.am (package.m4): Create it by hand,
13890 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
13892 2002-01-06 Akim Demaille <akim@epita.fr>
13894 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
13897 2002-01-04 Paul Eggert <eggert@twinsun.com>
13899 * doc/bison.texinfo (Debugging):
13900 Remove YYSTDERR; it's no longer defined or used.
13901 Also, s/cstdio.h/cstdio/.
13903 2002-01-03 Akim Demaille <akim@epita.fr>
13905 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
13907 2002-01-03 Akim Demaille <akim@epita.fr>
13909 * src/parse-skel.y (process_skeleton): Don't bind the parser's
13910 tracing code to --trace, wait for a better --trace option, with
13913 2002-01-03 Akim Demaille <akim@epita.fr>
13915 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
13916 The ISO C++ standard is extremely clear about it: stderr is
13917 considered a macro, not a regular symbol (see table 94 `Header
13918 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
13919 Therefore std:: does not apply to it. It still does with fprintf.
13920 Also, s/cstdio.h/cstdio/.
13922 2002-01-03 Akim Demaille <akim@epita.fr>
13924 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
13925 for non system headers.
13927 2002-01-02 Akim Demaille <akim@epita.fr>
13929 Equip the skeleton chain with location tracking, runtime trace,
13930 pure parser and scanner.
13932 * src/parse-skel.y: Request a pure parser, locations, and prefix
13934 (%union): Having several members with the same type does not help
13935 type mismatches, simplify.
13936 (YYPRINT, yyprint): New.
13937 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
13938 (skel_error): this.
13940 * src/scan-skel.l: Adjust to these changes.
13941 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
13942 (LOCATION_PRINT, skel_control_t): New.
13944 2001-12-30 Akim Demaille <akim@epita.fr>
13946 * src/parse-skel.y: Get rid of the shift/reduce conflict:
13947 replace `gb' with BLANKS.
13948 * src/scan-skel.l: Adjust.
13950 2001-12-30 Akim Demaille <akim@epita.fr>
13952 * src/system.h: We don't need nor want bcopy.
13953 Throw away MS-DOS crap: we don't need getpid.
13954 * configure.in: We don't need strndup. It was even causing
13955 problems: because Flex includes the headers *before* us,
13956 _GNU_SOURCE is not defined by config.h, and therefore strndup was
13958 * lib/xstrndup.c: New.
13959 * src/scan-skel.l: Use it.
13960 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
13961 * src/parse-skel.y: Use %directives instead of #defines.
13963 2001-12-30 Akim Demaille <akim@epita.fr>
13965 * src/skeleton.h: New.
13966 * src/output.c (output_parser, output_master_parser): Remove, dead
13968 * src/output.h (get_lines_number, actions_output, guards_output)
13969 (token_definitions_output): Prototype them.
13970 * src/parse-skel.y: Add the license notice.
13971 Include output.h and skeleton.h.
13972 (process_skeleton): Returns void, and takes a single parameter.
13973 * src/scan-skel.l: Add the license notice.
13974 Include skeleton.h.
13975 Don't use %option yylineno: it seems that then Flex imagines
13976 REJECT has been used, and therefore it won't reallocate its
13977 buffers (which makes no other sense to me than a bug). It results
13978 in warnings for `unused: yy_flex_realloc'.
13980 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
13982 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
13983 (MUSCLE_INSERT_PREFIX): ...to there.
13984 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
13985 (MUSCLE_INSERT_PREFIX): Move from here...
13987 * src/bison.hairy: Add a section directive. Put braces around muscle
13988 names. This parser skeleton is still broken, but Bison should not
13989 choke on a bad muscle 'syntax'.
13990 * src/bison.simple: Add a section directive. Put braces around muscle
13993 * src/files.h (strsuffix, stringappend): Add declarations.
13994 (tab_extension): Add declaration.
13995 (short_base_name): Add declaration.
13997 * src/files.c (strsuffix, stringappend): No longer static. These
13998 functions are used in the skeleton parser.
13999 (tab_extension): New.
14000 (compute_base_names): Use the computations done in this function
14001 to guess if the generated parsers should have '.tab' in their
14003 (short_base_name): No longer static.
14005 * src/output.c (output_skeleton): New.
14006 (output): Disable call to output_master_parser, and give a try to
14007 a new skeleton handling system.
14008 (guards_output, actions_output): No longer static.
14009 (token_definitions_output, get_lines_number): No longer static.
14011 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
14013 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
14016 * src/parse-skel.y: New file.
14017 * src/scan-skel.l: New file.
14019 2001-12-29 Akim Demaille <akim@epita.fr>
14021 %name-prefix is broken.
14023 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
14024 Adjust all dependencies.
14025 * tests/headers.at (export YYLTYPE): Strengthen this test: use
14028 Renaming yylval but not yylloc is not consistent. Now we do.
14030 * src/bison.simple: Prefix yylloc if used.
14031 * doc/bison.texinfo (Decl Summary): Document that.
14033 2001-12-29 Akim Demaille <akim@epita.fr>
14035 * doc/bison.texinfo: Promote `%long-directive' over
14037 Remove all references to fixed-output-files, yacc is enough.
14039 2001-12-29 Akim Demaille <akim@epita.fr>
14041 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
14042 user prologue. These are defaults.
14043 * tests/actions.at (Mid-rule actions): Make sure the user can
14044 define YYDEBUG and YYERROR_VERBOSE.
14046 2001-12-29 Akim Demaille <akim@epita.fr>
14048 * src/output.c (header_output): Don't forget to export YYLTYPE and
14050 * tests/headers.at (export YYLTYPE): New, make sure it does.
14051 * tests/regression.at (%union and --defines, Invalid CPP headers):
14053 * tests/headers.at: here.
14055 2001-12-29 Akim Demaille <akim@epita.fr>
14057 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
14059 2001-12-29 Akim Demaille <akim@epita.fr>
14061 * tests/actions.at (Mid-rule actions): Output on a single line
14062 instead of several.
14064 2001-12-29 Akim Demaille <akim@epita.fr>
14066 * doc/bison.texinfo: Formatting changes.
14068 2001-12-29 Akim Demaille <akim@epita.fr>
14070 Don't store the token defs in a muscle, just be ready to output it
14071 on command. Now possible via `symbols'. Fixes a memory leak.
14073 * src/output.c (token_definitions_output): New.
14074 (output_parser, header_output): Use it.
14075 * src/reader.c (symbols_save): Remove.
14077 2001-12-29 Akim Demaille <akim@epita.fr>
14079 * src/bison.simple: Do not provide a default for YYSTYPE and
14080 YYLTYPE before the user's prologue. Otherwise it's hardly... a
14083 2001-12-29 Akim Demaille <akim@epita.fr>
14085 Mid-rule actions are simply... ignored!
14087 * src/reader.c (readgram): Be sure to attach mid-rule actions to
14088 the empty-rule associated to the dummy symbol, not to the host
14090 * tests/actions.at (Mid-rule actions): New.
14092 2001-12-29 Akim Demaille <akim@epita.fr>
14096 * src/reader.c (reader): Free grammar.
14098 2001-12-29 Akim Demaille <akim@epita.fr>
14102 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
14103 since it allocates it for each state, although only one is needed.
14104 (allocate_storage): Do it here.
14106 2001-12-29 Akim Demaille <akim@epita.fr>
14108 * src/options.h, src/options.c (create_long_option_table): Rename
14110 (long_option_table_new): this, with a clearer prototype.
14111 (percent_table): Remove, unused,
14112 * src/getargs.c (getargs): Adjust.
14114 2001-12-29 Akim Demaille <akim@epita.fr>
14116 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
14117 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
14120 2001-12-29 Akim Demaille <akim@epita.fr>
14122 * src/lalr.c (build_relations): Rename `states' as `states1'.
14123 Sorry, I don't understand exactly what it is, no better name...
14125 2001-12-29 Akim Demaille <akim@epita.fr>
14127 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
14128 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
14129 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
14132 2001-12-29 Akim Demaille <akim@epita.fr>
14134 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
14137 2001-12-29 Akim Demaille <akim@epita.fr>
14139 * src/reader.c, src/reader.h (user_toknums): Remove.
14140 Adjust all users to use symbols[i]->user_token_number.
14142 2001-12-29 Akim Demaille <akim@epita.fr>
14144 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
14145 Adjust all users to use symbols[i]->prec or ->assoc.
14147 2001-12-29 Akim Demaille <akim@epita.fr>
14149 * src/reader.c, src/reader.h (tags): Remove.
14150 Adjust all users to use symbols[i]->tag.
14152 2001-12-29 Akim Demaille <akim@epita.fr>
14154 * src/gram.h, src/gram.c (symbols): New, similar to state_table
14156 * src/reader.c (packsymbols): Fill this table.
14158 * src/conflicts.c (resolve_sr_conflict): Adjust.
14159 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
14161 Use symbols[i]->tag instead of tags[i].
14163 2001-12-29 Akim Demaille <akim@epita.fr>
14165 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
14166 In addition, put a comment in there, to replace...
14167 * tests/regression.at (%union and C comments): Remove.
14169 2001-12-29 Akim Demaille <akim@epita.fr>
14171 * tests/regression.at (Web2c Actions): Blindly move the actual
14172 output as expected output. The contents *seem* right to me, but I
14173 can't pretend reading perfectly parser tables... Nonetheless, all
14174 the other tests pass correctly, the table look OK, even though the
14175 presence of `$axiom' is to be noted: AFAICS it is useless (but
14178 2001-12-29 Akim Demaille <akim@epita.fr>
14180 * src/reader.c (readgram): Don't add the rule 0 if there were no
14181 rules read. In other words, add it _after_ having performed
14182 grammar sanity checks.
14183 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
14185 2001-12-29 Akim Demaille <akim@epita.fr>
14187 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
14188 visible, and some states have now a different number.
14190 2001-12-29 Akim Demaille <akim@epita.fr>
14192 * src/reader.c (readgram): Bind the initial rule's lineno to that
14194 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
14195 (Solved SR Conflicts): Adjust rule 0's line number.
14197 2001-12-29 Akim Demaille <akim@epita.fr>
14199 Fix the `GAWK Grammar' failure.
14201 * src/LR0.c (final_state): Initialize to -1 so that we do compute
14202 the reductions of the first state which was mistakenly confused
14203 with the final state because precisely final_state was initialized
14205 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
14206 now noticed by Bison.
14207 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
14208 have a reduction on $default.
14210 2001-12-29 Akim Demaille <akim@epita.fr>
14212 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
14214 * src/closure.c (print_closure): Likewise.
14215 * src/derives.c (print_derives): Likewise.
14216 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
14219 2001-12-29 Akim Demaille <akim@epita.fr>
14221 * src/lalr.c (lookaheads_print): New.
14222 (lalr): Call it when --trace-flag.
14223 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
14226 2001-12-29 Akim Demaille <akim@epita.fr>
14228 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
14229 when walking through ritem, even via rule->rhs.
14230 * src/reduce.c (dump_grammar, useful_production, reduce_output)
14231 (useful_production, useless_nonterminals): Likewise.
14232 (reduce_grammar_tables): Likewise, plus update nritems.
14233 * src/nullable.c (set_nullable): Likewise.
14234 * src/lalr.c (build_relations): Likewise.
14235 * tests/sets.at (Nullable): Adjust.
14236 Fortunately, now, the $axiom is no longer nullable.
14238 2001-12-29 Akim Demaille <akim@epita.fr>
14240 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
14242 * src/gram.c (ritem_longest_rhs): Likewise.
14243 * src/reduce.c (nonterminals_reduce): Likewise.
14244 * src/print_graph.c (print_graph): Likewise.
14245 * src/output.c (output_rule_data): Likewise.
14246 * src/nullable.c (set_nullable): Likewise.
14248 2001-12-29 Akim Demaille <akim@epita.fr>
14250 * src/output.c: Comment changes.
14252 2001-12-27 Paul Eggert <eggert@twinsun.com>
14254 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
14255 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
14256 Sparc, as they were causing more porting problems than the
14257 (minor) performance improvement was worth.
14259 Also, catch up with 1.31's YYSTD.
14261 2001-12-27 Akim Demaille <akim@epita.fr>
14263 * src/output.c (output_gram): Rely on nritems, not the
14264 0-sentinel. See below.
14265 Use -1 as separator, not 0.
14266 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
14267 Rely on -1 as separator in yyrhs, instead of 0.
14268 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
14269 twice `Now at end of input', therefore there are two lines less to
14272 2001-12-27 Akim Demaille <akim@epita.fr>
14274 * tests/regression.at (Unresolved SR Conflicts):
14275 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
14278 2001-12-27 Akim Demaille <akim@epita.fr>
14280 * src/LR0.c (new_state): Recognize the final state by the fact it
14281 is reached by eoftoken.
14282 (insert_start_shifting_state, insert_eof_shifting_state)
14283 (insert_accepting_state, augment_automaton): Remove, since now
14284 these states are automatically computed from the initial state.
14285 (generate_states): Adjust.
14286 * src/print.c: When reporting a rule number to the user, substract
14287 1, so that the axiom rule is rule 0, and the first user rule is 1.
14288 * src/reduce.c: Likewise.
14289 * src/print_graph.c (print_core): For the time being, just as for
14290 the report, depend upon --trace-flags to dump the full set of
14292 * src/reader.c (readgram): Once the grammar read, insert the rule
14293 0: `$axiom: START-SYMBOL $'.
14294 * tests/set.at: Adjust: rule 0 is now displayed, and since the
14295 number of the states has changed (the final state is no longer
14296 necessarily the last), catch up.
14298 2001-12-27 Akim Demaille <akim@epita.fr>
14300 Try to make the use of the eoftoken valid. Given that its value
14301 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
14302 is used instead of > 0 where appropriate, (ii), depend upon nritems
14303 instead of the 0-sentinel.
14305 * src/gram.h, src/gram.c (nritems): New.
14306 Expected to be duplication of nitems, but for the time being...
14307 * src/reader.c (packgram): Assert nritems and nitems are equal.
14308 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
14309 * src/closure.c (print_closure, print_fderives): Likewise.
14310 * src/gram.c (ritem_print): Likewise.
14311 * src/print.c (print_core, print_grammar): Likewise.
14312 * src/print_graph.c: Likewise.
14314 2001-12-27 Akim Demaille <akim@epita.fr>
14316 * src/main.c (main): If there are complains after grammar
14317 reductions, then output the report anyway if requested, then die.
14318 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
14319 * src/reader.c (eoftoken): New.
14320 (parse_token_decl): If the token being defined has value `0', it
14322 (packsymbols): No longer hack `tags' to insert `$' by hand.
14323 Be sure to preserve the value of the eoftoken.
14324 (reader): Make sure eoftoken is defined.
14325 Initialize nsyms to 0: now eoftoken is created just like the others.
14326 * src/print.c (print_grammar): Don't special case the eof token.
14327 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
14328 lie anyway, albeit pleasant.
14329 * tests/calc.at: Exercise error messages with eoftoken.
14330 Change the grammar so that empty input is invalid.
14331 Adjust expectations.
14332 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
14334 2001-12-27 Akim Demaille <akim@epita.fr>
14336 * configure.in: Check the protos of strchr ans strspn.
14337 Replace strchr if needed.
14338 * src/system.h: Provide the protos of strchr, strspn and memchr if
14340 * lib/strchr.c: New.
14341 * src/reader.c (symbols_save): Use strchr.
14343 2001-12-27 Akim Demaille <akim@epita.fr>
14345 * src/print.c, src/print_graph.c (escape): New.
14346 Use it to quote the TAGS outputs.
14347 * src/print_graph.c (print_state): Now errors are in red, and
14348 reductions in green.
14349 Prefer high to wide: output the state number on a line of its own.
14351 2001-12-27 Akim Demaille <akim@epita.fr>
14353 * src/state.h, src/state.c (reductions_new): New.
14354 * src/LR0.c (set_state_table): Let all the states have a
14355 `reductions', even if reduced to 0.
14356 (save_reductions): Adjust.
14357 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
14358 * src/print.c (print_reductions, print_actions): Adjust.
14359 * src/output.c (action_row): Adjust.
14361 2001-12-27 Akim Demaille <akim@epita.fr>
14363 * src/state.h, src/state.c (errs_new, errs_dup): New.
14364 * src/LR0.c (set_state_table): Let all the states have an errs,
14365 even if reduced to 0.
14366 * src/print.c (print_errs, print_reductions): Adjust.
14367 * src/output.c (output_actions, action_row): Adjust.
14368 * src/conflicts.c (resolve_sr_conflict): Adjust.
14370 2001-12-27 Akim Demaille <akim@epita.fr>
14372 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
14374 2001-12-27 Akim Demaille <akim@epita.fr>
14376 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
14377 * src/print.c: here.
14378 (lookaheadset, shiftset): New, used as additional storage by
14380 (print_results): Adjust.
14381 (print_shifts, print_gotos, print_errs): New, extracted from...
14382 (print_actions): here.
14383 * src/print_graph.c (print_actions): Remove dead code.
14385 2001-12-27 Akim Demaille <akim@epita.fr>
14387 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
14390 2001-12-27 Akim Demaille <akim@epita.fr>
14392 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
14393 (build_relations): Adjust.
14395 2001-12-27 Akim Demaille <akim@epita.fr>
14397 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
14400 2001-12-27 Akim Demaille <akim@epita.fr>
14402 * src/reader.c (packgram): Catch nitems overflows.
14404 2001-12-27 Akim Demaille <akim@epita.fr>
14406 * src/files.c, src/files.h (guard_obstack): Remove.
14407 * src/output.c (output): Adjust.
14408 * src/reader.c (parse_braces): New, factoring...
14409 (copy_action, copy_guard): these two which are renamed as...
14410 (parse_action, parse_guard): these.
14411 As a voluntary consequence, using braces around guards is now
14414 2001-12-27 Akim Demaille <akim@epita.fr>
14416 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
14417 * src/reader.c (symbol_list): `guard' and `guard_line' are new
14419 (symbol_list_new): Adjust.
14420 (copy_action): action_line is the first line, not the last.
14421 (copy_guard): Just as for actions, store the `action' only, not
14422 the switch/case/break flesh.
14423 Don't parse the user action that might follow the guard, let...
14424 (readgram): do it, i.e., now, there can be an action after a
14426 In other words the guard is just explicitly optional.
14427 (packgram): Adjust.
14428 * src/output.c (guards_output): New.
14429 (output_parser): Call it when needed.
14430 (output): Also free the guard and attrs obstacks.
14431 * src/files.c, src/files.h (obstack_save): Remove.
14432 (output_files): Remove.
14433 As a result, if one needs the former `.act' file, using an
14434 appropriate skeleton which requires actions and guards is now
14436 * src/main.c (main): Adjust.
14437 * tests/semantic.at: New.
14438 * tests/regression.at: Use `input.y' as input file name.
14439 Avoid 8+3 problems by requiring input.c when the test needs the
14442 2001-12-27 Akim Demaille <akim@epita.fr>
14444 * src/reader.c (symbol_list_new): Be sure to initialize all the
14447 2001-12-27 Akim Demaille <akim@epita.fr>
14449 All the hacks using a final pseudo state are now useless.
14451 * src/LR0.c (set_state_table): state_table holds exactly nstates.
14452 * src/lalr.c (nLA): New.
14453 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
14454 instead of lookaheadsp from the pseudo state (nstate + 1).
14456 2001-12-27 Akim Demaille <akim@epita.fr>
14458 * src/output.c (action_row, token_actions): Use a state_t instead
14459 of a integer, and nlookaheads instead of the following state's
14462 2001-12-27 Akim Demaille <akim@epita.fr>
14464 * src/conflicts.c (log_resolution, flush_shift)
14465 (resolve_sr_conflict, set_conflicts, solve_conflicts)
14466 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
14467 (conflicts_print, print_reductions): Use a state_t instead of an
14468 integer when referring to a state.
14469 As much as possible, depend upon nlookaheads, instead of the
14470 `lookaheadsp' member of the following state (since lookaheads of
14471 successive states are successive, the difference between state n + 1
14472 and n served as the number of lookaheads for state n).
14473 * src/lalr.c (add_lookback_edge): Likewise.
14474 * src/print.c (print_core, print_actions, print_state)
14475 (print_results): Likewise.
14476 * src/print_graph.c (print_core, print_actions, print_state)
14477 (print_graph): Likewise.
14478 * src/conflicts.h: Adjust.
14480 2001-12-27 Akim Demaille <akim@epita.fr>
14482 * src/bison.hairy: Formatting/comment changes.
14484 Remove `register' indications.
14485 Add plenty of `static'.
14487 2001-12-27 Akim Demaille <akim@epita.fr>
14489 * src/output.c (prepare): Drop the muscle `ntbase' which
14490 duplicates ntokens.
14491 * src/bison.simple: Formatting/comment changes.
14492 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
14493 is an undocumented synonym.
14495 2001-12-22 Akim Demaille <akim@epita.fr>
14497 * src/output.c (output_table_data): Change the prototype to use
14498 `int' for array ranges: some invocations do pass an int, not a
14500 Reported by Wayne Green.
14502 2001-12-22 Akim Demaille <akim@epita.fr>
14504 Some actions of web2c.y are improperly triggered.
14505 Reported by Mike Castle.
14507 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
14508 * tests/regression.at (Web2c): Rename as...
14509 (Web2c Report): this.
14510 (Web2c Actions): New.
14512 2001-12-22 Akim Demaille <akim@epita.fr>
14514 Reductions in web2c.y are improperly reported.
14515 Reported by Mike Castle.
14517 * src/conflicts.c (print_reductions): Fix.
14518 * tests/regression.at (Web2c): New.
14520 2001-12-18 Akim Demaille <akim@epita.fr>
14522 Some host fail on `assert (!"foo")', which expands to
14523 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
14524 Reported by Nelson Beebee.
14526 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
14527 `#define it_succeeded 0' and `assert (it_succeeded)'.
14529 2001-12-17 Marc Autret <autret_m@epita.fr>
14531 * src/bison.simple: Don't hard code the skeleton line and filename.
14532 * src/output.c (output_parser): Rename 'line' as 'output_line'.
14533 New line counter 'skeleton_line' (skeleton-line muscle).
14535 2001-12-17 Paul Eggert <eggert@twinsun.com>
14537 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
14538 YYDEBUG must be defined to a nonzero value.
14540 * src/bison.simple (yytname): Do not assume that the user defines
14541 YYDEBUG to a properly parenthesized expression.
14543 2001-12-17 Akim Demaille <akim@epita.fr>
14545 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
14546 nlookaheads is a new member.
14548 * src/lalr.h (nlookaheads): Remove this orphan declaration.
14549 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
14552 2001-12-17 Akim Demaille <akim@epita.fr>
14554 * src/files.h, src/files.c (open_files, close_files): Remove.
14555 * src/main.c (main): Don't open/close files, nor invoke lex_free,
14557 * src/reader.c (reader): Do it.
14559 2001-12-17 Akim Demaille <akim@epita.fr>
14561 * src/conflicts.c (print_reductions): Formatting changes.
14563 2001-12-17 Akim Demaille <akim@epita.fr>
14565 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
14566 (flush_reduce): New.
14567 (resolve_sr_conflict): Adjust.
14569 2001-12-17 Akim Demaille <akim@epita.fr>
14571 * src/output.c (output_obstack): Be static and rename as...
14572 (format_obstack): this, to avoid any confusion with files.c's
14574 * src/reader.h (muscle_obstack): Move to...
14575 * src/output.h: here, since it's defined in output.c.
14577 2001-12-17 Akim Demaille <akim@epita.fr>
14579 * src/output.c (action_row, save_column, default_goto)
14580 (sort_actions, matching_state, pack_vector): Better variable
14583 2001-12-17 Akim Demaille <akim@epita.fr>
14585 * src/output.c: Various formatting changes.
14587 2001-12-17 Akim Demaille <akim@epita.fr>
14589 * src/files.c (output_files): Free the output_obstack.
14590 * src/main.c (main): Call print and print_graph conditionally.
14591 * src/print.c (print): Work unconditionally.
14592 * src/print_graph.c (print_graph): Work unconditionally.
14593 * src/conflicts.c (log_resolution): Output only if verbose_flag.
14595 2001-12-16 Marc Autret <autret_m@epita.fr>
14597 * src/output.c (actions_output): Fix. When we use %no-lines,
14598 there is one less line per action.
14600 2001-12-16 Marc Autret <autret_m@epita.fr>
14602 * src/bison.simple: Remove a useless #line directive.
14603 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
14604 * src/output.c (get_lines_number): New.
14605 (output_parser): Adjust, now takes care about the lines of a
14607 Fix line numbering.
14608 (actions_output): Computes the number of lines taken by actions.
14609 (output_master_parser): Insert new skeleton which is the name of
14610 the output parser file name.
14612 2001-12-15 Marc Autret <autret_m@epita.fr>
14614 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
14616 2001-12-15 Marc Autret <autret_m@epita.fr>
14618 * src/output.c (output_gram): Keep track of the hairy one.
14620 2001-12-15 Akim Demaille <akim@epita.fr>
14622 Make `make distcheck' work.
14624 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
14625 system.h which uses libgettext.h.
14627 2001-12-15 Akim Demaille <akim@epita.fr>
14629 * src/nullable.c (set_nullable): Useless rules must be skipped,
14630 otherwise, since we range over their symbols, we might look at a
14631 nonterminal which no longer ``exists'', i.e., it is not counted in
14632 `nvars', hence we overflow our arrays.
14634 2001-12-15 Akim Demaille <akim@epita.fr>
14636 The header can also be produced directly, without any obstack!
14639 * src/files.c, src/files.h (defines_obstack): Remove.
14640 (compute_header_macro): Global.
14641 (defines_obstack_save): Remove.
14642 * src/reader.c (parse_union_decl): No longer output to
14643 defines_obstack: its content can be found in the `stype' muscle
14645 (output_token_translations): Merge into...
14646 (symbols_output): this.
14648 (symbols_save): this.
14650 * src/output.c (header_output): New.
14653 2001-12-15 Akim Demaille <akim@epita.fr>
14655 * src/reader.c (parse_union_decl): Instead of handling two obstack
14656 simultaneously, use one to define the `stype' muscle, and use the
14657 value of the latter to fill defines_obstack.
14658 (copy_comment): Remove.
14659 (copy_comment2): Work for a single obstack.
14661 (copy_comment): this.
14663 2001-12-15 Akim Demaille <akim@epita.fr>
14665 * src/lex.c, src/lex.h (xgetc): No longer static.
14666 * src/reader.c (parse_union_decl): Revamp.
14668 2001-12-15 Akim Demaille <akim@epita.fr>
14670 Still making progress in separating Bison into (i) input, (ii)
14671 process, (iii) output: now we can directly output the parser file
14672 without using table_obstack at all.
14674 * src/files.c, src/files.h (table_obstack): Bye bye.
14675 (parser_file_name): New.
14676 * src/files.c (compute_output_file_names): Compute it.
14677 * src/output.c (actions_output, output_parser)
14678 (output_master_parser): To a file instead of an obstack.
14680 2001-12-15 Akim Demaille <akim@epita.fr>
14682 Attach actions to rules, instead of pre-outputting them to
14685 * src/gram.h (rule_t): action and action_line are new members.
14686 * src/reader.c (symbol_list): Likewise.
14687 (copy_action): Save the actions within the rule.
14688 (packgram): Save them in rule_table.
14689 * src/output.c (actions_output): New.
14690 (output_parser): Use it on `%%actions'.
14691 (output_rule_data): Don't free rule_table.
14693 (prepare): Don't save the `action' muscle.
14694 * src/bison.simple: s/%%action/%%actions/.
14696 2001-12-15 Akim Demaille <akim@epita.fr>
14698 * src/reader.c (copy_action): When --yacc, don't append a `;'
14699 to the user action: let it fail if lacking.
14700 Suggested by Arnold Robbins and Tom Tromey.
14702 2001-12-14 Akim Demaille <akim@epita.fr>
14704 * src/lex.c (literalchar): Simply return the char you decoded, non
14705 longer mess around with obstacks and int pointers.
14706 Adjust all callers.
14708 2001-12-14 Akim Demaille <akim@epita.fr>
14710 * src/lex.c (literalchar): Don't escape the special characters,
14711 just decode them, and keep them as char (before, eol was output as
14712 the 2 char string `\n' etc.).
14713 * src/output.c (output_rule_data): Use quotearg to output the
14716 2001-12-13 Paul Eggert <eggert@twinsun.com>
14718 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
14719 Do not infringe on the global user namespace when using C++.
14720 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
14721 All uses of `fprintf' and `stderr' changed.
14723 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
14725 2001-12-13 Akim Demaille <akim@epita.fr>
14727 The computation of nullable is broken: it doesn't handle empty
14730 * tests/torture.at (GNU AWK Grammar): New.
14731 * tests/sets.at (Nullable): New.
14732 * src/nullable.c (set_nullable): Instead of blindly looping over
14733 `ritems', loop over the rules, and then over their rhs's.
14735 Work around Autotest bugs.
14737 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
14738 frame, because Autotest understand lines starting with a `+' as
14739 traces from the shell. Then, they are not processed properly.
14740 Admittedly an Autotest bug, but we don't have time to wait for
14741 Autotest to catch up.
14742 * tests/regression.at (Broken Closure): Adjust to the new table
14745 * tests/sets.at: here.
14747 2001-12-13 Akim Demaille <akim@epita.fr>
14749 * src/closure.c (closure): Use nrules instead of playing tricks
14750 with BITS_PER_WORD.
14752 2001-12-13 Akim Demaille <akim@epita.fr>
14754 * src/print.c (print_actions): Output the handling of `$' as the
14755 traces do: shifting the token EOF. Before EOF was treated as a
14757 * tests/regression.at: Adjust some tests.
14758 * src/print_graph.c (print_core): Complete the set of items via
14759 closure. The next-to-final and final states are still unsatisfying,
14760 but that's to be addressed elsewhere.
14761 No longer output the rule numbers, but do output the state number.
14762 A single loop for the shifts + gotos is enough, but picked a
14763 distinct color for each.
14764 (print_graph): Initialize and finalize closure.
14766 2001-12-13 Akim Demaille <akim@epita.fr>
14768 * src/reader.c (readgram): Remove dead code, an strip useless
14770 (get_type): Remove, unused.
14772 2001-12-12 Akim Demaille <akim@epita.fr>
14774 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
14775 on that of lib/error.c.
14777 2001-12-12 Akim Demaille <akim@epita.fr>
14779 Some hosts don't like `/' in includes.
14781 * src/system.h: Include libgettext.h without qualifying the path.
14782 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
14785 2001-12-11 Marc Autret <autret_m@epita.fr>
14787 * src/output.c (output_parser): Remove useless muscle.
14789 2001-12-11 Marc Autret <autret_m@epita.fr>
14791 * src/bison.simple: Remove #line just before %%epilogue. It
14792 is now handled in ...
14793 * src/reader.c (read_additionnal_code): Add the output of a
14794 #line for the epilogue.
14796 2001-12-10 Marc Autret <autret_m@epita.fr>
14798 * src/reader.c (copy_definition): Re-use CPP-outed code which
14799 replace precedent remove.
14800 * src/bison.simple: Remove #line before %%prologue because
14801 %%input-line is wrong at this time.
14803 2001-12-10 Marc Autret <autret_m@epita.fr>
14805 * src/reader.c (symbols_output): Clean up.
14806 * src/output.c (output_gram, output): Clean up.
14808 2001-12-10 Akim Demaille <akim@epita.fr>
14810 * src/lalr.c (initialize_lookaheads): New. Extracted from...
14811 * src/LR0.c (set_state_table): here.
14812 * src/lalr.c (lalr): Call it.
14814 2001-12-10 Akim Demaille <akim@epita.fr>
14816 * src/state.h (shifts): Remove the `number' member: shifts are
14817 attached to state, hence no longer need to be labelled with a
14820 2001-12-10 Akim Demaille <akim@epita.fr>
14822 Now that states have a complete set of members, the linked list of
14823 shifts is useless: just fill directly the state's shifts member.
14825 * src/state.h (shifts): Remove the `next' member.
14826 * src/LR0.c (first_state, last_state): Remove.
14827 Adjust the callers.
14828 (augment_automaton): Don't look for the shifts that must be added
14829 a shift on EOF: it is those of the state we looked for! But now,
14830 since shifts are attached, it is no longer needed to looking
14831 merely by its id: its number.
14833 2001-12-10 Akim Demaille <akim@epita.fr>
14835 * src/LR0.c (augment_automaton): Better variable locality.
14836 Remove an impossible branch: if there is a state corresponding to
14837 the start symbol being shifted, then there is shift for the start
14838 symbol from the initial state.
14840 2001-12-10 Akim Demaille <akim@epita.fr>
14842 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
14843 only when appropriate: when insert_start_shifting_state' is not
14845 * tests/regression.at (Rule Line Numbers): Adjust.
14847 2001-12-10 Akim Demaille <akim@epita.fr>
14849 * src/LR0.c (augment_automaton): Now that all states have shifts,
14850 merge the two cases addition shifts to the initial state.
14852 2001-12-10 Akim Demaille <akim@epita.fr>
14854 * src/lalr.c (set_state_table): Move to...
14856 * src/lalr.c (lalr): Don't call it...
14857 * src/LR0.c (generate_states): do it.
14858 * src/LR0.h (first_state): Remove, only the table is used.
14860 2001-12-10 Akim Demaille <akim@epita.fr>
14862 * src/LR0.h (first_shift, first_reduction): Remove.
14863 * src/lalr.c: Don't use first_shift: find shifts through the
14866 2001-12-10 Akim Demaille <akim@epita.fr>
14868 * src/LR0.c: Attach shifts to states as soon as they are
14870 * src/lalr.c (set_state_table): Instead of assigning shifts to
14871 state, just assert that the mapping was properly done.
14873 2001-12-10 Akim Demaille <akim@epita.fr>
14875 * src/LR0.c (insert_start_shift): Rename as...
14876 (insert_start_shifting_state): this.
14877 (insert_eof_shifting_state, insert_accepting_state): New.
14878 (augment_automaton): Adjust.
14879 Better locality of the variables.
14880 When looking if the start_symbol is shifted from the initial
14881 state, using `while (... symbol != start_symbol ...)' sounds
14882 better than `while (... symbol < start_symbol ...)': If fail
14883 to see how the order between symbols could be relevant!
14885 2001-12-10 Akim Demaille <akim@epita.fr>
14887 * src/getargs.h: Don't declare `spec_name_prefix' and
14888 `spec_file_prefix', declared by src/files.h.
14889 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
14890 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
14891 * src/output.c (prepare): Adjust.
14892 * src/reader.c (symbols_output): Likewise.
14893 * src/vmsgetargs.c: Vaguely adjust, but who cares?
14895 2001-12-10 Akim Demaille <akim@epita.fr>
14897 * src/muscle_tab.c (muscle_init): NULL is a better default than
14900 2001-12-10 Akim Demaille <akim@epita.fr>
14902 * src/reader.c (reader): Calling symbols_output once is enough.
14904 2001-12-10 Akim Demaille <akim@epita.fr>
14906 Now that states have a complete set of members, the linked list of
14907 reductions is useless: just fill directly the state's reductions
14910 * src/state.h (struct reductions): Remove member `number' and
14912 * src/LR0.c (first_reduction, last_reduction): Remove.
14913 (save_reductions): Don't link the new reductions, store them in
14915 * src/lalr.c (set_state_table): No need to attach reductions to
14916 states, it's already done.
14917 * src/output.c (output_actions): No longer free the shifts, then
14918 the reductions, then the states: free all the states and their
14921 2001-12-10 Akim Demaille <akim@epita.fr>
14923 * src/options.c (OPTN, DRTV, BOTH): New.
14924 (option_table): Use them.
14926 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
14927 the job of system.h.
14928 * src/options.c: Don't include stdio.h and xalloc.h for the same
14931 2001-12-10 Akim Demaille <akim@epita.fr>
14933 * src/output.c (output, prepare): Make sure the values of the
14934 muscles `action' and `prologue' are 0-terminated.
14936 2001-12-10 Akim Demaille <akim@epita.fr>
14938 Clean up GCC warnings.
14940 * src/reader.c (copy_action): `buf' is not used.
14941 (parse_skel_decl): Be static.
14942 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
14943 * src/options.h (create_long_option_table): Have a real prototype.
14944 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
14945 (hash_delete_at): Return const void *.
14946 Adjust casts to preserve the const.
14948 2001-12-10 Akim Demaille <akim@epita.fr>
14950 * configure.in: Require 2.52g.
14951 M4 is not needed, but AUTOM4TE is.
14952 * m4/m4.m4: Remove.
14953 * tests/Makefile.am: Adjust.
14955 2001-12-10 Akim Demaille <akim@epita.fr>
14957 One structure for states is enough, even though theoretically
14958 there are LR(0) states and LALR(1) states.
14960 * src/lalr.h (state_t): Remove.
14961 (state_table): Be state_t **, not state_t *.
14962 * src/state.h (core, CORE_ALLOC): Rename as...
14963 (state_t, STATE_ALLOC): this.
14964 Add the LALR(1) members: shifts, reductions, errs.
14965 * src/LR0.c (state_table): Rename as...
14966 (state_hash): this, to avoid name clashes with the global
14968 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
14969 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
14971 2001-12-10 Akim Demaille <akim@epita.fr>
14973 Bison dumps core on bash.y.
14974 Reported by Pascal Bart.
14976 * src/warshall.c (bitmatrix_print): New.
14978 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
14979 j must be the outer loop.
14980 * tests/regression.at (Broken Closure): New.
14982 2001-12-05 Akim Demaille <akim@epita.fr>
14984 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
14986 Reported by Peter Hamorsky.
14988 2001-12-05 Akim Demaille <akim@epita.fr>
14990 * src/conflicts.c (err_table): Remove.
14991 (resolve_sr_conflict): Adjust.
14992 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
14994 (state_t.reductions, state_t.shifts): this.
14996 2001-12-05 Akim Demaille <akim@epita.fr>
14998 * src/reduce.c (reduce_grammar_tables): No longer disable the
14999 removal of useless rules via CPP but via `if (0)', so that the
15000 compiler still check the code is valid.
15001 For instance, it should have noticed `rline' no longer exists: use
15002 the `line' member of rule_t.
15003 * src/gram.c (dummy, rline): Remove, unused.
15005 2001-12-05 Akim Demaille <akim@epita.fr>
15007 * src/output.c (pack_vector): Use assert, not berror.
15008 * src/main.c (berror): Remove, unused.
15010 2001-12-05 Akim Demaille <akim@epita.fr>
15012 New experimental feature: if --verbose --trace output all the
15013 items of a state, not only its kernel.
15015 * src/print.c (print_core): If `trace_flag', then invoke closure
15016 before outputting the items of the state (print_core is no longer
15017 a correct name them).
15018 (print_results): Invoke new_closure/free_closure if needed.
15020 2001-12-05 Akim Demaille <akim@epita.fr>
15022 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
15023 * src/closure.c, src/closure.h (itemsetsize): Rename as...
15024 (nitemset): for consistency with the rest of the project.
15026 2001-12-05 Akim Demaille <akim@epita.fr>
15028 * src/closure.c (print_closure): Improve.
15029 (closure): Use it for printing input and output.
15031 2001-12-05 Akim Demaille <akim@epita.fr>
15033 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
15034 indexed by nonterminals.
15036 2001-12-05 Akim Demaille <akim@epita.fr>
15038 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
15040 * src/warshall.h: Remove accidental duplication of the content.
15042 2001-12-05 Akim Demaille <akim@epita.fr>
15044 * src/closure.c (set_fderives): De-obfuscate.
15046 2001-12-05 Akim Demaille <akim@epita.fr>
15048 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
15050 2001-12-05 Akim Demaille <akim@epita.fr>
15052 * src/closure.c (set_firsts): De-obfuscate.
15054 2001-12-05 Akim Demaille <akim@epita.fr>
15056 * src/output.c (action_row): De-obfuscate
15057 using the good o' techniques: arrays not pointers, variable
15058 locality, BITISSET, RESETBIT etc.
15060 2001-12-05 Akim Demaille <akim@epita.fr>
15062 Pessimize the code to simplify it: from now on, all the states
15063 have a valid SHIFTS, which NSHIFTS is possibly 0.
15065 * src/LR0.c (shifts_new): Be global and move to..
15066 * src/state.c, src/state.h: here.
15067 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
15068 * src/print_graph: Adjust.
15070 2001-12-05 Akim Demaille <akim@epita.fr>
15072 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
15073 * src/conflicts.c: Use it.
15074 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
15075 incorrectly ``simplified''.
15077 2001-12-05 Akim Demaille <akim@epita.fr>
15079 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
15080 using the good o' techniques: arrays not pointers, variable
15081 locality, BITISSET, RESETBIT etc.
15083 2001-12-05 Akim Demaille <akim@epita.fr>
15085 * src/state.h (SHIFT_SYMBOL): New.
15086 * src/conflicts.c: Use it to deobfuscate.
15088 2001-12-05 Akim Demaille <akim@epita.fr>
15090 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
15091 (print_reductions): De-obfuscate using the good o' techniques:
15092 arrays not pointers, variable locality, BITISSET.
15094 2001-12-05 Akim Demaille <akim@epita.fr>
15096 * src/conflicts.c (print_reductions): Arrays, not pointers.
15099 2001-12-05 Akim Demaille <akim@epita.fr>
15101 * src/conflicts.c (print_reductions): Pessimize, but clarify.
15103 2001-12-05 Akim Demaille <akim@epita.fr>
15105 * src/conflicts.c (print_reductions): Improve variable locality.
15107 2001-12-05 Akim Demaille <akim@epita.fr>
15109 * src/conflicts.c (print_reductions): Pessimize, but clarify.
15111 2001-12-05 Akim Demaille <akim@epita.fr>
15113 * src/conflicts.c (print_reductions): Improve variable locality.
15115 2001-12-05 Akim Demaille <akim@epita.fr>
15117 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
15118 * src/lalr.c: Use them.
15120 2001-12-05 Akim Demaille <akim@epita.fr>
15122 * src/LR0.c (augment_automaton): Formatting changes.
15123 Better variable locality.
15125 2001-12-05 Akim Demaille <akim@epita.fr>
15127 * src/lalr.c (matrix_print): New.
15128 (transpose): Use it.
15129 Use arrays instead of pointers.
15131 2001-12-05 Akim Demaille <akim@epita.fr>
15133 * src/lalr.c (maxrhs): Move to...
15134 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
15135 * src/lalr.c (build_relations): Adjust.
15137 2001-12-05 Akim Demaille <akim@epita.fr>
15139 * src/lalr.c (transpose): Free the memory allocated to the
15140 argument, as it is replaced by the results by the unique caller.
15141 (build_relations): Merely invoke transpose: it handles the memory
15143 Improve variable locality.
15144 Avoid variables used as mere abbreviations.
15145 (compute_lookaheads): Use arrays instead of pointers.
15147 2001-12-05 Akim Demaille <akim@epita.fr>
15149 * src/lalr.c (initialize_F): Improve variable locality.
15150 Avoid variables used as mere abbreviations.
15152 2001-12-05 Akim Demaille <akim@epita.fr>
15154 * src/derives.c (print_derives): Display the ruleno.
15155 * src/lalr.c (initialize_F, transpose): Better variable locality
15156 to improve readability.
15157 Avoid variables used as mere abbreviations.
15159 2001-12-05 Akim Demaille <akim@epita.fr>
15161 * src/lalr.c (traverse): Use arrays instead of pointers.
15163 2001-12-05 Akim Demaille <akim@epita.fr>
15165 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
15166 the handling of squeue.
15167 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
15169 2001-12-05 Akim Demaille <akim@epita.fr>
15171 Because useless nonterminals are now kept alive (instead of being
15172 `destroyed'), we now sometimes examine them, and store information
15173 related to them. Hence we need to know their number, and adjust
15174 memory allocations.
15176 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
15178 * src/LR0.c (allocate_itemsets): The memory allocated to
15179 `symbol_count' was used for two different purpose: once to count
15180 the number of occurrences of each symbol, and later reassigned to
15181 `shift_symbol', containing the symbol that can be shifted from a
15183 Deobfuscate, i.e., allocate, use and free `symbol_count' here
15185 (new_itemsets): Allocate `shift_symbol' here.
15186 (allocate_itemsets): symbol_count includes useless nonterminals.
15187 Make room for them.
15188 (free_storage): Use `free', not `XFREE', for pointers that cannot
15191 2001-12-05 Akim Demaille <akim@epita.fr>
15193 * src/nullable.c (set_nullable): Deobfuscate the handling of
15195 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
15197 2001-12-05 Akim Demaille <akim@epita.fr>
15199 * src/gram.c, src/gram.h (ritem_print): New.
15200 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
15201 (This useless function was defined only to work around VMS linkers
15202 that can't handle compilation units with variables only).
15203 * src/reduce.c (dump_grammar): Use it to trace the construction of
15206 2001-12-04 Paul Eggert <eggert@twinsun.com>
15208 * src/bison.simple (union yyalloc): Change member names
15209 to be the same as the stack names.
15210 (yyparse): yyptr is now union yyalloc *, not char *.
15211 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
15212 and may generate better code on some machines.
15213 (yystpcpy): Use prototype if __STDC__ is defined, not just
15214 if __cplusplus is defined.
15216 2001-11-30 Akim Demaille <akim@epita.fr>
15218 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
15219 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
15220 Gettext doesn't compile cleanly, and dies with -Werror.
15221 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
15222 Include WARNING_CFLAGS here.
15223 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
15224 before being defined.
15226 2001-11-27 Paul Eggert <eggert@twinsun.com>
15228 * lib/quotearg.h (quotearg_n, quotearg_n_style):
15229 First arg is int, not unsigned.
15230 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
15231 (SIZE_MAX, UINT_MAX): New macros.
15232 (quotearg_n_options): Abort if N is negative.
15233 Avoid overflow check on hosts where size_t is 64 bits and int
15234 is 32 bits, as overflow is impossible there.
15235 Fix off-by-one typo that caused unnecessary reallocation.
15237 2001-11-29 Paul Eggert <eggert@twinsun.com>
15239 Name space cleanup in generated parser.
15241 * doc/bison.texinfo (Bison Parser): Discuss system headers
15242 and their effect on the user name space.
15244 * src/bison.simple:
15245 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
15246 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
15247 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
15249 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
15250 on user names when possible.
15252 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
15253 Simplify test for whather <alloca.h> exists.
15255 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
15257 (<stdio.h>): Include if YYDEBUG.
15259 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
15260 ! defined (yyoverflow) && ! defined (yymemcpy).
15262 (yymemcpy, yyparse): Rename local variables as needed so that
15263 they all begin with 'yy'.
15265 (yystrlen, yystpcpy): New functions.
15267 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
15270 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
15271 instead of relying on string.h functions. Use YYSTACK_ALLOC
15272 and YYSTACK_FREE instead of malloc and free.
15274 2001-11-30 Akim Demaille <akim@epita.fr>
15276 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
15277 before their first uses.
15278 (YYBISON, YYPURE): Move to the top of the output.
15280 2001-11-30 Akim Demaille <akim@epita.fr>
15282 * tests/reduce.at (Useless Nonterminals): Fix.
15284 2001-11-30 Akim Demaille <akim@epita.fr>
15286 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
15287 if body instead of `;' to pacify GCC's warnings.
15289 2001-11-30 Akim Demaille <akim@epita.fr>
15291 Instead of mapping the LHS of unused rules to -1, keep the LHS
15292 valid, but flag the rules as invalid.
15294 * src/gram.h (rule_t): `useful' is a new member.
15295 * src/print.c (print_grammar): Adjust.
15296 * src/derives.c (set_derives): Likewise.
15297 * src/reader.c (packgram, reduce_output): Likewise.
15298 * src/reduce.c (reduce_grammar_tables): Likewise.
15299 * tests/reduce.at (Underivable Rules, Useless Rules): New.
15301 2001-11-30 Akim Demaille <akim@epita.fr>
15303 * src/reduce.c (reduce_output): Formatting changes.
15304 * src/print.c (print_results, print_grammar): Likewise.
15305 * tests/regression.at (Rule Line Numbers)
15306 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
15308 2001-11-30 Akim Demaille <akim@epita.fr>
15310 * src/reduce.c (nonterminals_reduce): Instead of throwing away
15311 useless nonterminals, move them at the end of the symbol arrays.
15312 (reduce_output): Adjust.
15313 * tests/reduce.at (Useless Nonterminals): Adjust.
15315 2001-11-30 Akim Demaille <akim@epita.fr>
15317 * src/reduce.c: Various comment/formatting changes.
15318 (nonterminals_reduce): New, extracted from...
15319 (reduce_grammar_tables): here.
15320 (reduce_grammar): Call nonterminals_reduce.
15322 2001-11-29 Paul Eggert <eggert@twinsun.com>
15324 * src/bison.simple (YYSTACK_REALLOC): Remove.
15325 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
15326 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
15328 (union yyalloc): New type.
15329 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
15330 an arbitrary restriction on hosts where size_t is wider than int.
15332 (yyparse): Don't dump core if alloca or malloc fails; instead, report
15333 a parser stack overflow. Allocate just one block of memory for all
15334 three stacks, instead of allocating three blocks; this typically is
15335 faster and reduces fragmentation.
15337 Do not limit the number of items in the stack to a value that fits
15338 in 'int', as this is an arbitrary limit on hosts with 64-bit
15339 size_t and 32-bit int.
15341 2001-11-29 Marc Autret <autret_m@epita.fr>
15343 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
15344 of defining YYERROR_VERBOSE.
15345 [AT_DATA]: $4 is now out of C declarations in the prologue.
15347 2001-11-28 Marc Autret <autret_m@epita.fr>
15349 * src/reader.c (parse_dquoted_param): New.
15350 (parse_skel_decl): Use it.
15351 * src/lex.h: Add its prototype.
15352 * src/lex.c (literalchar): Become not static.
15354 2001-11-28 Marc Autret <autret_m@epita.fr>
15356 * src/output.h: And put its extern declaration here.
15357 * src/output.c (error_verbose): Define here.
15358 (prepare): Echo name modification.
15359 * src/getargs.h: Clean its extern declaration.
15360 * src/getargs.c (error_verbose_flag): Remove.
15361 (getargs): Remove case 'e'.
15362 * src/options.c (option_table): 'error-verbose' is now seen as simple
15366 * src/reader.c (read_declarations): Remove case tok_include.
15367 (parse_include_decl): Remove.
15368 * src/lex.h (token_t): Remove tok_include.
15369 * src/options.c (option_table): 'include' is now a simple command line
15372 2001-11-28 Marc Autret <autret_m@epita.fr>
15374 * src/bison.simple: Adjust muscle names.
15375 * src/muscle_tab.c (muscle_init): Also rename the muscles.
15376 * src/output.c (prepare): s/_/-/ for the muscles names.
15377 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
15379 2001-11-28 Marc Autret <autret_m@epita.fr>
15381 * src/bison.simple: Fix debug.
15382 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
15384 2001-11-28 Akim Demaille <akim@epita.fr>
15386 * src/LR0.c (shifts_new): New.
15387 (save_shifts, insert_start_shift, augment_automaton): Use it.
15389 2001-11-28 Akim Demaille <akim@epita.fr>
15391 * src/closure.c (closure): `b' and `ruleno' denote the same value:
15394 2001-11-28 Akim Demaille <akim@epita.fr>
15396 * src/closure.c (closure): Instead of looping over word in array
15397 then bits in words, loop over bits in array.
15399 2001-11-28 Akim Demaille <akim@epita.fr>
15401 * src/closure.c (closure): No longer optimize the special case
15402 where all the bits of `ruleset[r]' are set to 0, to make the code
15405 2001-11-28 Akim Demaille <akim@epita.fr>
15407 * src/closure.c (closure): `r' and `c' are new variables, used to
15408 de-obfuscate accesses to RULESET and CORE.
15410 2001-11-28 Akim Demaille <akim@epita.fr>
15412 * src/reduce.c (reduce_print): Use ngettext.
15413 (dump_grammar): Improve the trace accuracy.
15415 2001-11-28 Akim Demaille <akim@epita.fr>
15417 * src/reduce.c (dump_grammar): Don't translate trace messages.
15419 2001-11-28 Akim Demaille <akim@epita.fr>
15421 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
15422 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
15423 as all tags are free'ed afterwards.
15424 From Enrico Scholz.
15426 2001-11-27 Paul Eggert <eggert@twinsun.com>
15428 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
15429 use alloca when we didn't want to, and vice versa.
15431 2001-11-27 Marc Autret <autret_m@epita.fr>
15433 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
15435 * src/output.c (prepare): Remove its update.
15437 2001-11-27 Marc Autret <autret_m@epita.fr>
15439 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
15440 Use %error-verbose.
15442 2001-11-27 Marc Autret <autret_m@epita.fr>
15444 * src/bison.simple: Remove YYERROR_VERBOSE using.
15445 Use %%error_verbose.
15446 (yyparse): Likewise.
15447 * src/output.c (prepare): Give its final value.
15448 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
15449 * src/getargs.h: Add its extern declaration.
15450 * src/getargs.c (error_verbose_flag): New int.
15451 (getargs): Update to catch new case.
15452 * src/options.c (option_table): 'error-verbose' is a new option.
15453 (shortopts): Update.
15455 2001-11-27 Akim Demaille <akim@epita.fr>
15457 * src/system.h: Use intl/libgettext.h.
15458 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
15460 2001-11-27 Akim Demaille <akim@epita.fr>
15462 * tests/torture.at (Exploding the Stack Size with Malloc):
15463 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
15465 2001-11-27 Akim Demaille <akim@epita.fr>
15467 * src/files.c: Include error.h.
15468 Reported by Hans Aberg.
15470 2001-11-26 Marc Autret <autret_m@epita.fr>
15472 * src/reader.c (parse_include_decl): New, not yet implemented.
15473 (read_declarations): Add case tok_include.
15474 * src/getargs.h (include): Add its extern definition.
15475 * src/getargs.c (include): New const char *.
15476 (getargs): Add case '-I'.
15477 * src/options.c (option_table): Add include as command line and
15479 * src/lex.h (token_t): Add tok_include.
15481 2001-11-26 Akim Demaille <akim@epita.fr>
15483 * src/reader.c (readgram): Make sure rules for mid-rule actions
15484 have a lineno equal to that of their host rule.
15485 Reported by Hans Aberg.
15486 * tests/regression.at (Rule Line Numbers): New.
15488 2001-11-26 Akim Demaille <akim@epita.fr>
15490 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
15493 2001-11-26 Akim Demaille <akim@epita.fr>
15495 * src/complain.c, src/complain.h (error): Remove, provided by
15498 2001-11-26 Akim Demaille <akim@epita.fr>
15500 * src/reader.c (read_declarations): Don't abort on tok_illegal,
15501 issue an error message.
15502 * tests/regression.at (Invalid %directive): New.
15503 Reported by Hans Aberg.
15505 2001-11-26 Akim Demaille <akim@epita.fr>
15507 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
15508 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
15510 2001-11-26 Akim Demaille <akim@epita.fr>
15512 * src/conflicts.c (conflicts_print): Don't complain at all when
15513 there are no reduce/reduce conflicts, and as many shift/reduce
15514 conflicts as expected.
15515 * tests/regression.at (%expect right): Adjust.
15517 2001-11-23 Akim Demaille <akim@epita.fr>
15519 * lib/alloca.c: Update, from fileutils.
15521 2001-11-23 Akim Demaille <akim@epita.fr>
15523 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
15525 2001-11-23 Akim Demaille <akim@epita.fr>
15527 * src/system.h: Include alloca.h.
15528 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
15530 2001-11-23 Akim Demaille <akim@epita.fr>
15532 * src/print_graph.c (print_actions): Remove `rule', unused.
15533 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
15534 pacify GCC's signed < unsigned warnings.
15535 * src/closure.c (itemsetsize): Likewise.
15536 * src/reader.c (symbol_list_new): Static.
15538 2001-11-23 Akim Demaille <akim@epita.fr>
15540 Attaching lineno to buckets is stupid, since only one copy of each
15541 symbol is kept, only the line of the first occurrence is kept too.
15543 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
15544 * src/reader.c (rline_allocated): Remove, unused.
15545 (symbol_list): Have a `line' member.
15546 (symbol_list_new): New.
15547 (readgram): Use it.
15548 * src/print.c (print_grammar): Output the rule line numbers.
15549 * tests/regression.at (Solved SR Conflicts)
15550 (Unresolved SR Conflicts): Adjust.
15551 Reported by Hans Aberg.
15553 2001-11-22 Marc Autret <autret_m@epita.fr>
15555 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
15557 2001-11-22 Marc Autret <autret_m@epita.fr>
15559 * src/muscle_tab.c (muscle_init): Remove initialization of
15561 * src/output.c (output_master_parser): Do it here.
15563 2001-11-20 Akim Demaille <akim@epita.fr>
15566 * configure.in (ALL_LINGUAS): Adjust.
15567 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
15568 longer contains strings to translate.
15570 2001-11-19 Akim Demaille <akim@epita.fr>
15572 * src/conflicts.c (conflicts_print): Add a missing \n.
15574 2001-11-19 Akim Demaille <akim@epita.fr>
15576 * src/nullable.c (nullable_print): New.
15577 (set_nullable): Call it when tracing.
15578 Better locality of variables.
15580 2001-11-19 Akim Demaille <akim@epita.fr>
15582 * src/print.c (print_actions): Better locality of variables.
15584 2001-11-19 Akim Demaille <akim@epita.fr>
15586 * src/derives.c (print_derives): Fix and enrich.
15587 * src/closure.c (print_fderives): Likewise.
15589 2001-11-19 Akim Demaille <akim@epita.fr>
15591 * src/closure.c (itemsetend): Remove, replaced with...
15592 (itemsetsize): new.
15594 2001-11-19 Akim Demaille <akim@epita.fr>
15596 * src/LR0.c (kernel_end): Remove, replaced with...
15597 (kernel_size): new.
15599 2001-11-19 Akim Demaille <akim@epita.fr>
15601 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
15604 2001-11-19 Akim Demaille <akim@epita.fr>
15606 * src/closure.c (closure): Use arrays instead of pointers to clarify.
15608 2001-11-19 Akim Demaille <akim@epita.fr>
15610 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
15612 * src/LR0.c: Likewise.
15613 (allocate_itemsets): Use arrays instead of pointers to clarify.
15615 2001-11-19 Akim Demaille <akim@epita.fr>
15617 * src/getargs.c (statistics_flag): Replace with...
15619 (longopts): Accept --trace instead of --statistics.
15620 * src/getargs.h, src/options.c: Adjust.
15621 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
15622 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
15624 2001-11-19 Akim Demaille <akim@epita.fr>
15626 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
15627 pointers to clarify the code.
15628 (save_reductions, save_shifts): Factor common parts of alternatives.
15630 2001-11-19 Akim Demaille <akim@epita.fr>
15632 * src/LR0.c (new_state, get_state): Complete TRACE code.
15633 * src/closure.c: Include `reader.h' to get `tags', needed by the
15635 Rename the conditional DEBUG as TRACE.
15636 Output consistently TRACEs to stderr, not stdout.
15637 * src/derives.c: Likewise.
15638 * src/reduce.c: (inaccessable_symbols): Using if is better style
15640 Use `#if TRACE' instead of `#if 0' for tracing code.
15642 2001-11-19 Akim Demaille <akim@epita.fr>
15644 * src/system.h (LIST_FREE, shortcpy): New.
15645 * src/LR0.c: Use them.
15646 * src/output.c (free_itemsets, free_reductions, free_shifts):
15647 Remove, replaced by LIST_FREE.
15649 2001-11-19 Akim Demaille <akim@epita.fr>
15651 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
15652 (REDUCTIONS_ALLOC): New.
15653 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
15656 2001-11-19 Akim Demaille <akim@epita.fr>
15658 * src/LR0.c (new_state): Complete trace code.
15659 * src/nullable.c (set_nullable): Don't translate traces.
15661 2001-11-19 Akim Demaille <akim@epita.fr>
15663 * src/print_graph.c (print_core): Better locality of variables.
15664 * src/print.c (print_core): Likewise.
15666 2001-11-19 Akim Demaille <akim@epita.fr>
15668 * src/vcg.c: You do the output, so you are responsible of the
15669 handling of VCG syntax, in particular: use quotearg.
15670 * src/print_graph.c: Don't.
15671 (print_actions): Don't output the actions as part of the nodes,
15672 since that's the job of the edges.
15673 (print_state): Don't output by hand: fill the node description,
15674 and ask for its output.
15676 2001-11-19 Akim Demaille <akim@epita.fr>
15678 * src/bison.simple (yyparse): When verbosely reporting an error,
15679 no longer put additional quotes around token names.
15680 * tests/calc.at: Adjust.
15682 2001-11-19 Akim Demaille <akim@epita.fr>
15684 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
15685 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
15686 * src/output.c: Adjust.
15688 2001-11-19 Akim Demaille <akim@epita.fr>
15690 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
15692 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
15694 2001-11-19 Akim Demaille <akim@epita.fr>
15696 * src/gram.h (rule_t): New.
15698 (rrhs, rlhs): Remove, part of state_t.
15699 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
15700 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
15701 * src/reader.c, src/reduce.c: Adjust.
15703 2001-11-19 Akim Demaille <akim@epita.fr>
15705 * src/reader.c (symbols_output): New, extracted from...
15706 (packsymbols): Here.
15709 2001-11-19 Akim Demaille <akim@epita.fr>
15711 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
15712 (maxrhs): this new function.
15714 2001-11-19 Akim Demaille <akim@epita.fr>
15716 * src/lalr.c (F): New macro to access the variable F.
15719 2001-11-19 Akim Demaille <akim@epita.fr>
15721 * src/lalr.h (LA): New macro to access the variable LA.
15722 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
15723 * src/lalr.c: Adjust.
15725 2001-11-19 Akim Demaille <akim@epita.fr>
15727 * src/lalr.c (initialize_LA): Only initialize LA. Let...
15728 (set_state_table): handle the `lookaheads' members.
15730 2001-11-19 Akim Demaille <akim@epita.fr>
15732 * src/lalr.h (lookaheads): Removed array, whose contents is now
15734 (state_t): this structure.
15735 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
15738 2001-11-19 Akim Demaille <akim@epita.fr>
15740 * src/lalr.h (consistent): Removed array, whose contents is now
15742 (state_t): this structure.
15743 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
15746 2001-11-19 Akim Demaille <akim@epita.fr>
15748 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
15749 contents are now members of...
15750 (state_t): this structure.
15751 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
15754 2001-11-19 Akim Demaille <akim@epita.fr>
15756 * src/lalr.h (state_t): New.
15757 (state_table): Be a state_t * instead of a core **.
15758 (accessing_symbol): Remove, part of state_t.
15759 * src/lalr.c: Adjust.
15760 (set_accessing_symbol): Merge into...
15761 (set_state_table): this.
15762 * src/print_graph.c, src/conflicts.c: Adjust.
15764 2001-11-14 Akim Demaille <akim@epita.fr>
15766 * tests/calc.at, tests/output.at, tests/regression.at,
15767 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
15768 now the tests are run in private dirs, therefore AC_CLEANUP and
15769 family can be simplified to 0-ary.
15770 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
15771 use abs. path to find config.h.
15772 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
15773 stderr, there can be way too much random noise.
15774 Instead pass -Werror to GCC and rely on the exit status.
15775 Reported by Wolfram Wagner.
15777 2001-11-14 Akim Demaille <akim@epita.fr>
15779 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
15780 defined only if yyoverflow is defined, to avoid `warning: unused
15782 Reported by The Test Suite.
15784 2001-11-14 Akim Demaille <akim@epita.fr>
15786 * src/print.c: Include reduce.h.
15787 Reported by Hans Aberg.
15789 2001-11-14 Akim Demaille <akim@epita.fr>
15791 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
15792 Revert a previous patch: these are really const.
15793 * src/conflicts.c (conflict_report): Additional useless pair of
15794 braces to pacify GCC's warnings for `if () if () {} else {}'.
15795 * src/lex.c (parse_percent_token): Replace equal_offset with
15798 Be sure to strdup `arg' when used, since there is no reason for
15799 token_buffer not to change.
15801 2001-11-14 Akim Demaille <akim@epita.fr>
15803 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
15805 * src/main.c (main): Use them.
15806 Suggested by Hans Aberg.
15808 2001-11-12 Akim Demaille <akim@epita.fr>
15810 * src/system.h (ngettext): Now that we use ngettext, be sure to
15811 provide a default definition when NLS are not used.
15813 2001-11-12 Akim Demaille <akim@epita.fr>
15815 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
15816 Use @kbd to denote user input.
15817 (Language and Grammar): ANSIfy the example.
15818 Adjust its layout for info/notinfo.
15819 (Location Tracking Calc): Output error messages to stderr.
15820 Output locations in a more GNUtically correct way.
15821 Fix a couple of Englishos.
15822 Adjust @group/@end group pairs.
15824 2001-11-12 Akim Demaille <akim@epita.fr>
15826 %expect was not functioning at all.
15828 * src/conflicts.c (expected_conflicts): Set to -1.
15829 (conflict_report): Use ngettext.
15830 (conflicts_print): Check %expect and make its violation an error.
15831 * doc/bison.texinfo (Expect Decl): Adjust.
15832 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
15833 * tests/regression.at (%expect not enough, %expect right)
15834 (%expect too much): New.
15836 2001-11-12 Akim Demaille <akim@epita.fr>
15838 * tests/regression.at (Conflicts): Rename as...
15839 (Unresolved SR Conflicts): this.
15840 (Solved SR Conflicts): New.
15842 2001-11-12 Akim Demaille <akim@epita.fr>
15844 * src/reduce.c (print_results): Rename as...
15845 (reduce_output): This.
15846 Output to OUT, passed as argument, instead of output_obstack.
15847 (dump_grammar): Likewise.
15848 (reduce_free): New.
15850 (reduce_grammar): No longer call reduce_output, since...
15851 * src/print.c (print_results): do it.
15852 * src/main.c (main): Call reduce_free;
15854 2001-11-12 Akim Demaille <akim@epita.fr>
15856 * src/conflicts.c (print_reductions): Accept OUT as argument.
15857 Output to it, not to output_obstack.
15858 * src/print.c (print_actions): Adjust.
15860 2001-11-12 Akim Demaille <akim@epita.fr>
15862 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
15863 the result instead of using...
15864 (src_total, rrc_total, src_count, rrc_count): Remove.
15865 (any_conflicts): Remove.
15866 (print_conflicts): Split into...
15867 (conflicts_print, conflicts_output): New.
15868 * src/conflicts.h: Adjust.
15869 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
15870 * src/print.c (print_grammar): Issue `\n' between two rules.
15871 * tests/regression.at (Conflicts): New.
15872 Reported by Tom Lane.
15874 2001-11-12 Akim Demaille <akim@epita.fr>
15876 * tests/regression.at (Invalid input): Remove, duplicate with
15877 ``Invalid input: 1''.
15879 2001-11-12 Akim Demaille <akim@epita.fr>
15881 * tests/torture.at (AT_DATA_STACK_TORTURE)
15882 (Exploding the Stack Size with Alloca)
15883 (Exploding the Stack Size with Malloc): New.
15885 2001-11-12 Akim Demaille <akim@epita.fr>
15887 * src/bison.simple (YYSTACK_REALLOC): New.
15888 (yyparse) [!yyoverflow]: Use it and free the old stack.
15889 Reported by Per Allansson.
15891 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
15893 * src/bison.simple: Define type yystype instead of YYSTYPE, and
15894 define CPP macro, which substitute YYSTYPE by yystype.
15895 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
15896 with yyltype/YYLTYPE. This allows inclusion of the generated
15897 header within the parser if the compiler, such as GGC, accepts
15898 multiple equivalent #defines.
15901 2001-11-05 Akim Demaille <akim@epita.fr>
15903 * src/reader.c (symbols_output): New, extracted from...
15904 (packsymbols): here.
15907 2001-11-05 Akim Demaille <akim@epita.fr>
15909 * src/lex.c (parse_percent_token): s/quotearg/quote/.
15911 2001-11-05 Akim Demaille <akim@epita.fr>
15913 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
15916 2001-11-05 Akim Demaille <akim@epita.fr>
15918 * src/options.h (struct option_table_struct): set_flags is void*.
15919 * src/options.c (longopts): Support `--output' and `%output'.
15921 * src/lex.h (tok_setopt): Remove, replaced with...
15922 (tok_intopt, tok_stropt): these new guys.
15923 * src/lex.c (getopt.h): Not needed.
15924 (token_buffer, unlexed_token_buffer): Not const.
15925 (percent_table): Promote `-' over `_' in directive names.
15926 Active `%name-prefix', `file-prefix', and `output'.
15927 (parse_percent_token): Accept possible arguments to directives.
15928 Promote `-' over `_' in directive names.
15930 2001-11-04 Akim Demaille <akim@epita.fr>
15932 * doc/bison.texinfo (Decl Summary): Split the list into
15933 `directives for grammars' and `directives for bison'.
15935 Add description of `%name-prefix', `file-prefix', and `output'.
15936 Promote `-' over `_' in directive names.
15937 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
15938 Simplify the description of `--name-prefix'.
15939 Promote `-' over `_' in directive names.
15940 Promote `--output' over `--output-file'.
15941 Fix the description of `--defines'.
15942 * tests/output.at: Exercise %file-prefix and %output.
15944 2001-11-02 Akim Demaille <akim@epita.fr>
15946 * doc/refcard.tex: Update.
15948 2001-11-02 Akim Demaille <akim@epita.fr>
15950 * src/symtab.h (SUNDEF): New.
15951 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
15952 stand for `uninitialized', instead of 0.
15953 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
15954 * src/lex.c (lex): Adjust.
15956 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
15958 Let yylex return it instead of a plain 0.
15959 Reported by Dick Streefland.
15961 2001-11-02 Akim Demaille <akim@epita.fr>
15963 * tests/regression.at (Mixing %token styles): New test.
15965 2001-11-02 Akim Demaille <akim@epita.fr>
15967 * src/reader.c (parse_thong_decl): Formatting changes.
15968 (token_translations_init): New, extracted from...
15969 (packsymbols): Here.
15972 2001-11-01 Akim Demaille <akim@epita.fr>
15974 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
15975 Check that `9foo.y' produces correct cpp guards.
15976 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
15980 2001-11-01 Akim Demaille <akim@epita.fr>
15982 * tests/regression.at (Invalid input: 2): New.
15983 * src/lex.c (unlexed_token_buffer): New.
15984 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
15988 2001-11-01 Akim Demaille <akim@epita.fr>
15990 * tests/calc.at: Catch up with 1.30.
15991 * configure.in: Bump to 1.49a.
15992 Adjust to newer Autotest.
15994 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
15996 * src/conflicts.c: Move global variables rrc_total and src_total ...
15997 (print_conflicts): here.
15998 * src/output.c (output): Free global variable user_toknums.
15999 * src/lex.c (token_obstack): Become static.
16001 2001-10-18 Akim Demaille <akim@epita.fr>
16003 * tests/atlocal.in (GCC): Add.
16004 * tests/calc.at: s/m4_match/m4_bmatch/.
16005 s/m4_patsubst/m4_bpatsubst/.
16006 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
16007 * configure.in: AC_SUBST(GCC).
16009 2001-10-14 Marc Autret <autret_m@epita.fr>
16011 * src/options.c (create_long_option_table): Fix.
16013 2001-10-10 Akim Demaille <akim@epita.fr>
16015 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
16017 2001-10-04 Akim Demaille <akim@epita.fr>
16019 * src/reader.c (parse_union_decl): Push the caracters in
16020 union_obstack, not attrs_obstack.
16022 2001-10-04 Akim Demaille <akim@epita.fr>
16024 Merge in the branch 1.29.
16026 * src/reader.c (packsymbols): Use a temporary obstack for
16027 `%%tokendef', since output_stack is already used elsewhere.
16029 2001-10-02 Akim Demaille <akim@epita.fr>
16033 2001-10-02 Akim Demaille <akim@epita.fr>
16037 2001-10-02 Akim Demaille <akim@epita.fr>
16039 * tests/regression.at (Invalid CPP headers): New.
16040 From Alexander Belopolsky.
16041 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
16043 2001-10-02 Akim Demaille <akim@epita.fr>
16045 * tests/regression.at (Invalid input): New.
16046 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
16049 2001-10-02 Akim Demaille <akim@epita.fr>
16051 * tests/calc.at: Now that --debug works, the tests must be adjusted.
16053 2001-10-02 Akim Demaille <akim@epita.fr>
16055 * src/output.c (output_parser): Assert `skeleton'.
16056 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
16060 2001-10-01 Marc Autret <autret_m@epita.fr>
16062 * src/lex.h: Echo modifications.
16063 * src/lex.c (unlex): Parameter is now token_t.
16066 2001-10-01 Marc Autret <autret_m@epita.fr>
16068 * src/main.c: Include lex.h.
16071 2001-09-29 Akim Demaille <akim@epita.fr>
16073 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
16075 2001-09-28 Akim Demaille <akim@epita.fr>
16077 * tests/testsuite.at: Update to newer Autotest.
16078 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
16080 2001-09-27 Akim Demaille <akim@epita.fr>
16082 Position independent wrapper.
16084 * tests/bison: Remove.
16085 * tests/bison.in: New.
16086 * configure.in: Adjust.
16088 2001-09-27 Paul Eggert <eggert@twinsun.com>
16090 Port quotearg fixes from tar 1.13.24.
16092 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
16094 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
16095 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
16097 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
16098 * m4/mbrtowc.m4: New file.
16099 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
16100 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
16102 2001-09-27 Akim Demaille <akim@epita.fr>
16106 2001-09-27 Akim Demaille <akim@epita.fr>
16110 2001-09-25 Akim Demaille <akim@epita.fr>
16112 * src/system.h: Include `xalloc.h'.
16113 Remove it from the C files.
16114 * src/files.c (output_files): Free the obstacks.
16115 * src/lex.c (init_lex): Rename as...
16118 * src/main.c (main): Use it.
16120 2001-09-24 Marc Autret <autret_m@epita.fr>
16122 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
16123 to output informations in fout (FILE*).
16124 (open_graph, close_graph): Likewise.
16125 (output_graph, output_edge, output_node): Likewise.
16126 * src/vcg.h: Update function prototypes.
16127 * src/print_graph.c (print_graph): Open output graph file.
16128 (print_actions): Adjust.
16129 * src/files.h: Remove extern declaration.
16130 * src/files.c: Remove graph_obstack declaration.
16131 (open_files): Remove graph_obstack initialization.
16132 (output_files): Remove graph_obstack saving.
16134 2001-09-24 Marc Autret <autret_m@epita.fr>
16136 * src/files.c (compute_output_file_names): Fix.
16138 2001-09-24 Marc Autret <autret_m@epita.fr>,
16139 Akim Demaille <akim@epita.fr>
16141 * src/reader.c (reader): Remove call to free_symtab ().
16142 * src/main.c (main): Call it here.
16144 * src/conflicts.c (initialize_conflicts): Rename as...
16145 (solve_conflicts): this.
16146 * src/print.c (print_core, print_actions, print_state)
16147 (print_grammar): Dump to a file instead a `output_obstack'.
16148 (print_results): Dump `output_obstack', and then proceed with the
16150 * src/files.c (compute_output_file_names, close_files): New.
16151 (output_files): Adjust.
16152 * src/main.c (main): Adjust.
16154 2001-09-23 Marc Autret <autret_m@epita.fr>
16156 * src/files.c (compute_header_macro): Computes header macro name
16157 from spec_defines_file when given.
16159 2001-09-23 Marc Autret <autret_m@epita.fr>
16161 * src/files.c (output_files): Add default extensions.
16163 2001-09-22 Akim Demaille <akim@epita.fr>
16165 * src/conflicts.c (finalize_conflicts): Rename as...
16166 (free_conflicts): this.
16168 2001-09-22 Akim Demaille <akim@epita.fr>
16170 * src/gram.c (gram_free): Rename back as...
16172 (output_token_translations): Free `token_translations'.
16173 * src/symtab.c (free_symtab): Free the tag field.
16175 2001-09-22 Akim Demaille <akim@epita.fr>
16177 Remove `translations' as it is always set to true.
16179 * src/gram.h: Adjust.
16180 * src/reader.c (packsymbols, parse_token_decl): Adjust
16181 * src/print.c (print_grammar): Adjust.
16182 * src/output.c (output_token_translations): Adjust.
16183 * src/lex.c (lex): Adjust.
16184 * src/gram.c: Be sure the set pointers to NULL.
16185 (dummy): Rename as...
16188 2001-09-22 Akim Demaille <akim@epita.fr>
16190 * configure.in: Invoke AM_LIB_DMALLOC.
16191 * src/system.h: Use dmalloc.
16192 * src/LR0.c: Be sure to have pointers initialized to NULL.
16193 (allocate_itemsets): Allocate kernel_items only if needed.
16195 2001-09-22 Akim Demaille <akim@epita.fr>
16197 * configure.in: Bump to 1.29b.
16198 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
16199 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
16200 need xmalloc.c in calc.y.
16203 2001-09-21 Akim Demaille <akim@epita.fr>
16206 * Makefile.maint, config/config.guess, config/config.sub,
16207 * config/missing: Update from masters.
16208 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
16210 * configure.in (ALL_LINGUAS): Add `tr'.
16212 2001-09-21 Akim Demaille <akim@epita.fr>
16214 * tests/Makefile.am (package.m4): Move to...
16215 ($(srcdir)/$(TESTSUITE)): here.
16217 2001-09-20 Akim Demaille <akim@epita.fr>
16219 * src/complain.c: No longer try to be standalone: use system.h.
16220 Don't assume __STDC__ is defined to 1. Just test if it is defined.
16221 * src/complain.h: Likewise.
16222 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
16223 Remove the unused variable `n'.
16224 From Albert Chin-A-Young.
16226 2001-09-18 Marc Autret <autret_m@epita.fr>
16228 * doc/bison.1: Update.
16229 * doc/bison.texinfo (Bison Options): Update --defines and --graph
16231 (Option Cross Key): Update.
16234 2001-09-18 Marc Autret <autret_m@epita.fr>
16236 * tests/regression.at: New test (comment in %union).
16238 2001-09-18 Marc Autret <autret_m@epita.fr>
16240 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
16242 Reported by Keith Browne.
16244 2001-09-18 Marc Autret <autret_m@epita.fr>
16246 * tests/output.at: Add tests for --defines and --graph.
16248 2001-09-18 Marc Autret <autret_m@epita.fr>
16250 * tests/output.at: Removes tests of %{header,src}_extension features.
16252 2001-09-18 Akim Demaille <akim@epita.fr>
16254 * tests/Makefile.am (package.m4): New.
16255 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
16256 (_AT_CHECK_CALC_ERROR): Likewise.
16257 Factor the `, ' part of verbose error messages.
16259 2001-09-18 Marc Autret <autret_m@epita.fr>
16261 * src/getargs.c (longopts): Declare --defines and --graph as options
16262 with optional arguments.
16263 * src/files.h: Add extern declarations.
16264 * src/files.c (spec_graph_file, spec_defines_file): New.
16265 (output_files): Update.
16266 Remove CPP-outed code.
16268 2001-09-18 Marc Autret <autret_m@epita.fr>
16270 Turn off %{source,header}_extension feature.
16272 * src/files.c (compute_exts_from_gf): Update.
16273 (compute_exts_from_src): Update.
16274 (output_files): CPP-out useless code.
16275 * src/files.h: Remove {header,source}_extension extern declarations.
16276 * src/reader.c (parse_dquoted_param): CPP-out.
16277 (parse_header_extension_decl): Remove.
16278 (parse_source_extension_decl): Remove.
16279 (read_declarations): Remove cases tok_{hdrext,srcext}.
16280 * src/lex.c (percent_table): Remove {header,source}_extension entries.
16281 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
16283 2001-09-10 Akim Demaille <akim@epita.fr>
16285 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
16286 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
16287 (AT_CHECK_OUTPUT): this.
16288 Merely check ls' exit status, its output is useless.
16290 2001-09-10 Akim Demaille <akim@epita.fr>
16292 * tests/calc.at: Use m4_match.
16293 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
16295 2001-09-10 Marc Autret <autret_m@epita.fr>,
16296 Akim Demaille <akim@epita.fr>
16298 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
16300 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
16302 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
16303 * src/lex.h: Adjust prototype.
16304 (token_t): Add `tok_undef'.
16305 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
16306 (parse_percent_token): Now returns token_t.
16307 Add default statement in switch.
16308 (lex): Separate `c' as an input variable, from the token_t result
16310 (unlexed): Is a token_t.
16312 2001-09-10 Akim Demaille <akim@epita.fr>
16314 * configure.in: Bump to 1.29a.
16316 2001-09-07 Akim Demaille <akim@epita.fr>
16320 2001-08-30 Akim Demaille <akim@epita.fr>
16322 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
16323 * m4/atconfig.m4: Remove.
16324 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
16325 * tests/bison: New.
16326 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
16327 m4_if, m4_patsubst, and m4_regexp.
16328 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
16329 `input' file instead of echo.
16331 2001-08-29 Akim Demaille <akim@epita.fr>
16335 2001-08-29 Akim Demaille <akim@epita.fr>
16339 2001-08-29 Paul Eggert <eggert@twinsun.com>
16341 * src/bison.simple (yyparse): Don't take the address of an
16342 item before the start of an array, as that doesn't conform to
16345 2001-08-29 Robert Anisko <anisko_r@epita.fr>
16347 * doc/bison.texinfo (Location Tracking Calc): New node.
16349 2001-08-29 Paul Eggert <eggert@twinsun.com>
16351 * src/output.c (output): Do not define const, as this now
16352 causes more problems than it cures.
16354 2001-08-29 Akim Demaille <akim@epita.fr>
16356 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
16358 Be sure to tag the `detailmenu'.
16360 2001-08-29 Akim Demaille <akim@epita.fr>
16362 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
16363 download in a tmp dir.
16365 2001-08-28 Marc Autret <autret_m@epita.fr>
16367 * config/depcomp: New file.
16369 2001-08-28 Marc Autret <autret_m@epita.fr>
16371 * doc/bison.1 (mandoc): Adjust.
16372 From Juan Manuel Guerrero.
16374 2001-08-28 Marc Autret <autret_m@epita.fr>
16376 * src/print_graph.c (print_state): Fix.
16378 2001-08-27 Marc Autret <autret_m@epita.fr>
16380 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
16382 Echo modifications to the functions prototypes.
16383 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
16385 2001-08-27 Marc Autret <autret_m@epita.fr>
16387 * src/vcg.c: Include `xalloc.h'.
16388 (add_colorentry): New.
16389 (add_classname): New.
16390 (add_infoname): New.
16391 * src/vcg.h: Add new prototypes.
16393 2001-08-27 Akim Demaille <akim@epita.fr>
16395 * Makefile.maint: Sync. again with CVS Autoconf.
16397 2001-08-27 Akim Demaille <akim@epita.fr>
16399 * Makefile.maint: Formatting changes.
16400 (po-update, cvs-update, update): New targets.
16403 2001-08-27 Akim Demaille <akim@epita.fr>
16405 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
16406 * Makefile.maint: Sync. with CVS Autoconf.
16408 2001-08-27 Marc Autret <autret_m@epita.fr>
16410 * src/vcg.h (struct infoname_s): New.
16411 (struct colorentry_s): New.
16412 (graph_s): New fields {vertical,horizontal}_order in structure.
16413 Add `infoname' field.
16414 Add `colorentry' field;
16415 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
16416 (G_HORIZONTAL_ORDER): New.
16418 (G_COLORENTRY): New.
16419 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
16420 Add output of `infoname'.
16421 Add output of `colorentry'.
16423 2001-08-27 Marc Autret <autret_m@epita.fr>
16425 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
16426 This one shadowed a global parameter.
16428 2001-08-24 Marc Autret <autret_m@epita.fr>
16430 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
16431 instead of `unsigned'.
16432 (print_state): Do not call obstack_object_size () in obstack_grow ()
16433 to avoid macro variables shadowing.
16435 2001-08-23 Marc Autret <autret_m@epita.fr>
16437 * src/lex.c (percent_table): Typo: s/naem/name/.
16439 Normalize new options declarations.
16441 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
16443 * tests/suite.at: Exercise %header_extension and %source_extension.
16445 2001-08-16 Marc Autret <autret_m@epita.fr>
16447 * src/reader.c (parse_dquoted_param): New.
16448 (parse_header_extension_decl): Use it.
16449 (parse_source_extension_decl): Likewise.
16451 2001-08-16 Marc Autret <autret_m@epita.fr>
16453 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
16454 (get_xxxx_str): Use assert () instead of complain ().
16455 Remove return invokations in default cases.
16456 (get_decision_str): Modify default behaviour. Remove second argument.
16457 Echo modifications on calls.
16458 (output_graph): Fix.
16460 2001-08-16 Marc Autret <autret_m@epita.fr>
16462 * src/getargs.c (usage): Update with ``-g, --graph''.
16464 2001-08-16 Marc Autret <autret_m@epita.fr>
16466 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
16467 (Option Cross Key): Likewise.
16468 * doc/bison.1: Update.
16470 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
16472 * src/output.c (output_master_parser): Don't finish action_obstack.
16473 (output_parser): Don't care about the muscle action, here.
16474 (prepare): Copy the action_obstack in the action muscle.
16475 (output): Free action_obstack.
16477 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
16479 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
16480 will contain `%union' declaration.
16481 (parse_union_decl): Delete #line directive output.
16482 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
16483 informations about %union.
16484 (parse_union_decl): Copy the union_obstack in the muscle stype.
16485 * src/bison.simple: Add new #line directive.
16486 Add typdef %%stype YYSTYPE.
16488 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
16490 * src/bison.simple: Add new `#line' directive.
16492 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
16494 * src/bison.simple: New `#line' directive.
16495 * src/output.c (output_parser): Support new dynamic muscle input_line.
16497 2001-09-22 Marc Autret <autret_m@epita.fr>
16499 * src/output.c (output_master_parser): New.
16500 (output_parser): Be more re-entrant.
16502 2001-09-21 Marc Autret <autret_m@epita.fr>
16504 * src/reader.c (copy_definition, parse_union_decl): Update and use
16506 (copy_action): Likewise.
16507 Use obstack_1grow ().
16508 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
16510 2001-09-21 Marc Autret <autret_m@epita.fr>
16512 * src/options.c (option_table): Adjust.
16513 * src/lex.c (parse_percent_token): Fix.
16515 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
16517 * src/options.c (symtab.h): Include it, need by lex.h.
16519 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
16521 * src/lex.c (parse_percent_token): Change type of variable `tx', which
16522 is now an option_table_struct*.
16523 (option_strcmp): New function option_strcmp.
16524 (parse_percent_token): Call option_strcmp.
16525 * src/getargs.c (xalloc.h, options.h): Include it.
16526 (getargs): Call create_long_option_table.
16527 (getargs): Free longopts at the end of the function.
16528 (shortopts): Move in options.c.
16529 * src/options.c (create_long_option_table): New function. Convert
16530 information from option_table to option structure.
16531 * src/reader.c (options.h): Include it.
16533 * src/Makefile.am: Adjust.
16534 * src/options.c (option_table): Create from longopts and percent_table.
16535 * src/getargs.c (longopts): Delete.
16536 * src/lex.c (struct percent_table_struct): Delete.
16537 (percent_table): Delete.
16538 (options.h): Include it.
16539 * src/options.c: Create.
16540 * src/options.h: Create.
16541 Declare enum opt_access_e.
16542 Define struct option_table_struct.
16544 2001-09-20 Marc Autret <autret_m@epita.fr>
16546 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
16549 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
16551 * src/bison.simple: s/%%filename/%%skeleton.
16552 * src/muscle_tab.c (getargs.h): Include it.
16553 (muscle_init): Insert new muscle skeleton.
16555 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
16557 * src/output.c (output_parser): Delete unused variable actions_dumped.
16559 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
16561 * src/output.c (output): Delete call to reader_output_yylsp.
16562 * src/reader.c (reader): Likewise.
16563 * src/reader.h: Delete declaration of reader_output_yylsp.
16565 2001-09-02 Marc Autret <autret_m@epita.fr>
16567 * src/reader.c: Include muscle_tab.h.
16568 (parse_union_decl): Update.
16569 (parse_macro_decl): Rename parse_muscle_decl.
16570 Update to use renamed functions and variable.
16571 (read_declarations, copy_action, read_additionnal_code, : Updated
16572 with correct variables and functions names.
16573 (packsymbols, reader): Likewise.
16575 * src/reader.h (muscle_obstack): Extern declaration update.
16577 * src/output.c: Include muscle_tab.h
16578 In all functions using macro_insert, change by using muscle_insert ().
16579 (macro_obstack): Rename muscle_obstack.
16580 Echo modifications in the whole file.
16581 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
16582 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
16583 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
16585 * src/muscle_tab.h: Update double inclusion macros.
16586 (macro_entry_s): Rename muscle_entry_s.
16589 * src/muscle_tab.c: Include muscle_tab.h.
16590 Rename macro_tabble to muscle_table.
16591 (mhash1, mhash2, mcmp): Use muscle_entry.
16592 (macro_init): Rename muscle_init. Update.
16593 (macro_insert): Rename muscle_insert. Update.
16594 (macro_find): Rename muscle_find. Update.
16596 * src/main.c: Include muscle_tab.h.
16597 (main): Call muscle_init ().
16598 * src/Makefile.am (bison_SOURCES): Echo modifications.
16600 2001-09-02 Marc Autret <autret_m@epita.fr>
16602 Now the files macro_tab.[ch] are named muscle_tab.[ch].
16604 * src/muscle_tab.c, src/muscle_tab.h: Add files.
16606 2001-09-02 Marc Autret <autret_m@epita.fr>
16608 * src/macrotab.c, src/macrotab.h: Remove.
16610 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
16612 * src/reader.c (copy_guard): Use muscle to specify the `#line'
16615 2001-09-01 Marc Autret <autret_m@epita.fr>
16617 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
16618 to an explicit value to activate the feature. We do it here.
16620 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
16622 * src/output.c (prepare): Delete the `filename' muscule insertion.
16623 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
16624 (parse_union_decl): Likewise.
16625 * src/macrotab.c (macro_init): Initialize filename by infile.
16627 2001-08-31 Marc Autret <autret_m@epita.fr>
16629 * src/bison.simple (YYLSP_NEEDED): New definition.
16630 * src/output.c (prepare): Add macro insertion of `locations_flag'
16632 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
16634 * src/output.c (prepare): Delete insertion of previous muscles,
16635 and insert the `prefix' muscles.
16636 * src/macrotab.c (macro_init): Likewise.
16637 (macro_init): Initialization prefix directive by `yy'.
16638 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
16639 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
16640 yylval, yydebug, yyerror, yynerrs and yyparse.
16641 New directive `#define' to substitute yydebug, ... with option
16644 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
16646 * src/main.c (main): Standardize.
16647 * src/output.c (output_table_data, output_parser): Likewise.
16648 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
16650 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
16652 * src/reader.c (read_additionnal_code): Rename %%user_code to
16654 * src/output.c (output): Rename %%declarations to %%prologue.
16655 * src/bison.simple: Echo modifications.
16657 2001-08-31 Marc Autret <autret_m@epita.fr>
16659 * src/reader.c (readgram): CleanUp.
16660 (output_token_defines): Likewise.
16661 (packsymbols): Likewise.
16662 (reader): Likewise.
16663 * src/output.c (output): CPP-out useless code.
16665 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
16667 * src/reader.c (reader): Delete obsolete call to function
16668 output_trailers and output_headers.
16669 * src/output.h: Remove obsolete functions prototypes of output_headers
16670 and output_trailers.
16672 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
16674 * src/main.c: Include macrotab.h.
16675 * src/macrotab.h (macro_entry_s): Constify fields.
16676 Adjust functions prototypes.
16677 * src/macrotab.c (macro_insert): Constify key and value.
16678 (macro_find): Constify key.
16679 (macro_insert): Include 'xalloc.h'
16680 (macro_insert): Use XMALLOC.
16681 (macro_find): Constify return value.
16682 * src/output.c (output_table_data): Rename table to table_data.
16683 (output_parser): Constify macro_key, macro_value.
16685 2001-08-30 Marc Autret <autret_m@epita.fr>
16687 * src/reader.c (parse_skel_decl): New.
16688 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
16689 * src/lex.h (token_t): New token `tok_skel'.
16690 * src/lex.c (percent_table): Add skeleton option entry.
16693 2001-08-29 Marc Autret <autret_m@epita.fr>
16695 * src/bison.simple: Add %%user_code directive at the end.
16696 * src/reader.c (read_additionnal_code): New.
16698 * src/output.c (output_program): Remove.
16701 2001-08-28 Marc Autret <autret_m@epita.fr>
16703 * src/output.c (output_actions): Clean up.
16704 (output_gram): CPP-out useless code.
16705 * src/reader.c (reader): Clean up, CPP-out useless code.
16707 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
16709 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
16711 * src/bison.simple: Add `%%definitions'.
16713 2001-08-28 Marc Autret <autret_m@epita.fr>
16715 * config/depcomp: New file.
16717 2001-08-27 Paul Eggert <eggert@twinsun.com>
16719 * src/bison.simple (yyparse): Don't take the address of an
16720 item before the start of an array, as that doesn't conform to
16723 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
16725 * src/output.c (output): Remove the initialization of the macro
16726 obstack. It was done too late here.
16728 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
16730 (reader): Initialize the macro obstack here, since we need it to grow
16731 '%define' directives.
16733 * src/reader.h: Declare the macro obstack as extern.
16735 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
16737 * src/output.c (output_parser): Fix. Store single '%' characters in
16738 the output obstack instead of throwing them away.
16740 2001-08-27 Akim Demaille <akim@epita.fr>
16742 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
16744 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
16746 * lib/Makefile.am: Adjust.
16748 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
16750 * src/bison.simple: Update and add '%%' directives.
16752 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
16754 * src/reader.c (reader): Remove calls to 'output_headers' and
16755 'output_trailers'. Remove some C output.
16756 (readgram): Disable a piece of code that was writing a default
16757 definition for 'YYSTYPE'.
16758 (reader_output_yylsp): Remove.
16759 (packsymbols): Output token defintions to a macro.
16760 (copy_definition): Disable C output.
16762 * src/reader.c (parse_macro_decl): New function used to parse macro
16764 (copy_string2): Put the body of copy_string into this new function.
16765 Add a parameter to let the caller choose whether he wants to copy the
16766 string delimiters or not.
16767 (copy_string): Be a simple call to copy_string2 with the last argument
16769 (read_declarations): Add case for macro definition.
16770 (copy_identifier): New.
16771 (parse_macro_decl): Read macro identifiers using copy_identifier
16774 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
16776 * src/output.c (prepare): Add prefixed names.
16777 (output_parser): Output semantic actions.
16778 (output_parser): Fix bug on '%%line' directives.
16780 * src/output.c (output_headers): Remove. The C code printed by this
16781 function should now be in the skeletons.
16782 (output_trailers): Remove.
16783 (output): Disable call to 'reader_output_yylsp'.
16784 (output_rule_data): Do not output tables to the table obstack.
16786 * src/output.c: Remove some C dedicated output.
16787 Improve the use of macro and output obstacks.
16788 (output_defines): Remove.
16790 * src/output.c (output_token_translations): Associate 'translate'
16791 table with a macro. No output to the table obstack.
16792 (output_gram): Same for 'rhs' and 'prhs'.
16793 (output_stos): Same for 'stos'.
16794 (output_rule_data): Same for 'r1' and 'r2'.
16795 (token_actions): Same for 'defact'.
16796 (goto_actions): Same for 'defgoto'.
16797 (output_base): Same for 'pact' and 'pgoto'.
16798 (output_table): Same for 'table'.
16799 (output_check): Same for 'check'.
16801 * src/output.c (output_table_data): New function.
16802 (output_short_table): Remove.
16803 (output_short_or_char_table): Remove.
16805 * src/output.c (output_parser): Replace most of the skeleton copy code
16806 with something new. Skeletons are now processed character by character
16807 rather than line by line, and Bison looks for '%%' macros. This is the
16808 first step in making Bison's output process (a lot) more flexible.
16809 (output_parser): Use the macro table.
16811 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
16813 * src/main.c (main): Initialize the macro table.
16815 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
16817 * src/lex.c (percent_table): Add tok_define.
16818 * src/lex.h: Add tok_define.
16820 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
16822 * src/macrotab.c: New file.
16823 * src/macrotab.h: New file.
16824 * src/Makefile.am: Update.
16826 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
16828 * lib/hash.c: New file.
16829 * lib/hash.h: New file.
16830 * lib/Makefile.am: Update.
16832 2001-08-15 Akim Demaille <akim@epita.fr>
16836 2001-08-15 Marc Autret <autret_m@epita.fr>
16838 * src/reader.c (readgram): Indent output macro YYSTYPE.
16839 (packsymbols): Likewise.
16840 (output_token_defines): Likewise.
16841 * src/files.c: Standardize.
16842 (compute_header_macro): New.
16843 (defines_obstack_save): New. Use compute_header_macro.
16844 (output_files): Update. Use defines_obstack_save.
16846 2001-08-15 Akim Demaille <akim@epita.fr>
16848 * doc/bison.texinfo (Table of Symbols): Document
16849 YYSTACK_USE_ALLOCA.
16851 2001-08-15 Akim Demaille <akim@epita.fr>
16853 * missing: Update from CVS Automake.
16854 * config/config.guess, config/config.sub, config/texinfo.tex:
16855 Update from gnu.org.
16857 2001-08-15 Akim Demaille <akim@epita.fr>
16859 * Makefile.maint: Sync with CVS Autoconf.
16861 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
16863 * doc/bison.texinfo: Include GNU Free Documentation License from
16865 * doc/fdl.texi: Add to package.
16867 2001-08-14 Marc Autret <autret_m@epita.fr>
16869 Turn on %{source,header}_extension features.
16871 * src/lex.c (percent_table): Un-CPP out header_extension and
16873 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
16874 (compute_exts_from_src): Remove conditions. It restores priorities
16877 2001-08-14 Marc Autret <autret_m@epita.fr>
16879 * src/files.c (compute_base_names): Add extensions computing when
16880 `--file-prefix' used.
16881 Standardize function calls.
16883 2001-08-13 Marc Autret <autret_m@epita.fr>
16885 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
16886 defining it (defined but null disables alloca).
16888 2001-08-13 Marc Autret <autret_m@epita.fr>
16890 * src/bison.simple (_yy_memcpy): CPP reformat.
16892 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
16894 * tests/atconfig.in (CPPFLAGS): Fix.
16896 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
16898 * doc/bison.texinfo: Include GNU General Public License from
16900 * doc/gpl.texi: Add to package.
16902 2001-08-10 Marc Autret <autret_m@epita.fr>
16904 * src/print_graph.h: Fix.
16905 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
16907 2001-08-10 Akim Demaille <akim@epita.fr>
16909 * src/system.h: Provide default declarations for stpcpy, strndup,
16912 2001-08-10 Robert Anisko <anisko_r@epita.fr>
16914 * doc/bison.texinfo (Locations): Update @$ stuff.
16916 2001-08-09 Robert Anisko <anisko_r@epita.fr>
16918 * src/bison.simple (YYLLOC_DEFAULT): Update.
16921 2001-08-08 Marc Autret <autret_m@epita.fr>
16923 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
16924 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
16925 Reported by Fabrice Bauzac.
16927 2001-08-08 Marc Autret <autret_m@epita.fr>
16929 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
16930 * src/vcg.c (output_node): Fix.
16931 * src/vcg.h: Cleanup.
16932 * src/print_graph.c: Add comments.
16933 (node_output_size): New global variable. Simplify the formatting of
16934 the VCG graph output.
16935 (print_actions): Unused code is now used. It notifies the final state
16936 and no action states in the VCG graph. It also give the reduce actions.
16937 The `shift and goto' edges are red and the `go to state' edges are
16939 Get the current node name and node_obstack by argument.
16940 (node_obstack): New variable.
16941 (print_state): Manage node_obstack.
16942 (print_core): Use node_obstack given by argument.
16943 A node is not only computed here but in print_actions also.
16944 (print_graph): CPP out useless code instead of commenting it.
16946 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
16948 * tests/atconfig.in (CPPFLAGS): Fix.
16950 2001-08-07 Akim Demaille <akim@epita.fr>
16952 * src/print_graph.c (quote): New.
16953 (print_core): Use it.
16955 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
16957 * src/vcg.c (complain.h): Include it.
16958 Unepitaize `return' invocations.
16959 [NDEBUG] (main): Remove.
16960 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
16961 * src/files.c (open_files): Initialize graph_obstack.
16962 * src/print_graph.c (print_actions): CPP out useless code.
16963 (print_core): Don't output the last `\n' in labels.
16965 * src/files.c (output_files): Output the VCG file.
16966 * src/main.c (main): Invoke print_graph ();
16968 2001-08-06 Marc Autret <autret_m@epita.fr>
16970 Automaton VCG graph output.
16971 Using option ``-g'' or long option ``--graph'', you can generate
16972 a gram_filename.vcg file containing a VCG description of the LALR (1)
16973 automaton of your grammar.
16975 * src/main.c: Call to print_graph() function.
16976 * src/getargs.h: Update.
16977 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
16978 (graph_flag): New flag.
16979 (longopts): Update.
16980 (getargs): Add case `g'.
16981 * src/files.c (graph_obstack): New obstack struct.
16982 (open_files): Initialize new obstack.
16983 (output_files): Saves graph_obstack if required.
16984 * src/files.h (graph_obstack): New extern declaration.
16985 * src/Makefile.am: Add new source files.
16987 2001-08-06 Marc Autret <autret_m@epita.fr>
16989 * src/print_graph.c, src/print_graph.h (graph): New.
16990 * src/vcg.h: New file.
16991 * src/vcg.c: New file, VCG graph handling.
16993 2001-08-06 Marc Autret <autret_m@epita.fr>
16995 Add of %source_extension and %header_extension which specify
16996 the source or/and the header output file extension.
16998 * src/files.c (compute_base_names): Remove initialisation of
16999 src_extension and header_extension.
17000 (compute_exts_from_gf): Update.
17001 (compute_exts_from_src): Update.
17002 (output_files): Update.
17003 * src/reader.c (parse_header_extension_decl): New.
17004 (parse_source_extension_decl): New.
17005 (read_declarations): New case statements for the new tokens.
17006 * src/lex.c (percent_table): Add entries for %source_extension
17007 and %header_extension.
17008 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
17010 2001-08-06 Marc Autret <autret_m@epita.fr>
17012 * configure.in: Bump to 1.28c.
17013 * doc/bison.texinfo: Texinfo thingies.
17015 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
17017 * tests/atconfig.in (CPPFLAGS): Add.
17018 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
17020 2001-08-03 Akim Demaille <akim@epita.fr>
17024 2001-08-03 Akim Demaille <akim@epita.fr>
17026 * tests/Makefile.am (check-local): Ship testsuite.
17027 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
17028 Include `string.h'.
17030 2001-08-03 Akim Demaille <akim@epita.fr>
17032 * configure.in: Try using -Wformat when compiling.
17034 2001-08-03 Akim Demaille <akim@epita.fr>
17036 * configure.in: Bump to 1.28b.
17038 2001-08-03 Akim Demaille <akim@epita.fr>
17040 * src/complain.c: Adjust strerror_r portability issues.
17042 2001-08-03 Akim Demaille <akim@epita.fr>
17046 2001-08-03 Akim Demaille <akim@epita.fr>
17048 * src/getargs.c, src/getarg.h (skeleton)): Constify.
17049 * src/lex.c (literalchar): Avoid name clashes on `buf'.
17050 * src/getargs.c: Include complain.h.
17051 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
17052 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
17054 2001-08-03 Akim Demaille <akim@epita.fr>
17056 * src/reader.c (readgram): Display hidden chars in error messages.
17058 2001-08-03 Akim Demaille <akim@epita.fr>
17060 Update to gettext 0.10.39.
17062 2001-08-03 Akim Demaille <akim@epita.fr>
17064 * lib/strspn.c: New.
17066 2001-08-01 Marc Autret <autret_m@epita.fr>
17068 * doc/bison.texinfo: Update.
17069 * doc/bison.1 (mandoc): Update.
17070 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
17071 * src/files.c: Support output files extensions computing.
17072 (src_extension): New static variable.
17073 (header_extension): New static variable.
17074 (tr): New function.
17075 (get_extension_index): New function, gets the index of an extension
17076 filename in a string.
17077 (compute_exts_from_gf): New function, computes extensions from the
17078 grammar file extension.
17079 (compute_exts_from_src): New functions, computes extensions from the
17080 C source file extension, file given by ``-o'' option.
17081 (compute_base_names): Update.
17082 (output_files): Update.
17084 2001-08-01 Robert Anisko <anisko_r@epita.fr>
17086 * doc/bison.texi: Document @$.
17087 (Locations): New section.
17089 2001-07-18 Akim Demaille <akim@epita.fr>
17091 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
17092 * config/prev-version.txt, config/move-if-change: New.
17093 * Makefile.am: Adjust.
17095 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
17097 * src/bison.simple (yyparse): Suppress warning `comparaison
17098 between signed and unsigned'.
17100 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
17102 * src/getargs.h (raw_flag): Remove.
17103 * src/getargs.c: Die on `-r'/`--raw'.
17104 * src/lex.c (parse_percent_token): Die on `%raw'.
17105 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
17106 * tests/calc.at: Suppress test with option `--raw'.
17108 2001-07-14 Akim Demaille <akim@epita.fr>
17111 * configure.in: Require Autoconf 2.50.
17112 Update to gettext 0.10.38.
17114 2001-03-16 Akim Demaille <akim@epita.fr>
17116 * doc/bison.texinfo: ANSIfy the examples.
17118 2001-03-16 Akim Demaille <akim@epita.fr>
17120 * getargs.c (skeleton): New variable.
17121 (longopts): --skeleton is a new option.
17122 (shortopts, getargs): -S is a new option.
17123 * getargs.h: Declare skeleton.
17124 * output.c (output_parser): Use it.
17126 2001-03-16 Akim Demaille <akim@epita.fr>
17128 * m4/strerror_r.m4: New.
17129 * m4/error.m4: Run AC_FUNC_STRERROR_R.
17130 * lib/error.h, lib/error.c: Update.
17132 2001-03-16 Akim Demaille <akim@epita.fr>
17134 * src/getargs.c (longopts): Clean up.
17136 2001-02-21 Akim Demaille <akim@epita.fr>
17138 * src/reader.c (gensym): `gensym_count' is your own.
17139 Use a static buf to create the symbol name, as token_buffer is no
17142 2001-02-08 Akim Demaille <akim@epita.fr>
17144 * src/conflicts.c (conflict_report): Be sure not to append to res
17145 between two calls, which could happen if both first sprintf were
17146 skipped, but not the first cp += strlen.
17148 2001-02-08 Akim Demaille <akim@epita.fr>
17150 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
17151 New, from fileutils 4.0.37.
17152 * configure.in: Require Autoconf 2.49c. I took some time before
17153 making this decision. This is the only way out for portability
17154 issues in Bison, it would mean way too much duplicate effort to
17155 import in Bison features implemented in 2.49c since 2.13.
17156 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
17158 2001-02-02 Akim Demaille <akim@epita.fr>
17160 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
17161 * lib/xalloc.h, lib/xmalloc.c: Update.
17163 2001-01-19 Akim Demaille <akim@epita.fr>
17165 Get rid of the ad hoc handling of token_buffer in the scanner: use
17168 * src/lex.c (token_obstack): New.
17169 (init_lex): Initialize it. No longer call...
17170 (grow_token_buffer): this. Remove it.
17171 Adjust all the places which used it to use the obstack.
17173 2001-01-19 Akim Demaille <akim@epita.fr>
17175 * src/lex.h: Rename all the tokens:
17176 s/\bENDFILE\b/tok_eof/g;
17177 s/\bIDENTIFIER\b/tok_identifier/g;
17179 Let them be enums, not #define, to ease debugging.
17180 Adjust all the code.
17182 2001-01-18 Akim Demaille <akim@epita.fr>
17184 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
17185 * src/lex.c (maxtoken, grow_token_buffer): Static.
17187 2001-01-18 Akim Demaille <akim@epita.fr>
17189 Since we now use obstacks, more % directives can be enabled.
17191 * src/lex.c (percent_table): Also accept `%yacc',
17192 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
17194 Handle the actions for `%semantic_parser' and `%pure_parser' here,
17195 instead of returning a token.
17196 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
17197 * src/reader.c (read_declarations): Adjust.
17198 * src/files.c (open_files): Don't call `compute_base_names', don't
17199 compute `attrsfile' since they depend upon data which might be
17200 *in* the input file now.
17201 (output_files): Do it here.
17202 * src/output.c (output_headers): Document the fact that this patch
17203 introduces a guaranteed SEGV for semantic parsers.
17204 * doc/bison.texinfo: Document them.
17205 * tests/suite.at: Exercise these %options.
17207 2000-12-20 Akim Demaille <akim@epita.fr>
17209 Also handle the output file (--verbose) with obstacks.
17211 * files.c (foutput): Remove.
17212 (output_obstack): New.
17213 Adjust all dependencies.
17214 * src/conflicts.c: Return a string.
17215 * src/system.h (obstack_grow_string): Rename as...
17216 (obstack_sgrow): this. Be ready to work with non literals.
17217 (obstack_fgrow4): New.
17219 2000-12-20 Akim Demaille <akim@epita.fr>
17221 * src/files.c (open_files): Fix the computation of short_base_name
17222 in the case of `-o foo.tab.c'.
17224 2000-12-20 Akim Demaille <akim@epita.fr>
17226 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
17227 (copy_dollar): Now that everything uses obstacks, get rid of the
17230 2000-12-20 Akim Demaille <akim@epita.fr>
17232 * src/files.c (open_files): Actually the `.output' file is based
17233 on the short_base_name, not base_name.
17234 * tests/suite.at (Checking output file names): Adjust.
17236 2000-12-20 Akim Demaille <akim@epita.fr>
17238 * src/bison.s1: Remove, we now use directly...
17239 * src/bison.simple: this.
17240 * src/Makefile.am: Use pkgdata instead of data.
17242 2000-12-20 Akim Demaille <akim@epita.fr>
17244 * src/files.c (guard_obstack): New.
17245 (open_files): Initialize it.
17246 (output_files): Dump it...
17247 * src/files.h: Export it.
17248 * src/reader.c (copy_guard): Use it.
17250 2000-12-19 Akim Demaille <akim@epita.fr>
17252 * src/files.c (outfile, defsfile, actfile): Removed as global
17254 (open_files): Don't compute them.
17255 (output_files): Adjust.
17256 (base_name, short_base_name): Be global.
17257 Adjust dependencies.
17259 2000-12-19 Akim Demaille <akim@epita.fr>
17261 * src/files.c (strsuffix): New.
17262 (stringappend): Be just like strcat but allocate.
17263 (base_names): Eve out from open_files.
17264 Try to simplify the rather hairy computation of base_name and
17266 (open_files): Use it.
17267 * tests/suite.at (Checking output file names): New test.
17269 2000-12-19 Akim Demaille <akim@epita.fr>
17271 * src/system.h (obstack_grow_literal_string): Rename as...
17272 (obstack_grow_string): this.
17273 * src/output.c (output_parser): Recognize `%% actions' instead of
17275 * src/bison.s1: s/$/%% actions/.
17276 * src/bison.hairy: Likewise.
17278 2000-12-19 Akim Demaille <akim@epita.fr>
17280 * src/output.c (output_parser): Compute the `#line' lines when
17282 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
17283 Suggested by Hans Aberg.
17285 2000-12-19 Akim Demaille <akim@epita.fr>
17287 Let the handling of the skeleton files be local to the procedures
17290 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
17292 (fparser, open_extra_files): Remove.
17293 (open_files, output_files): Don't take care of fparser.
17294 * src/files.h: Adjust.
17295 * src/output.c (output_parser): Open and close the file to the
17297 * src/reader.c (read_declarations): When %semantic_parser, open
17300 2000-12-19 Akim Demaille <akim@epita.fr>
17302 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
17303 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
17305 2000-12-19 Akim Demaille <akim@epita.fr>
17307 * src/files.c (open_files): Yipee! We no longer need all the code
17308 looking for `/tmp' since we have no tmp file.
17310 2000-12-19 Akim Demaille <akim@epita.fr>
17312 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
17314 * src/files.c (open_files): Less dependency on MSDOS etc.
17316 2000-12-14 Akim Demaille <akim@epita.fr>
17318 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
17319 Provide a default definition.
17320 Use it when executing the default @ action.
17321 * src/reader.c (reader_output_yylsp): No longer include
17322 `timestamp' and `text' in the default YYLTYPE.
17324 2000-12-12 Akim Demaille <akim@epita.fr>
17326 * src/reader.c (copy_definition, parse_union_decl, copy_action)
17327 (copy_guard): Quote the file names.
17328 Reported by Laurent Mascherpa.
17330 2000-12-12 Akim Demaille <akim@epita.fr>
17332 * src/output.c (output_headers, output_program, output): Be sure
17333 to escape special characters when outputting filenames.
17334 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
17335 (output_headers): Don't depend on them, Use ACTSTR.
17337 2000-11-17 Akim Demaille <akim@epita.fr>
17339 * lib/obstack.h: Formatting changes.
17340 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
17341 prevents type checking.
17342 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
17343 cast the value to (void *): assigning a `foo *' to a `void *'
17345 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
17346 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
17349 2000-11-17 Akim Demaille <akim@epita.fr>
17351 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
17353 (suite.m4, regression.m4, calc.m4): these.
17354 * tests/atgeneral.m4: Update from CVS Autoconf.
17356 2000-11-17 Akim Demaille <akim@epita.fr>
17358 * tests/regression.m4 (%union and --defines): New test,
17359 demonstrating a current bug in the obstack implementation.
17361 2000-11-17 Akim Demaille <akim@epita.fr>
17363 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
17365 Use them to declare the variables which are global or local to
17368 2000-11-17 Akim Demaille <akim@epita.fr>
17370 * acconfig.h: Remove, no longer used.
17372 2000-11-07 Akim Demaille <akim@epita.fr>
17374 * src: s/Copyright (C)/Copyright/g.
17376 2000-11-07 Akim Demaille <akim@epita.fr>
17378 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
17380 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
17382 2000-11-07 Akim Demaille <akim@epita.fr>
17384 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
17385 Merge in a single CPP if/else.
17387 2000-11-07 Akim Demaille <akim@epita.fr>
17389 * src/output.c (output): Remove useless variables.
17390 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
17391 argument `data' for consistency with the prototypes.
17392 Qualify it `const'.
17393 (obstack_copy, obstack_copy0): Rename the second argument as
17394 `address' for consistency. Qualify it `const'.
17395 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
17396 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
17397 `const' their input argument (`data' or `address').
17398 Adjust the corresponding macros to include `const' in casts.
17400 2000-11-03 Akim Demaille <akim@epita.fr>
17402 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
17403 s/PFILE1/BISON_HAIRY/.
17404 Adjust dependencies.
17406 2000-11-03 Akim Demaille <akim@epita.fr>
17408 For some reason, this was not applied.
17410 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
17411 `unlink': it's no longer used.
17413 2000-11-03 Akim Demaille <akim@epita.fr>
17415 * src/files.c (skeleton_find): New function, eved out of...
17416 (open_files, open_extra_files): here.
17418 2000-11-03 Akim Demaille <akim@epita.fr>
17420 Don't use `atexit'.
17422 * src/files.c (obstack_save): New function.
17423 (done): Rename as...
17424 (output_files): this.
17425 Use `obstack_save'.
17426 * src/main.c (main): Don't use `atexit' to register `done', since
17427 it no longer has to remove tmp files, just call `output_files'
17428 when there are no errors.
17430 2000-11-02 Akim Demaille <akim@epita.fr>
17432 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
17433 `unlink': it's no longer used.
17434 * src/files.h: Formatting changes.
17436 2000-11-02 Akim Demaille <akim@epita.fr>
17438 Remove the last uses of mktemp and unlink/delete.
17440 * src/files.c (fdefines, ftable): Removed.
17441 (defines_ostack, table_obstack): New.
17442 Adjust dependencies of the former into uses of the latter.
17443 * src/output.c (output_short_or_char_table, output_short_table):
17444 Convert to using obstacks.
17445 * src/reader.c (copy_comment2): Accept one FILE * and two
17447 (output_token_defines, reader_output_yylsp): Use obstacks.
17448 * src/system.h (obstack_fgrow3): New.
17449 * po/POTFILES.in: Adjust.
17451 2000-11-01 Akim Demaille <akim@epita.fr>
17453 Change each use of `fattrs' into a use of `attrs_obstack'.
17455 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
17456 * src/files.c (fattrs): Remove.
17457 (attrs_obstack): New.
17458 Adjust all dependencies.
17459 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
17461 2000-11-01 Akim Demaille <akim@epita.fr>
17463 Introduce obstacks.
17464 Change each use of `faction' into a use of `action_obstack'.
17466 * lib/obstack.h, lib/obstack.c: New files.
17467 * src/files.c (faction): Remove.
17468 (action_obstack): New.
17469 Adjust all dependencies.
17471 2000-10-20 Akim Demaille <akim@epita.fr>
17473 * lib/quote.h (PARAMS): New macro. Use it.
17475 2000-10-16 Akim Demaille <akim@epita.fr>
17477 * src/output.c (output_short_or_char_table): New function.
17478 (output_short_table, output_token_translations): Use it.
17479 (goto_actions): Use output_short_table.
17481 2000-10-16 Akim Demaille <akim@epita.fr>
17483 * src/symtab.c (bucket_new): New function.
17486 * src/output.c (output_short_table): New argument to display the
17487 comment associated with the table.
17488 Adjust dependencies.
17489 (output_gram): Use it.
17490 (output_rule_data): Nicer output layout for YYTNAME.
17492 2000-10-16 Akim Demaille <akim@epita.fr>
17494 * src/lex.c (read_typename): New function.
17496 * src/reader.c (copy_dollar): Likewise.
17498 2000-10-16 Akim Demaille <akim@epita.fr>
17500 * src/reader.c (copy_comment2): Expect the input stream to be on
17501 the `/' which is suspected to open a comment, instead of being
17502 called after `//' or `/*' was read.
17503 (copy_comment, copy_definition, parse_union_decl, copy_action)
17504 (copy_guard): Adjust.
17506 2000-10-16 Akim Demaille <akim@epita.fr>
17508 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
17509 `read_signed_integer'.
17511 2000-10-16 Akim Demaille <akim@epita.fr>
17513 * src/reader.c (copy_dollar): New function.
17514 (copy_guard, copy_action): Use it.
17516 2000-10-16 Akim Demaille <akim@epita.fr>
17518 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
17519 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
17520 New files, from Fileutils 4.0.27.
17521 * src/main.c (printable_version): Remove.
17522 * src/lex.c, src/reader.c: Use `quote'.
17524 2000-10-04 Akim Demaille <akim@epita.fr>
17526 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
17528 2000-10-04 Akim Demaille <akim@epita.fr>
17530 * doc/bison.texinfo: Various typos spotted by Neil Booth.
17532 2000-10-04 Akim Demaille <akim@epita.fr>
17534 When a literal string is used to define two different tokens,
17535 `bison -v' segfaults.
17536 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
17538 * tests/regression.m4: New file.
17539 Include the core of the sample provided by Piotr Gackiewicz.
17540 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
17543 2000-10-04 Akim Demaille <akim@epita.fr>
17545 * src/reader.c (parse_expect_decl): Keep `count' within the size
17549 2000-10-02 Paul Eggert <eggert@twinsun.com>
17551 * bison.s1 (yyparse): Assign the default value
17552 unconditionally, to avoid a GCC warning and make the parser a
17555 2000-10-02 Akim Demaille <akim@epita.fr>
17557 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
17560 2000-10-02 Akim Demaille <akim@epita.fr>
17562 * src/derives.c, src/print.c, src/reduce.c: To ease the
17563 translation, move some `\n' out of the translated strings.
17565 2000-10-02 Akim Demaille <akim@epita.fr>
17567 The location tracking mechanism is precious for parse error
17568 messages. Nevertheless, it is enabled only when `@n' is used in
17569 the grammar, which is a different issue (you can use it in error
17570 message, but not in the grammar per se). Therefore, there should
17571 be another means to enable it.
17573 * src/getargs.c (getargs): Support `--locations'.
17574 (usage): Report it.
17575 * src/getargs.h (locationsflag): Export it.
17576 * src/lex.c (percent_table): Support `%locations'.
17577 * src/reader.c (yylsp_needed): Remove this variable, now replaced
17578 with `locationsflag'.
17579 * doc/bison.texinfo: Document `--locations' and `%locations'.
17581 * tests/calc.m4: Test it.
17583 For regularity of the names, replace each
17584 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
17585 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
17586 In addition replace each `flag' with `_flag'.
17588 2000-10-02 Akim Demaille <akim@epita.fr>
17590 Also test parse error messages, including with YYERROR_VERBOSE.
17592 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
17594 Use it to check the computations.
17595 Use it to check `nonassoc' is honored.
17596 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
17597 `--yyerror-verbose'.
17598 (_AT_CHECK_CALC): Adjust to this option.
17599 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
17601 2000-10-02 Akim Demaille <akim@epita.fr>
17603 Test also `--verbose', `--defines' and `--name-prefix'. Testing
17604 the latter demonstrates a flaw in the handling of non debugging
17605 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
17606 was used in order to simplify:
17622 unfortunately this leads to a CPP conflict when
17623 `--name-prefix=foo' is used since it produces `#define yydebug
17626 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
17627 (YYDPRINTF): New macro.
17629 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
17631 Also test `--verbose', `--defines' and `--name-prefix'.
17633 2000-10-02 Akim Demaille <akim@epita.fr>
17635 Improve the readability of the produced parsers.
17637 * src/bison.s1: Formatting changes.
17638 Improve the comment related to the `$' mark.
17639 (yydefault): Don't fall through to `yyresume': `goto' there.
17640 * src/output.c (output_parser): When the `$' is met, skip the end
17642 New variable, `number_of_dollar_signs', to check there's exactly
17643 one `$' in the parser skeleton.
17645 2000-10-02 Akim Demaille <akim@epita.fr>
17647 * lib/xstrdup.c: New file, from the fileutils.
17648 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
17649 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
17650 instead of strlen + xmalloc + strcpy.
17651 * src/symtab.c (copys): Remove, use xstrdup instead.
17653 2000-10-02 Akim Demaille <akim@epita.fr>
17655 * src/gram.h (associativity): New enum type which replaces the
17656 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
17657 `right_assoc', `left_assoc' and `non_assoc'.
17658 Adjust all dependencies.
17659 * src/reader.c: Formatting changes.
17660 (LTYPESTR): Don't define it, use it as a literal in
17661 `reader_output_yylsp'.
17662 * src/symtab.h (symbol_class): New enum type which replaces the
17663 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
17664 `sunknown', `stoken and `snterm'.
17666 2000-10-02 Akim Demaille <akim@epita.fr>
17668 * src/getargs.c (fixed_outfiles): Rename as...
17669 (yaccflag): for consistency and accuracy.
17670 Adjust dependencies.
17672 2000-10-02 Akim Demaille <akim@epita.fr>
17674 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
17675 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
17676 difficult and introduced a lot of core dump. It turns out that
17677 Bison used an implementation of `xmalloc' based on `calloc', and
17678 at various places it does depend upon the initialization to 0. I
17679 have not tried to isolate the pertinent places, and all the former
17680 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
17681 someone should address this issue.
17683 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
17684 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
17686 Adjust dependencies.
17687 * src/warshall.h: New file.
17690 2000-10-02 Akim Demaille <akim@epita.fr>
17692 Various anti-`extern in *.c' changes.
17694 * src/system.h: Include `assert.h'.
17696 2000-10-02 Akim Demaille <akim@epita.fr>
17698 * src/state.h (nstates, final_state, first_state, first_shift)
17699 (first_reduction): Move their exportation from here...
17700 * src/LR0.h: to here.
17701 Adjust dependencies.
17702 * src/getargs.c (statisticsflag): New variable.
17703 Add support for `--statistics'.
17704 Adjust dependencies.
17706 Remove a lot of now useless `extern' statements in most files.
17708 2000-10-02 Akim Demaille <akim@epita.fr>
17710 * src/LR0.h: New file.
17713 2000-10-02 Akim Demaille <akim@epita.fr>
17715 * src/print.h: New file.
17717 * src/print.c: Formatting and ordering changes.
17718 (verbose, terse): Replace with...
17719 (print_results): this new function.
17720 Adjust dependencies.
17722 2000-10-02 Akim Demaille <akim@epita.fr>
17724 * src/conflicts.c (conflict_report): New function.
17725 (conflict_log, verbose_conflict_log): Replace with...
17726 (print_conflicts): this function.
17727 Adjust dependencies.
17728 * src/conflicts.h: New file.
17729 Propagate its inclusion.
17731 2000-10-02 Akim Demaille <akim@epita.fr>
17733 * src/nullable.h: New file.
17734 Propagate its inclusion.
17735 * src/nullable.c: Formatting changes.
17737 2000-10-02 Akim Demaille <akim@epita.fr>
17739 * src/reduce.h: New file.
17740 Propagate its inclusion.
17741 * src/reduce.c: Topological sort and other formatting changes.
17742 (bool, TRUE, FALSE): Move their definition to...
17743 * src/system.h: here.
17745 2000-10-02 Akim Demaille <akim@epita.fr>
17747 * src/files.c: Formatting changes.
17748 (tryopen, tryclose, openfiles): Rename as...
17749 (xfopen, xfclose, open_files): this.
17750 (stringappend): static.
17751 * src/files.h: Complete the list of exported symbols.
17754 2000-10-02 Akim Demaille <akim@epita.fr>
17756 * src/reader.h: New file.
17757 Propagate its use instead of tedious list of `extern' and
17759 * src/reader.c: Formatting changes, topological sort,
17762 2000-10-02 Akim Demaille <akim@epita.fr>
17764 * src/lex.h: Prototype `lex.c' exported functions.
17765 * src/reader.c: Adjust.
17766 * src/lex.c: Formatting changes.
17767 (safegetc): Rename as...
17770 2000-10-02 Akim Demaille <akim@epita.fr>
17772 * src/lalr.h: New file.
17773 Propagate its inclusion instead of prototypes and `extern'.
17774 * src/lalr.c: Formatting changes, topological sorting etc.
17776 2000-10-02 Akim Demaille <akim@epita.fr>
17778 * src/output.c (token_actions): Introduce a temporary array,
17779 YYDEFACT, that makes it possible for this function to use
17780 output_short_table.
17782 2000-10-02 Akim Demaille <akim@epita.fr>
17784 `user_toknums' is output as a `short[]' in `output.c', while it is
17785 defined as a `int[]' in `reader.c'. For consistency with the
17786 other output tables, `user_toknums' is now defined as a table of
17789 * src/reader.c (user_toknums): Be a short table instead of an int
17791 Adjust dependencies.
17793 Factor the short table outputs.
17795 * src/output.c (output_short_table): New function.
17796 * src/output.c (output_gram, output_stos, output_rule_data)
17797 (output_base, output_table, output_check): Use it.
17799 2000-10-02 Akim Demaille <akim@epita.fr>
17801 * src/output.c (output): Topological sort of the functions, in
17802 order to get rid of the `static' prototypes.
17803 No longer use `register'.
17804 * src/output.h: New file.
17805 Propagate its inclusion in files explicitly prototyping functions
17808 2000-09-21 Akim Demaille <akim@epita.fr>
17810 * src/atgeneral.m4: Update from Autoconf.
17812 2000-09-21 Akim Demaille <akim@epita.fr>
17814 * src/closure.h: New file.
17815 * src/closure.c: Formatting changes, topological sort over the
17816 functions, use of closure.h.
17817 (initialize_closure, finalize_closure): Rename as...
17818 (new_closure, free_closure): these. Adjust dependencies.
17819 * src/LR0.c: Formatting changes, topological sort, use of
17821 (initialize_states): Rename as...
17822 (new_states): this.
17823 * src/Makefile.am (noinst_HEADERS): Adjust.
17825 2000-09-20 Akim Demaille <akim@epita.fr>
17827 * src/acconfig.h: Don't protect config.h against multiple
17829 Don't define PARAMS.
17830 * src/system.h: Define PARAMS.
17831 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
17832 purpose of config.h. system.h must not try to fix wrong
17833 definitions in config.h.
17835 2000-09-20 Akim Demaille <akim@epita.fr>
17837 * src/derives.h: New file.
17838 * src/main.c, src/derives.h: Use it.
17839 Formatting changes.
17840 * src/Makefile.am (noinst_HEADERS): Adjust.
17842 2000-09-20 Akim Demaille <akim@epita.fr>
17844 * tests/atgeneral.m4: Update from Autoconf.
17845 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
17846 (AT_CHECK_CALC): New macros.
17847 Use these macros to test bison with options `', `--raw',
17848 `--debug', `--yacc', `--yacc --debug'.
17850 2000-09-19 Akim Demaille <akim@epita.fr>
17852 * src/output.c: Formatting changes.
17853 * src/machine.h: Remove, leaving its contents in...
17854 * src/system.h: here.
17856 Adjust all dependencies on stdio.h and machine.h.
17857 * src/getargs.h: New file.
17858 Let all `extern' declarations about getargs.c be replaced with
17859 inclusion of `getargs.h'.
17860 * src/Makefile.am (noinst_HEADERS): Adjust.
17862 * tests/calc.m4 (yyin): Be initialized in main, not on the global
17864 (yyerror): Returns void, not int.
17865 * doc/bison.texinfo: Formatting changes.
17867 2000-09-19 Akim Demaille <akim@epita.fr>
17869 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
17872 2000-09-18 Akim Demaille <akim@epita.fr>
17874 * configure.in: Append WARNING_CFLAGS to CFLAGS.
17875 * src/Makefile.am (INCLUDES): Don't.
17876 Be ready to fetch headers in lib/.
17878 2000-09-18 Akim Demaille <akim@epita.fr>
17880 * doc/bison.texinfo: Update the copyright.
17881 ANSIfy and GNUify the examples.
17882 Remove the old menu.
17884 2000-09-18 Akim Demaille <akim@epita.fr>
17886 First set of tests: use the `calc' example from the documentation.
17888 * src/bison.s1 (yyparse): Condition the code using `yytname' which
17889 is defined only when YYDEBUG is.
17890 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
17891 * src/files.c (tryopen, tryclose): Formatting changes.
17892 Move to the top and be static.
17893 * src/reader.c (read_signed_integer): Likewise.
17894 * tests/calc.m4: New file.
17895 * Makefile.am, suite.m4: Adjust.
17896 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
17898 2000-09-18 Akim Demaille <akim@epita.fr>
17900 Add support for an Autotest test suite for Bison.
17902 * m4/m4.m4, m4/atconfig.m4: New files.
17903 * m4/Makefile.am (EXTRA_DIST): Adjust.
17904 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
17906 * src/getargs.c: Display a more standard --version message.
17907 * src/reader.c (reader): Formatting changes.
17908 No longer depend upon VERSION_STRING.
17909 * configure.in: No longer use `dnl'.
17910 Set up the test suite and the new directory `tests/.
17911 (VERSION_STRING): Remove.
17913 2000-04-14 Akim Demaille <akim@epita.fr>
17915 * src/reader.c (copy_comment2): New function, same as former
17916 `copy_comment', but outputs into two FILE *.
17917 (copy_comment): Use it.
17918 (parse_union_decl): Use it.
17919 (get_type, parse_start_decl): Use the same `invalid' message.
17920 (parse_start_decl, parse_union_decl): Use the same `multiple'
17922 (parse_union_decl, copy_guard, copy_action): Use the same
17923 `unmatched' message.
17924 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
17926 2000-03-31 Akim Demaille <akim@epita.fr>
17928 * src/files.c (tryopen, tryclose): Move to the top.
17931 2000-03-31 Akim Demaille <akim@epita.fr>
17933 * src/main.c (main): Don't call `done', exit does it.
17935 2000-03-31 Akim Demaille <akim@epita.fr>
17937 * allocate.c: s/return (foo)/return foo/.
17938 * lalr.c: Likewise.
17940 * output.c: Likewise.
17941 * reader.c: Likewise.
17942 * symtab.c: Likewise.
17943 * vmsgetargs.c: Likewise.
17945 2000-03-31 Akim Demaille <akim@epita.fr>
17947 Clean up the error reporting functions.
17949 * src/report.c: New file.
17950 * src/report.h: Likewise.
17951 * src/Makefile.am: Adjust.
17952 * m4/error.m4: New file.
17953 * m4/Makefile.am: Adjust.
17954 * configure.in (jm_PREREQ_ERROR): Call it.
17955 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
17957 (fatal, fatals): Remove. All callers use complain.c::fatal.
17958 (warn, warni, warns, warnss, warnss): Remove. All callers use
17959 complain.c::complain.
17960 (toomany): Remove, use fatal instead.
17961 * src/files.c (done): No argument, use complain_message_count.
17962 * src/main.c (main): Register `done' to `atexit'.
17964 * src/getargs.c (usage): More `fputs', less `fprintf'.
17966 2000-03-28 Akim Demaille <akim@epita.fr>
17968 * lib/: New directory.
17969 * Makefile.am (SUBDIRS): Adjust.
17970 * configure.in: Adjust.
17971 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
17973 * src/alloca.c: Moved to lib/.
17974 * src/getopt.c: Likewise.
17975 * src/getopt1.c: Likewise.
17976 * src/getopt.h: Likewise.
17977 * src/ansi2knr.c: Likewise.
17978 * src/ansi2knr.1: Likewise.
17979 * src/Makefile.am: Adjust.
17980 * lib/Makefile.am: New file.
17982 2000-03-28 Akim Demaille <akim@epita.fr>
17984 * src/getargs.c (usage): Refresh the help message.
17986 2000-03-17 Akim Demaille <akim@epita.fr>
17988 * src/getopt1.c: Updated from textutils 2.0e
17989 * src/getopt.c: Likewise.
17990 * src/getopt.h: Likewise.
17992 2000-03-17 Akim Demaille <akim@epita.fr>
17994 * src/Makefile.am (bison.simple): Fix the awk program: quote only
17995 the file name, not the whole `#line LINE FILE'.
17997 2000-03-17 Akim Demaille <akim@epita.fr>
17999 On syntax errors, report the token on which we choked.
18001 * src/bison.s1 (yyparse): In the label yyerrlab, when
18002 YYERROR_VERBOSE, add yychar in msg.
18004 2000-03-17 Akim Demaille <akim@epita.fr>
18006 * src/reader.c (copy_at): New function.
18007 (copy_guard): Use it.
18008 (copy_action): Use it.
18010 2000-03-17 Akim Demaille <akim@epita.fr>
18012 Be kind to translators, save some useless translations.
18014 * src/main.c (banner): New function.
18015 (fatal_banner): Use it.
18016 (warn_banner): Use it.
18018 2000-03-17 Akim Demaille <akim@epita.fr>
18020 * src/reader.c (copy_definition): Use copy_string and
18021 copy_comment. Removed now unused `match', `ended',
18023 (copy_comment, copy_string): Moved, to be visible from
18026 2000-03-17 Akim Demaille <akim@epita.fr>
18028 * src/reader.c (copy_string): Declare `static inline'. No
18029 problems with inline, since it is checked by configure.
18030 (copy_comment): Likewise.
18032 2000-03-17 Akim Demaille <akim@epita.fr>
18034 * src/reader.c (packsymbols): Formatting changes.
18036 2000-03-17 Akim Demaille <akim@epita.fr>
18038 * src/reader.c (copy_comment): New function, factored out from:
18039 (copy_action): Use it. Removed now unused `match', `ended',
18041 (copy_guard): Likewise.
18043 2000-03-17 Akim Demaille <akim@epita.fr>
18045 * src/reader.c (copy_string): New function, factored out from:
18046 (copy_action): Use it.
18047 (copy_guard): Likewise.
18049 2000-03-17 Akim Demaille <akim@epita.fr>
18051 Change the handling of @s so that they behave exactly like $s.
18052 There is now a pseudo variable @$ (readble and writable), location
18053 of the lhs of the rule (by default ranging from the location of
18054 the first symbol of the rhs, to the location of the last symbol,
18055 or, if the rhs is empty, YYLLOC).
18057 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
18059 (yyparse): When providing a default semantic action, provide a
18060 default location action.
18061 (after the $): No longer change `*YYLSP', just stack YYLOC the
18062 same way you stack YYVAL.
18063 * src/reader.c (read_declarations): Use warns.
18064 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
18065 (copy_action, case '@'): Likewise.
18066 Use a standard error message, to save useless work from
18069 2000-03-17 Akim Demaille <akim@epita.fr>
18071 * src/bison.s1: Formatting and cosmetics changes.
18072 * src/reader.c: Likewise.
18073 Update the Copyright notice.
18075 2000-03-17 Akim Demaille <akim@epita.fr>
18077 * src/bison.s1 (#line): All set to `#line' only, since the
18078 Makefile now handles them.
18080 2000-03-16 Akim Demaille <akim@epita.fr>
18082 * src/output.c (output_rule_data): Output the documentation of
18083 some of the tables.
18084 (Copyright notice): Update.
18085 Formatting changes.
18087 2000-03-16 Akim Demaille <akim@epita.fr>
18089 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
18090 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
18091 One `#if YYDEBUG' remains, since it uses variables which are
18092 defined only if `YYDEBUG != 0'.
18094 2000-03-16 Akim Demaille <akim@epita.fr>
18096 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
18097 and related variables so that the similarities are highlighted.
18099 2000-03-16 Akim Demaille <akim@epita.fr>
18101 * src/bison.s1: Properly indent CPP directives.
18103 2000-03-16 Akim Demaille <akim@epita.fr>
18105 * src/bison.s1: Properly indent the `alloca' CPP section.
18107 2000-03-16 Akim Demaille <akim@epita.fr>
18109 Do not hard code values of directories in `configure.in'.
18110 Update the `configure' tool chain.
18112 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
18114 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
18115 (AC_OUTPUT): Add m4/Makefile.
18116 Bump to bison 1.28a, 1.29 has never been released.
18117 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
18118 handled via src/Makefile.am.
18119 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
18120 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
18122 * Makefile.am (SUBDIRS): Add m4.
18123 (ACLOCAL_AM_FLAGS): New variable.
18124 (AUTOMAKE_OPTIONS): Add check-news.
18125 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
18126 the proper line number and file name.
18127 (DEFS): Propagate the location of bison library files and of the
18129 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
18131 * acinclude.m4: Remove, replaced by the directory m4.
18132 * m4/Makefile.am (EXTRA_DIST): New variable.
18133 * m4/gettext.m4: New file, from the fileutils.
18134 * m4/lcmessage.m4: Likewise
18135 * m4/progtest.m4: Likewise.
18136 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
18138 2000-03-10 Akim Demaille <akim@epita.fr>
18141 Formatting changes of various comments.
18142 Respect the GNU coding standards at various places.
18143 Don't use `_()' when no translation is needed.
18145 1999-12-13 Jesse Thilo <jthilo@gnu.org>
18148 OS/2 honors TMPDIR environment variable.
18150 1999-12-13 Jesse Thilo <jthilo@gnu.org>
18152 * doc/bison.texinfo: Tweaked spelling and grammar.
18154 Removed reference to price of printed copy.
18155 Mention BISON_SIMPLE and BISON_HAIRY.
18157 1999-12-13 Jesse Thilo <jthilo@gnu.org>
18159 * configure.in, NEWS:
18160 Bison 1.29 released.
18162 1999-10-27 Jesse Thilo <jthilo@gnu.org>
18164 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
18165 Added reference card.
18167 1999-07-26 Jesse Thilo <jthilo@gnu.org>
18169 * po/ru.po: Added Russian translation.
18171 1999-07-26 Jesse Thilo <jthilo@gnu.org>
18173 * configure.in: Added Russian translation.
18175 1999-07-06 Jesse Thilo <jthilo@gnu.org>
18177 * configure.in, NEWS, README:
18178 Released version 1.28.
18180 1999-06-14 Jesse Thilo <jthilo@gnu.org>
18183 Squashed redefinition warning on some systems.
18185 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
18186 Have configure build version string instead of relying on ANSI string
18189 1999-06-14 Jesse Thilo <jthilo@gnu.org>
18191 * po/POTFILES.in: Got rid of version.c.
18193 1999-06-14 Jesse Thilo <jthilo@gnu.org>
18195 * acconfig.h, configure.in:
18196 Have configure build version string instead of relying on ANSI string
18199 1999-06-08 Jesse Thilo <jthilo@gnu.org>
18202 Dropped mention of `+' for long-named options.
18204 1999-05-30 Jesse Thilo <jthilo@gnu.org>
18206 * src/files.c: Added <unistd.h> for unlink().
18208 * src/Makefile.am, src/system.h:
18211 1999-05-30 Jesse Thilo <jthilo@gnu.org>
18213 * README: Added a FAQ list.
18215 * configure.in, acconfig.h:
18218 1999-05-30 Jesse Thilo <jthilo@gnu.org>
18220 * doc/FAQ, doc/Makefile.am:
18223 1999-05-19 Jesse Thilo <jthilo@gnu.org>
18225 * src/alloc.h, src/symtab.h, src/version.c:
18226 Protected inclusion of "config.h" with HAVE_CONFIG_H.
18228 1999-04-18 Jesse Thilo <jthilo@gnu.org>
18230 * src/.cvsignore, src/Makefile.am:
18231 Reorganized: sources in `src', documentation in `doc'.
18233 * src/lex.c (literalchar):
18234 fixed the code for escaping double quotes (thanks
18237 1999-04-18 Jesse Thilo <jthilo@gnu.org>
18239 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
18240 Adjusted paths to reflect directory reorganization.
18242 1999-04-18 Jesse Thilo <jthilo@gnu.org>
18244 * doc/.cvsignore, doc/Makefile.am:
18245 Reorganized: sources in `src', documentation in `doc'.
18247 1999-04-18 Jesse Thilo <jthilo@gnu.org>
18250 Updated AC_INIT file to reflect directory reorganization.
18252 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
18253 Reorganized: sources in `src', documentation in `doc'.
18255 1999-04-13 Jesse Thilo <jthilo@gnu.org>
18258 Don't declare calloc() and realloc() if not necessary.
18260 1999-04-13 Jesse Thilo <jthilo@gnu.org>
18262 * configure.in, acconfig.h, acinclude.m4:
18263 Don't declare calloc() and realloc() if not necessary.
18265 1999-03-23 Jesse Thilo <jthilo@gnu.org>
18267 * po/.cvsignore: Added i18n support.
18269 1999-03-23 Jesse Thilo <jthilo@gnu.org>
18271 * acconfig.h, configure.in, Makefile.am:
18272 Added i18n support.
18274 1999-03-22 Jesse Thilo <jthilo@gnu.org>
18276 * src/bison.s1: Fixed #line numbers.
18278 1999-03-15 Jesse Thilo <jthilo@gnu.org>
18280 * po/es.po, po/fr.po, po/nl.po, po/de.po:
18281 Added PO files from Translation Project.
18283 1999-03-03 Jesse Thilo <jthilo@gnu.org>
18286 Added support for non-ANSI compilers (ansi2knr).
18288 1999-02-16 Jesse Thilo <jthilo@gnu.org>
18290 * configure.in: Bumped version number to 1.27.
18293 Added `bison.simple' to list of files removed by `make distclean'.
18295 1999-02-12 Jesse Thilo <jthilo@gnu.org>
18297 * src/files.c, src/files.h:
18298 Defined locations of parser files in config.h instead of Makefile.
18300 1999-02-12 Jesse Thilo <jthilo@gnu.org>
18302 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
18303 Defined locations of parser files in config.h instead of Makefile.
18305 1999-02-09 Jesse Thilo <jthilo@gnu.org>
18308 Removed inappropriate use of $< macro.
18310 1999-02-05 Jesse Thilo <jthilo@gnu.org>
18312 * po/Makefile.in.in, po/POTFILES.in:
18313 Add `po' directory skeleton.
18315 1999-01-27 Jesse Thilo <jthilo@gnu.org>
18317 * README: Document help-bison list.
18319 * configure.in: Add check for mkstemp().
18321 1999-01-20 Jesse Thilo <jthilo@gnu.org>
18323 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
18324 Hush a few compiler warnings.
18327 Add tryclose(), which verifies that fclose was successful.
18328 Hush a couple of compiler warnings.
18330 1999-01-20 Jesse Thilo <jthilo@gnu.org>
18332 * Makefile.am, OChangeLog:
18333 ChangeLog is now automatically generated. Include the old version as
18336 1999-01-14 Jesse Thilo <jthilo@gnu.org>
18338 * 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:
18339 Update FSF address.
18341 1999-01-14 Jesse Thilo <jthilo@gnu.org>
18343 * doc/bison.texinfo: Fix formatting glitch.
18345 * doc/bison.texinfo: Update FSF address.
18347 1999-01-14 Jesse Thilo <jthilo@gnu.org>
18349 * acconfig.h: Update FSF address.
18351 1999-01-08 Jesse Thilo <jthilo@gnu.org>
18354 Don't define PACKAGE here, since config.h defines it.
18356 1998-12-30 Jesse Thilo <jthilo@gnu.org>
18358 * src/reader.c: Update copyright date.
18361 Ditch sprintf to statically-sized buffers in fatal/warn functions in
18362 favor of output directly to stderr (avoids buffer overruns).
18364 * src/reader.c: Some checks for premature EOF.
18366 * 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:
18367 Use prototypes if the compiler understands them.
18369 * src/files.c: Honor TMPDIR on Unix hosts.
18370 Use prototypes if the compiler understands them.
18373 Fix a couple of buffer overrun bugs.
18374 Use prototypes if the compiler understands them.
18376 * src/system.h: Include unistd.h and ctype.h.
18377 Use #ifdef instead of #if for NLS symbols.
18379 1998-12-30 Jesse Thilo <jthilo@gnu.org>
18381 * doc/bison.texinfo:
18382 Delete comment "consider using @set for edition number, etc..." since
18383 we now are doing so.
18385 1998-12-30 Jesse Thilo <jthilo@gnu.org>
18388 Use prototypes if the compiler understands them.
18390 * NEWS: Document 1.26 highlights.
18392 * Makefile.am: Require Automake 1.3 or later.
18395 Use prototypes if the compiler understands them.
18397 1998-12-29 Jesse Thilo <jthilo@gnu.org>
18400 Use VERSION symbol from automake for version number.
18402 1998-12-29 Jesse Thilo <jthilo@gnu.org>
18404 * acconfig.h, configure.in, version.cin:
18405 Use VERSION symbol from automake for version number.
18407 1998-11-28 Jesse Thilo <jthilo@gnu.org>
18410 Distribute original version of simple parser (bison.s1), not built
18411 version (bison.simple).
18413 1998-11-28 Jesse Thilo <jthilo@gnu.org>
18415 * doc/bison.texinfo: Add info dir entry.
18417 * doc/bison.texinfo:
18418 Let automake put version number into documentation.
18420 1998-11-26 Jesse Thilo <jthilo@gnu.org>
18422 * src/bison.cld, src/build.com, src/vmshlp.mar:
18423 Add non-RCS files from /gd/gnu/bison.
18425 1998-11-26 Jesse Thilo <jthilo@gnu.org>
18428 Document the BISON_HAIRY and BISON_SIMPLE variables.
18430 1998-11-25 Jesse Thilo <jthilo@gnu.org>
18432 * src/version.c: Build version.c automatically.
18435 Fix token numbering (used to start at 258, not 257).
18437 * src/system.h: Include config.h.
18439 * src/getargs.c: Update bug report address.
18441 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
18442 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
18444 1998-11-25 Jesse Thilo <jthilo@gnu.org>
18447 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
18449 * configure.in, version.cin:
18450 Build version.c automatically.
18452 * AUTHORS: Add AUTHORS file.
18454 * README: Update bug report address.
18457 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
18459 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
18460 Add automake stuff.
18462 1998-11-25 Jesse Thilo <jthilo@gnu.org>
18464 * doc/bison.texinfo: Clean up some formatting.
18466 1998-05-05 Richard Stallman <rms@gnu.org>
18468 * doc/bison.texinfo:
18469 Explain better why to make a pure parser.
18471 1998-01-05 Richard Stallman <rms@gnu.org>
18473 * src/files.c (openfiles):
18474 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
18475 find a temporary directory, if possible. Do not unlink files while
18478 1997-08-25 Richard Stallman <rms@gnu.org>
18480 * src/reader.c (stack_offset;):
18481 Change some warni to warns.
18483 * src/lex.c (literalchar): Use warns, not warni.
18485 1997-06-28 Richard Stallman <rms@gnu.org>
18487 * src/bison.s1: Add a Bison version comment.
18489 * src/main.c (fatal, warn, berror):
18492 1997-06-28 Richard Stallman <rms@gnu.org>
18494 * Makefile.in (bison_version): New variable.
18495 (dist): Use that variable.
18496 (bison.s1): Substitute the Bison version into bison.simple.
18498 * bison.simple: Add a Bison version comment.
18500 1997-06-18 Richard Stallman <rms@gnu.org>
18502 * src/main.c (fatal, warn, berror):
18503 Make error messages standard.
18504 (toomany): Improve error message text.
18506 * 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:
18507 new.h renamed to alloc.h.
18509 1997-06-18 Richard Stallman <rms@gnu.org>
18511 * Makefile.in: new.h renamed to alloc.h.
18513 1997-05-24 Richard Stallman <rms@gnu.org>
18515 * src/lex.c (literalchar):
18516 Fix the code for escaping \, " and '.
18518 (lex): Avoid trouble when there are many chars
18519 to discard in a char literal with just several chars in it.
18521 1997-05-17 Richard Stallman <rms@gnu.org>
18524 Use malloc, if using alloca is troublesome.
18525 (YYSTACK_USE_ALLOCA): New flag macro.
18526 Define it for some systems and compilers.
18527 (YYSTACK_ALLOC): New macro.
18528 (yyparse): Use YYSTACK_ALLOC to allocate stack.
18529 If it was malloc'd, free it.
18531 1997-05-17 Richard Stallman <rms@gnu.org>
18534 Use malloc, if using alloca is troublesome.
18535 (YYSTACK_USE_ALLOCA): New flag macro.
18536 Define it for some systems and compilers.
18537 (YYSTACK_ALLOC): New macro.
18538 (yyparse): Use YYSTACK_ALLOC to allocate stack.
18539 If it was malloc'd, free it.
18541 1997-04-23 Richard Stallman <rms@gnu.org>
18544 (alloca) [__hpux]: Always define as __builtin_alloca.
18546 1997-04-23 Richard Stallman <rms@gnu.org>
18549 (alloca) [__hpux]: Always define as __builtin_alloca.
18551 1997-04-22 Richard Stallman <rms@gnu.org>
18554 [__hpux]: Include alloca.h (right for HPUX 10)
18555 instead of declaring alloca (right for HPUX 9).
18557 * src/bison.s1 (__yy_memcpy):
18558 Declare arg `count' as unsigned int.
18559 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
18561 1997-04-22 Richard Stallman <rms@gnu.org>
18564 [__hpux]: Include alloca.h (right for HPUX 10)
18565 instead of declaring alloca (right for HPUX 9).
18567 * bison.simple (__yy_memcpy):
18568 Declare arg `count' as unsigned int.
18569 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
18571 1997-01-03 Richard Stallman <rms@gnu.org>
18573 * src/allocate.c: [__STDC__ or _MSC_VER]:
18574 Declare calloc and realloc to return void *.
18576 1997-01-02 Richard Stallman <rms@gnu.org>
18579 [_MSC_VER]: Include stdlib.h and process.h.
18580 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
18582 * src/main.c (main): Return FAILURE as a value.
18583 (printable_version): Declare arg as int, not char.
18585 1997-01-02 Richard Stallman <rms@gnu.org>
18587 * Makefile.in (dist):
18588 Explicitly check for symlinks, and copy them.
18590 1996-12-19 Richard Stallman <rms@gnu.org>
18593 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
18595 1996-12-18 Paul Eggert <eggert@gnu.org>
18597 * src/bison.s1 (yyparse):
18598 If __GNUC__ and YYPARSE_PARAM are both defined,
18599 declare yyparse to have a void * argument.
18601 1996-12-18 Paul Eggert <eggert@gnu.org>
18603 * bison.simple (yyparse):
18604 If __GNUC__ and YYPARSE_PARAM are both defined,
18605 declare yyparse to have a void * argument.
18607 1996-12-17 Richard Stallman <rms@gnu.org>
18609 * src/reduce.c (nbits): Add some casts.
18611 1996-08-12 Richard Stallman <rms@gnu.org>
18613 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
18615 1996-08-12 Richard Stallman <rms@gnu.org>
18617 * bison.simple: Test _MSDOS as well as _MSDOS_.
18619 1996-07-31 Richard Stallman <rms@gnu.org>
18622 [__sun && __i386]: Include alloca.h.
18624 1996-07-31 Richard Stallman <rms@gnu.org>
18627 [__sun && __i386]: Include alloca.h.
18629 1996-07-30 Richard Stallman <rms@gnu.org>
18631 * src/bison.s1: Comment change.
18633 * src/bison.s1: Test _MSDOS_, not MSDOS.
18635 1996-07-30 Richard Stallman <rms@gnu.org>
18637 * bison.simple: Comment change.
18639 * bison.simple: Test _MSDOS_, not MSDOS.
18641 1996-06-01 Richard Stallman <rms@gnu.org>
18643 * 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:
18644 Insert `_' macro around many string constants.
18647 Insert `_' macro around many string constants.
18649 (main): Call setlocale, bindtextdomain and textdomain.
18651 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
18652 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
18653 [ENABLE_NLS]: Include libintl.h.
18654 [ENABLE_NLS] (gettext): Define.
18655 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
18656 (N_, PACKAGE, LOCALEDIR): New macros.
18658 1996-06-01 Richard Stallman <rms@gnu.org>
18660 * POTFILES.in: New file.
18662 * Makefile.in (allocate.o):
18663 Define target explicitly.
18665 * Makefile.in (CFLAGS): Set to @CFLAGS@.
18666 (LDFLAGS): Set to @LDFLAGS@.
18667 (configure): Run autoconf only if preceding `cd' succeeds.
18668 (bison.s1): Redirect output to temporary file then move the
18669 temporary to the target, rather than redirecting directly to bison.s1.
18670 (clean): Remove config.status and config.log.
18671 (distclean): Don't remove config.status here.
18673 1996-05-12 Richard Stallman <rms@gnu.org>
18676 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
18678 1996-05-12 Richard Stallman <rms@gnu.org>
18681 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
18683 1996-05-11 Richard Stallman <rms@gnu.org>
18685 * src/bison.s1 (__yy_memcpy):
18686 Really reorder the args, as was supposedly done on Feb 14 1995.
18687 (yyparse): Calls changed accordingly.
18689 1996-05-11 Richard Stallman <rms@gnu.org>
18691 * Makefile.in (dist): Don't use $(srcdir).
18693 * bison.simple (__yy_memcpy):
18694 Really reorder the args, as was supposedly done on Feb 14 1995.
18695 (yyparse): Calls changed accordingly.
18697 1996-01-27 Richard Stallman <rms@gnu.org>
18699 * src/output.c (output_rule_data):
18700 Test YYERROR_VERBOSE in the conditional
18701 around the definition of ttyname.
18703 1995-12-29 Richard Stallman <rms@gnu.org>
18706 Fix line numbers in #line commands.
18708 1995-12-29 Richard Stallman <rms@gnu.org>
18711 Fix line numbers in #line commands.
18713 1995-12-27 Richard Stallman <rms@gnu.org>
18715 * src/bison.s1 (YYPARSE_PARAM_DECL):
18716 In C++, make it always null.
18717 (YYPARSE_PARAM_ARG): New macro.
18718 (yyparse): Use YYPARSE_PARAM_ARG.
18720 1995-12-27 Richard Stallman <rms@gnu.org>
18722 * bison.simple (YYPARSE_PARAM_DECL):
18723 In C++, make it always null.
18724 (YYPARSE_PARAM_ARG): New macro.
18725 (yyparse): Use YYPARSE_PARAM_ARG.
18727 1995-11-29 Richard Stallman <rms@gnu.org>
18729 * doc/bison.texinfo:
18730 Describe literal string tokens, %raw, %no_lines, %token_table.
18732 1995-11-29 Daniel Hagerty <hag@gnu.org>
18734 * doc/bison.texinfo: Fixed update date
18736 1995-10-16 Richard Stallman <rms@gnu.org>
18738 * src/version.c: Version 1.25.
18740 1995-10-16 Richard Stallman <rms@gnu.org>
18742 * NEWS: *** empty log message ***
18744 1995-10-16 Richard Stallman <rms@gnu.org>
18746 * doc/bison.1, doc/bison.rnh:
18749 1995-10-15 Richard Stallman <rms@gnu.org>
18751 * src/vmsgetargs.c, src/getargs.c:
18752 Added -n, -k, and -raw switches.
18753 (noparserflag, toknumflag, rawtoknumflag): New variables.
18755 * src/symtab.h (SALIAS):
18756 New #define for adding aliases to %token.
18757 (struct bucket): Added `alias' field.
18759 * src/reduce.c (reduce_grammar):
18760 Revise error message.
18761 (print_notices): Remove final `.' from error message.
18763 * src/reader.c (reader_output_yylsp):
18765 (readgram): Use `#if 0' around code that accepted %command
18766 inside grammar rules: The documentation doesn't allow it,
18767 and it will fail since the %command processors scan for the next %.
18768 (parse_token_decl): Extended the %token
18769 declaration to allow a multi-character symbol as an alias.
18770 (parse_thong_decl): New function.
18771 (read_declarations): Added %thong declarations.
18772 (read_declarations): Handle NOOP to deal with allowing
18773 % declarations as another means to specify the flags.
18774 (readgram): Allow %prec prior to semantics embedded in a rule.
18775 (skip_to_char, read_declarations, copy_definition)
18776 (parse_token_decl, parse_start_decl, parse_type_decl)
18777 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
18778 (get_type_name, copy_guard, copy_action, readgram)
18779 (get_type, packsymbols): Revised most error messages.
18780 Changed `fatal' to `warnxxx' to avoid aborting for error.
18781 Revised and use multiple warnxxx functions to avoid using VARARGS1.
18782 (read_declarations): Improve the error message for
18783 an invalid character. Do not abort.
18784 (read_declarations, copy_guard, copy_action): Use
18785 printable_version to avoid unprintable characters in printed output.
18786 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
18787 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
18788 Allow the type of a non-terminal can be given
18789 more than once, as long as all specifications give the same type.
18792 (output_headers, output_trailers, output, output_gram)
18793 (output_rule_data): Implement noparserflag variable.
18794 Implement toknumflag variable.
18795 (output): Call reader_output_yylsp to output LTYPESTR.
18797 * src/main.c (main):
18798 If reader sees an error, don't process the grammar.
18799 (fatals): Updated to not use VARARGS1.
18800 (printable_version, int_to_string, warn, warni, warns, warnss)
18801 (warnsss): New error reporting functions. Avoid abort for error.
18804 Added THONG and NOOP for alias processing.
18805 Added SETOPT for the new code that allows setting options with %flags.
18808 Include getopt.h. Add some extern decls.
18809 (safegetc): New function to deal with EOF gracefully.
18810 (literalchar); new function to deal with reading \ escapes.
18811 (lex): Use literalchar.
18812 (lex): Implemented "..." tokens.
18813 (literalchar, lex, parse_percent_token): Made tokenbuffer
18814 always contain the token. This includes growing the token
18815 buffer while reading an integer.
18816 (parse_percent_token): Replaced if-else statement with percent_table.
18817 (parse_percent_token): Added % declarations as another
18818 way to specify the flags -n, -l, and -r. Also added hooks for
18819 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
18820 major changes to files.c.
18821 (lex) Retain in the incoming stream a character following
18823 (skip_white_space, lex): Revised most error messages
18824 and changed fatal to warn to avoid aborting.
18825 (percent_table): Added %thong declarations.
18827 * src/gram.h: Comment changes.
18829 * src/files.c (openfiles, open_extra_files, done):
18831 and actfile file. Handle noparserflag. Both for -n switch.
18833 * src/conflicts.c (resolve_sr_conflict):
18834 Remove use of alloca.
18836 1995-06-01 Jim Meyering <meyering@gnu.org>
18838 * doc/bison.texinfo: *** empty log message ***
18840 1995-05-06 Richard Stallman <rms@gnu.org>
18842 * src/bison.s1: Comment change.
18844 1995-05-06 Richard Stallman <rms@gnu.org>
18846 * bison.simple: Comment change.
18848 1995-05-03 Richard Stallman <rms@gnu.org>
18850 * src/version.c: Version now 1.24.
18852 * src/bison.s1: Change distribution terms.
18854 * src/version.c: Version now 1.23.
18856 1995-05-03 Richard Stallman <rms@gnu.org>
18858 * doc/bison.texinfo:
18859 Rewrite "Conditions for Using Bison".
18860 Update version to 1.24.
18862 1995-05-03 Richard Stallman <rms@gnu.org>
18864 * bison.simple: Change distribution terms.
18866 1995-02-23 Richard Stallman <rms@gnu.org>
18868 * src/files.c: Test __VMS_POSIX as well as VMS.
18870 1995-02-14 Jim Meyering <meyering@gnu.org>
18872 * src/bison.s1 (__yy_memcpy):
18873 Renamed from __yy_bcopy to avoid
18874 confusion. Reverse FROM and TO arguments to be consistent with
18877 1995-02-14 Jim Meyering <meyering@gnu.org>
18879 * bison.simple (__yy_memcpy):
18880 Renamed from __yy_bcopy to avoid
18881 confusion. Reverse FROM and TO arguments to be consistent with
18884 1994-11-10 David J. MacKenzie <djm@gnu.org>
18890 * Makefile.in (DISTFILES): Include NEWS.
18892 * Makefile.in (DISTFILES):
18893 Include install-sh, not install.sh.
18895 * configure.in: Update to Autoconf v2 macro names.
18897 1994-10-05 David J. MacKenzie <djm@gnu.org>
18899 * Makefile.in: fix typo
18901 * Makefile.in (prefix, exec_prefix):
18902 Let configure set them.
18904 1994-09-28 David J. MacKenzie <djm@gnu.org>
18906 * Makefile.in: Set datadir to $(prefix)/share.
18908 1994-09-15 Richard Stallman <rms@gnu.org>
18911 Update copyright notice and GPL version.
18913 1994-09-15 Richard Stallman <rms@gnu.org>
18916 Update copyright notice and GPL version.
18918 1994-07-12 Richard Stallman <rms@gnu.org>
18920 * src/reduce.c, src/reader.c:
18923 1994-05-05 David J. MacKenzie <djm@gnu.org>
18925 * Makefile.in: entered into RCS
18927 1994-03-26 Richard Stallman <rms@gnu.org>
18929 * src/bison.s1: entered into RCS
18931 1994-03-26 Richard Stallman <rms@gnu.org>
18933 * bison.simple: entered into RCS
18935 1994-03-25 Richard Stallman <rms@gnu.org>
18937 * src/main.c: entered into RCS
18939 1994-03-24 Richard Stallman <rms@gnu.org>
18941 * src/conflicts.c: entered into RCS
18943 1994-01-02 Richard Stallman <rms@gnu.org>
18945 * Makefile.in: *** empty log message ***
18947 1993-11-21 Richard Stallman <rms@gnu.org>
18949 * src/bison.s1: *** empty log message ***
18951 1993-11-21 Richard Stallman <rms@gnu.org>
18953 * doc/bison.texinfo: entered into RCS
18955 * doc/bison.texinfo: *** empty log message ***
18957 1993-11-21 Richard Stallman <rms@gnu.org>
18959 * bison.simple: *** empty log message ***
18961 1993-10-25 David J. MacKenzie <djm@gnu.org>
18963 * doc/bison.texinfo: *** empty log message ***
18965 1993-10-19 Richard Stallman <rms@gnu.org>
18967 * src/bison.s1: *** empty log message ***
18969 1993-10-19 Richard Stallman <rms@gnu.org>
18971 * bison.simple: *** empty log message ***
18973 1993-10-14 Richard Stallman <rms@gnu.org>
18975 * src/bison.s1: *** empty log message ***
18977 1993-10-14 Richard Stallman <rms@gnu.org>
18979 * bison.simple: *** empty log message ***
18981 1993-09-14 David J. MacKenzie <djm@gnu.org>
18983 * doc/bison.texinfo: *** empty log message ***
18985 1993-09-13 Noah Friedman <friedman@gnu.org>
18987 * Makefile.in: *** empty log message ***
18989 1993-09-10 Richard Stallman <rms@gnu.org>
18991 * src/conflicts.c: *** empty log message ***
18993 * src/system.h: entered into RCS
18995 1993-09-10 Richard Stallman <rms@gnu.org>
18997 * doc/bison.1: entered into RCS
18999 1993-09-06 Noah Friedman <friedman@gnu.org>
19001 * src/version.c: entered into RCS
19003 1993-09-06 Noah Friedman <friedman@gnu.org>
19005 * Makefile.in: *** empty log message ***
19007 1993-07-30 David J. MacKenzie <djm@gnu.org>
19009 * Makefile.in: *** empty log message ***
19011 1993-07-24 Richard Stallman <rms@gnu.org>
19013 * src/bison.s1: *** empty log message ***
19015 1993-07-24 Richard Stallman <rms@gnu.org>
19017 * bison.simple: *** empty log message ***
19019 1993-07-08 David J. MacKenzie <djm@gnu.org>
19021 * Makefile.in: *** empty log message ***
19023 1993-07-04 Richard Stallman <rms@gnu.org>
19025 * src/bison.s1: *** empty log message ***
19027 1993-07-04 Richard Stallman <rms@gnu.org>
19029 * bison.simple: *** empty log message ***
19031 1993-06-26 David J. MacKenzie <djm@gnu.org>
19033 * src/getargs.c: entered into RCS
19035 1993-06-26 David J. MacKenzie <djm@gnu.org>
19037 * doc/bison.texinfo: *** empty log message ***
19039 * doc/bison.1: New file.
19041 1993-06-25 Richard Stallman <rms@gnu.org>
19043 * src/getargs.c: New file.
19045 1993-06-16 Richard Stallman <rms@gnu.org>
19047 * src/bison.s1: *** empty log message ***
19049 1993-06-16 Richard Stallman <rms@gnu.org>
19051 * bison.simple: *** empty log message ***
19053 1993-06-03 Richard Stallman <rms@gnu.org>
19055 * src/bison.s1: New file.
19057 1993-06-03 Richard Stallman <rms@gnu.org>
19059 * doc/bison.texinfo: *** empty log message ***
19061 1993-06-03 Richard Stallman <rms@gnu.org>
19063 * bison.simple: New file.
19065 1993-05-19 Richard Stallman <rms@gnu.org>
19067 * doc/bison.texinfo: New file.
19069 1993-05-07 Noah Friedman <friedman@gnu.org>
19071 * Makefile.in: *** empty log message ***
19073 1993-04-28 Noah Friedman <friedman@gnu.org>
19075 * src/reader.c: *** empty log message ***
19077 1993-04-23 Noah Friedman <friedman@gnu.org>
19079 * src/alloc.h: entered into RCS
19081 1993-04-20 David J. MacKenzie <djm@gnu.org>
19083 * src/version.c: *** empty log message ***
19085 * src/files.c, src/allocate.c:
19088 * src/reader.c: *** empty log message ***
19090 * src/lex.c: entered into RCS
19092 * src/conflicts.c: New file.
19094 * src/symtab.c: entered into RCS
19096 * src/alloc.h: New file.
19098 * src/LR0.c: entered into RCS
19100 1993-04-18 Noah Friedman <friedman@gnu.org>
19102 * src/reader.c: New file.
19104 * src/version.c: *** empty log message ***
19106 1993-04-18 Noah Friedman <friedman@gnu.org>
19108 * Makefile.in: *** empty log message ***
19110 1993-04-17 Noah Friedman <friedman@gnu.org>
19112 * Makefile.in: *** empty log message ***
19114 1993-04-15 Richard Stallman <rms@gnu.org>
19116 * src/main.c, src/files.c:
19119 1993-04-15 Noah Friedman <friedman@gnu.org>
19121 * configure.in: entered into RCS
19123 * configure.in: *** empty log message ***
19125 * configure.in: New file.
19127 1993-04-14 Richard Stallman <rms@gnu.org>
19129 * Makefile.in: New file.
19131 1993-04-13 Richard Stallman <rms@gnu.org>
19133 * src/version.c: New file.
19135 1993-03-25 Richard Stallman <rms@gnu.org>
19137 * src/output.c: entered into RCS
19139 1992-09-25 Richard Stallman <rms@gnu.org>
19141 * configure.bat: entered into RCS
19143 1992-06-22 Richard Stallman <rms@gnu.org>
19145 * src/vmsgetargs.c: entered into RCS
19147 1992-06-22 Richard Stallman <rms@gnu.org>
19149 * doc/bison.rnh: entered into RCS
19151 1992-04-20 David J. MacKenzie <djm@gnu.org>
19153 * README: entered into RCS
19155 1992-01-22 Richard Stallman <rms@gnu.org>
19157 * src/machine.h: entered into RCS
19159 1991-12-21 Richard Stallman <rms@gnu.org>
19161 * src/lalr.c, src/closure.c:
19164 1991-12-20 Richard Stallman <rms@gnu.org>
19166 * src/state.h: entered into RCS
19168 1991-12-18 Richard Stallman <rms@gnu.org>
19170 * src/print.c, src/nullable.c, src/derives.c:
19173 1991-11-03 David J. MacKenzie <djm@gnu.org>
19175 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
19178 1988-09-09 Richard Stallman <rms@gnu.org>
19180 * src/bison.hairy: entered into RCS
19182 1987-12-16 Richard Stallman <rms@gnu.org>
19184 * REFERENCES: entered into RCS
19189 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
19190 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
19191 Free Software Foundation, Inc.
19193 Copying and distribution of this file, with or without
19194 modification, are permitted provided the copyright notice and this
19195 notice are preserved.