1 2009-05-19 Akim Demaille <demaille@gostai.com>
3 remove useless variable.
4 * src/getargs.c (skeleton_arg): Remove now useless variable.
5 Should help the compiler see that this printf-like call is sane.
7 2009-05-15 Akim Demaille <demaille@gostai.com>
9 Rename token.prefix as api.tokens.prefix.
11 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00024.html.
13 * NEWS, data/bison.m4, data/c.m4, data/java.m4, doc/bison.texinfo,
14 * tests/c++.at, tests/calc.at, tests/java.at, tests/local.at
15 (token.prefix): Rename as...
16 (api.tokens.prefix): this.
18 2009-05-11 Akim Demaille <demaille@gostai.com>
21 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
24 2009-05-11 Akim Demaille <demaille@gostai.com>
27 * doc/bison.simple (Decl Summary): Document token.prefix.
28 (Calc++ Parser): Various fixes.
31 Introduce a macro TOKEN to shorten the code and make it more
33 (Calc++ Scanner): Adjust.
34 * NEWS (Variable token.prefix): New.
36 2009-05-04 Akim Demaille <demaille@gostai.com>
38 bison: catch bad symbol names.
39 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
40 * tests/input.at: Adjust.
42 2009-05-04 Akim Demaille <demaille@gostai.com>
44 identifiers: dashes are letters.
45 Dashes can now start identifiers (symbols and directives).
47 * src/scan-gram.l ({letter}): Add dash.
49 * tests/input.at (Symbols): Adjust.
51 * tests/regression.at (Invalid inputs): Adjust error message.
52 * doc/bison.texinfo (Symbols): Update.
54 2009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
56 Declare %code to be a permanent feature.
58 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
60 (Decl Summary): Likewise.
62 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
64 Convert underscores to dashes in some %define variable names.
65 For now, just api.push-pull and lr.keep-unreachable-states.
66 Maintain old names for backward compatibility.
67 * NEWS (2.5): Document.
68 * data/c.m4 (b4_identification): Update comment.
69 * data/yacc.c: Update access.
70 * doc/bison.texinfo: Update.
71 * etc/bench.pl.in (bench_push_parser): Update use.
72 * src/files.c (tr): Move to...
73 * src/getargs.c, src/getargs.h (tr): ... here because I can't
74 think of a better place to expose it. My logic is that, for all
75 uses of tr so far, command-line arguments can be involved, and
76 getargs.h is already included.
77 * src/main.c (main): Update access.
78 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
79 variable names to new variable names before assigning value.
80 * src/reader.c (reader): Update setting default.
81 * tests/calc.at: Update uses.
82 * tests/conflicts.at (Unreachable States After Conflict
83 Resolution): Update use.
84 * tests/input.at (%define enum variables): Update use.
85 (%define backward compatibility): New test group.
86 * tests/push.at: Update uses.
87 * tests/reduce.at: Update uses.
88 * tests/torture.at: Update uses.
90 2009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
92 Set all front-end %define defaults in one place.
93 * src/main.c (main): Move lr.keep_unreachable_states default...
94 * src/reader.c (reader): ... to here.
96 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
98 Rename lr.default_reductions to lr.default-reductions.
100 * doc/bison.texinfo: Here.
101 * src/lalr.c (initialize_LA): Here.
102 * src/print.c (print_reductions): Here.
103 * src/reader.c (reader): Here.
104 * src/tables.c (action_row): Here.
105 * tests/input.at (%define enum variables): Here.
106 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
108 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
110 Pacify ./configure --enable-gcc-warnings.
111 * tests/input.at (Symbols): Prototype yyerror and yylex.
113 2009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
115 Document how `%define "var" "value"' is not M4-friendly.
116 * src/parse-gram.y (variable): In comments here.
118 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
120 Clean up recent patches a little.
121 Reported by Akim Demaille.
122 * doc/bison.texinfo (Understanding): Fix typos.
123 * src/print.c (print_reductions): Don't use negated variable.
125 2009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
127 List accepted values for a %define enum variable with an invalid value.
128 Suggested by Akim Demaille at
129 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
130 * data/bison.m4 (_b4_percent_define_check_values): Implement.
131 * src/muscle-tab.c (muscle_percent_define_check_values): Implement.
132 * tests/input.at (%define lr.default_reductions invalid values): Merge
134 (%define enum variables): ... here, and update output.
136 2009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
138 Rename "default rule" to "default reduction".
139 This includes changing variable names in code, changing
140 comments, and renaming %define lr.default_rules to %define
141 lr.default_reductions.
142 * NEWS (2.5): Update IELR documentation.
143 * data/bison.m4 (b4_integral_parser_tables_map): Adjust YYDEFACT
145 * data/glr.c, data/lalr1.java: Sync copyright dates.
146 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
147 and lr.type documentation. Make some other wording
149 (Glossary): Adjust cross-references and Default Reduction
151 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
152 Remove a confusing comment pointed out by Akim Demaille.
153 (initialize_LA): Adjust code.
154 * src/print-xml.c (print_reductions): Adjust code.
155 * src/print.c (print_reductions): Adjust code.
156 * src/reader.c (reader): Adjust code.
157 * src/tables.c (action_row): Adjust code.
158 (token_actions): Adjust code.
159 * src/tables.h: Adjust YYDEFACT documentation.
160 * tests/input.at (%define lr.default_rules invalid values):
161 Rename test group to...
162 (%define lr.default_reductions invalid values): ... this, and
163 update grammar file and expected output.
164 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
165 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
167 2009-04-21 Akim Demaille <demaille@gostai.com>
169 tests: check the use of dashes and periods in symbols.
170 * tests/input.at (Symbol): New test group.
172 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
174 Document %define lr.type and lr.default_rules.
175 * NEWS (2.5): Add an entry.
176 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
177 besides just LALR(1) and GLR(1).
178 * doc/bison.texinfo (Introduction): Likewise.
179 (Language and Grammar): Bison is no longer limited to LALR(1)
181 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
182 when trying to distinguish from GLR. Talk about LR(1) grammars
183 rather than LALR(1) grammars.
184 (Decl Summary): In %define api.push_pull entry, say it applies
185 to deterministic parsers in C rather than LALR(1) parsers in C.
186 Add lr.default_rules entry.
188 (Mystery Conflicts): Bison is no longer limited to LALR(1)
190 (Generalized LR Parsing): Same changes as for the previous GLR
192 (Memory Management): Say deterministic rather than LALR(1).
193 (Understanding): Correct some bison output.
194 Index discussion of "accepting state".
195 Say deterministic rather than LALR(1).
196 (Bison Options): In --yacc entry, say deterministic rather than
198 In --report, --graph, and --xml entries, just don't mention
200 (C++ Parsers): Say deterministic rather than LALR(1).
201 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
202 (Glossary): Add Accepting State, Consistent State, Default Rule,
203 and IELR(1) definitions.
204 In Generalized LR (GLR) definition, make same changes as in
205 previous GLR sections.
206 In LALR(1) definition, say Bison uses LALR(1) by default rather
207 than implying Bison is limited to LALR(1).
208 (LocalWords): Add IELR.
210 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
212 Finish implementing %define lr.type.
213 Its value can be "LALR", "IELR", or "canonical LR".
214 * lib/timevar.def (TV_IELR_PHASE1): New var.
215 (TV_IELR_PHASE2): New var.
216 (TV_IELR_PHASE3): New var.
217 (TV_IELR_PHASE4): New var.
218 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
219 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
220 Sbitset.h, ielr.h, and ielr.c.
221 * src/getargs.h, src/getargs.c (enum trace, trace_args,
222 trace_types): Add trace_ielr.
223 * src/lalr.h, src/lalr.c (ngotos): Export it.
225 (goto_follows): ... this, update all uses, and export it.
226 (set_goto_map): Export it.
227 (map_goto): Export it.
228 (compute_lookahead_tokens): Don't free goto_follows yet. Now
230 (initialize_LA): Export it. Move lookback allocation to...
231 (lalr): ... here because, for canonical LR, initialize_LA must
232 be invoked but lookback and much of the rest of LALR isn't
234 * main.c (main): Instead of lalr, invoke ielr, which invokes
236 * src/reader.c (reader): Default lr.type to "LALR".
237 Default lr.default_rules to "accepting" if lr.type is "canonical
238 LR". Leave the default as "all" otherwise.
239 Check for a valid lr.type value.
240 * src/state.h, src/state.c (struct state_list): Add state_list
242 (state_new): Initialize state_list member to NULL.
243 (state_new_isocore): New function, exported.
244 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
245 exercises all values of lr.type.
246 (GNU AWK Grammar): Rename test group to...
247 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
248 AT_TEST_EXISTING_GRAMMAR.
249 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
250 (GNU pic Grammar): Rename test group to...
251 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
252 AT_TEST_EXISTING_GRAMMAR.
253 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
254 all values of lr.type.
255 (Single State Split): New test groups using AT_TEST_LR_TYPE.
256 (Lane Split): Likewise.
257 (Complex Lane Split): Likewise.
258 (Split During Added Lookahead Propagation): Likewise.
260 2009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
262 Add new files for IELR and canonical LR implementation.
263 * src/AnnotationList.c: New.
264 * src/AnnotationList.h: New.
265 * src/InadequacyList.c: New.
266 * src/InadequacyList.h: New.
267 * src/Sbitset.c: New.
268 * src/Sbitset.h: New.
272 2009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
274 Implement %define lr.default_rules.
275 Its value describes the states that are permitted to contain
276 default rules: "all", "consistent", or "accepting".
277 * src/reader.c (reader): Default lr.default_rules to "all".
278 Check for a valid lr.default_rules value.
279 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
280 is "accepting", then only mark the accepting state as
282 (initialize_LA): Tell state_lookahead_tokens_count whether
283 lr.default_rules is "accepting".
284 * src/tables.c (action_row): If lr.default_rules is not "all",
285 then disable default rules in inconsistent states.
286 * src/print.c (print_reductions): Use this opportunity to
287 perform some assertions about whether lr.default_rules was
289 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
290 helps with checking the parser tables for a grammar.
291 * tests/input.at (%define lr.default_rules invalid values): New
293 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
294 AT_TEST_TABLES_AND_PARSE.
295 (`no %define lr.default_rules'): New test group generated by
296 AT_TEST_LR_DEFAULT_RULES.
297 (`%define lr.default_rules "all"'): Likewise.
298 (`%define lr.default_rules "consistent"'): Likewise.
299 (`%define lr.default_rules "accepting"'): Likewise.
301 2009-04-20 Akim Demaille <demaille@gostai.com>
305 2009-04-20 Akim Demaille <demaille@gostai.com>
308 * src/output.c (token_definitions_output): Use symbol_id_get
309 instead of duplicating its logic.
310 * TODO (YYERRCODE): Extend.
312 2009-04-20 Akim Demaille <demaille@gostai.com>
314 variables: prefer error-verbose to error_verbose.
315 * data/bison.m4 (b4_error_verbose_if): Based on error-verbose
316 instead of error_verbose.
317 * src/scan-gram.l (%error-verbose): Map to the error-verbose
319 * doc/bison.texinfo: Promote %define error-verbose instead of
321 * tests/actions.at: Prefer %define error-verbose to %error-verbose.
323 2009-04-15 Akim Demaille <demaille@gostai.com>
325 variables: accept dashes.
326 * data/bison.m4 (b4_percent_define_if_define_): Also map dashes to
328 * src/scan-gram.l ({id}): Also accept dashes after the initial
330 ({directive}): Use {id}.
331 * src/parse-gram.y: Comment and formatting changes.
332 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
334 * src/complain.h, src/complain.c (yacc_at): New.
335 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
337 * src/output.c (token_definitions_output): Do not #define token
340 2009-04-20 Akim Demaille <demaille@gostai.com>
342 Consistently refer to Yacc, not YACC.
343 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
345 2009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
347 Pacify make maintainer-check-posix.
348 * tests/input.at (%define, --define): Move bison command-line
349 options before grammar file name.
351 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
353 Document semicolon warnings.
356 2009-04-14 Akim Demaille <demaille@gostai.com>
358 variables: use `parse.assert' instead of `assert'.
359 * TODO (assert): Remove.
360 * data/bison.m4 (b4_assert_if): Replace with...
361 (b4_parse_assert_if): this.
362 * data/lalr1.cc, data/variant.hh, tests/c++.at: Adjust.
363 * doc/bison.texinfo (Decl Summary): Document parse.assert.
365 2009-04-14 Akim Demaille <demaille@gostai.com>
367 variables: use `parse.trace' instead of `debug'.
368 * src/getargs.c (getargs): Map -t to %define trace.parse.
369 * src/scan-gram.l (%debug): Map to %define trace.parse.
370 * data/bison.m4 (b4_percent_define_if_define): Map `.' in variable
371 names to `_' in macro names.
372 (b4_debug_if): Replace with...
373 (b4_parse_trace_if): this.
374 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
375 * data/yacc.c: Adjust.
376 * doc/bison.texinfo (Decl Summary): Document %debug as obsoleted.
377 Use @code to label the variable list.
378 Document the variable parse.trace.
379 (Tracing): Promote the parse.trace variable.
380 * TODO: %printer is not documented.
382 2009-04-14 Akim Demaille <demaille@gostai.com>
385 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
386 (Table of Symbols): Remove duplicate entry for %debug.
388 2009-04-10 Eric Blake <ebb9@byu.net>
390 submodules: update to latest
391 * submodules/autoconf: Use latest upstream Autoconf.
393 2009-04-06 Eric Blake <ebb9@byu.net>
395 Work around autoconf 2.63b bug in testsuite.
396 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
397 autoconf bug related to # in test.
399 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
401 * NEWS (2.5): New section. Describe new -D/--define feature.
403 2009-04-06 Akim Demaille <demaille@gostai.com>
406 * src/parse-gram.h, src/parse-gram.c: Regen.
408 2009-04-06 Akim Demaille <demaille@gostai.com>
410 rename muscle_tab.* as muscle-tab.* for consistency.
411 * src/muscle_tab.h, src/muscle_tab.c: Rename as...
412 * src/muscle-tab.h, src/muscle-tab.c: these.
413 * src/getargs.c, src/local.mk, src/main.c, src/output.c,
414 * src/parse-gram.y, src/reader.c, src/scan-code.l: Adjust.
416 2009-04-06 Akim Demaille <demaille@gostai.com>
418 Makefile: introduce $(BISON).
419 * src/local.mk (BISON): New.
422 2009-04-06 Akim Demaille <demaille@gostai.com>
424 parser: handle %locations as %define locations.
425 * src/getargs.h, src/getargs.c (locations_flag): Remove.
426 * src/getargs.c, src/scan-code.l: Use muscle_percent_define_ensure
427 to set "locations" to true.
428 * src/output.c (prepare): Don't output "locations".
429 * src/scan-gram.l (%locations): Handle it as a %<flag>.
430 * src/parse-gram.y: It's no longer a token.
432 * data/bison.m4 (b4_locations_if): Define it with
433 b4_percent_define_if_define.
434 * data/c.m4, data/glr.cc: Adjust.
436 2009-04-06 Akim Demaille <demaille@gostai.com>
439 * src/parse-gram.c: Regen.
441 2009-04-06 Akim Demaille <demaille@gostai.com>
443 muscle: factor the handling of obsolete of obsolete directives.
444 Suggested by Joel E. Denny.
446 * src/muscle_tab.h, src/muscle_tab.c (muscle_percent_define_ensure):
447 New, extracted from...
448 * src/parse-gram.y (prologue_declaration: pure-parser): here.
450 (prologue_declaration: "%<flag>"): Use
451 muscle_percent_define_ensure.
452 (%error-verbose, %pure-parser): No longer tokens.
453 * src/scan-gram.l (pure-parser): Return as a %<flag>.
455 2009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
457 Fix options documentation.
458 * build-aux/cross-options.pl: As in --help output, write optional
459 arguments as [=ARG] not =[ARG].
460 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
462 2009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
464 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
465 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
466 requirements for a correct m4 are stricter.
467 * m4/m4.m4: Make it a symbolic link to submodules/autoconf/m4/m4.m4.
468 * configure.ac: Update to use AC_PROG_GNU_M4.
469 Reported by Eric Blake.
471 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
473 Help with updating web manual.
474 * HACKING: Incorporate instructions from gnulib/doc/README.
475 * bootstrap.conf (gnulib_modules): Add gendocs.
477 2009-04-03 Akim Demaille <demaille@gostai.com>
480 * src/parse-gram.h, src/parse-gram.c: Regen.
482 2009-04-03 Akim Demaille <demaille@gostai.com>
484 Factor %FLAG at scan level.
485 * src/parse-gram.y (PERCENT_DEBUG, PERCENT_ERROR_VERBOSE): Token
486 definitions and associated rules, replaced by....
487 (PERCENT_FLAG): this new token type, and rule.
488 * src/scan-gram.l (RETURN_PERCENT_FLAG): New.
489 Use it for %debug and %error-verbose.
491 2009-04-03 Akim Demaille <demaille@gostai.com>
494 * src/parse-gram.h, src/parse-gram.c: Regen.
496 2009-04-03 Akim Demaille <demaille@gostai.com>
498 Treat %debug as %define debug.
499 * data/bison.m4 (b4_debug_if): New.
500 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c,
501 * data/lalr1.java: Use it instead of b4_debug_flag.
502 * src/getargs.h, src/getargs.c (debug_flag): Remove.
503 * src/output.c (prepare): Don't output it.
504 * src/parse-gram.y: Treat %debug as %define debug.
506 2009-04-03 Akim Demaille <demaille@gostai.com>
508 Treat %error-verbose as %define error_verbose.
509 This allows to pass -Derror_verbose on the command line. Better
510 yet, it allows to pass -Derror_verbose=$(ERROR_VERBOSE), with
511 ERROR_VERBOSE being defined as false or true.
512 * data/bison.m4 (b4_percent_define_if_define): Instead of relying
513 on b4_percent_define_ifdef, for does not check the defined value,
514 but only whether the symbol is defined, rely on
515 b4_percent_define_flag_if, so that a value of "false" is processed
517 If not defined, define the flag to "false".
518 (b4_error_verbose_if): New.
519 * data/glr.c, data/lalr1.cc, data/yacc.c: Use it instead of
520 b4_error_verbose_flag.
521 * src/getargs.h, src/getargs.c (error_verbose_flag): Remove.
522 * src/output.c (prepare): Don't output it.
523 * src/parse-gram.y (%error-verbose): Treat as %define error_verbose.
525 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
527 Fix strange %define locations for default values.
528 Reported by Akim Demaille at
529 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
530 and discussed again starting at
531 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
532 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
533 because location information is bogus.
534 Use angle brackets to delimit fake file name because square brackets
535 look like underexpanded m4. Choose a better fake file name.
536 Use negative line numbers.
537 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
538 * src/location.c (location_print): If line for a boundary is negative,
539 only print that boundary's file name.
540 * src/location.h: Document that.
541 * tests/skeletons.at (%define Boolean variables: invalid skeleton
542 defaults): Update output.
544 2009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
546 Pacify ./configure --enable-gcc-warnings.
547 * Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS) because many files
548 in lib won't compile with it.
549 * src/local.mk (src_bison_CFLAGS): Use $(WERROR_CFLAGS) here only.
551 2009-03-31 Akim Demaille <demaille@gostai.com>
553 bootstrap: --help to stdout.
554 * bootstrap (usage): Don't send --help to stderr.
555 Use a here doc instead of a long string.
557 2009-03-31 Akim Demaille <demaille@gostai.com>
559 bootstrap: README-hacking no longer exists
560 * bootstrap (checkout_only_file): Set to HACKING.
562 2009-03-26 Akim Demaille <demaille@gostai.com>
564 doc: merge HACKING and README-hacking.
565 Two files is confusing.
566 Reported by Alexandre Duret-Lutz.
568 * README-hacking: Merge into...
569 * HACKING (Working from the repository): here.
571 2009-03-26 Akim Demaille <demaille@gostai.com>
573 doc: update README-hacking.
574 * README-hacking: We now use git and git submodules.
575 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
577 2009-03-26 Akim Demaille <demaille@gostai.com>
579 lalr1.cc: avoid GCC 4.3 warnings.
580 GCC 4.3 now warns about "a || b && c" and asks for explicit
582 Reported by Alexandre Duret-Lutz.
583 * data/location.cc: Update copyright years.
584 (Position::operator==): Use parens to make precedence explicit.
585 Compare lines and columns first, as they are more likely to be
586 different, and they are faster to compare.
588 2009-03-26 Akim Demaille <demaille@gostai.com>
591 * gnulib: Update to latest.
592 * src/local.mk (AM_CFLAGS): Move to...
594 * etc/prefix-gnulib-mk (prefix_assignment): Also transform
597 2009-03-02 Akim Demaille <demaille@gostai.com>
601 2009-03-02 Akim Demaille <demaille@gostai.com>
603 Share b4_yytranslate_define.
604 * data/lalr1.cc (b4_yytranslate_define): Move to...
607 2009-03-02 Akim Demaille <demaille@gostai.com>
609 Use locations in the variant example.
610 Yes, this obfuscates the point of this example, variants only.
611 But glr.cc cannot work (yet?) without locations. This change
612 makes it easier to use this example with glr.cc.
614 * examples/variant.yy (assert): %define it.
615 (locations): Request them.
616 (yylex): Bind the location to the stage.
618 2009-03-02 Akim Demaille <demaille@gostai.com>
620 Dub make_TOKEN as a public type interface.
621 * data/c++.m4 (b4_symbol_constructor_declare)
622 (b4_symbol_constructor_define): New empty stubs.
623 (b4_public_types_declare, b4_public_types_define): Use them.
624 * data/lalr1.cc (b4_symbol_constructor_declare)
625 (b4_symbol_constructor_declare_)
626 (b4_symbol_constructor_define_, b4_symbol_constructor_define):
628 * data/variant.hh: here.
629 Remove the "b4_variant_if" parts, as variant.hh is loaded only if
631 * data/lalr1.cc: No longer invoke b4_symbol_constructor_define and
632 b4_symbol_constructor_declare, as it is now done by
633 b4_public_types_define and b4_public_types_declare.
635 2009-03-02 Akim Demaille <demaille@gostai.com>
637 Coding style changes.
638 * data/lalr1.cc (b4_symbol_constructor_declaration_)
639 (b4_symbol_constructor_declarations)
640 (b4_symbol_constructor_definition_)
641 (b4_symbol_constructor_definitions)
642 (b4_yytranslate_definition): Rename as...
643 (b4_symbol_constructor_declare_)
644 (b4_symbol_constructor_declare)
645 (b4_symbol_constructor_define_)
646 (b4_symbol_constructor_define)
647 (b4_yytranslate_define): these.
648 * data/variant.hh (b4_variant_definition): Rename as...
649 (b4_variant_define): this.
651 2009-03-02 Akim Demaille <demaille@gostai.com>
653 Factor b4_assert_if, b4_lex_symbol_if, and b4_variant_if.
654 * data/bison.m4 (b4_percent_define_if_define): New.
655 * data/c++.m4 (b4_variant_if): Move to...
656 * data/bison.m4: Here, using b4_percent_define_if_define.
657 * data/lalr1.cc (b4_assert_if, b4_lex_symbol_if): Move to...
658 * data/bison.m4: Here, using b4_percent_define_if_define.
660 2009-03-02 Akim Demaille <demaille@gostai.com>
662 Dub symbol_type_base as a public type.
663 * data/c++.m4 (b4_public_types_declare): Now define
664 symbol_type_base and symbol_type.
665 (b4_public_types_define): New.
666 In both cases, the definitions are taken verbatim from lalr1.cc.
667 * data/lalr1.cc: Adjust.
669 2009-03-02 Akim Demaille <demaille@gostai.com>
671 b4_public_types_declare.
672 * data/c++.m4 (b4_public_types_declare): New.
673 * data/glr.cc, data/lalr1.cc: Use it.
675 2009-03-02 Akim Demaille <demaille@gostai.com>
677 b4_semantic_type_declare.
678 * data/c++.m4 (b4_semantic_type_declare): New.
679 Factors and generalizes what was in glr.cc and lalr1.cc.
680 * data/variant.hh (b4_semantic_type_declare): Redefine it for
682 * data/lalr1.cc, data/glr.cc: Use it.
684 2009-02-26 Akim Demaille <demaille@gostai.com>
687 * gnulib: Upgrade from master.
688 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore, m4/.gitignore:
691 2009-02-25 Akim Demaille <demaille@gostai.com>
693 Remove useless arguments.
694 * data/glr.c (yy_reduce_print): $$ and @$ are not used and not
697 2009-02-25 Akim Demaille <demaille@gostai.com>
700 * data/lalr1.cc: here.
702 2009-02-25 Akim Demaille <demaille@gostai.com>
704 Fix glr.cc's debug level handling.
705 * data/glr.cc (yydebug_): Remove, as it is actually yydebug from
707 (debug_level, set_debug_level): Adjust.
709 2009-02-25 Akim Demaille <demaille@gostai.com>
712 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
714 2009-02-25 Akim Demaille <demaille@gostai.com>
717 * etc/bench.pl.in (generate_grammar_list): Consitently use
718 location_type, not yy::location.
720 2009-02-25 Akim Demaille <demaille@gostai.com>
723 * data/lalr1.cc: here.
725 2009-02-19 Akim Demaille <demaille@gostai.com>
727 Make yyparser::error public.
728 * data/lalr1.cc: here.
729 There is no good reason to keep it private (and it is convenient
730 to use it from the scanner for instance). It is already public in
733 2009-02-19 Akim Demaille <demaille@gostai.com>
738 2009-02-19 Akim Demaille <demaille@gostai.com>
740 Remove trailing blanks.
741 The epilogue has its own ending \n, no need to add another.
743 * data/glr.c, data/lalr1.java, data/yacc.c: dnl when outputing the
745 * data/glr.cc: dnl when extending the epilogue.
746 Remove stray "private:".
748 2009-02-19 Akim Demaille <demaille@gostai.com>
751 * data/c.m4 (b4_c_function_decl): Here.
753 2009-02-19 Akim Demaille <demaille@gostai.com>
756 * data/lalr1.cc: here.
758 2009-02-19 Akim Demaille <demaille@gostai.com>
761 * data/variant.hh: New, extracted from...
762 * data/lalr1.cc: here.
764 * data/local.mk: Adjust.
766 2009-02-19 Akim Demaille <demaille@gostai.com>
768 Extract stack.hh from lalr1.cc.
769 * data/stack.hh: New.
770 * data/lalr1.cc: Extract from here.
771 * data/local.mk: Adjust.
773 2009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
775 Add reminder about uploading public key to keys.gnupg.net.
776 * HACKING (Release Procedure): Here.
778 2009-01-28 Akim Demaille <demaille@gostai.com>
780 * NEWS: Update information about 2.4.1 and 2.4.2.
782 2008-11-04 Akim Demaille <demaille@gostai.com>
785 * NEWS: Use more outline-mode markup.
786 Suggested by Jim Meyering.
788 2009-01-08 Akim Demaille <demaille@gostai.com>
790 Fix grep portability issues.
791 Grep on Solaris does not support -q.
792 Reported by Summum Bonum.
794 * NEWS: Add a stub for 2.4.2.
795 * THANKS: Add Summum Bonum.
796 * tests/atlocal.in (EGREP): New.
797 (CC, CXX, XSLTPROC): Make it possible to override them via
799 * tests/java.at: Use $EGREP instead of egrep.
800 Use AT_CHECK's ignore instead of grep's -q.
802 2008-12-11 Akim Demaille <demaille@gostai.com>
804 Pass the token type to yysyntax_error.
805 * data/yacc.c (yysyntax_error): Take the transated token instead
810 2008-12-11 Akim Demaille <demaille@gostai.com>
813 * data/glr.c: Formatting changes.
815 2008-12-11 Akim Demaille <demaille@gostai.com>
817 Propagate i18n changes into glr.c.
819 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
820 building the error message format dynamically.
821 * data/lalr1.java: Formatting changes.
823 2008-12-11 Akim Demaille <demaille@gostai.com>
826 * tests/local.mk: Replace "cd && testsuite" by "testsuite -C".
827 Solves problems when top_srcdir is an absolute path.
828 Suggested by Eric Blake.
829 * configure.ac: Require Autoconf 2.62.
831 2008-12-11 Akim Demaille <demaille@gostai.com>
833 Simplify the i18n of the error messages.
834 * data/lalr1.cc: Comment changes.
835 * data/yacc.c (yysyntax_error): Rewrite, using a switch as in
836 lalr1.cc instead of building dynamically the format string.
838 2008-12-08 Akim Demaille <demaille@gostai.com>
840 Fix portability issue in the test suite.
841 * tests/local.at (AT_MATCHES_CHECK): New.
842 Based on Perl instead of Sed. Sed has too many portability
843 pitfalls, not ever Sed is GNU Sed.
844 * tests/actions.at (Fix user actions without a trailing semicolon):
847 2008-12-08 Akim Demaille <demaille@gostai.com>
850 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
852 2008-12-08 Akim Demaille <demaille@gostai.com>
854 Install autoconf as a submodule to get m4sugar.
855 * .gitmodules: Add submodules/autoconf.
856 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
859 2008-12-08 Akim Demaille <demaille@gostai.com>
861 Test token.prefix in all the skeletons.
862 * data/java.m4 (b4_token_enum): Use the token.prefix.
863 * tests/local.at (AT_BISON_OPTION_PUSHDEFS): Define AT_TOKEN_PREFIX.
864 * tests/calc.at (_AT_DATA_CALC_Y): Use it.
865 Add checks for yacc.c, glr.c, lalr1.cc and glr.cc.
866 * tests/java.at: Comment changes.
867 (AT_CHECK_JAVA_MINIMAL): Define the END token.
868 (Java parser class and package names): Add token.prefix check.
870 2008-12-08 Akim Demaille <demaille@gostai.com>
872 Fix regeneration of atconfig.
873 * tests/local.mk (tests/atconfig): The rule was incorrect, but
874 remove it: now that there is no tests/Makefile.am, the top-level
875 Makefile properly updates atconfig when needed.
877 2008-12-07 Di-an Jan <dianj@freeshell.org>
879 Implement the FIXME that ends an user action with a semicolon
880 if it seems necessary.
881 * src/scan-code.l (flex rules section): Flag cpp directive from
882 any `#' to the first unescaped end-of-line. Semicolon is not
883 needed after `;', `{', '}', or cpp directives and is needed after
884 any other token (whitespaces and comments have no effect).
885 * tests/actions.at (Fix user actions without a trailing semicolon):
887 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
888 to make user actions complete statements.
889 Adjust column numbers in error messages.
890 * tests/regression.at (Fix user actions without a trailing semicolon):
891 Remove. Covered by new test.
893 2008-12-07 Akim Demaille <demaille@gostai.com>
896 * gnulib: Update from master.
898 2008-12-05 Eric Blake <ebb9@byu.net>
900 Avoid compiler warning.
901 * src/output.c (muscle_insert_item_number_table): Delete unused
904 2008-12-02 Eric Blake <ebb9@byu.net>
906 Build testsuite with newer autoconf.
907 * tests/output.at (m4_expand): Don't override in newer autoconf,
908 where the underlying implementation changed.
909 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
910 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
911 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
912 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
913 since some of them contain unbalanced ')'.
915 2008-12-01 Akim Demaille <demaille@gostai.com>
917 Use b4_symbol for printers and destructors everywhere.
918 * data/bison.m4 (b4_symbol_action_location): New.
919 * data/c.m4 (b4_symbol_actions): Remove.
920 Adjust all callers to use by b4_symbol_foreach and the corresponding
921 b4_symbol_printer/destructor macro.
922 * data/glr.cc: Adjust.
923 * data/lalr1.java: Adjust the %destructor sanity check.
924 * src/output.c (symbol_code_props_output): Remove, we no longer
925 need the b4_symbol_printers/destructors tables.
927 2008-12-01 Akim Demaille <demaille@gostai.com>
930 * data/lalr1.cc, data/bison.m4 (b4_symbol_action): Use
933 2008-12-01 Akim Demaille <demaille@gostai.com>
935 Move b4_symbol based macro to bison.m4.
936 * data/lalr1.cc (b4_symbol_, b4_symbol, b4_symbol_if)
937 (b4_symbol_action, b4_symbol_destructor, b4_symbol_printer)
938 (b4_symbol_case_, b4_symbol_foreach, b4_type_action_)
939 (b4_type_foreach): Move to...
940 * data/bison.m4: Here.
941 * data/lalr1.cc (b4_symbol_action): Specialize for C++: use
942 b4_symbol_value_template instead of b4_symbol_value.
944 2008-12-01 Akim Demaille <demaille@gostai.com>
946 b4_symbol/type_foreach.
947 * data/lalr1.cc (b4_symbol_foreach, b4_type_foreach): New.
950 2008-12-01 Akim Demaille <demaille@gostai.com>
952 Use the symbol properties to output the printer/destructor for lalr1.cc.
953 Instead of defining complex list of tuples to define various
954 properties of the symbols, we now prefer to define symbols as
955 "structs" in m4: using the symbol key (its number), and the
956 property name, b4_symbol gives it value. Use this to handle
957 destructors and printers.
959 * src/output.c (CODE_PROP): New.
960 (prepare_symbol_definitions): Use it to define the printer and
961 destructor related attributes of the symbols.
962 * data/lalr1.cc (b4_symbol_actions): Rename as...
963 (b4_symbol_action): this.
964 Use b4_symbol instead of 6 arguments.
965 (b4_symbol_printer, b4_symbol_destructor): New.
966 Use them instead of b4_symbol_actions.
968 2008-12-01 Akim Demaille <demaille@gostai.com>
970 Avoid capturing variables too easily.
971 * src/muscle_tab.h (MUSCLE_INSERT_BOOL, MUSCLE_OBSTACK_SGROW): Use
972 v__ and p__ instead of v and p.
974 2008-12-01 Akim Demaille <demaille@gostai.com>
976 Remove spurious empty line before syncline.
977 * data/bison.m4 (b4_syncline): Don't output an empty line before
980 2008-11-26 Akim Demaille <demaille@gostai.com>
982 Convert lib/Makefile.am into lib/local.mk.
983 The real problem is rather gnulib.mk, which itself is extracted
984 from a Makefile.am that gnulib expects to the "recursive". The
985 tool prefix-gnulib-mk converts such a gnulib.mk to be
986 non-recursive. Also, some AC_SUBST variables need to be adjusted.
988 * etc/prefix-gnulib-mk: New.
989 * bootstrap (slurp): Use it to convert further gnulib.mk.
990 No longer try to avoid re-creation of lib/gnulib.mk as the changes
992 * lib/Makefile.am: Rename as...
993 * lib/local.mk: this.
994 Adjust to be prefixed.
995 * Makefile.am, configure.ac: Adjust.
996 * src/local.mk (AM_CPPFLAGS): Extend it, don't define it.
998 2008-11-26 Akim Demaille <demaille@gostai.com>
1001 * tests/local.mk (TESTSUITE_FLAGS, AUTOTEST_FLAGS): Rename as...
1002 (TESTSUITEFLAGS, AUTOTESTFLAGS): these to compy with the GCS.
1003 Reported by Eric Blake.
1005 2008-11-26 Akim Demaille <demaille@gostai.com>
1007 Use b4_parser_tables_define in glr.cc.
1008 * data/glr.c: Use b4_parser_tables_define instead of defining the
1009 (deterministic integral) tables by hand.
1011 2008-11-26 Akim Demaille <demaille@gostai.com>
1013 Use b4_parser_tables_define in Java.
1014 * data/java.m4 (b4_typed_parser_table): Rename as...
1015 (b4_typed_parser_table_define): this, for consistency.
1016 Accept a comment as $4.
1018 (b4_integral_parser_table): Rename as...
1019 (b4_integral_parser_table_define): this.
1020 * data/lalr1.java: Adjust all uses.
1021 Use b4_parser_tables_define instead of generation by hand.
1023 2008-11-26 Akim Demaille <demaille@gostai.com>
1025 Prepare the convergence bw C style and Java table generation.
1026 * data/bison.m4 (b4_tables_map, b4_tables_declare)
1027 (b4_tables_define): Rename as...
1028 (b4_integral_parser_tables_map, b4_parser_tables_declare)
1029 (b4_parser_tables_define): these.
1030 * data/c.m4 (b4_table_define): Rename as...
1031 (b4_integral_parser_table_define): this.
1032 * data/lalr1.cc: Adjust.
1033 (b4_table_define, b4_table_declare): Rename as...
1034 (b4_integral_parser_table_define)
1035 (b4_integral_parser_table_declare): these.
1036 (yyrline_): Move the comment where it is actually used.
1037 * data/yacc.c: Adjust.
1038 (yyrline): Use b4_integral_parser_table_define.
1040 2008-11-26 Akim Demaille <demaille@gostai.com>
1043 * src/parse-gram.h, src/parse-gram.c: Regen.
1045 2008-11-26 Akim Demaille <demaille@gostai.com>
1047 Factor the generation of the (integral) tables bw yacc.c and lalr1.cc.
1048 * data/lalr1.cc (b4_tables_map): Move to...
1049 * data/bison.m4: here.
1050 Update the comment for yytable during the flight.
1051 (b4_tables_declare, b4_tables_define): New.
1052 * data/lalr1.cc: Use them.
1053 * data/c.m4 (b4_table_define): New.
1054 * data/yacc.c: Use b4_tables_define instead of output the tables
1056 * tests/regression.at (Web2c Actions): Adjust the expected output,
1057 the order of the tables changed.
1059 2008-11-26 Akim Demaille <demaille@gostai.com>
1061 Get rid of (yy)rhs and (yy)prhs.
1062 These tables are no longer needed in the parsers, and they don't seem to
1063 be useful. They are not documented either.
1065 * src/output.c (prepare_rules): Get rid of rhs and prhs.
1066 Adjust the computation of (yy)r2.
1068 2008-11-26 Akim Demaille <demaille@gostai.com>
1070 Rule length is unsigned.
1071 * src/gram.h, src/gram.c (rule_rhs_length): Return a size_t.
1073 2008-11-26 Akim Demaille <demaille@gostai.com>
1075 Get rid of lalr1-split.cc.
1076 It was no longer maintainer.
1078 * data/lalr1-split.cc: Remove.
1079 * etc/bench.pl.in (bench_fusion_parser): Remove.
1082 2008-11-26 Akim Demaille <demaille@gostai.com>
1084 Use yy* consistently.
1085 * data/glr.c: Now that yyrhs no longer exists as a global
1086 variable, rename local "rhs" variables into "yyrhs" for
1089 2008-11-25 Akim Demaille <demaille@gostai.com>
1091 Get rid of yyrhs and yyprhs in glr.c.
1092 * data/glr.c (yyrhs, yyprhs): Remove.
1093 Instead, use the state stack and yystos.
1095 2008-11-25 Akim Demaille <demaille@gostai.com>
1098 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): If glr, declare it
1099 as an Autotest keyword.
1101 2008-11-25 Akim Demaille <demaille@gostai.com>
1103 Prefer TESTSUITE_FLAGS.
1104 TESTSUITEFLAGS is barely readable.
1106 * tests/local.mk (TESTSUITE_FLAGS): Default to $(TESTSUITEFLAGS)
1107 for backward compatibility.
1108 Use the former instead of the latter.
1110 2008-11-25 Akim Demaille <demaille@gostai.com>
1112 Get rid of yyrhs and yyprhs in larl1.java.
1113 * data/lalr1.java (yyrhs_, yyprhs_): Remove.
1114 (yy_reduce_print): Rather, use yystos_ and the state stack.
1116 2008-11-25 Akim Demaille <demaille@gostai.com>
1120 2008-11-25 Akim Demaille <demaille@gostai.com>
1122 Get rid of yyrhs and yyprhs in yacc.c.
1123 They were used to get the symbol types, given a rule number, when
1124 displaying the top of the stack before a reduction. But the
1125 symbol type is available from the state stack. This has two be
1126 benefits: two tables less in the parser (making it smaller), and a
1127 more consistent use of the three stacks which will help to fuse
1130 * data/yacc.c (yyprhs, yyrhs): Remove.
1131 (YY_REDUCE_PRINT): Pass yyssp to yy_reduce_print.
1132 (yy_reduce_print): Take yyssp as argument.
1133 Use it, together with yystos, to get the symbol type.
1134 * tests/regression.at (Web2c Report): Remove these tables from the
1137 2008-11-25 Akim Demaille <demaille@gostai.com>
1140 The point is to factor the generation of the tables across skeletons.
1141 This is language dependant.
1143 * data/c.m4 (b4_comment_): New.
1144 Should be usable to define how to generate tables independently of
1146 (b4_c_comment): New.
1147 (b4_comment): Bounce to b4_c_comment.
1148 Now support $2 = [PREFIX] for indentation.
1149 * data/lalr1.cc (b4_table_declare): Don't output a comment if
1150 there is no comment.
1151 Indent it properly when there is one.
1152 Output the ending semicolon.
1153 (b4_table_define): Space changes.
1154 Output the ending semicolon.
1155 (b4_tables_map): New.
1156 Use it twice instead of declaring and defining the (integral)
1159 2008-11-25 Akim Demaille <demaille@gostai.com>
1162 * data/lalr1.cc (b4_table_declare): New.
1163 Use it to declare the tables defined with b4_table_define.
1164 (b4_table_define): Declare a third arg to match b4_table_declare
1166 Move all the comments around invocations of b4_table_define into
1167 the invocations itselves.
1168 Move things around to have the order for declarations and
1171 2008-11-25 Akim Demaille <demaille@gostai.com>
1174 * data/lalr1.java: here.
1176 2008-11-25 Akim Demaille <demaille@gostai.com>
1178 b4_args is more general than only C++.
1179 * data/lalr1.cc (b4_args, _b4_args): Move to...
1180 * data/bison.m4: here.
1182 2008-11-21 Di-an Jan <dianj@freeshell.org>
1184 Implement no-XXX arguments for --warnings, --report, --trace.
1185 * src/getargs.c (flags_argmatch): Handles no-XXX.
1186 Fix typo in doxygen comment.
1188 2008-11-21 Akim Demaille <demaille@gostai.com>
1190 Display the changes in cross-options.texi.
1191 * build-aux/cross-options.pl ($sep): New, to separate items.
1192 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Use diff to display the
1195 2008-11-20 Di-an Jan <dianj@freeshell.org>
1197 Improves options in the manual.
1198 * doc/bison.texinfo (-g, -x): Add space before argument.
1199 (Option Cross Key): Implement FIXME: listing directives also.
1200 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
1201 (Short Option): Special case -d. Put arguments inside @option.
1202 (Bison Directive): Add column, automatically extracted from
1203 src/scan-gram.l (actual name passed as the first argument)
1204 with special case for %define.
1205 * doc/local.mk (doc/cross-options.texi): Pass src/scan-gram.l
1206 to build-aux/cross-options.pl.
1207 * src/getargs.c (usage): Document limitations of cross-options.pl.
1208 * src/scan-gram.l: Likewise.
1210 2008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
1212 Fix unexpanded macros in GLR defines file.
1213 Reported by Csaba Raduly at
1214 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
1215 * THANKS (Csaba Raduly): Add.
1216 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
1217 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
1218 lexer in a separate module that includes the defines file.
1219 (AT_CHECK_CALC): From AT_FULL_COMPILE, request compilation of lexer
1221 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
1222 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
1223 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
1224 (AT_DATA_SOURCE_PROLOGUE): New.
1225 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
1226 (AT_DATA_SOURCE): New.
1227 (AT_FULL_COMPILE): Extend to support an additional source file.
1229 2008-11-18 Akim Demaille <demaille@gostai.com>
1232 * TODO: More short term issues.
1234 2008-11-18 Akim Demaille <demaille@gostai.com>
1237 * src/parse-gram.h, src/parse-gram.c: Regen.
1239 2008-11-18 Akim Demaille <demaille@gostai.com>
1241 Use b4_subtract where possible.
1242 * data/lalr1.cc (b4_subtract): Move to...
1243 * data/bison.m4: here.
1244 * data/glr.c (b4_rhs_data): Use it.
1245 * data/yacc.c (b4_rhs_value, b4_rhs_location): Use it.
1247 2008-11-18 Akim Demaille <demaille@gostai.com>
1249 Remove incorrect mode specification.
1250 * data/glr.cc: Don't pretend it's C code.
1252 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1254 Simplify last patch slightly.
1255 * src/getargs.c (getargs): Here.
1257 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1259 Fix last warning from --enable-gcc-warnings.
1260 * src/getargs.c (getargs): Don't assign const address to non-const
1263 2008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1265 Don't let maintainer-*-check targets force a version update.
1266 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
1269 2008-11-17 Di-an Jan <dianj@freeshell.org>
1271 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
1272 Align menus. Adjust word wrapping. Use node names for menu names.
1273 (Examples): Don't abbreviate node names.
1274 (LocalWords): Remove abbreviations.
1275 (Copying): Make description a sentence.
1276 (Java Action Features): Remove period to match the rest of menu.
1278 2008-11-17 Di-an Jan <dianj@freeshell.org>
1280 Handles several --enable-gcc-warnings.
1281 * src/getargs.c (command_line_location): Set parameters to void.
1282 * src/output.c (symbol_type_name_cmp): Make static.
1283 (symbols_by_type_name): Set parameters to void.
1284 (symbol_definitions_output): Remove unused parameter. Rename as...
1285 (prepare_symbol_definitions): this.
1286 (muscles_output): Move symbol_definitions_output to...
1287 (output): here as prepare_symbol_definitions.
1288 * tests/c++.at (AT_CHECK_VARIANTS): Remove unused parameters of main.
1289 (AT_CHECK_NAMESPACE): Make unused parameter lloc unnamed.
1291 2008-11-17 Di-an Jan <dianj@freeshell.org>
1293 * tests/c++.at (AT_CHECK_VARIANTS): Fixes tests 198-202.
1294 Use AT_DATA_GRAMMAR instead of AT_DATA for compiled tests.
1296 2008-11-16 Akim Demaille <demaille@gostai.com>
1298 Add missing $(EXEEXT).
1299 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): The target is
1300 "src/bison$(EXEEXT)".
1301 Reported by Di-an Jan.
1303 2008-11-15 Akim Demaille <demaille@gostai.com>
1307 2008-11-15 Akim Demaille <demaille@gostai.com>
1310 * tests/input.at: here.
1312 2008-11-15 Akim Demaille <demaille@gostai.com>
1314 Remove duplicate header inclusion.
1317 2008-11-15 Akim Demaille <demaille@gostai.com>
1319 * src/parse-gram.h, src/parse-gram.c: Regen.
1321 2008-11-15 Akim Demaille <demaille@gostai.com>
1323 Support parametric types.
1325 There are two issues to handle: first scanning nested angle
1326 bracket pairs to support types such as std::pair< std::string,
1327 std::list<std::string> > >.
1329 Another issue is to address idiosyncracies of C++: do not glue two
1330 closing angle brackets together (otherwise it's operator>>), and
1331 avoid sticking blindly a TYPE to the opening <, as it can result
1332 in '<:' which is a digraph for '['.
1334 * src/scan-gram.l (brace_level): Rename as...
1337 Implement support for complex tags.
1340 * data/lalr1.cc (b4_symbol_value, b4_symbol_value_template)
1341 (b4_symbol_variant): Leave space around types as parameters.
1342 * examples/variant.yy: Use nested template types and leading ::.
1343 * src/parse-gram.y (TYPE, TYPE_TAG_ANY, TYPE_TAG_NONE, type.opt):
1345 (TAG, TAG_ANY, TAG_NONE, tag.opt): these.
1346 * tests/c++.at: Test parametric types.
1348 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
1351 This is not sufficient, but we test at least that the make_SYMBOL
1352 interface is not affected by token.prefix. A more general test
1353 will be implemented when the support of token.prefix is generalized
1356 * tests/c++.at: One more variant test, using token.prefix.
1358 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
1360 Test the make_TOKEN interface.
1361 * tests/c++.at (AT_CHECK_VARIANTS): Require and use locations.
1362 Factor the common code in yylex.
1363 Use it to test "%define lex_symbol".
1365 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
1369 2008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
1371 Simplify code for variants bench marks.
1372 * etc/bench.pl.in (&generate_grammar_list): Define and use
1374 Factor the common code in yylex.
1376 2008-11-15 Akim Demaille <demaille@gostai.com>
1378 Better error message.
1379 * bootstrap (find_tool): Fix the error message.
1381 2008-11-15 Akim Demaille <demaille@gostai.com>
1383 Update variant.yy to newest interface.
1384 * examples/variant.yy: Define lex_symbol.
1387 2008-11-15 Akim Demaille <demaille@gostai.com>
1389 Don't use locations in variant.yy.
1390 * examples/variant.yy: Adjust to not using locations.
1392 2008-11-15 Akim Demaille <demaille@gostai.com>
1395 * data/local.mk, etc/local.mk, examples/local.mk: Use Automake
1396 comments for the license.
1398 2008-11-15 Akim Demaille <demaille@gostai.com>
1400 Remove tests/Makefile.am.
1401 * tests/Makefile.am: Rename as...
1402 * tests/local.mk: this.
1403 * Makefile.am, configure.ac: Adjust.
1404 * Makefile.am (DISTCLEANFILES): Define.
1405 (maintainer-check, maintainer-xml-check, maintainer-push-check):
1406 Remove, we no longer need to bounce to the real targets.
1408 2008-11-15 Akim Demaille <demaille@gostai.com>
1412 2008-11-15 Akim Demaille <demaille@gostai.com>
1415 * Makefile.am (EXTRA_DIST): Move djgpp related part to...
1416 * djgpp/local.mk: this new file.
1418 2008-11-15 Akim Demaille <demaille@gostai.com>
1420 Remove doc/Makefile.am.
1421 * doc/Makefile.am: Rename as...
1422 * doc/local.mk: this.
1424 * Makefile.am, configure.ac: Adjust.
1425 * Makefile.am (MOSTLYCLEANFILES): New.
1426 * src/local.mk: Adjust.
1428 2008-11-15 Akim Demaille <demaille@gostai.com>
1430 Move sc_tight_scope into maint.mk.
1431 It does not work, and I don't know how it was supposed to work: it
1432 seems to be looking for sources in the build tree. I just moved
1433 it at a better place, fixing it is still required.
1435 * src/local.mk (echo): Remove.
1436 (sc_tight_scope): Move to...
1439 2008-11-15 Akim Demaille <demaille@gostai.com>
1442 * src/parse-gram.h, src/parse-gram.h: Regen.
1444 2008-11-15 Akim Demaille <demaille@gostai.com>
1446 Remove src/Makefile.am.
1447 * src/Makefile.am: Rename as...
1448 * src/local.mk: this.
1449 Prefix all the paths with src/.
1450 (AUTOMAKE_OPTIONS): Build object files in the sub dirs.
1451 (AM_CPPFLAGS): Find find in builddir/src.
1452 (YACC): Move the flags into...
1454 * maint.mk (sc_tight_scope): Disable.
1455 It used to bounce to the version in src/Makefile.am which is now
1456 part of this very Makefile.
1457 * Makefile.am, configure.ac: Adjust.
1458 * src/scan-code-c.c, src/scan-code.l: We can no longer rely on
1459 include "..." to find files "here": we are no longer in src/, so
1460 qualify the includes with src/.
1461 * doc/Makefile.am (PREPATH): No longer include the top_builddir
1463 (.x.1): Adjust to be able to create src/foo from the top level
1464 Makefile, instead of going bounce to src/Makefile the creation of
1467 2008-11-15 Akim Demaille <demaille@gostai.com>
1469 Remove useless variable.
1470 * doc/Makefile.am (srcsrcdir): Remove.
1472 2008-11-15 Akim Demaille <demaille@gostai.com>
1474 Remove data/Makefile.am.
1475 * data/Makefile.am: Rename as...
1476 * data/local.mk: this.
1478 * Makefile.am, configure.ac: Adjust.
1480 2008-11-15 Akim Demaille <demaille@gostai.com>
1482 Remove etc/Makefile.am.
1483 * etc/Makefile.am: Rename as...
1484 * etc/local.mk: this.
1486 * Makefile.am, configure.ac: Adjust.
1488 2008-11-15 Akim Demaille <demaille@gostai.com>
1490 Remove examples/local.mk.
1491 examples/calc++/Makefile.am might be interesting to keep as is, since
1492 it is an example in itself.
1494 * examples/Makefile.am: Rename as...
1495 * examples/local.mk: this.
1497 * Makefile.am, configure.ac: Adjust.
1499 2008-11-15 Akim Demaille <demaille@gostai.com>
1501 Remove build-aux/Makefile.am.
1502 Recursive Makefiles are really way too slow, let's get rid of some of
1505 * build-aux/Makefile.am: Rename as...
1506 * build-aux/local.mk: this.
1508 * Makefile.am, configure.ac: Adjust.
1510 2008-11-15 Akim Demaille <demaille@gostai.com>
1512 Provide convenience constructors for locations and positions.
1513 * data/location.cc (position::position): Accept file, line and
1514 column as arguments with default values.
1515 Always qualify initial line and column literals as unsigned.
1516 (location::location): Provide convenience constructors.
1518 2008-11-15 Akim Demaille <demaille@gostai.com>
1520 Instead of using make_symbol<TOK_FOO>, generate make_FOO for each
1522 Using template buys us nothing, and makes it uselessly complex to
1523 construct a symbol. Besides, it could not be generalized to other
1524 languages, while make_FOO would work in C/Java etc.
1526 * data/lalr1.cc (b4_symbol_): New.
1527 (b4_symbol): Use it.
1528 (b4_symbol_constructor_declaration_)
1529 (b4_symbol_constructor_definition_): Instead of generating
1530 specializations of an overloaded template function, just generate
1531 several functions whose names are forged from the token names
1532 without the token.prefix.
1533 (b4_symbol_constructor_declarations): Generate them for all the
1534 symbols, not just by class of symbol type, now that instead of
1535 specializing a function template by the token, we generate a
1536 function named after the token.
1537 (b4_symbol_constructor_specialization_)
1538 (b4_symbol_constructor_specializations): Remove.
1539 * etc/bench.pl.in: Adjust to this new API.
1541 2008-11-13 Akim Demaille <demaille@gostai.com>
1543 %define token.prefix.
1544 Provide a means to add a prefix to the name of the tokens as
1545 output in the generated files. Because of name clashes, it is
1546 good to have such a prefix such as TOK_ that protects from names
1547 such as EOF, FILE etc. But it clutters the grammar itself.
1549 * data/bison.m4 (token.prefix): Empty by default.
1550 * data/c.m4 (b4_token_enum, b4_token_define): Use it.
1551 * data/lalr1.cc (b4_symbol): Ditto.
1553 2008-11-13 Akim Demaille <demaille@gostai.com>
1555 Compute at M4 time some of the subtractions.
1556 * data/lalr1.cc (b4_subtract): New.
1557 (b4_rhs_data): Use it.
1559 2008-11-13 Akim Demaille <demaille@gostai.com>
1562 This allows the user to get the type of a token returned by yylex.
1564 * data/lalr1.cc (symbol::token): New.
1565 (yytoknum_): Define when %define lex_symbol, independently of
1567 (yytoken_number_): Move into...
1568 (symbol::token): here, since that's the only use.
1569 The other one is YYPRINT which was not officially supported
1570 by lalr1.cc, and anyway it did not work since YYPRINT uses this
1571 array under a different name (yytoknum).
1573 2008-11-13 Akim Demaille <demaille@gostai.com>
1576 * TODO (YYERRCODE): Mention the case of $undef.
1578 2008-11-13 Akim Demaille <demaille@gostai.com>
1581 * TODO (YYPRINT): New.
1583 2008-11-13 Akim Demaille <demaille@gostai.com>
1586 * data/lalr1.cc, data/yacc.c: Fix the description of the
1587 yytranslate and yytoknum tables.
1589 2008-11-13 Akim Demaille <demaille@gostai.com>
1591 Define make_symbol in the header.
1592 To reach good performances these functions should be inlined (yet
1593 this is to measure precisely). To this end they must be available
1596 * data/lalr1.cc (b4_symbol_constructor_definition_): Qualify
1597 location_type with the class name.
1598 Since will now be output in the header, declare "inline".
1599 No longer use b4_symbol_constructor_specializations, but
1600 b4_symbol_constructor_definitions in the header.
1601 Don't call it in the *.cc file.
1603 2008-11-13 Akim Demaille <demaille@gostai.com>
1605 Define yytranslate in the header for lex_symbol.
1606 * data/lalr1.cc: Move the invocation of b4_yytranslate_definition
1607 into the header file when using %define lex_symbol.
1608 (yytranslate_): Declare inline.
1610 2008-11-13 Akim Demaille <demaille@gostai.com>
1612 Define the constructors of symbol_type in
1613 b4_symbol_constructor_definitions.
1614 The constructors are called by the make_symbol functions, which a
1615 forthcoming patch will move elsewhere. Hence the interest of
1616 putting them together.
1618 The stack_symbol_type does not need to be moved, it is used only
1621 * data/lalr1.cc: Move symbol_type and symbol_base_type
1622 constructors into...
1623 (b4_symbol_constructor_definitions): here.
1626 2008-11-13 Akim Demaille <demaille@gostai.com>
1628 Make it easier to move the definition of yytranslate_.
1629 Forthcoming changes will make it possible to use yytranslate_
1630 from outside the parser implementation file.
1632 * data/lalr1.cc (b4_yytranslate_definition): New.
1635 2008-11-13 Akim Demaille <demaille@gostai.com>
1637 Remove useless class specification.
1638 * data/lalr1.cc (b4_symbol_constructor_specialization_): No need
1639 to refer to the class name to use a type defined by the class for
1640 arguments of member functions.
1642 2008-11-13 Akim Demaille <demaille@gostai.com>
1644 Finer input type for yytranslate.
1645 This patch is debatable: the tradition expects yylex to return an int
1646 which happens to correspond to token_number (which is an enum). This
1647 allows for instance to return characters (such as '*' etc.). But this
1648 goes against the stronger typing I am trying to have with the new
1649 lex interface which return a symbol_type. So in this case, feed
1650 yytranslate_ with a token_type.
1652 * data/lalr1.cc (yytranslate_): When in %define lex-symbol,
1653 expect a token_type.
1655 2008-11-13 Akim Demaille <demaille@gostai.com>
1657 Honor lex-params in %define lex_symbol mode.
1658 * data/lalr1.cc: Use b4_lex_param.
1660 2008-11-13 Akim Demaille <demaille@gostai.com>
1663 * src/output.c (symbol_definitions_output): Rename symbol
1664 attributes type_name and has_type_name as type and has_type.
1665 * data/lalr1.cc: Adjust uses.
1667 2008-11-13 Akim Demaille <demaille@gostai.com>
1669 Use b4_type_names for the union type.
1670 The union used to compute the size of the variant used to iterate
1671 over the type of all the symbols, with a lot of redundancy. Now
1672 iterate over the lists of symbols having the same type-name.
1674 * data/lalr1.cc (b4_char_sizeof_): New.
1675 (b4_char_sizeof): Use it.
1676 Adjust to be called with a list of numbers instead of a single
1678 Adjust its caller for new-line issues.
1680 2008-11-13 Akim Demaille <demaille@gostai.com>
1682 Define the "identifier" of a symbol.
1683 Symbols may have several string representations, for instance if
1684 they have an alias. What I call its "id" is a string that can be
1685 used as an identifier. May not exist.
1687 Currently the symbols which have the "tag_is_id" flag set are
1688 those that don't have an alias. Look harder for the id.
1690 * src/output.c (is_identifier): Move to...
1691 * src/symtab.c (is_identifier): here.
1692 * src/symtab.h, src/symtab.c (symbol_id_get): New.
1693 * src/output.c (symbol_definitions_output): Use it to define "id"
1695 Remove the definition of "tag_is_id".
1696 * data/lalr1.cc: Use the "id" and "has_id" whereever "tag" and
1697 "tag_is_id" were used to produce code.
1698 We still use "tag" for documentation.
1700 2008-11-11 Akim Demaille <demaille@gostai.com>
1702 Locations are no longer required by lalr1.cc.
1703 * data/lalr1.cc (_b4_args, b4_args): New.
1704 Adjust all uses of locations to make them optional.
1705 * tests/c++.at (AT_CHECK_VARIANTS): No longer use the locations.
1706 (AT_CHECK_NAMESPACE): Check the use of locations.
1707 * tests/calc.at (_AT_DATA_CALC_Y): Adjust to be usable with or
1708 without locations with lalr1.cc.
1710 * tests/output.at: Check lalr1.cc with and without location
1712 * tests/regression.at (_AT_DATA_EXPECT2_Y, _AT_DATA_DANCER_Y):
1713 Don't use locations.
1715 2008-11-11 Akim Demaille <demaille@gostai.com>
1718 * tests/local.at (AT_FULL_COMPILE): New.
1719 * tests/actions.at, tests/calc.at, tests/regression.at: Use it.
1721 2008-11-11 Akim Demaille <demaille@gostai.com>
1723 Support parens in calc++.
1724 * doc/bison.texinfo (Calc++ Scanner, Calc++ Parser): Support parens.
1725 * examples/calc++/test (run): Check the expected output.
1729 2008-11-11 Akim Demaille <demaille@gostai.com>
1731 Simplify lalr1.cc since %defines is mandatory.
1732 * data/lalr1.cc: Remove useless calls to b4_defines_if.
1734 2008-11-11 Akim Demaille <demaille@gostai.com>
1737 * TODO (yysyntax_error): New item.
1739 2008-11-11 Akim Demaille <demaille@gostai.com>
1742 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
1745 2008-11-11 Akim Demaille <demaille@gostai.com>
1747 Support i18n of the parse error messages.
1748 * TODO (lalr1.cc/I18n): Remove.
1749 * data/lalr1.cc (yysyntax_error_): Support the translation of the
1750 error messages, as done in yacc.c.
1751 Stay within the yy* pseudo namespace.
1753 2008-11-11 Akim Demaille <demaille@gostai.com>
1756 * TODO (single stack, yysyntax_error): New.
1758 2008-11-11 Akim Demaille <demaille@gostai.com>
1760 Make it possible to return a symbol_type from yylex.
1761 * data/lalr1.cc (b4_lex_symbol_if): New.
1762 (parse): When lex_symbol is defined, expected yylex to return the
1764 * etc/bench.pl.in (generate_grammar_list): Extend to support this
1766 (bench_variant_parser): Exercise it.
1768 2008-11-11 Akim Demaille <demaille@gostai.com>
1770 Remove useless bench case.
1771 * etc/bench.pl.in (bench_variant_parser): VARIANT_DESTROY is
1774 2008-11-11 Akim Demaille <demaille@gostai.com>
1776 Improve display of directives.
1777 * etc/bench.pl.in (parse_term): Don't add useless eol.
1779 2008-11-11 Akim Demaille <demaille@gostai.com>
1781 Use string_cast in the bench.
1782 * etc/bench.pl.in (generate_grammar_list): Define and use
1785 2008-11-11 Akim Demaille <demaille@gostai.com>
1787 Replace yychar with a Boolean.
1788 * data/lalr1.cc (parse::yychar): Replace by...
1789 (parse::yyempty): this.
1791 2008-11-11 Akim Demaille <demaille@gostai.com>
1796 2008-11-11 Akim Demaille <demaille@gostai.com>
1798 Let yytranslate handle the eof case.
1799 * data/lalr1.cc (yytranslate_): Handle the EOF case.
1801 No longer expect yychar to be equal to yyeof_, rather, test the
1802 lookahead's (translated) kind.
1804 2008-11-11 Akim Demaille <demaille@gostai.com>
1806 yychar cannot be empty in yyerrlab.
1807 * TODO (yychar == yyempty_): New.
1808 * data/lalr1.cc: Remove the handling of this case.
1809 This eases forthcoming changes related to yychar and yytranslate.
1811 2008-11-11 Akim Demaille <demaille@gostai.com>
1813 Bench: syntactic sugar for %define/#define.
1814 * etc/bench.pl.in (parse_dirs): Support %d and #d with arguments.
1815 (&bench_push_parser, bench_variant_parser): Use this feature.
1819 2008-11-11 Akim Demaille <demaille@gostai.com>
1821 Less memory pressure on the "list" bench.
1822 * etc/bench.pl.in (generate_grammar_list): Do not accumulate all
1823 the values, to limit memory pressure.
1825 2008-11-11 Akim Demaille <demaille@gostai.com>
1827 Introduce make_symbol.
1828 make_symbol provides a means to construct a full symbol (kind,
1829 value, location) in a single shot. It is meant to be a Symbol
1830 constructor, parameterized by the symbol kind so that overloading
1831 would prevent incorrect kind/value pairs. Unfortunately
1832 parameterized constructors do not work well in C++ (unless the
1833 parameter also appears as an argument, which is not acceptable),
1834 hence the use of a function instead of a constructor.
1836 * data/lalr1.cc (b4_symbol_constructor_declaration_)
1837 (b4_symbol_constructor_declarations)
1838 (b4_symbol_constructor_specialization_)
1839 (b4_symbol_constructor_specializations)
1840 (b4_symbol_constructor_definition_)
1841 (b4_symbol_constructor_definitions): New.
1842 Use them where appropriate to generate declaration, declaration of
1843 the specializations, and implementations of the templated
1844 overloaded function "make_symbol".
1845 (variant::variant): Always define a default ctor.
1846 Also provide a copy ctor.
1847 (symbol_base_type, symbol_type): New ctor overloads for value-less
1849 (symbol_type): Now public, so that functions such as yylex can use
1852 2008-11-11 Akim Demaille <demaille@gostai.com>
1854 Inform m4 whether a tag is a valid id.
1855 * src/output.c (is_identifier): New.
1856 (symbol_definitions_output): Use it to define tag_is_id.
1857 But maybe this should be done at m4 level?
1859 2008-11-11 Akim Demaille <demaille@gostai.com>
1861 Test 214 was failing: it greps with a pattern containing [ ]*
1862 which obviously meant to catch spaces and tabs, but contained only
1863 spaces. Tabulations in sources are a nuisance, so to simplify the
1864 matter, get rid of all the tabulations in the Java sources. The
1865 other skeletons will be treated equally later.
1867 * data/java.m4, data/lalr1.java: Untabify.
1868 * tests/java.at: Simplify AT_CHECK_JAVA_GREP invocations:
1869 tabulations are no longer generated.
1871 2008-11-11 Paolo Bonzini <bonzini@gnu.org>
1873 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
1874 * configure.ac: Adjust usage.
1875 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
1876 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
1877 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
1879 2008-11-10 Di-an Jan <dianj@freeshell.org>
1881 Workaround Java's ``code too large'' problem for parser tables
1882 in most cases, by using one function per initialization.
1883 * data/java.m4 (b4_typed_parser_table, b4_integral_parser_table): New.
1884 * data/lalr1.java (yypact_, yydefact_, yypgoto_, yydefgoto_,
1885 yytable_, yycheck_, yystos_, yytoken_number_, yyr1_, yyr2_, yyrhs_
1886 yyprhs_, yyrline_, yytranslate_table_): Use b4_integral_parser_table.
1887 (yytname_): Use b4_typed_parser_table.
1888 * doc/bison.texinfo (Java Bison Interface): Add note on Java's
1889 ``code too large'' error.
1891 2008-11-10 Di-an Jan <dianj@freeshell.org>
1893 * NEWS: Document them.
1895 General Java skeleton improvements.
1896 * configure.ac (gt_JAVACOMP): Request target of 1.4, which allows
1897 using gcj < 4.3 in the testsuite, according to comments in
1898 gnulib/m4/javacomp.m4.
1899 * data/java.m4 (stype, parser_class_name, lex_throws, throws,
1900 location_type, position_type): Remove extraneous brackets from
1901 b4_percent_define_default.
1902 (b4_lex_param, b4_parse_param): Remove extraneous brackets from
1903 m4_define and m4_define_default.
1904 * data/lalr1.java (b4_pre_prologue): Change to b4_user_post_prologue,
1905 which marks the end of user code with appropriate syncline, like all
1906 the other skeletons.
1907 (b4_user_post_prologue): Add. Don't silently drop.
1909 (parse): Inline yylex.
1910 * doc/bison.texinfo (bisonVersion, bisonSkeleton): Document.
1911 (%{...%}): Fix typo of %code imports.
1912 * tests/java.at (AT_JAVA_COMPILE): Add "java" keyword.
1914 Support annotations on parser class with %define annotations.
1915 * data/lalr1.java (annotations): Add to parser class modifier.
1916 * doc/bison.texinfo (Java Parser Interface): Document
1917 %define annotations.
1918 (Java Declarations Summary): Document %define annotations.
1919 * tests/java.at (Java parser class modifiers): Test annotations.
1921 Do not generate code for %error-verbose unless requested.
1922 * data/lalr1.java (errorVerbose): Rename to yyErrorVerbose.
1923 Make private. Make conditional on %error-verbose.
1924 (getErrorVerbose, setErrorVerbose): New.
1925 (yytnamerr_): Make conditional on %error-verbose.
1926 (yysyntax_error): Make some code conditional on %error-verbose.
1927 * doc/bison.texinfo (Java Bison Interface): Remove the parts
1928 about %error-verbose having no effect.
1929 (getErrorVerbose, setErrorVerbose): Document.
1931 Move constants for token names to Lexer interface.
1932 * data/lalr1.java (Lexer): Move EOF, b4_token_enums(b4_tokens) here.
1933 * data/java.m4 (b4_token_enum): Indent for move to Lexer interface.
1934 (parse): Qualify EOF to Lexer.EOF.
1935 * doc/bison.texinfo (Java Parser Interface): Move documentation of
1936 EOF and token names to Java Lexer Interface.
1937 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove Calc qualifier.
1939 Make yyerror public.
1940 * data/lalr1.java (Lexer.yyerror): Use longer parameter name.
1941 (yyerror): Change to public. Add Javadoc comments. Use longer
1942 parameter names. Make the body rather than the declarator
1943 conditional on %locations.
1944 * doc/bison.texinfo (yyerror): Document. Don't mark as protected.
1946 Allow user to add code to the constructor with %code init.
1947 * data/java.m4 (b4_init_throws): New, for %define init_throws.
1948 * data/lalr1.java (YYParser.YYParser): Add b4_init_throws.
1949 Add %code init to the front of the constructor body.
1950 * doc/bison.texinfo (YYParser.YYParser): Document %code init
1951 and %define init_throws.
1952 (Java Declarations Summary): Document %code init and
1953 %define init_throws.
1954 * tests/java.at (Java %parse-param and %lex-param): Adjust grep.
1955 (Java constructor init and init_throws): Add tests.
1957 2008-11-10 Akim Demaille <demaille@gostai.com>
1960 * TODO (-D): is implemented.
1961 (associativity): Same precedence must have the same associativity.
1962 For instance, how can a * b / c be parsed if * is %left and / is
1964 (YYERRORCODE, YYFAIL, YYBACKUP): New.
1966 2008-11-10 Akim Demaille <demaille@gostai.com>
1970 2008-11-10 Akim Demaille <demaille@gostai.com>
1972 More information about the symbols.
1973 * src/output.c (type_names_output): Document all the symbols,
1974 including those that don't have a type-name.
1975 (symbol_definitions_output): Define "is_token" and
1977 * data/lalr1.cc (b4_type_action_): Skip symbols that have an empty
1978 type-name, now that they are defined too in b4_type_names.
1980 2008-11-10 Akim Demaille <demaille@gostai.com>
1984 2008-11-10 Akim Demaille <demaille@gostai.com>
1986 Make parser::yytranslate static.
1987 Small speedup (1%) on the list grammar. And makes yytranslate_
1988 available in non member functions.
1990 * data/lalr1.cc (yytranslate_): Does not need to be a instance
1993 2008-11-10 Akim Demaille <demaille@gostai.com>
1995 Avoid trailing spaces.
1996 * data/c.m4: b4_comment(TEXT): Don't indent empty lines.
1997 * data/lalr1.cc: Don't indent before rule and symbol actions, as
1998 they can be empty, and anyway this incorrectly indents the first
2001 2008-11-10 Akim Demaille <demaille@gostai.com>
2005 2008-11-10 Akim Demaille <demaille@gostai.com>
2007 Use "enum" for integral constants.
2008 This is just nicer to read, I observed no speedup.
2010 * data/lalr1.cc (yyeof_, yylast_, yynnts_, yyempty_, yyfinal_)
2011 (yterror_, yyerrcode_, yyntokens_): Define as members of an enum.
2012 (yyuser_token_number_max_, yyundef_token_): Move into...
2013 (yytranslate_): here.
2015 2008-11-10 Akim Demaille <demaille@gostai.com>
2017 Shortcuts in bench directives.
2018 * etc/bench.pl.in (parse_dirs): New.
2020 (bench_variant_parser, bench_fusion_parser): Use %s and %d.
2021 Create the benches in "benches/".
2023 2008-11-10 Akim Demaille <demaille@gostai.com>
2026 * data/lalr1.cc: here.
2028 2008-11-10 Akim Demaille <demaille@gostai.com>
2030 Adjust verbose message to using emacs.
2031 * etc/bench.pl.in: Inform compilation-mode when we change the
2033 (generate_grammar_list): Recognize %define "variant" in addition
2036 2008-11-10 Akim Demaille <demaille@gostai.com>
2038 Classify symbols by type-name.
2039 * src/uniqstr.h (UNIQSTR_CMP): New.
2040 * src/output.c (symbol_type_name_cmp, symbols_by_type_name)
2041 (type_names_output): New.
2042 (muscles_output): Use it.
2043 * data/lalr1.cc (b4_symbol_action_): Remove.
2044 (b4_symbol_case_, b4_type_action_): New.
2045 Adjust uses of b4_symbol_action_ to use b4_type_action_.
2047 2008-11-10 Akim Demaille <demaille@gostai.com>
2049 Change the handling of the symbols in the skeletons.
2050 Before we were using tables which lines were the symbols and which
2051 columns were things like number, tag, type-name etc. It is was
2052 difficult to extend: each time a column was added, all the numbers had
2053 to be updated (you asked for colon $2, not for "tag"). Also, it was
2054 hard to filter these tables when only a subset of the symbols (say the
2055 tokens, or the nterms, or the tokens that have and external number
2056 *and* a type-name) was of interest.
2058 Now instead of monolithic tables, we define one macro per cell. For
2059 instance "b4_symbol(0, tag)" is a macro name which contents is
2060 self-decriptive. The macro "b4_symbol" provides easier access to
2063 * src/output.c (type_names_output): Remove.
2064 (symbol_numbers_output, symbol_definitions_output): New.
2065 (muscles_output): Call them.
2066 (prepare_symbols): Define b4_symbols_number.
2068 2008-11-10 Akim Demaille <demaille@gostai.com>
2071 * src/getargs.h, src/getargs.c (trace_muscle): New.
2072 (trace_types, trace_args): Support it.
2073 * src/output.c (output_skeleton): Use it.
2075 2008-11-10 Akim Demaille <demaille@gostai.com>
2078 * src/output.c (muscles_output): New, extracted from...
2079 (output_skeleton): here.
2082 2008-11-10 Akim Demaille <demaille@gostai.com>
2086 2008-11-10 Akim Demaille <demaille@gostai.com>
2088 Update the variant example.
2089 * examples/variant.yy: Formatting changes.
2092 2008-11-10 Akim Demaille <demaille@gostai.com>
2094 Support constructor with an argument.
2095 This improves the "list" bench by 2%.
2097 * data/lalr1.cc (variant::build): Add an overloaded version with
2099 * tests/c++.at (AT_CHECK_VARIANT): Check it.
2101 2008-11-10 Akim Demaille <demaille@gostai.com>
2104 * tests/c++.at (AT_CHECK_VARIANTS): New.
2105 Use it with and without %define assert.
2107 2008-11-10 Akim Demaille <demaille@gostai.com>
2109 Add %precedence support.
2110 Unfortunately it is not possible to reuse the %prec directive. This
2111 is because to please POSIX, we do not require to end the rules with a
2112 semicolon. As a result,
2116 is ambiguous: either a rule which precedence is that of baz, or a rule,
2117 and then a declaration of the precedence of the token baz.
2119 * doc/bison.texinfo: Document %precedence.
2120 (Precedence Only): New.
2121 * src/assoc.h, src/assoc.c (precedence_assoc): New.
2122 * src/conflicts.c (resolve_sr_conflict): Support it.
2123 * src/scan-gram.l, src/parse-gram.y (%precedence): New token.
2125 * tests/calc.at: Use %precedence for NEG.
2126 * tests/conflicts.at (%precedence does not suffice)
2127 (%precedence suffices): New tests.
2129 2008-11-09 Akim Demaille <demaille@gostai.com>
2131 Make benches in a sub dirs.
2132 * etc/bench.pl.in ($dir): New.
2134 Check the use of constructors with an argument.
2135 (bench_variant_parser): Fix.
2137 2008-11-09 Akim Demaille <demaille@gostai.com>
2141 2008-11-09 Akim Demaille <demaille@gostai.com>
2145 2008-11-09 Akim Demaille <demaille@gostai.com>
2147 Require the generation of parse-gram.output.
2148 * src/Makefile.am (YACC): Pass --report=all.
2150 2008-11-09 Akim Demaille <demaille@gostai.com>
2154 2008-11-09 Akim Demaille <demaille@gostai.com>
2157 * TODO: Remove obsolete items.
2160 2008-11-09 Akim Demaille <demaille@gostai.com>
2163 * etc/bench.pl.in (parse, parse_expr, parse_term, parse_fact)
2164 (@token, $grammar, $bench): New.
2165 (generate_grammar_variant): Rename as...
2166 (generate_grammar_list): this.
2167 (generate_grammar): Adjust.
2168 (bench_grammar): Rename as...
2170 Use it in the various bench-marking routines.
2171 (-b, -g): New options.
2173 2008-11-09 Akim Demaille <demaille@gostai.com>
2175 Use a static hierarchy for symbols in the C++ parser.
2176 * data/lalr1.cc (symbol_base_type, symbol_type)
2177 (stack_symbol_type): Make it a static hierarchy.
2178 Adjust dependencies.
2180 2008-11-09 Akim Demaille <demaille@gostai.com>
2182 bench.pl -d, --directive.
2183 * etc/bench.pl.in (@directive): New.
2184 (&bench_grammar): Use it.
2185 (&bench_list_grammar): New, to provide access to the "variant"
2188 (getopts): Support -d, --directive.
2190 2008-11-09 Akim Demaille <demaille@gostai.com>
2192 Use inline for small operations.
2193 * data/lalr1.cc (symbol_base_type, symbol_type)
2194 (stack_symbol_type): Declare constructor and other operations as
2196 (yy_destroy_): Inline.
2198 2008-11-09 Akim Demaille <demaille@gostai.com>
2200 Introduce a hierarchy for symbols.
2201 * data/lalr1.cc (symbol_base_type, symbol_type): New.
2202 (data_type): Rename as...
2203 (stack_symbol_type): this.
2204 Derive from symbol_base_type.
2205 (yy_symbol_value_print_): Merge into...
2206 (yy_symbol_print_): this.
2209 (yydestruct_): Rename as...
2210 (yy_destroy_): this.
2211 (b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
2212 (parser::parse): yyla is now of symbol_type.
2213 Use its type member instead of yytoken.
2215 2008-11-09 Akim Demaille <demaille@gostai.com>
2217 Rename data_type and stack_symbol_type.
2218 * data/lalr1.cc (data_type): Rename as...
2219 (stack_symbol_type): this.
2221 2008-11-09 Akim Demaille <demaille@gostai.com>
2223 Handle semantic value and location together.
2224 * data/lalr1.cc (b4_symbol_actions): Bounce $$ and @$ to
2225 yydata.value and yydata.location.
2226 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_)
2227 (YY_SYMBOL_PRINT): Now take semantic value and location as a
2230 (yydestruct_): New overload for a stack symbol.
2232 2008-11-09 Akim Demaille <demaille@gostai.com>
2234 Push a complete symbol, not connected parts.
2235 * data/lalr1.cc (yypush_): Take a data_type&, not disconnected
2236 state, value and location.
2239 2008-11-09 Akim Demaille <demaille@gostai.com>
2241 Agregate yylval and yylloc.
2242 * data/lalr1.cc (parser::yylval, parser::yylloc): Replace by...
2243 (parser::yyla): this.
2245 2008-11-09 Akim Demaille <demaille@gostai.com>
2247 Rely on the state stack to display reduction traces.
2248 To display rhs symbols before a reduction, we used information
2249 about the rule reduced, which required the tables yyrhs and
2250 yyprhs. Now use rely only on the state stack to get the same
2253 * data/lalr1.cc (b4_rhs_data, b4_rhs_state): New.
2255 (parser::yyrhs_, parser::yyprhs_): Remove.
2256 (parser::yy_reduce_print_): Use the state stack.
2258 2008-11-09 Akim Demaille <demaille@gostai.com>
2260 Fuse yyval and yyloc into yylhs.
2261 * data/lalr1.cc (b4_lhs_value, b4_lhs_location): Adjust to using
2263 (parse): Replace yyval and yyloc with yylhs.value and
2265 After a user action, compute yylhs.state earlier.
2266 (yyerrlab1): Do not play tricks with yylhs.location, rather, use a
2269 2008-11-09 Di-an Jan <dianj@freeshell.org>
2271 Remove unused variable.
2272 * src/output.c (type_names_output): Remove unused variable sep.
2274 2008-11-09 Paolo Bonzini <bonzini@gnu.org>
2276 Change tests/output.at quoting.
2277 * tests/output.at (AT_CHECK_OUTPUT): Use conventional m4 quoting when
2278 expanding arguments.
2280 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
2282 Don't add a semicolon to actions for %skeleton or %language.
2283 It breaks Java test cases as reported by Akim Demaille.
2284 * src/scan-code.l: Implement.
2286 2008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
2288 Clean up %skeleton and %language priority implementation.
2289 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
2290 remove static qualifier because others will soon need to see it.
2291 (language_prio): Likewise.
2292 (getargs): Use command_line_prio rather than 0.
2293 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
2295 (skeleton_prio): Extern it.
2296 (language_prio): Extern it.
2297 * src/parse-gram.y: Use grammar_prio rather than 1.
2299 2008-11-07 Akim Demaille <demaille@gostai.com>
2301 Moving push traces into yypush_.
2302 * data/lalr1.cc (yypush_): Now takes a optional trace message.
2305 2008-11-07 Akim Demaille <demaille@gostai.com>
2307 The single-stack C++ parser is now the standard one.
2308 * data/lalr1.cc: Rename as...
2309 * data/lalr1-split.cc: this.
2310 * data/lalr1-fusion.cc: Rename as...
2311 * data/lalr1.cc: this.
2312 * etc/bench.pl.in: Adjust.
2314 2008-11-07 Akim Demaille <demaille@gostai.com>
2316 Avoid empty-if warnings.
2317 Reported by Quentin Hocquet.
2319 * data/lalr1-fusion.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT)
2320 (YY_STACK_PRINT): Provide some contents even when !YYDEBUG.
2322 2008-11-07 Akim Demaille <demaille@gostai.com>
2324 Pass command line location to skeleton_arg and language_argmatch.
2325 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
2326 The location argument is now mandatory.
2327 Adjust all dependencies.
2328 (getargs): Use command_line_location.
2330 2008-11-07 Akim Demaille <demaille@gostai.com>
2333 * src/getargs.c (usage): Document -D.
2334 Fix help string for --locations.
2335 (command_line_location): New.
2336 (short_options, long_options, getargs): Support -D, --define.
2337 (getargs): Move -d support at the right place.
2338 * doc/bison.texinfo (Bison Options): Update.
2339 * tests/input.at (%define, --define): New.
2341 2008-11-07 Akim Demaille <demaille@gostai.com>
2343 Initialize the muscle table before parsing the command line.
2344 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
2345 (getargs): Define file_name.
2346 * src/main.c (main): Initialize muscle_tab before calling
2348 * src/muscle_tab.c (muscle_init): No longer define file_name, as
2349 its value is not available yet.
2351 2008-11-07 Akim Demaille <demaille@gostai.com>
2353 Locations without columns for command line arguments.
2354 * src/location.c (location_print): Don't display negative columns.
2355 * src/location.h: Document this.
2357 2008-11-07 Akim Demaille <demaille@gostai.com>
2360 * src/getargs.c (usage): Fix help string for -W.
2362 2008-11-07 Akim Demaille <demaille@gostai.com>
2364 Handle more general types of option arguments.
2365 * build-aux/cross-options.pl: The argument ends at the first
2366 space, not the first non-symbol character.
2367 Use @var for each word appearing the argument description.
2369 2008-11-07 Akim Demaille <demaille@gostai.com>
2371 Destroy the variants that remain on the stack in case of error.
2372 * data/lalr1-fusion.cc (yydestruct_): Invoke the variant's
2374 Display the value only if yymsg is nonnull.
2375 (yyreduce): Invoke yydestruct_ when popping lhs symbols.
2377 2008-11-07 Akim Demaille <demaille@gostai.com>
2379 Add "%define assert" to variants.
2380 This is used to help the user catch cases where some value gets
2381 ovewritten by a new one. This should not happen, as this will
2384 Unfortunately this uncovered a bug in the C++ parser itself: the
2385 lookahead value was not destroyed between two calls to yylex. For
2386 instance if the previous lookahead was a std::string, and then an int,
2387 then the value of the std::string was correctly taken (i.e., the
2388 lookahead was now an empty string), but std::string structure itself
2391 This is now done in variant::build(other&) (which is used to take the
2392 value of the lookahead): other is not only stolen from its value, it
2393 is also destroyed. This incurs a new performance penalty of a few
2394 percent, and union becomes faster again.
2396 * data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
2397 (b4_variant_if): New.
2398 (variant::built): New.
2399 Use it whereever the status of the variant changes.
2400 * etc/bench.pl.in: Check the penalty of %define assert.
2402 2008-11-07 Akim Demaille <demaille@gostai.com>
2404 Use "%define variant" in bench.pl.
2405 * etc/bench.pl.in: No longer use the pseudo directive %variants,
2406 just use %define variants.
2408 2008-11-07 Akim Demaille <demaille@gostai.com>
2411 * src/parse-gram.h, src/parse-gram.c: Regen.
2413 2008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
2415 Fix user actions without a trailing semicolon.
2416 Reported by Sergei Steshenko at
2417 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
2418 * THANKS (Sergei Steshenko): Add.
2419 * src/scan-code.l (SC_RULE_ACTION): Fix it.
2420 * tests/regression.at (Fix user actions without a trailing semicolon):
2423 2008-11-04 Akim Demaille <demaille@gostai.com>
2425 Use b4_copyright_years.
2426 * data/yacc.c (b4_copyright_years): New.
2427 Fix its value according to the comments in the file.
2428 Use it and undefine it.
2430 2008-11-04 Akim Demaille <demaille@gostai.com>
2433 * data/lalr1-fusion.cc, src/parse-gram.y: here.
2435 2008-11-04 Akim Demaille <demaille@gostai.com>
2438 * data/lalr1-fusion.cc: here.
2440 2008-11-04 Akim Demaille <demaille@gostai.com>
2442 Use strict on bench.pl.
2443 * etc/bench.pl.in (&run, &generate_grammar): New.
2444 Rename the grammar generating functions for consistency.
2445 Change the interface so that the list of benches to run is passed
2446 as (optionless) arguments.
2447 (&compile): Use &run.
2449 2008-11-04 Akim Demaille <demaille@gostai.com>
2451 Remove spurious initial empty lines.
2452 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
2453 * data/yacc.c: End the @output lines with an @.
2455 2008-11-04 Akim Demaille <demaille@gostai.com>
2457 Improve the display of sizes.
2458 * etc/bench.p.in: Higher precision.
2459 Sort by decreasing size.
2461 2008-11-04 Akim Demaille <demaille@gostai.com>
2463 Don't memcpy C++ structures.
2464 * data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
2466 (variant::build): New overload for
2467 copy-construction-that-destroys.
2468 (variant::swap): New.
2469 (parser::yypush_): Use it in variant mode.
2471 2008-11-04 Akim Demaille <demaille@gostai.com>
2473 Better defaults for bench.pl.
2474 * etc/bench.pl.in ($verbose, $cflags, $iterations): Change the
2476 Adjust &verbose uses.
2479 2008-11-04 Akim Demaille <demaille@gostai.com>
2481 Make variant.yy more complex.
2482 std::list cannot be copied via memcpy, they are more demanding than
2483 std::string. Use one std::list to strengthen the test.
2485 * examples/variant.yy: Use lalr1-fusion.cc, not lalr1.cc.
2487 Create a list of strings, instead of a single large string.
2489 2008-11-04 Akim Demaille <demaille@gostai.com>
2492 * etc/bench.pl.in (--bench, $bench): New.
2494 2008-11-04 Akim Demaille <demaille@gostai.com>
2497 * data/lalr1-fusion.cc (destroy): Use as() in its definition.
2498 Define it after as().
2500 2008-11-04 Akim Demaille <demaille@gostai.com>
2503 * data/lalr1-fusion.cc (b4_rhs_location): Remove useless parens.
2505 2008-11-04 Akim Demaille <demaille@gostai.com>
2507 Issue missing synclines after user actions.
2508 * data/c.m4 (b4_case): Issue synclines on the output file.
2510 2008-11-04 Akim Demaille <demaille@gostai.com>
2512 Remove trailing empty line.
2513 * data/lalr1-fusion.cc: Don't add an empty line after the user's
2516 2008-11-04 Akim Demaille <demaille@gostai.com>
2518 Fix output of copyright years.
2519 * data/bison.m4 (b4_copyright): Fix the indentation of the
2520 copyright year paragraph.
2521 Use b4_copyright_years when no years are given.
2522 * data/lalr1.cc, data/lalr1-fusion.cc, data/location.cc
2523 (b4_copyright_years): New.
2526 2008-11-04 Akim Demaille <demaille@gostai.com>
2528 Avoid the spurious initial empty line.
2529 * data/lalr1-fusion.cc, data/location.cc: Put a trailing "@" at
2530 the end of @output request to suppress the empty line that
2533 2008-11-04 Akim Demaille <demaille@gostai.com>
2535 Remove parser::rhs_number_type.
2536 * data/lalr1-fusion.cc (rhs_number_type): No longer define it.
2537 (yyrhs_): Use b4_table_define.
2539 2008-11-04 Akim Demaille <demaille@gostai.com>
2542 * data/lalr1-fusion.cc: Use an int to iterate up to an int.
2544 2008-11-04 Akim Demaille <demaille@gostai.com>
2546 Factor the declaration of the integer tables.
2547 * data/lalr1-fusion.cc (b4_table_define): New.
2550 2008-11-03 Akim Demaille <demaille@gostai.com>
2552 Fix indentation of tables in lalr1.cc
2553 * data/lalr1-fusion.cc: Fix the indentation.
2555 2008-11-03 Akim Demaille <demaille@gostai.com>
2557 Destroy the lhs symbols after reduction.
2558 * data/lalr1-fusion.cc (parse): After the user action, when in
2559 variant mode, destroy the lhs symbols.
2561 2008-11-03 Akim Demaille <demaille@gostai.com>
2563 Simplify yysyntax_error_ use.
2564 * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
2565 type, but make it unnamed in the declaration when it is not used.
2567 2008-11-03 Akim Demaille <demaille@gostai.com>
2569 Let yy::variant::build return an lvalue.
2570 * data/lalr1-fusion.cc (variant::build): Return a reference to the
2573 2008-11-03 Akim Demaille <demaille@gostai.com>
2575 Define yy::variant only when needed.
2576 * data/lalr1-fusion.cc (yy::variant): Define only if variants are
2579 2008-11-03 Akim Demaille <demaille@gostai.com>
2581 Bench the three-stack lalr1.cc.
2582 * etc/bench.pl.in: Bench the three-stack lalr1.cc vs. the
2585 2008-11-03 Akim Demaille <demaille@gostai.com>
2587 Fail on parse error in calc++.
2588 * doc/bison.texinfo (calc++.cc): Propagate failures to the exit
2590 * examples/calc++/test ($me, $number, $exit, run): New.
2591 Use them to propagate errors to the exit status.
2593 2008-11-03 Akim Demaille <demaille@gostai.com>
2595 Don't specify the skeleton twice in the example.
2596 * examples/calc++/Makefile.am: Don't pass -S to Bison, the grammar
2597 file does what is needed.
2599 2008-11-03 Akim Demaille <demaille@gostai.com>
2601 bench: Improve output.
2602 * etc/bench.pl.in (bench_grammar): Tune the printf format.
2604 2008-11-03 Akim Demaille <demaille@gostai.com>
2606 bench: check impact of %debug on variants.
2607 * etc/bench.pl.in (variant_grammar): Fix the computation of
2609 Generate a grammar file that can work with or without %debug.
2610 Do use the @directive.
2611 (bench_variant_parser): Check impact of %debug.
2612 (@directives): Rename all the occurrences to...
2613 (@directive): this, for consistency.
2615 2008-11-03 Akim Demaille <demaille@gostai.com>
2617 bench: report the size too.
2618 * etc/bench.pl.in ($iterations): Defaults to -3.
2619 (&bench_grammar): Require hireswallclock.
2620 Compute and display the size of the result.
2623 2008-11-03 Akim Demaille <demaille@gostai.com>
2625 bench: More use of the verbosity level.
2626 * etc/bench.pl.in ($verbose, &verbose): New.
2628 More POD documentation.
2630 2008-11-03 Akim Demaille <demaille@gostai.com>
2632 bench.pl: a command line interface
2633 * etc/bench.pl.in: More doc.
2634 Some fixes in the documentation.
2635 ($cflags, $iterations, &help, &getopt): New.
2637 (&variant_grammar): Let the number of stages be 10 times what is
2640 2008-11-03 Akim Demaille <demaille@gostai.com>
2642 Bench the use of Boost.Variants.
2643 * etc/bench.pl.in ($cxx, &variant_grammar, &bench_variant_parser):
2645 (&compile): Be ready to compile C++ parsers.
2646 (&bench_push_parser): Move debug information to the outermost
2648 * THANKS: Add Michiel De Wilde.
2650 2008-11-03 Akim Demaille <demaille@gostai.com>
2652 bench.pl: Pass directives as a list instead of as a string.
2653 * etc/bench.pl.in (&directives): New.
2654 (&triangular_grammar, &calc_grammar): Use it to format the Bison
2656 (&triangular_grammar): Do use the directives (were ignored).
2657 (&bench_grammar, &bench_push_parser): Adjust to pass lists of
2660 2008-11-03 Akim Demaille <demaille@gostai.com>
2662 Improve genericity of bench.pl.
2663 * etc/bench.pl.in (&bench_grammar): Take the set of benches as
2665 (&bench_push_parser): New.
2668 2008-11-03 Akim Demaille <demaille@gostai.com>
2670 Add documentation to bench.pl.
2671 * etc/bench.pl.in: Comment changes.
2673 2008-11-03 Akim Demaille <demaille@gostai.com>
2675 Fuse the three stacks into a single one.
2677 In order to make it easy to perform benchmarks to ensure that
2678 there are no performance loss, lalr1.cc is forked into
2679 lalr1-fusion.cc. Eventually, lalr1-fusion.cc will replace
2682 Meanwhile, to make sure that lalr1-fusion.cc is correctly
2683 exercized by the test suite, the user must install a symbolic link
2684 from lalr1.cc to it.
2686 Instead of having three stacks (state, value, location), use a
2687 stack of triples. This considerably simplifies the code (and it
2688 will be easier not to require locations as currently does the C++
2689 parser), and also gives a 10% speedup according to
2690 etc/bench (probably mainly since memory allocation is done once
2691 instead of three times).
2693 Another motivation is to make it easier to destruct properly
2694 semantic values: now that they are bound to their state (hence
2695 symbol type) it will be easier to call the appropriate destructor.
2697 These changes should probably benefit the C parser too.
2699 * data/lalr1.cc: Copy as...
2700 * data/lalr1-fusion.cc: this new file.
2701 (b4_rhs_value, b4_rhs_location): New definitions overriding those
2703 (state_stack_type, semantic_stack_type, location_stack_type)
2704 (yystate_stack_, yysemantic_stack_, yylocation_stack_): Remove.
2705 (data_type, stack_type, yystack_): New.
2706 (YYLLOC_DEFAULT, yypush_): Adjust.
2707 (yyerror_range): Now based on data_type, not location_type.
2709 2008-11-03 Akim Demaille <demaille@gostai.com>
2711 Push the state, value, and location at the same time.
2712 This is needed to prepare a forthcoming patch that fuses the three
2715 * data/lalr1.cc (parser::yypush_): New.
2716 (parser::yynewstate): Change the semantics: instead of arriving to
2717 this label when value and location have been pushed, but yystate
2718 is to be pushed on the state stack, now the three of them must
2719 have been pushed before. yystate still must be the new state.
2720 This allows to use yypush_ everywhere instead of individual
2721 handling of the stacks.
2723 2008-11-03 Akim Demaille <demaille@gostai.com>
2725 Prefer references to pointers.
2726 * data/lalr1.cc (b4_symbol_actions): New, overrides the default C
2727 definition to use references instead of pointers.
2728 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_):
2729 Take the value and location as references.
2732 2008-11-03 Akim Demaille <demaille@gostai.com>
2734 stack::size instead of stack::height.
2735 * data/lalr1.cc (stack::height): Rename as...
2736 (stack::size): this.
2737 Fix the output type.
2740 2008-11-03 Akim Demaille <demaille@gostai.com>
2742 Use variants to support objects as semantic values.
2743 This patch was inspired by work by Michiel De Wilde. But he used
2744 Boost variants which (i) requires Boost on the user side, (ii) is
2745 slow, and (iii) has useless overhead (the parser knows the type of
2746 the semantic value there is no reason to duplicate this
2747 information as Boost.Variants do).
2749 This implementation reserves a buffer large enough to store the
2750 largest objects. yy::variant implements this buffer. It was
2751 implemented with Quentin Hocquet.
2753 * src/output.c (type_names_output): New.
2754 (output_skeleton): Invoke it.
2755 * data/c++.m4 (b4_variant_if): New.
2756 (b4_symbol_value): If needed, provide a definition for variants.
2757 * data/lalr1.cc (b4_symbol_value, b4_symbol_action_)
2758 (b4_symbol_variant, _b4_char_sizeof_counter, _b4_char_sizeof_dummy)
2759 (b4_char_sizeof, yy::variant): New.
2760 (parser::parse): If variants are requested, define
2761 parser::union_type, parser::variant, change the definition of
2762 semantic_type, construct $$ before running the user action instead
2763 of performing a default $$ = $1.
2764 * examples/variant.yy: New.
2765 Based on an example by Michiel De Wilde.
2767 2008-11-03 Akim Demaille <demaille@gostai.com>
2769 Parameterize the extraction of semantic values.
2770 To make future changes easier, no longer rely on ".TYPE" being the
2771 way to get a semantic value.
2773 * data/c.m4 (b4_symbol_value): New.
2775 * data/c++.m4, data/yacc.c: Use it.
2776 * data/glr.c: Use b4_symbol_value.
2780 2008-11-03 Akim Demaille <demaille@gostai.com>
2782 Prepare easier M4 changes.
2783 * data/lalr1.cc: Use escaped [] instead of literals to prepare
2786 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2788 Initiate further development.
2789 * NEWS: Create an empty section for new entries.
2790 * gnulib: Update submodule to HEAD.
2792 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2794 * NEWS: Version 2.4.
2796 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2798 Prepare for next release.
2799 * NEWS: Briefly mention changes since 2.3b.
2800 * README: Say GNU m4 1.4.6, which we've been requiring in release
2801 announcements already, not 1.4.3, which breaks the build.
2803 2008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2805 Say %language is experimental.
2806 We're thinking of extending it's effect on output file naming. See the
2808 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
2809 * NEWS: Say it's experimental.
2810 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
2811 recommend it over %skeleton for now.
2812 (Bison Options): Likewise.
2813 (C++ Bison Interface): Use %skeleton not %language.
2814 (Calc++ Parser): Use %skeleton not %language.
2815 * src/getargs.c (usage): Say it's experimental.
2817 2008-11-01 Di-an Jan <dianj@freeshell.org>
2818 Paolo Bonzini <bonzini@gnu.org>
2820 Support all Java parser class modifiers.
2821 * data/java.m4 (b4_percent_define_get3): New.
2822 (b4_final_if, b4_strictfp_if): New.
2823 * data/lalr1.java (final, strictfp, extends, implements): Support.
2824 * doc/bison.texinfo (final, strictfp, extends, implements): Add
2826 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
2827 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
2828 (AT_CHECK_JAVA_GREP): New.
2829 (Java parser class modifiers): New test.
2830 (Java parser class extends and implements): New test.
2832 Model exception propagation better with throws and lex_throws.
2833 * data/java.m4 (b4_list2): New.
2834 (throws): Change default.
2835 * data/lalr1.java (yyaction): Add throws.
2836 (parse): Add lex_throws in addition to throws.
2837 * doc/bison.texinfo (throws, lex_throws): Add documentation.
2838 * tests/java.at (Java throws specifications): New test.
2840 Improve documentation for Java parsers.
2841 * doc/bison.texinfo (Java Parsers): Add subsections.
2842 Don't quote first argument of %define.
2843 (Java Bison Interface): Document output files. Move documentation
2844 of parser class and merge into Java Parser Interface. Document
2845 features that error out. Document directives with no effect.
2846 Move note about Javadoc higher.
2847 (Java Semantic Values): Explicitly mention stype.
2848 Document that generic types cannot be used.
2849 (Java Location Values): Use @deftypeivar. Document constructors.
2850 Correct return value for toString.
2851 (Java Parser Interface): List undocumented constants/fields.
2852 Move documentation of fields added by %parse-param closer to list
2853 of members. Document that token names are added as fields.
2854 Document constructors accurately. Remove error method.
2855 (Java Scanner Interface): Move note on %pure-parser to Java Bison
2856 Interface. Describe %code lexer and yylex accutately.
2857 Remove documentation that does not match the code.
2858 (Java Action Features): New.
2859 (Java Differences): Add reference. Add item on semantic values.
2860 Add note about @{ ... @}. Clarify %% epilogue placement.
2861 (Java Declarations Summary): New.
2864 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
2865 (b4_remove_comma): Quote test argument.
2866 (b4_identification): Remove "bison" field.
2867 * tests/java.at (Java parser class and package names): New test.
2868 (Java %parse-param and %lex-param): New test.
2869 (Java stype, position_class and location_class): New test.
2871 2008-10-31 Di-an Jan <dianj@freeshell.org>
2873 * data/lalr1.jave: Update copyright years.
2874 (YYParser): Correct name of "generated from" file in Javadoc:
2875 use b4_file_name instead of @ofile@.
2876 (Location constructor): Correct Javadoc parameter name.
2877 (yylloc): Add missing opening m4 quote after b4_location_if.
2878 This removes a stray [ in the Javadoc of Lexer.getStartPos.
2879 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
2880 (YYParser constructor): Correct Javadoc parameter name.
2882 2008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
2884 Always put auxiliary code files in the same dir as other output files.
2885 * src/files.c (compute_file_name_parts): When the user specifies
2886 --output but not --file-prefix, extract the directory prefix from the
2887 file prefix not from the grammar file name. This affects the location
2888 of files like location.hh generated by the C++ skeleton. The includes
2889 in the other output files require this fix.
2890 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
2891 for expected output files.
2892 (Output files): Add a test for the above.
2894 2008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
2896 * gnulib: Update submodule to HEAD.
2898 2008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
2900 Update copyright year.
2901 * src/files.c: Here.
2903 2008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
2905 Don't overwrite the input file.
2906 * src/files.c (output_file_name_check): Fatal error if using input file
2908 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
2910 (Conflicting output files): Add test.
2912 2008-10-28 Akim Demaille <demaille@gostai.com>
2915 * data/lalr1.cc: Formatting changes.
2917 2008-10-28 Akim Demaille <demaille@gostai.com>
2919 Don't define debugging functions when !YYDEBUG.
2920 * data/lalr1.cc (debug_stream, set_debug_stream)
2921 (debug_level_type, debug_level, set_debug_level): Don't
2922 declare them when YYDEBUG is not defined.
2923 The implementation are already YYDEBUG-aware.
2925 2008-10-28 Akim Demaille <demaille@gostai.com>
2927 Prefer "continue" for empty loop bodies.
2928 * etc/bench.pl.in: Use "continue" instead of {}.
2930 2008-10-28 Akim Demaille <demaille@gostai.com>
2932 Space and comments changes.
2933 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
2934 * data/c.m4, data/lalr1.cc: Space changes.
2936 2008-10-28 Akim Demaille <demaille@gostai.com>
2938 Make gnulib a submodule.
2940 * .gitmodules (gnulib): New.
2942 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
2944 Fix yyerror_range for user-defined location type in C++. Reported by
2946 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
2947 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
2948 * THANKS (Georg Sauthoff): Add.
2950 2008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
2952 Update several administrative files mainly to facilitate releasing.
2953 * HACKING (Administrivia): Make the git-merge-changelog notes more
2955 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
2956 (Release Procedure): Update for git and add numerous details that were
2958 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
2959 * maint.mk (announcement): Don't list bison as a bootstrap tool so
2960 that announcements don't claim we bootstrapped with whatever bison
2961 happened to be in PATH. Add flex as a bootstrap tool.
2962 * Makefile.maint: Remove, previously replaced by maint.mk.
2963 * Makefile.cfg: Remove, and migrate settings to...
2964 * cfg.mk: ... here for the sake of `make announcement'.
2965 * bootstrap.conf (gnulib_modules): Add announce-gen.
2966 * README: Say GNU Bison instead of just Bison. Suggested by Karl
2969 2008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
2971 Small but important bugfixes for the Java skeleton.
2972 * data/lalr1.java (yyerror): Change Location to b4_location_type.
2973 (yy_symbol_print): Call toString on yyvaluep.
2975 2008-08-29 Akim Demaille <demaille@gostai.com>
2977 Clarify UPDATED use.
2978 * doc/bison.texinfo: It refers to the last edition of this file,
2979 not to the release date of Bison.
2980 Reported by Joel E. Denny.
2982 2008-08-29 Akim Demaille <demaille@gostai.com>
2984 * README: Update FAQ pointer.
2985 Reported by Joel E. Denny.
2987 2008-08-27 Eric Blake <ebb9@byu.net>
2989 Resync m4sugar from autoconf.
2990 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
2991 (m4_init): Adjust to latest m4.git changes.
2992 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
2994 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
2995 (_m4_list_cmp): Reduce side effects.
2997 2008-08-27 Akim Demaille <demaille@gostai.com>
2999 Check yyerrok in calc.at.
3000 * tests/calc.at (calc.y): Use yyerrok on "( error )".
3001 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
3004 2008-08-27 Akim Demaille <demaille@gostai.com>
3006 Support yyerrok in lalr1.cc.
3007 YYBACKUP is still to import back into lalr1.cc.
3008 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
3010 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
3012 For maintainer-check*, don't recompile for a $(VERSION) update.
3014 (_is-dist-target): Override the one in GNUmakefile.
3015 * Makefile.am (EXTRA_DIST): Add cfg.mk.
3017 2008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
3019 Update for recent change to gnulib.
3020 * src/parse-gram.y: Don't include strverscmp.h. It comes from
3023 2008-08-15 Eric Blake <ebb9@byu.net>
3025 Remaining m4sugar merge from autoconf.
3026 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
3027 * data/m4sugar/foreach.m4: New file, copied from autoconf.
3028 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
3029 * src/output.c (output_skeleton): Tell m4 how to find it.
3031 Partial m4sugar merge from autoconf: m4_map.
3032 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
3033 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
3034 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
3035 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
3037 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
3039 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
3042 2008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
3044 Keep .version and PACKAGE_VERSION in sync.
3045 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
3046 dependency, and add comments justifying this in more detail. Discussed
3048 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
3050 2008-08-06 Eric Blake <ebb9@byu.net>
3052 Partial m4sugar merge from autoconf: m4_shiftn.
3053 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
3054 (m4_shift2, m4_shift3): New macros.
3055 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
3056 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
3057 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
3058 * data/java.m4 (b4_remove_comma): Likewise.
3060 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
3061 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
3062 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
3063 (m4_init): Consolidate wrapped text into single m4_wrap.
3064 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
3067 2008-08-05 Eric Blake <ebb9@byu.net>
3069 Partial m4sugar merge from autoconf: builtins, version.m4.
3070 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
3071 (m4_prepend): Remove, as it is unused and inherently quadratic,
3072 whereas m4_append is linear in newer m4.
3073 (m4_mkstemp): New builtin.
3074 (m4_symbols): Make rename conditional.
3075 (m4_version_prereq): Ensure fatal error if used in bison, which
3076 intentionally lacks version.m4.
3078 Fix comments in m4sugar.
3079 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
3081 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
3083 Update for recent .gitignore fix in Gnulib.
3084 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
3085 anchored .gitignore entries.
3087 2008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
3089 Set gnu or gnits strictness.
3090 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
3091 development and gnits strictness for releases. Based on Eric Blake's
3093 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
3095 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
3097 * NEWS: Clarify documentation of %language.
3099 2008-07-31 Paolo Bonzini <bonzini@gnu.org>
3101 Support usage of git-merge-changelog.
3102 * .gitattributes: New.
3103 * HACKING: Document usage of git-merge-changelog.
3104 * bootstrap: Install git-merge-changelog entries in .git/config
3107 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3109 Remove remaining dependence on CVS Id keyword.
3110 * ChangeLog: For the sake of people still using CVS, don't use dollars
3112 * data/xslt/bison.xsl: Remove Id from header comments, where it was
3114 * data/xslt/xml2dot.xsl: Likewise.
3115 * data/xslt/xml2text.xsl: Likewise.
3116 * data/xslt/xml2xhtml.xsl: Likewise.
3117 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
3118 * doc/Makefile.am (neutralize): Remove, no longer needed.
3119 (.x.1): Don't use neutralize.
3120 (edit): Don't substitute for ID.
3121 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
3123 2008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3125 Fix dependence on computed configure variables.
3126 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
3127 $(top_srcdir)/configure.ac so that changes to computed variables, such
3128 as PACKAGE_VERSION, are seen.
3129 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
3131 2008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
3133 Update copyright dates for recent changes.
3134 * Makefile.am: Here.
3135 * src/Makefile.am: Here.
3136 * src/reduce.c: Here.
3137 * tests/reduce.at: Here.
3139 2008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
3141 Use git-version-gen for version names between releases.
3142 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
3143 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
3144 * .prev-version: New.
3145 * .version.in: Remove.
3146 * ChangeLog: Remove the Id previously used for capturing the CVS
3148 * GNUmakefile: Remove, now copied from Gnulib.
3149 * Makefile.am: Add code suggested by comments in
3150 build-aux/git-version-gen.
3151 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
3152 .prev-version, and .version.
3153 * NEWS (2.3b+): Rename to...
3154 (?.?): ... this because we're dropping the "+" version naming scheme,
3155 but, in general, we still can't be sure of our next release name.
3156 * bootstrap: Add a quick hack to remove from .gitignore the
3157 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
3158 entry. This should really be fixed in gnulib instead.
3159 * bootstrap.conf (gnulib_modules): Add gnumakefile.
3160 * configure.ac (AC_INIT): Set version name by invoking
3161 build-aux/git-version-gen.
3162 (AC_CONFIG_FILES): Remove .version, now generated by
3163 build-aux/git-version-gen.
3164 * maint.mk: New, copied from coreutils.
3165 * doc/.cvsignore (bison.1): Add.
3166 * doc/.gitignore (/bison.1): Add.
3167 * doc/bison.1: Remove, generated.
3168 * src/.cvsignore (revision.c): Remove.
3169 * src/.gitignore (/revision.c): Remove.
3170 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
3171 (BUILT_SOURCES): Remove revision.c.
3172 (revision.c): Remove.
3173 * src/getargs.c (version): Don't print revision after the VERSION.
3174 * src/revision.h: Remove.
3176 2008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
3178 Fix untranslatable composition of sentences. Reported by Goran
3180 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
3181 * THANKS (Goran Uddeborg): Add.
3182 * src/reduce.c (reduce_print): Report the number of nonterminals and
3183 rules useless in the grammar in separate sentences.
3184 * tests/reduce.at (Useless Rules): Update output.
3185 (Reduced Automaton): Likewise.
3186 (Underivable Rules): Likewise.
3187 (Empty Language): Likewise.
3189 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
3191 Fix some .gitignore and .cvsignore problems.
3192 * bootstrap (insert_sorted_if_absent): Replace all uses with...
3193 (insert_vc_ignore): ... this new function, which prepends `/' to all
3194 .gitignore entries before passing them to insert_sorted_if_absent.
3195 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
3196 .cvsignore files are maintained even though Bison developers run
3197 bootstrap while using Git.
3198 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
3201 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
3202 unneeded. Reported by Eric Blake.
3203 * lib/.gitignore (/*~): Add.
3204 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
3205 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
3207 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
3209 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
3211 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
3212 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
3213 * bootstrap.conf (gnulib_modules): Add unsetenv.
3214 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
3215 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
3217 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
3218 the first argument because it may become position-dependent, and unset
3219 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
3220 Add comments explaining these issues in more detail.
3222 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
3224 Add .gitignore everywhere based on .cvsignore.
3226 * build-aux/.gitignore: New.
3227 * data/.gitignore: New.
3228 * doc/.gitignore: New.
3229 * etc/.gitignore: New.
3230 * examples/.gitignore: New.
3231 * examples/calc++/.gitignore: New.
3232 * lib/.gitignore: New.
3233 * m4/.gitignore: New.
3234 * po/.gitignore: New.
3235 * runtime-po/.gitignore: New.
3236 * src/.gitignore: New.
3237 * tests/.gitignore: New.
3239 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3241 * NEWS (2.3b+): New section, empty for now.
3242 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
3244 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3246 * NEWS (2.3b): Update release date since there has been a delay in
3247 getting the announcements and tarballs out.
3249 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
3251 * NEWS: Version 2.3b.
3252 * configure.ac (AC_INIT): Likewise.
3253 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
3255 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
3257 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
3258 been doing it for years.
3259 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
3260 (Release Procedure): Add FIXME about make alpha being unmaintained.
3262 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
3264 * data/yacc.c: Reformat m4 a little for readability.
3265 * src/lalr.c (build_relations): Correct comment.
3267 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3269 DJGPP specific issue.
3270 * djgpp/config.sed: Fixes required to run configure scripts generated
3273 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
3275 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
3276 coordinator@translationproject.org.
3278 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3280 * THANKS: Add Eric Blake.
3282 2008-04-23 Eric Blake <ebb9@byu.net>
3284 Revert prior patch, by working around autoconf regression.
3285 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
3286 ("Output file name: ("): Uncomment test.
3287 ("Output file name: )"): Likewise.
3288 Based on an idea from Noah Misch.
3290 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3292 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
3293 2.61. Reported by Juan Manuel Guerrero at
3294 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
3295 * tests/output.at ("Output file name: ("): Comment out test case for
3297 ("Output file name: )"): Likewise.
3299 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3301 * GNUmakefile: Update git-version-gen invocation so make dist
3304 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
3306 Update to the current gnulib CVS repository, and fix trigraph handling
3308 * bootstrap: Update gnulib CVS repository URL.
3309 (symlink_to_dir): Encapsulate the code that guarantees the destination
3310 directory exists into...
3311 (check_dst_dir): ... this new function, and...
3312 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
3313 fail when copying files into lib/uniwidth/.
3314 * src/output.c (prepare_symbols): When writing yytname muscles, where
3315 symbol names will be encoded in C-string literals, tell quotearg to
3316 escape trigraphs. This used to be the default in gnulib.
3317 * tests/regression.at (Token definitions): Because of the change in
3318 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
3319 escapes trigraphs in symbol names. Thus, yytname no longer has
3320 trigraphs unnecessarily doubly escaped. Update test case output.
3321 Extend test case to be sure Bison's own error messages will no longer
3322 have trigraphs in symbol names unnecessarily escaped once.
3324 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
3326 Fix make dist infinite loop reported by Juan Manuel Guerrero at
3327 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
3328 * .cvsignore: Add .version.
3330 * bootstrap.conf (gnulib_modules): Add git-version-gen.
3331 * configure.ac (AC_CONFIG_FILES): Add .version.
3332 * build-aux/.cvsignore: Add git-version-gen.
3334 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
3336 * NEWS (2.3a+): Mention that -g now takes an argument.
3337 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
3338 consistency. Update the -g and -x entries now that they take
3339 arguments. Use brackets to indicate optional arguments.
3340 * src/getargs.c (usage): Explain the relationship between arguments of
3341 long and short options more completely. Document --defines and -d
3342 separately since the former takes an argument but, for POSIX Yacc, the
3344 (short_options): Let -W take an optional argument like --warnings.
3345 (getargs): Sort cases.
3347 2008-02-28 Akim Demaille <demaille@gostai.com>
3349 * doc/bison.texinfo: Fix a few typos.
3351 2008-02-28 Akim Demaille <akim@epita.fr>
3353 * doc/bison.texinfo (Bison Options): Document -W.
3354 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
3356 2008-02-28 Akim Demaille <akim@epita.fr>
3358 * src/getargs.c (short_options): Split and sort for readability.
3359 -g and -x take optional arguments, just like their long options.
3360 * build-aux/cross-options.pl: Use /x to make the regexp easier to
3362 Fix the handling of $opt which resulted in all the argument to be
3363 considered as optional.
3365 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
3367 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
3368 say its interface is experimental.
3369 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
3371 (Bison Options): In the -L and --language entry, mention Java.
3372 (Java Bison Interface): Say the interface is experimental.
3373 * src/getargs.c (usage): Mention -L and --language.
3375 * NEWS (2.3a+): Say the push parsing interface is experimental.
3376 * doc/bison.texinfo (Push Decl): Likewise.
3377 (Decl Summary): Likewise in the "%define api.push_pull" entry.
3378 (Push Parser Function): Likewise.
3379 (Pull Parser Function): Likewise.
3380 (Parser Create Function): Likewise.
3381 (Parser Delete Function): Likewise.
3382 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
3383 yypull_parse, and yypush_parse entries.
3385 * NEWS (2.3a+): Mention XML support, and say the schema is
3387 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
3388 * src/getargs.c (usage): Say the XML schema is experimental.
3390 * NEWS (2.3a+): Say option instead of flag.
3392 2008-02-21 Wojciech Polak <polak@gnu.org>
3394 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
3397 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
3399 Fix impure push parser compile error reported by Bob Rossi at
3400 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
3401 * data/yacc.c: Clean up whitespace in the output a little.
3402 (yypstate_allocated): Define for impure push parsers regardless of
3403 whether the pull interface is also requested.
3404 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
3405 check impure push parsers without the pull interface.
3407 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
3408 yyerror takes arguments specified by %parse-param while yypstate_new
3410 * doc/bison.texinfo (Parser Create Function): Document that
3411 yypstate_new returns 0 for multiple impure parser instances.
3412 * tests/push.at (Push Parsing: Multiple impure instances): Update
3413 expected stderr output.
3415 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
3417 * runtime-po/POTFILES.in (push.c): Remove.
3419 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3421 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
3422 * data/push.c: Rename to...
3423 * data/yacc.c: ... this, overwriting it.
3424 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
3425 `%push-pull-parser' -> `%define api.push_pull "both"'.
3426 Remove old yacc.c tests, and update push.c tests to yacc.c.
3428 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
3430 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
3431 `"%code top" blocks' instead of `%code "top" blocks'.
3432 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
3433 Clean up whitespace in the output a little.
3435 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3437 Fix documentation problems reported by Tim Josling at
3438 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
3439 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
3440 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
3441 integers. Explain the effect of literal string aliases on error
3442 messages. Copy token 0 documentation from the C++ skeleton
3445 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
3447 Accept a token number in a %left, %right, or %nonassoc for POSIX
3448 conformance. Reported by Tim Josling at
3449 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
3450 * NEWS (2.3a+): Mention.
3451 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
3452 and code numbers are treated by precedence declarations.
3453 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
3455 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
3457 (symbol.prec): New, just like symbol but allows INT.
3458 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
3460 * tests/regression.at (Token number in precedence declaration): New
3463 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3465 DJGPP specific issues.
3466 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
3467 be changed. Copyright timestamp adjusted.
3468 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
3469 be changed. Copyright timestamp adjusted.
3470 * djgpp/config.site: Copyright timestamp adjusted.
3471 * djgpp/config_h.sed: Copyright timestamp adjusted.
3472 * djgpp/djunpack.bat: Copyright timestamp adjusted.
3473 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
3474 filename translation list.
3475 * djgpp/subpipe.c (init_subpipe): Check the environment variables
3476 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
3477 files shall be created. Before trying to use the temp dir where the
3478 environment variable points to check that the dir really exists. If
3479 not default to the cwd as temp dir. Copyright timestamp adjusted.
3480 * djgpp/subpipe.h: Copyright timestamp adjusted.
3481 * djgpp/testsuite.sed: Copyright timestamp adjusted.
3483 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
3485 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
3487 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
3489 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
3490 Problem reported by Claudio Saavedra in
3491 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
3493 2008-01-05 Wojciech Polak <polak@gnu.org>
3495 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
3496 document's title with the input grammar file name.
3498 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
3500 Automate regression testing of the XML/XSLT implementation. Discussed
3502 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
3503 * configure.ac (XSLTPROC): New substitution.
3504 * Makefile.am (maintainer-xml-check): New phony target invoking...
3505 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
3506 invoking make maintainer-check with BISON_TEST_XML=1.
3507 * tests/atlocal.in (XSLTPROC): New.
3508 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
3509 not to report reachable memory when Bison is expected to have a
3510 non-zero exit status and (2) to compare XML/XSLT output with --graph
3511 and --report=all output for every working grammar when
3513 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
3514 (AT_BISON_CHECK_XML): New.
3515 (AT_QUELL_VALGRIND): New.
3516 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
3517 (AT_CHECK): ... don't redefine this since this was the old way to
3519 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
3520 AT_BISON_CHECK invocations.
3521 * tests/c++.at: Likewise.
3522 * tests/calc.at: Likewise.
3523 * tests/conflicts.at: Likewise.
3524 * tests/cxx-type.at: Likewise.
3525 * tests/existing.at: Likewise.
3526 * tests/glr-regression.at: Likewise.
3527 * tests/headers.at: Likewise.
3528 * tests/input.at: Likewise.
3529 * tests/java.at: Likewise.
3530 * tests/output.at: Likewise.
3531 * tests/push.at: Likewise.
3532 * tests/reduce.at: Likewise.
3533 * tests/regression.at: Likewise.
3534 * tests/sets.at: Likewise.
3535 * tests/skeletons.at: Likewise.
3536 * tests/synclines.at: Likewise.
3537 * tests/torture.at: Likewise.
3538 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
3539 tends to hang xsltproc.
3540 (Big horizontal): Likewise.
3542 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
3544 In XML output, remove redundant class attribute on symbol element.
3545 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
3546 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
3547 look up a symbol to determine whether it's a nonterminal or terminal.
3548 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
3549 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
3551 Add prec/assoc information to XML output.
3552 * src/gram.c (grammar_rules_print_xml): For each rule that has a
3553 %prec, add a percent_prec attribute.
3554 * src/print-xml.c (print_grammar): For each terminal that has a
3555 precedence or associativity, add a prec or assoc attribute.
3557 (xml_puts): Use xml_indent.
3558 (xml_printf): Use xml_indent.
3559 * src/print-xml.h (xml_indent): Prototype.
3561 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
3562 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
3564 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
3566 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
3567 (bison:ruleByNumber): ... this for clarity.
3568 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
3569 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
3570 (xsl:template match="reduction"): Update.
3571 (xsl:template match="item"): Update.
3572 (xsl:template match="reduction"): Update.
3574 In the XML output, don't print the list of rules where symbols appear.
3575 Compute it in XSLT instead. Discussed at
3576 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
3577 * data/xslt/bison.xsl (bison:ruleByLhs): New.
3578 (bison:ruleByRhs): New.
3579 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
3581 (xsl:template match="terminal/rule"): Remove.
3582 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3584 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3586 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
3587 bison:ruleByRhs and mode="number-link" for rule template.
3588 (xsl:template match="terminal/rule"): Remove.
3589 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3590 bison:ruleByRhs and mode="number-link" for rule template.
3591 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3593 (xsl:template match="rule" mode="number-link"): ... this.
3594 * src/print-xml.c (print_grammar): Don't print the list of rules.
3596 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
3598 Don't let --report affect XML output; always print all information.
3600 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
3601 * src/conflicts.c (log_resolution): Implement.
3602 * src/print-xml.c (print_core): Implement.
3603 (print_state): Implement.
3604 (print_xml): Implement.
3606 * NEWS (2.3a+): Fix quotes.
3607 * src/parse-gram.y (prologue_declaration): For consistency with -v,
3608 don't let %verbose clear the list specified by --report.
3610 2007-11-26 Akim Demaille <akim@epita.fr>
3612 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
3614 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
3616 In the XML output, list useless and unused symbols and rules with the
3617 useful ones and add a "usefulness" attribute. Discussed starting at
3618 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
3619 * src/gram.c (grammar_rules_partial_print_xml): Remove.
3620 (grammar_rules_print_xml): Print all rules instead of just those
3621 useful in the grammar, and add a "usefulness" attribute.
3622 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
3623 * src/print-xml.c (print_rules_useless_in_parser): Remove.
3624 (print_grammar): Print all nonterminals instead of just useful ones,
3625 and add a "usefulness" attribute to nonterminals and terminals.
3626 (print_xml): Don't print a separate "reductions" or
3627 "rules-useless-in-parser" element.
3628 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
3629 (reduce_xml): Remove.
3630 (reduce_token_unused_in_grammar): New.
3631 (reduce_nonterminal_useless_in_grammar): New.
3632 * src/reduce.h (reduce_xml): Remove prototype.
3633 (reduce_token_unused_in_grammar): Add prototype.
3634 (reduce_nonterminal_useless_in_grammar): Add prototype.
3635 * data/xslt/xml2text.xsl: Update for XML changes.
3636 * data/xslt/xml2xhtml.xsl: Update for XML changes.
3637 * tests/reduce.at (Useless Terminals): Update output.
3638 (Useless Rules): Update output.
3639 (Reduced Automaton): Update output.
3641 Say "Terminals unused in grammar" instead of "Unused terminals".
3642 * NEWS (2.3a+): Update.
3643 * doc/bison.texinfo (Understanding): Update example output.
3644 * src/reduce.c (reduce_output): Implement.
3645 * data/xslt/xml2text.xsl: Implement.
3646 * data/xslt/xml2xhtml.xsl: Implement.
3648 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
3650 Accept --report-file=FILE to override the default `.output' filename.
3651 * NEWS (2.3a+): Mention.
3652 * doc/bison.texinfo (Bison Options): Add an entry.
3653 * src/files.c (compute_output_file_names): Don't override
3654 spec_verbose_file if already set.
3655 * src/getargs.c (usage): Document --report-file.
3656 (REPORT_FILE_OPTION): New anonymous enum member.
3657 (long_options): Add entry for it.
3658 (getargs): Add case for it setting spec_verbose_file.
3660 * build-aux/cross-options.pl: Don't record a short option just because
3662 * doc/.cvsignore: Add yacc.1.
3664 2007-11-14 Akim Demaille <akim@epita.fr>
3666 * doc/yacc.1.in: New.
3667 * configure.ac, doc/Makefile.am: Adjust.
3668 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
3670 Use AC_SUBST for assignments too.
3671 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
3673 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
3675 * src/gram.c: Remove comments that duplicate comments in gram.h.
3677 When reporting useless rules and nonterminals, say "useless in grammar"
3678 instead of "useless", and say "useless in parser" instead of "never
3679 reduced". Discussed starting at
3680 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
3681 * NEWS (2.3a+): Mention this change.
3682 * data/xslt/xml2text.xsl: Update output text and expected input XML
3683 element names to match changes below.
3684 * data/xslt/xml2xhtml.xsl: Likewise.
3685 (xsl:template match="bison-xml-report"): Add missing entry in Table of
3686 Contents: "Rules useless in parser due to conflicts".
3687 * doc/bison.texinfo (Decl Summary): Reword a little.
3688 (Understanding): Update example output for changes below.
3689 * src/gram.c: (rule_useful_p): Rename to...
3690 (rule_useful_in_grammar_p): ... this.
3691 (rule_useless_p): Rename to...
3692 (rule_useless_in_grammar_p): ... this.
3693 (rule_never_reduced_p): Rename to...
3694 (rule_useless_in_parser_p): ... this.
3695 (grammar_rules_print): Update for renames.
3696 (grammar_rules_print_xml): Update for renames.
3697 (grammar_rules_never_reduced_report): Rename to...
3698 (grammar_rules_useless_report): ... this since it is used for either
3699 kind of useless rule.
3700 * src/gram.h: Reword comments and update function names in prototypes.
3701 * src/main.c (main): Say "rule useless in parser due to conflicts".
3702 * src/print-xml.c (print_rules_never_reduced): Rename to...
3703 (print_rules_useless_in_parser): ... this, and rename output XML
3704 element "rules-never-reduced" to "rules-useless-in-parser".
3705 (print_xml): Update for rename.
3706 * src/print.c (print_results): Say "Rules useless in parser due to
3708 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
3709 (nonterminals_reduce): Say "nonterminal useless in grammar".
3710 (reduce_output): Say "Nonterminals useless in grammar".
3711 Say "Rules useless in grammar".
3712 (reduce_xml): Rename output XML element "useless" to
3713 "useless-in-grammar".
3714 (reduce_print): Don't report the count of grammatically useless rules
3715 as "rules never reduced" just because %yacc is specified.
3716 In the correct report of this count, say nonterminal(s) and rule(s)
3717 "useless in grammar".
3718 * tests/conflicts.at (S/R in initial): Update expected output.
3719 (Defaulted Conflicted Reduction): Likewise.
3720 (Unreachable States After Conflict Resolution): Likewise.
3721 * tests/existing.at (GNU pic Grammar): Likewise.
3722 * tests/reduce.at (Useless Nonterminals): Likewise.
3723 (Useless Rules): Likewise.
3724 (Reduced Automaton): Likewise.
3725 (Underivable Rules): Likewise.
3726 (Empty Language): Likewise.
3728 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
3730 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
3731 here document and before the EOF so that BSD's implementation of Bourne
3732 shell doesn't parse the delimiter as part of the here document.
3733 * doc/.cvsignore: Add cross-options.texi.
3734 * src/getargs.c (usage): Add a blank line after the warning categories.
3736 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
3738 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
3740 2007-11-05 Akim Demaille <akim@epita.fr>
3742 Remove Id: from bison.1.
3743 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
3744 (perl -0777 -pi -e 's/\.PP\nId): New.
3745 (.x.1): Use it to ignore the version control revision.
3747 2007-11-05 Akim Demaille <demaille@gostai.com>
3749 * build-aux/Makefile.am: Ship cross-options.pl.
3750 * doc/Makefile.am: Always refer to cross-options.texi with
3752 (MAINTAINERCLEANFILES): Add it.
3754 2007-11-04 Akim Demaille <demaille@gostai.com>
3756 Generate the long/short option cross-table.
3757 * build-aux/cross-options.pl: New.
3758 * doc/Makefile.am (cross-options.texi): New.
3759 * doc/bison.texinfo: Use it.
3761 2007-11-04 Akim Demaille <demaille@gostai.com>
3763 Generate bison.1 using help2man.
3764 * doc/common.x, doc/bison.x: New.
3765 * doc/Makefile.am (bison.1, .x.1): New.
3766 The code is taken from autoconf-2.61/man/Makefile.am.
3767 * configure.ac: Look for help2man.
3769 2007-11-04 Akim Demaille <demaille@gostai.com>
3772 * src/getargs.c (usage): Document -W, make it clear that -d,
3773 -g and -x have optional arguments.
3775 2007-11-04 Akim Demaille <demaille@gostai.com>
3777 Find sha1sum when named gsha1sum.
3778 * bootstrap (find_tool): New.
3781 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3783 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
3785 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
3786 * NEWS (2.3a+): Mention.
3787 * data/bison.m4 (b4_pure_if): Don't define it here.
3788 * data/c.m4 (b4_identification): Depend on individual skeletons to
3789 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
3790 values of the %define variables api.pure or api.push_pull. Define
3791 YYPURE, YYPUSH, and YYPULL accordingly.
3792 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
3793 glr.cc has already defined b4_pure_flag.
3794 * data/push.c: Define b4_pure_if based on `%define api.pure'.
3795 Remove YYPUSH and YYPULL since they're back in b4_identification again.
3796 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
3797 * doc/bison.texinfo (Pure Decl): Update.
3798 (Push Decl): Update.
3799 (Decl Summary): Add api.pure to %define entry.
3800 In %pure-parser entry, say it's deprecated and reference %define.
3801 (Pure Calling): Update.
3802 (Error Reporting): Update.
3803 (C++ Scanner Interface): Update.
3804 (How Can I Reset the Parser): Update.
3805 (Table of Symbols): In %pure-parser entry, say it's deprecated and
3807 * src/getargs.c (pure_parser): Remove global variable.
3808 * src/getargs.h (pure_parser): Remove extern.
3809 * src/output.c (prepare): Don't define pure_flag muscle.
3810 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
3811 wrapper around `%define api.pure'.
3812 * tests/calc.at (Simple LALR Calculator): Update.
3813 (Simple GLR Calculator): Update.
3814 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
3816 (GLR: Resolve ambiguity, pure, locations): Update.
3817 (GLR: Merge conflicting parses, pure, no locations): Update.
3818 (GLR: Merge conflicting parses, pure, locations): Update.
3819 * tests/glr-regression.at (Uninitialized location when reporting
3821 * tests/input.at (Unused %define api.pure): New test case.
3822 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
3823 AT_PURE_IF and AT_PURE_AND_LOC_IF.
3824 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
3826 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3828 %define push_pull -> %define api.push_pull. Discussed starting at
3829 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
3830 * data/push.c: Expect the new name.
3831 * data/yacc.c: Likewise.
3832 * doc/bison.texinfo (Push Decl): Update.
3833 (Decl Summary): Update %define entry.
3834 (Push Parser Function): Update.
3835 (Pull Parser Function): Update.
3836 (Parser Create Function): Update.
3837 (Parser Delete Function): Update.
3838 * tests/calc.at (Simple LALR Calculator): Update.
3839 * tests/input.at (%define enum variables): Update.
3840 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
3841 (Push Parsing: Multiple impure instances): Update.
3842 (Push Parsing: Unsupported Skeletons): Update.
3843 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
3844 (Exploding the Stack Size with Malloc): Update.
3846 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
3849 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
3851 For the XML output's terminal element, rename @number to @token-number,
3852 and add @symbol-number. In the nonterminal element, rename @number to
3853 @symbol-number. Discussed starting at
3854 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
3855 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
3857 (xsl:template match="nonterminal"): Likewise.
3858 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
3859 (xsl:template match="nonterminal"): Likewise.
3860 * src/print-xml.c (print_grammar): Implement.
3862 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
3864 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
3865 2007-10-11 change, the child elements here are items not rules.
3866 (xsl:template match="item"): New.
3867 (xsl:template match="rule"): Update for new reduced itemset.
3868 (xsl:template match="point"): Remove.
3869 (xsl:template match="empty"): For consistency with --graph, don't
3870 output "/* empty */".
3871 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
3872 line-wrap, don't pass a negative value as first-line-length since this
3873 won't work with the following changes.
3874 (xsl:template name="line-wrap"): Simplify slightly.
3875 (xsl:template name="ws-search"): Eliminate recursion.
3876 * src/print_graph.c (print_core): Don't print a reduction's lookahead
3877 set next to an item whose dot is not at the end of the RHS even if it
3878 happens to be associated with the same rule.
3880 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
3882 Add %define lr.keep_unreachable_states.
3883 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
3884 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
3885 * src/main.c (main): Implement it.
3886 * tests/conflicts.at (Unreachable States After Conflict Resolution):
3887 Extend to test it, and fix a typo.
3889 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
3891 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
3892 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
3893 the example .output text.
3894 * tests/regression.at (Extra lookahead sets in report): Improve wording
3897 2007-10-17 Wojciech Polak <polak@gnu.org>
3899 * src/print-xml.c (print_grammar): Renamed
3900 <terminal> and <nonterminal> attributes:
3901 "type" to "number" and "symbol" to "name".
3902 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
3903 Use new attribute names.
3904 (xsl:template match="nonterminal"): Likewise.
3905 * data/xslt/xml2xhtml.xsl: Likewise.
3907 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
3909 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
3910 (Option Cross Key): Likewise.
3912 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
3913 next to an item whose dot is not at the end of the RHS even if it
3914 happens to be associated with the same rule.
3915 * src/print.c (print_core): Likewise.
3916 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
3917 (Resolved SR Conflicts): Update output.
3918 * tests/regression.at (Extra lookahead sets in report): New test case.
3920 2007-10-11 Wojciech Polak <polak@gnu.org>
3922 * src/print-xml.c (print_core): Remove item set
3924 * data/xslt/bison.xsl (bison:ruleNumber): New key.
3925 Improve processing time. Suggested by Joel E. Denny.
3926 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
3927 Write xsl:param "required" attribute as comment.
3928 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
3929 (xsl:template match="rule"): Support new reduced itemset.
3930 (xsl:template match="point"): Remove.
3931 * data/xslt/xml2xhtml.xsl: Likewise.
3933 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
3935 * src/getargs.c (version): Update copyright year.
3937 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
3939 Make xml2dot.xsl and --graph produce the same output.
3940 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a ` '
3941 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
3943 (xsl:template name="output-node"): Use the new escape template instead
3944 of the string-replace template directly.
3945 (xsl:template name="output-edge"): Likewise.
3946 (xsl:template name="escape"): New, escapes backslashes and newlines in
3947 addition to quotation marks.
3948 * src/graphviz.c (start_graph, output_node, output_edge): Add
3949 whitespace to output for legibility.
3951 Make xml2text.xsl and --report produce the same output, and remove the
3952 XML "conflicts" element since a conflict summary is easily extracted
3954 * data/xslt/bison.xsl: New.
3955 (xsl:template match="state" mode="bison:count-conflicts): New.
3956 * data/xslt/xml2text.xsl: Import bison.xsl.
3957 (xsl:template match="bison-xml-report"): Instead of styling the
3958 "conflicts" element, style the "automaton" element with mode
3959 "conflicts". Unlike the former, the latter lists S/R and R/R
3960 conflicts for a state on the same line.
3961 (xsl:template match="conflicts"): Remove.
3962 (xsl:template match="conflict"): Remove.
3963 (xsl:template match="terminal"): Line-wrap the list of rules in which
3964 the terminal is used.
3965 (xsl:template match="nonterminal"): Likewise for nonterminals.
3966 (xsl:template match="automaton" mode="conflicts"): New.
3967 (xsl:template match="state" mode="conflicts"): New.
3968 (xsl:template name="line-wrap"): New.
3969 (xsl:template name="ws-search"): New.
3970 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
3971 (xsl:template match="bison-xml-report"): Instead of styling the
3972 "conflicts" element, style the "automaton" element with mode
3974 (xsl:template match="conflicts"): Remove.
3975 (xsl:template match="conflict"): Remove.
3976 (xsl:template match="automaton" mode="conflicts"): New.
3977 (xsl:template match="state" mode="conflicts): New.
3978 * src/conflicts.c (conflicts_output_xml): Remove.
3979 * src/conflicts.h (conflicts_output_xml): Remove prototype.
3980 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
3981 * src/print.c (print_grammar): Consistently wrap at the 66th column so
3982 the corresponding XSLT is easier. Also, never wrap between a word and
3983 the comma that follows it.
3985 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
3987 Improve C++ namespace support. Discussed starting at
3988 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
3989 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
3990 b4_namespace_close): New macros that interpret the %define variable
3991 "namespace" so its value can contain "::" to indicate nested
3993 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
3995 * data/lalr1.cc (b4_namespace): Likewise.
3996 * data/location.cc (b4_namespace): Likewise.
3997 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
3998 inside a new table in the general %define entry. Document `%define
3999 namespace' there as well. Point the %name-prefix entry to it since it
4000 explains it more completely in the case of C++.
4001 (C++ Bison Interface): Mention `%define namespace' instead of
4003 (Table of Symbols): Remove the `%define push_pull' entry. The %define
4005 * tests/c++.at (Relative namespace references): New test case.
4006 (Absolute namespace references): New test case.
4007 (Syntactically invalid namespace references): New test case.
4008 * tests/input.at (C++ namespace reference errors): New test case.
4010 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
4012 Add syncline support and location accessor to internal %define
4014 * data/bison.m4 (b4_percent_define_get_loc): New.
4015 (b4_percent_define_get_syncline): New.
4016 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
4017 (b4_percent_define_default): Record defining location as line 1 rather
4018 than 0 for the sake of synchronizing #line's, and define
4019 b4_percent_define_syncline(VARIABLE).
4020 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
4021 * src/muscle_tab.c (muscle_syncline_grow): New.
4022 (muscle_code_grow): Use muscle_syncline_grow.
4023 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
4024 define b4_percent_define_syncline(VARIABLE).
4025 (muscle_percent_define_get_loc): New.
4026 (muscle_percent_define_get_syncline): New.
4027 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
4028 remove some unused variables.
4029 (muscle_percent_define_default): Record defining location as line 1
4030 rather than 0 for the sake of synchronizing #line's, and define
4031 b4_percent_define_syncline(VARIABLE).
4032 (muscle_percent_define_check_values): Use
4033 muscle_percent_define_get_loc.
4034 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
4035 (muscle_percent_define_get_syncline): Prototype.
4036 * tests/skeletons.at (%define Boolean variables: invalid skeleton
4037 defaults): Update output for location change.
4038 (Complaining during macro argument expansion): Extend to test
4039 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
4041 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
4043 Fix some error-reporting macro bugs.
4044 * data/bison.m4 (b4_cat): New.
4045 (b4_error, b4_error_at): Use b4_cat to send error directives directly
4046 to stdout so they don't become arguments to other macros. Update
4047 comments and add examples.
4048 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
4050 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
4051 after printing the error directive so that M4 doesn't report subsequent
4052 problems that are induced by this problem.
4053 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
4054 instead of just in them. Recognize @\n in both places. Both expand to
4055 the empty string. Needed by b4_cat.
4056 * tests/skeletons.at (Complaining during macro argument expansion):
4058 (Fatal errors make M4 exit immediately): New test case.
4060 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
4062 Implement --print-datadir.
4063 * src/getargs.c (usage): Mention.
4064 (PRINT_DATADIR_OPTION): New anonymous enum member.
4065 (long_options): Add entry for it.
4066 (getargs): Add case for it calling compute_pkgdatadir.
4067 * src/output.c (output_skeleton): Encapsulate data directory
4068 computation from here...
4069 (prepare): ... and from here...
4070 (compute_pkgdatadir): ... into this new function.
4071 * src/output.h (compute_pkgdatadir): Prototype.
4073 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
4075 * src/print-xml.c (escape_bufs): New static global variable
4077 (xml_escape_n): ... the static local variable buf here.
4078 (print_xml): Free memory for escape_bufs.
4079 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
4081 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
4083 Replace `%push-parser' and `%push-pull-parser' with
4084 `%define push_pull "push"' and `%define push_pull "both"'.
4085 `%define push_pull "pull"' is the default.
4086 * doc/bison.texinfo (Push Decl, Push Parser Function,
4087 Pull Parser Function, Parser Create Function, Parser Delete Function):
4088 Update declarations.
4089 (Decl Summary, Table of Symbols): Replace %push-parser and
4090 %push-pull-parser entries with a %define push_pull entry.
4091 * data/bison.m4 (b4_percent_define_check_values): New macro.
4092 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
4094 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
4096 * data/push.c: ... to here and compute them from the value of the
4097 %define variable push_pull.
4098 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
4099 parsing requests here...
4100 * data/yacc.c: ... hack this to switch to push.c any time
4101 b4_use_push_pull_flag or the %define variable push_pull is set. This
4102 will go away when we mv push.c yacc.c.
4103 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
4104 push parsing is not supported since unused %define variables are
4106 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
4107 * src/muscle_tab.h (muscle_percent_define_check_values): Update
4108 comments for consistency with b4_percent_define_check_values.
4109 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
4111 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
4113 (prologue_declaration): Remove %push-parser and %push-pull-parser
4115 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
4116 * tests/calc.at: Update declarations.
4117 * tests/input.at (%define enum variables): New test case.
4118 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
4120 (Push Parsing: Multiple impure instances): Update declaration.
4121 (Push Parsing: Unsupported Skeletons): New test case.
4122 * tests/torture.at (Exploding the Stack Size with Alloca): Update
4124 (Exploding the Stack Size with Malloc): Update declaration.
4126 2007-09-24 Wojciech Polak <polak@gnu.org>
4128 Add XSLT transformations.
4130 * data/xslt/xml2dot.xsl: Transform XML into DOT.
4131 * data/xslt/xml2text.xsl: Transform XML into plain text.
4132 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
4133 * data/Makefile.am (xsltdir): New variable.
4134 (dist_xslt_DATA): Add xslt/*.xsl files.
4136 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
4138 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
4139 Problem reported by Wojciech Polak.
4140 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
4141 (xml_printf): Undo change I made on 21 September; that is,
4142 indent 2 spaces, not 1.
4144 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
4146 Pacify ./configure --enable-gcc-warnings.
4147 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
4148 `char const *' instead of `char *'.
4149 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
4150 local variable `sep'.
4152 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
4154 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
4156 * src/print-xml.c: Prefer "const" after types; that's more consistent.
4157 (xml_printf): Indent just 1 space for level.
4158 (e_char, xlate_char): Remove.
4159 (xml_escape_string): Rewrite to avoid undefined behavior (used
4160 storage that was freed from the stack).
4161 (xml_escape_n): Don't bother checking for subscript error.
4163 2007-09-21 Wojciech Polak <polak@gnu.org>
4165 Add Bison XML Automaton Report.
4167 Add support for an -x option to generate an XML report.
4168 It is not documented yet.
4169 * src/print-xml.c: New file.
4170 * src/print-xml.h: Likewise.
4171 * lib/timevar.def (TV_XML): New var.
4172 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
4173 * src/conflicts.c: Include print-xml.h.
4174 (solved_conflicts_xml_obstack): New var.
4175 (log_resolution, conflicts_solve, conflicts_free):
4176 Add support for XML report.
4177 (conflicts_output_val): New function.
4178 * src/conflicts.h (conflicts_output_val): New decl.
4179 * src/files.c (spec_xml_file): New var.
4180 (compute_output_file_names, output_file_names_free): Add XML support.
4181 * src/files.h (spec_xml_file): New decl.
4182 * src/getargs.c (xml_flag): New var.
4183 (usage, short_options, long_options, getargs): Add XML support.
4184 * src/getargs.h (xml_flag): New decl.
4185 * src/gram.c: Include print-xml.h.
4186 (rule_lhs_print_xml, rule_rhs_print_xml):
4187 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
4189 * src/gram.h: Declare external ones.
4190 * src/main.c: Include print-xml.h.
4191 (main): Add XML support.
4192 * src/reduce.c: Include print-xml.h.
4193 (reduce_xml): New function.
4194 * src/reduce.h: Declare it.
4195 * src/state.c: Include print-xml.h.
4196 (state_new): Add XML support.
4197 (state_rule_lookahead_tokens_print_xml): New function.
4198 * src/state.h: Declare it.
4199 (struct state): New member solved_conflicts_xml.
4200 * src/symtab.c (symbol_class_get_string): New function.
4201 * src/symtab.h: Declare it.
4203 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
4205 * GNUmakefile: Switch to coreutils's version.
4206 * bootstrap: Likewise.
4207 * Makefile.cfg: Adjust to new GNUmakefile.
4208 * README-hacking: Likewise.
4212 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
4213 Bruno Haible <bruno@clisp.org>
4215 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
4216 and is a script that invokes bison. Tighten the code. Add comments.
4218 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
4220 Spell "boolean" as "Boolean". Reported by Akim Demaille.
4221 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
4222 * doc/bison.texinfo (Decl Summary): Fix.
4223 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
4224 * tests/input.at (Boolean %define variables): Update output.
4225 * tests/skeletons.at (%define boolean variables: invalid skeleton
4226 defaults): Rename to...
4227 (%define Boolean variables: invalid skeleton defaults): ... this and
4230 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
4232 In impure push mode, don't allow more than one yypstate to be allocated
4233 since multiple impure parsers would corrupt yynerrs.
4234 * data/push.c (yypstate_allocated): New static global variable
4236 (yypull_parse): If yypstate_new returns 0, don't report it as memory
4237 exhaustion if yypstate_allocated is 1, but still return 2.
4238 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
4239 already 1. Otherwise, set it to 1.
4240 (yypstate_delete): Set it to 0.
4241 * tests/push.at (Push Parsing: Multiple impure instances): New test
4244 2007-08-17 Bob Rossi <bob@brasko.net>
4246 * doc/bison.texinfo (Push Decl): Document the push parser.
4247 (Table of Symbols): Ditto.
4249 (Decl Summary): Ditto.
4250 (Multiple Parsers, Push Parser Function, Pull Parser Function,
4251 Parser Create Function, Parser Delete Function):
4252 Add new push parser symbols.
4253 (Table of Symbols): Document push-parser, push-pull-parser,
4254 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
4256 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
4259 * doc/gpl-3.0.texi: New file.
4260 * doc/gpl.texi: Remove.
4261 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
4262 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
4263 * README-hacking, TODO, bootstrap, bootstrap.conf:
4264 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
4265 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
4266 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
4267 * data/lalr1.cc, data/lalr1.java, data/location.cc:
4268 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
4269 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
4270 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
4271 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
4272 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
4273 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
4274 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
4275 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
4276 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
4277 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
4278 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
4279 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
4280 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
4281 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
4282 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
4283 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
4284 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
4285 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
4286 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
4287 * src/complain.c, src/complain.h, src/conflicts.c:
4288 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
4289 * src/files.h, src/flex-scanner.h, src/getargs.c:
4290 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
4291 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
4292 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
4293 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
4294 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
4295 * src/print.c, src/print.h, src/print_graph.c:
4296 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
4297 * src/reduce.h, src/relation.c, src/relation.h:
4298 * src/revision.h, src/scan-code.h, src/scan-code.l:
4299 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
4300 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
4301 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
4302 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
4303 * tests/Makefile.am, tests/actions.at, tests/c++.at:
4304 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
4305 * tests/existing.at, tests/glr-regression.at:
4306 * tests/headers.at, tests/input.at, tests/java.at:
4307 * tests/local.at, tests/output.at, tests/push.at:
4308 * tests/reduce.at, tests/regression.at, tests/sets.at:
4309 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
4313 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
4315 Get rid of broken %no-parser, -n, and --no-parser implementation and
4317 * TODO: Don't mention them.
4318 * doc/bison.1: Likewise.
4319 * doc/bison.texinfo (Decl Summary): Likewise.
4320 (Bison Options): Likewise.
4321 (Option Cross Key): Likewise.
4322 * src/getargs.c (no_parser_flag): Remove global variable.
4323 (usage): Don't print description of -n and --no-parser.
4324 (long_options): Remove --no-parser entry here.
4325 (getargs): Remove -n case in the switch here.
4326 * src/getargs.h (no_parser_flag): Remove extern.
4327 * tests/regression.at (Web2c Actions): Remove comment that mentions
4330 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
4332 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
4333 name user variables starting with `yy'. Just pass NULL instead of a
4334 dummy local &yylval to yypush_parse.
4335 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
4338 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
4340 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
4341 true since it's then always used regardless of whether yyoverflow is
4342 defined. Reported by Christian Burger at
4343 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
4344 * THANKS: Add Christian Burger.
4346 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
4347 node names: say "Decl Summary" not "Bison Declaration Summary".
4349 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
4351 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
4352 determine whether this function has already complained about an invalid
4353 value for a %define boolean variable, don't check whether Bison has
4354 ever examined the value. As written, the check was a tautology.
4355 Instead, record and check for this complaint using a separate muscle.
4357 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
4359 Fix push parsing memory leak reported by Brandon Lucia at
4360 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
4361 * THANKS: Add Brandon Lucia.
4362 * data/push.c (yypstate_delete): Free the stack if it was reallocated
4363 but the parse never completed and thus freed it.
4364 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
4365 * tests/testsuite.at: Include push.at.
4366 * test/push.at: New.
4367 (Push Parsing: Memory Leak for Early Deletion): New test case.
4369 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
4371 Improve handling of multiple S/R conflicts in the same state and of S/R
4372 conflicts involving multiple reductions.
4373 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
4374 set for a state here or Bison will abort if it is reassigned on a
4375 later conflicted reduction in the same state.
4376 Similarly, don't finalize and assign the solved conflicts report here
4377 or it will be lost if it is reassigned on a later conflicted reduction
4379 (set_conflicts): Instead, assign them both here after all S/R conflicts
4380 in the state have been fully examined.
4381 * src/print.c (shift_set): Rename to...
4382 (no_reduce_set): ... this.
4383 (print_reductions): Update for rename, and add %nonassoc error action
4384 tokens to no_reduce_set so that, when printing the first remaining
4385 reduction on an error action token, the reduction is enclosed in
4387 (print_results): Update for rename.
4388 * tests/conflicts.at (Solved conflicts report for multiple reductions
4389 in a state): New test case.
4390 (%nonassoc error actions for multiple reductions in a state): New test
4393 * src/main.c (main): Don't depend on C99 features.
4395 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
4397 * build-aux/.cvsignore: Add compile.
4398 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
4401 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
4403 * bootstrap (slurp): Create target directories that don't exist.
4404 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
4406 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
4408 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
4410 * closure.c (closure): Likewise.
4411 * state.h (reductions): Comment sorting of rules.
4412 (state): Comment sorting of items.
4414 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
4416 Fix C++ test cases after recent Gnulib changes. Discussed starting at
4417 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
4418 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
4419 definition in order to avoid Gnulib headers since we don't use config.h
4421 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
4422 rather than AT_DATA so that config.h is included.
4424 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
4426 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
4427 instead of fprintf. Guard these functions with #if YYDEBUG instead of
4428 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
4429 and so that YYFPRINTF is guaranteed to be defined here.
4431 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
4433 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
4435 (muscle_percent_define_check_values): ... this more helpful function.
4436 Again, it's not used yet, but it will be.
4437 * src/muscle_tab.h: Likewise.
4439 Improve some comments in parser table construction.
4440 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
4441 (generate_states): Don't mention ruleset, which is internal to closure.
4442 * src/closure.c (closure): Explain sorting of core and itemset, which
4443 is required for this function to behave correctly.
4444 * src/closure.h (closure): Mention sorting.
4446 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
4448 * src/lalr.c (state_lookahead_tokens_count): For code readability,
4449 move the check for disabled transitions to an aver since conflict
4450 resolution hasn't happened yet.
4452 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
4453 labels a state as inconsistent just because it has error transitions.
4454 The original form of this check appeared in revision 1.1 of lalr.c,
4455 which was committed on 1991-12-21. Now (at least), changing the
4456 consistency label on such a state appears to have no useful effect in
4457 any of the places it is examined, which I enumerate below. The key
4458 point to understanding each item in this enumeration is that a state
4459 with an error transition is labelled consistent in the first place only
4460 if it has no rules, so the check cannot matter for states that have
4461 rules. (1) Labelling a state as inconsistent will cause set_conflicts
4462 to try to identify its conflicts, and a state must have *rules* to have
4463 conflicts. (2) Labelling a state as inconsistent will affect how
4464 action_row sets the default *rule* for the state. (3) Labelling a
4465 state as inconsistent will cause build_relations to add lookback edges
4466 to *rules* in that state.
4467 * src/state.h (struct state): Word the comment for member consistent
4470 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
4472 Don't depend on C99 features.
4473 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
4474 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
4475 * src/reader.c (check_and_convert_grammar): Fix for-loop.
4476 * src/state.c (state_mark_reachable_states): Fix for-loop.
4477 (state_remove_unreachable_states): Fix for-loop.
4479 Don't widen struct state with member reachable just to temporarily
4480 record reachability. Instead, use a local bitset.
4481 * src/state.h (struct state): Remove member.
4482 * src/state.c (state_new): Don't initialize it.
4483 (state_mark_reachable_states): Rename to...
4484 (state_record_reachable_states): ... this, and use bitset.
4485 (state_remove_unreachable_states): Use bitset.
4487 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
4489 * src/Makefile.am (yacc): Quote target action commands properly so
4490 that the yacc script isn't corrupt. Reported by Hans Aberg at
4491 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
4493 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
4494 the case of pure parsers. Reported by Frans Englich at
4495 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
4496 * THANKS: Add Frans Englich.
4498 * NEWS (2.3a+): In the %code entry, reference section `Bison
4499 Declaration Summary' from the manual now since the %code summary has
4501 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
4502 in the rules section must be terminated by semicolons.
4504 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
4506 Extend the front-end API for %define variables to more completely
4507 mirror the back-end. This will be useful in the future.
4508 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
4509 Update comments to mention the new front-end counterparts of these
4511 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
4512 for muscle_string_decode and muscle_location_decode.
4513 (muscle_string_decode): New static function.
4514 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
4515 (muscle_percent_define_get, muscle_percent_define_ifdef): New
4517 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
4518 muscle_percent_define_get to mimic the b4_percent_define_flag_if
4519 implementation more closely.
4520 (muscle_percent_define_invalid_value): New function.
4521 * src/muscle_tab.h (muscle_percent_define_get,
4522 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
4525 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
4527 * NEWS (2.3a+): Mention yesterday's state-removal change.
4528 (2.3a): Remove the %language entry, which was added after 2.3a.
4529 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
4530 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
4531 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
4532 tests/existing.at: Update copyright date.
4534 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4536 If conflict resolution makes states unreachable, remove those states,
4537 report rules that are then unused, and don't report conflicts in those
4539 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
4540 New global function.
4541 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
4543 * src/main.c (main): After conflict resolution, remove the unreachable
4544 states and update all data structures that reference states by number.
4545 * src/state.c (state_new): Initialize each state's reachable member to
4547 (state_mark_reachable_states): New static function.
4548 (state_remove_unreachable_states): New global function.
4549 * src/state.h (struct state): Add member bool reachable.
4550 (state_remove_unreachable_states): Prototype.
4551 * tests/conflicts.at (Unreachable States After Conflict Resolution):
4553 * tests/existing.at (GNU pic Grammar): Update test case output now that
4554 an unused rule is discovered.
4556 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4558 Minor code cleanup in parser table construction.
4559 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
4560 (new_itemsets, save_reductions): Update for rename to nitemset.
4561 * src/closure.c (nritemset): Rename to...
4562 (nitemset): ... this since the "r" appears to meaningless and isn't
4563 used in the comments.
4564 (closure): Update for rename.
4565 * src/closure.h (nritemset): Update extern to...
4566 (nitemset): ... this.
4567 * src/lalr.c (LA): Fix a typo in comments.
4568 * src/print.c (print_core): Update for rename to nitemset.
4569 * src/print_graph.c (print_graph): Likewise.
4570 * src/state.h: Fix some typos in header comments.
4572 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
4574 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
4575 still sticks to ASCII. Sorry!
4577 * README-hacking: New file, taken mostly from coreutils, with changes
4578 for Bison. Contains much of the contents of:
4579 * README-cvs: Remove.
4580 * bootstrap: Sync from gnulib.
4581 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
4582 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
4584 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
4586 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
4588 (Java Differences): Fix some typos.
4589 * THANKS: Add Sebastian Setzer.
4591 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
4593 * data/java.m4 (b4_single_class_if): Remove.
4594 (b4_abstract_if): Look at "%define abstract".
4596 (b4_union_name): Rename...
4597 (b4_yystype): ... to this. Map to "%define stype".
4598 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
4599 b4_maybe_throws): Fix quoting.
4600 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
4601 * data/lalr1.java (Lexer interface): Always define.
4602 (Lexer interface within parser class): Remove.
4603 (YYLexer class): New, used when "%code lexer" is present.
4604 (constructor): When "%code lexer" is used, pass %lex-param
4605 to the lexer constructor.
4606 (yylex, yyparse): Remove %lex-param from method invocations
4607 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
4609 * doc/bison.texinfo (Java Bison Interface): Mention "%define
4610 abstract". Rename "%define union_name" to "%define stype".
4611 Rename method names according to previous patch.
4612 (Java Scanner Interface): Describe "%code lexer" instead of
4613 "%pure-parser" and "%define single_class".
4614 (Java Differences): Mention "%code lexer".
4616 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
4617 Include scanner here, using macros from tests/local.at.
4618 (AT_DATA_CALC_Y): Remove final argument.
4619 (_AT_CHECK_JAVA_CALC): Likewise.
4620 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
4621 of %locations and %error-verbose.
4622 (main): Test with and without %lex-param.
4623 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
4624 (AT_BISON_OPTION_POPDEFS): Pop it.
4626 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4628 DJGPP spefic issue. Inhibit the use of disallowed characters for
4629 file name genertion on Win98, WinXP, etc. These are |<>":?*\
4630 and concern testsuite case 46.
4631 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
4632 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
4633 * djgpp/config.bat: Inhibit the use of disallowed characters.
4635 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4637 Miscellaneous %define and %code cleanup.
4638 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
4639 values are interpreted.
4640 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
4641 documentation a little more.
4642 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
4643 muscle_percent_define_insert, muscle_percent_code_grow): New
4645 * src/muscle_tab.h (muscle_percent_define_insert,
4646 muscle_percent_code_grow): Prototype.
4647 * src/parse-gram.y (prologue_declaration): Use
4648 muscle_percent_define_insert and muscle_percent_code_grow when parsing
4649 %define and %code directives.
4651 Make it easy to share %define boolean variables between the front-end
4652 and back-end. Though not used yet, this will be useful in the future.
4653 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
4654 Bison uses of names rather than just skeleton uses of names.
4655 (b4_percent_define_get, b4_percent_define_ifdef): Rename
4656 b4_percent_define_skeleton_variables(VARIABLE) to
4657 b4_percent_define_bison_variables(VARIABLE).
4658 (b4_percent_code_get, b4_percent_code_ifdef): Rename
4659 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
4660 b4_percent_code_bison_qualifiers(QUALIFIER).
4661 (b4_check_user_names_wrap): Update for renames.
4662 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
4663 muscle_percent_define_default): New functions mimicking
4664 b4_percent_define_flag_if and b4_percent_define_default.
4666 For %define variables, report locations for invalid values and
4668 * data/bison.m4 (b4_percent_define_flag_if): Read
4669 b4_percent_define_loc(VARIABLE) to report the location of an invalid
4671 (b4_percent_define_default): Save a special location in
4672 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
4673 must later be reported as invalid.
4674 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
4676 (muscle_percent_define_insert): Record the location of VARIABLE in
4677 muscle percent_define_loc(VARIABLE), and use it to report the previous
4678 location for a redefinition.
4679 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
4680 (muscle_percent_define_default): Update like b4_percent_define_default.
4681 (muscle_grow_user_name_list): Rename to...
4682 (muscle_user_name_list_grow): ... this for consistency and use
4683 muscle_location_grow.
4684 * src/muscle_tab.h (muscle_location_grow): Prototype.
4685 * tests/input.at (%define errors): Update expected output.
4686 * tests/skeletons.at (%define boolean variables: invalid skeleton
4687 defaults): New test case.
4689 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
4691 * src/print.c (lookahead_set, state_default_rule): Remove.
4692 (print_reductions): Replace state_default_rule invocation with
4693 equivalent use of yydefact, which was computed in token_actions in
4695 (print_results): Don't allocate lookahead_set.
4697 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
4699 * data/lalr1.java: Prefix all private members with yy.
4701 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
4703 Use YYFPRINTF instead of fprintf where appropriate. Reported by
4704 Sebastien Fricker at
4705 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
4706 * THANKS: Add Sebastien Fricker.
4707 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
4708 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
4709 accept a variable number of arguments.
4711 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
4713 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
4715 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4717 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
4718 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
4719 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
4721 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
4723 Undo my 2007-02-07 change, switching back to the c-strcase module
4724 introduced in the 2007-02-03 change. Bruno Haible reported that
4725 the 2007-02-07 change would be dangerous in Turkish if we add a
4726 language whose name contains "i", since "i" is not lowercase "I"
4728 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
4729 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
4730 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
4731 * m4/.cvsignore: Remove strcase.m4.
4732 * src/getargs.c: Revert 2007-02-07 change, as follows.
4733 Include c-strcase.h.
4734 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
4736 2007-02-11 Bruno Haible <bruno@clisp.org>
4738 Enable the Java related testsuite tests when the only Java compiler
4739 found is a gcj < 4.3. Discussed at
4740 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
4741 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
4743 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
4745 * data/Makefile.am: Update copyright date.
4746 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
4747 yypstate_new returns NULL.
4748 (yypstate_new): Return NULL if malloc does.
4749 * src/reader.c (packgram): Move translation of rule actions from the
4750 beginning of packgram to...
4751 (check_and_convert_grammar): ... here right before packgram is invoked
4752 so it's easier to write more complete comments, and remove redundant
4755 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
4757 As in semantic actions, make @$ in %initial-action, %destructor, and
4758 %printer imply %locations.
4759 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
4761 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
4762 (@$ in %initial-action implies %locations,
4763 @$ in %destructor implies %locations,
4764 @$ in %printer implies %locations): ... these new test cases.
4766 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
4768 Undo most of the 2007-02-03 change, switching to the strcase module
4769 now that gnulib strcase has been fixed.
4770 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
4771 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
4772 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
4773 * m4/.cvsignore: Add strcase.m4.
4774 * src/getargs.c: Revert 2007-02-03 change, as follows.
4775 Don't include c-strcase.h.
4776 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
4777 strcasecmp has "unspecified behavior" outside the POSIX locale,
4778 but it works fine in practice if at least one argument is ASCII,
4779 as is the case in Bison.
4781 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
4783 * tests/java.at: Skip tests if only one of javac/java is present.
4784 Reported by Joel E. Denny.
4785 * tests/atlocal.in: Adjust copyright years.
4787 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
4789 * data/lalr1.java (Stack): Work around old verifiers that disallow
4790 access to the private fields of an inner class, from the outer class.
4791 We can make Stack's fields public because user code doesn't have access
4792 to the instance of Stack used by parse(). Reported by Paul Eggert.
4794 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
4796 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
4797 the right spot for these files?
4798 * bootstrap.conf (gnulib_modules): Add c-strcase.
4799 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
4801 * src/getargs.c: Include c-strcase.h.
4802 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
4803 to avoid unspecified behavior.
4805 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
4807 * doc/bison.texinfo (Decl Summary): Correct typo.
4809 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
4811 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
4812 Complain if the value does not match empty, "true" or "false".
4813 * data/c++.m4: Adjust default definitions of %define variables.
4814 * data/java.m4: Adjust default definitions of %define variables.
4815 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
4817 * tests/input.at (Boolean %define variables): Test new behavior.
4819 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
4821 * NEWS: Mention java.
4822 * TODO: Remove things that are done.
4823 * bootstrap.conf: Add javacomp-script and javaexec-script.
4824 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
4826 * data/Makefile.am: Add new files.
4827 * data/java-skel.m4: New.
4828 * data/java.m4: New.
4829 * data/lalr1.java: New.
4831 * doc/bison.texinfo: Put "A Complete C++ Example" under
4832 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
4833 under Other Languages.
4835 * src/getargs.c (valid_languages): Add Java.
4836 * src/getargs.h (struct bison_language): Update size of string fields.
4838 * tests/Makefile.am: Add java.at.
4839 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
4840 * tests/java.at: New.
4841 * tests/testsuite.at: Include it.
4843 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
4846 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
4847 at_directive_argv arguments so these no longer have to be global
4848 variables. Also, update the implementation for the following changes.
4849 (fail_for_at_directive_too_many_args,
4850 fail_for_at_directive_too_few_args): Add at_directive_name argument.
4851 (at_directive_name): Remove as at_directive_argv[0] will be used for
4853 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
4854 for the directive name.
4855 (at_directive_argc, at_directive_argv): Make these local within
4856 skel_lex instead of global.
4857 (INITIAL): Update directive start action for above changes.
4858 (SC_AT_DIRECTIVE_ARG): Rename to...
4859 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
4860 (SC_AT_DIRECTIVE_SKIP_WS): Update.
4861 (scan_skel): Move yylex_destroy to...
4862 (skel_scanner_free): ... here.
4863 * tests/skeletons.at (installed skeleton file name): Rename to...
4864 (installed skeleton file names): ... this.
4866 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
4868 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
4869 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
4870 Summary" not "Directives".
4871 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
4872 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
4873 since the former is now the more complete one.
4874 (Prologue Alternatives): Likewise and do the same for %defines.
4875 (Table of Symbols): Add summary of %code, add summary of %define, and
4876 move full %code documentation to...
4877 (Decl Summary): ... here for consistency with other entries in these
4879 Move %define entry in order to keep this list alphabetized.
4880 Reword %define entry a little to put less emphasis on the skeleton
4881 concept, which most users shouldn't have to think about.
4883 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
4885 Adjust to recent gnulib changes.
4886 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
4887 Add string.h, string_.h, unistd_.h, wchar_.h.
4888 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
4889 * src/system.h: Don't include <stpcpy.h>; this is now done by
4892 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
4894 Simplify implementation of unqualified %code, implement macros for
4895 uniform treatment of boolean %define flags. Document %define.
4896 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
4897 b4_percent_code_ifdef): New.
4898 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
4899 * data/c++.m4: Define default value for global_tokens_and_yystype.
4900 * data/glr.cc: Likewise.
4901 * data/location.cc: Use b4_percent_define_flag_if.
4903 * doc/bison.texinfo (Decl Summary): Document %define.
4905 * src/parse-gram.y (Unqualified %code): Change muscle name to
4907 (content.opt): Default to empty.
4909 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
4911 Implement support for relative and absolute skeleton file names.
4912 Discussed starting at
4913 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
4914 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
4915 (Bison Options): Document in --skeleton entry.
4916 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
4917 full_skeleton can't necessarily hold all of pkgdatadir.
4918 If the specified skeleton file name contains a `/', don't prepend
4920 * src/parse-gram.y (prologue_declaration): If the specified skeleton
4921 file name contains a `/', prepend the grammar file directory.
4922 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
4923 * skeletons.at: New file.
4924 (relative skeleton file names): New test case.
4925 (installed skeleton file names): New test case.
4926 * tests/testsuite.at: Include skeletons.at.
4928 * bootstrap: Update copyright to 2007.
4930 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
4932 * bootstrap: Remove occurrences of .#bootmp from the files.
4934 2007-01-17 Akim Demaille <akim@epita.fr>
4936 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
4938 Use per-type %printer.
4940 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
4942 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
4943 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4944 djgpp/config.site, src/files.c, src/files.h, src/main.c,
4945 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
4946 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
4947 tests/glr-regression.at, tests/input.at, tests/local.at,
4948 tests/output.at, tests/torture.at: Update copyright to 2007.
4950 2007-01-16 Akim Demaille <akim@epita.fr>
4952 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
4954 (Calc++ Scanner): Exit with failure if we can't open the input
4956 Accept "-" standing for stdin.
4957 (Calc++ Top Level): Print the result only if the parsing was
4960 2007-01-16 Akim Demaille <akim@epita.fr>
4962 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
4964 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
4965 and Joel E. Denny <jdenny@ces.clemson.edu>
4967 Clean up %define and %code implementation in M4 some. Most
4968 importantly, rename all related macros to be in the b4_percent_define
4969 and b4_percent_code namespaces. Also, complete support for `.' in
4970 %define variable names and %code qualifiers.
4971 * data/bison.m4 (b4_check_user_names): Check for special
4972 "SKELETON-NAMESPACE(name)" macros instead of using two nested
4974 (b4_get_percent_define, b4_get_percent_code): Rename to...
4975 (b4_percent_define_get, b4_percent_code_get): ... these.
4976 Extend documentation with examples.
4977 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
4978 b4_percent_define_skeleton_variables and
4979 b4_percent_code_skeleton_qualifiers.
4980 Expect any value for the %define variable `foo' to be stored in the
4981 macro named `b4_percent_define(foo)'; expect any %code blocks for the
4982 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
4983 expect any unqualified %code blocks to be stored in a macro named
4984 `b4_percent_code_unqualified'.
4985 Use m4_indir so that %define variable names and %code qualifiers can
4986 contain `.', which is allowed by the grammar parser.
4987 (b4_percent_define_default): New macro to set a default value for a
4989 (m4_wrap): Update wrapped code, and fix some underquoting.
4990 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
4991 Expect grammar uses of %define variables and %code qualifiers to be
4992 defined in b4_percent_define_user_variables and
4993 b4_percent_code_user_qualifiers.
4994 * data/c++.m4: Use b4_percent_define_default rather than
4995 m4_define_default. Fix some underquoting. Skeleton usage of %define
4996 variable define_location_comparison now implies skeleton usage of
4997 %define variable filename_type.
4998 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4999 data/push.c, data/yacc.c: Update macro names.
5000 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
5003 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5005 DJGPP specific issues.
5007 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
5008 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
5010 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5012 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
5013 run parsers in all tests so that Valgrind is invoked during
5014 maintainer-check-valgrind.
5015 (Duplicate representation of merged trees): Free all semantic values.
5016 (Duplicated user destructor for lookahead): Likewise.
5018 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5020 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
5021 command-line prefix.
5022 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
5023 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
5024 miss Valgrind messages.
5025 (Exploding the Stack Size with Malloc): Likewise.
5027 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5029 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
5030 locals. Reported by Juan Manuel Guerrero at
5031 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
5032 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
5033 Fix some indentation also.
5034 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
5035 explaining this issue.
5037 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
5038 and Joel E. Denny <jdenny@ces.clemson.edu>
5040 Simplify union and prologue handling, and escape union and lex/parse
5041 params with digraphs.
5042 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
5043 values to the empty string since these are no longer guaranteed
5044 initialized by the front-end.
5045 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
5046 braces around b4_user_stype since this is no longer done by the
5048 * src/files.c, src/files.h (pre_prologue_obstack,
5049 post_prologue_obstack): Remove.
5050 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
5051 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
5052 with digraphs. This fixes lex params and parse params.
5053 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
5054 * src/output.c (prepare): Remove muscle insertion of the prologues.
5055 (output): Remove freeing of pre_prologue_obstack and
5056 post_prologue_obstack.
5057 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
5058 than prologue_augment for prologue parsing so you don't need prologue
5060 (grammar_declaration): For %union RHS, use `braceless' instead of
5061 "{...}" so that braces are already stripped and code is escaped with
5063 * src/reader.c (prologue_augment): Remove.
5064 (reader): Remove initialization of pre_prologue_obstack and
5065 post_prologue_obstack.
5066 * src/reader.h (prologue_augment): Remove.
5068 * data/c.m4: Remove stray parenthesis.
5070 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5072 Remove quotes from variables names in %define directives and from
5073 qualifiers in %code directives, and restrict the characters that are
5074 allowed in them to M4-friendly ones. For %define, continue to support
5075 the quoted form as a deprecated feature. Discussed starting at
5076 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
5077 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
5079 * doc/bison.texinfo (Prologue Alternatives): Update.
5080 (Decl Summary): In %defines entry, update mention of `%code requires'
5081 and `%code provides'.
5082 (C++ Location Values): Update %define uses.
5083 (Calc++ Parser Interface): Likewise.
5084 (Calc++ Parser): Likewise, and update `%code requires' uses.
5085 (Table of Symbols): Update %code documentation.
5086 * src/parse-gram.y (prologue_declaration): For %define variables, use
5087 `variable' instead of `STRING'.
5088 (grammar_declaration): For %code qualifiers, use `ID' instead of
5090 (variable): New nonterminal that takes an `ID' or a `STRING'.
5091 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
5093 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
5094 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
5095 (%define errors): Update %define uses.
5097 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5099 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
5100 instead of muscle_insert for %define values so that M4-special
5101 characters are replaced with digraphs.
5102 * tests/input.at (%define errors): Extend to check weird values.
5104 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5106 Instead of having skeletons declare all valid %define variables and
5107 %code qualifiers, provide macros that retrieve the associated values
5108 and build these lists automatically. Thus Bison will now warn when a
5109 variable or qualifier is not used by the skeleton in the current
5110 invocation regardless of whether it might sometimes be used by that
5111 skeleton in other invocations. Also, move all %define value macros to
5112 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
5113 form, which is replaced by %code.
5114 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
5115 (b4_check_user_names): ... this, and change the series of valid name
5116 arguments to a single list argument for names used in the skeleton
5117 similar to the existing list argument for names used in the grammar.
5118 Warn instead of complaining.
5119 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
5120 values and %code code, to format %code code properly, and to build
5121 lists of all %define variables and %code qualifiers used in the
5122 skeleton: b4_skeleton_percent_define_variables and
5123 b4_skeleton_percent_code_qualifiers.
5124 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
5126 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
5127 the skeleton names lists can finish building first. In place of
5128 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
5129 expect the lists b4_user_percent_define_variables and
5130 b4_user_percent_code_qualifiers.
5131 * data/c++.m4: Where setting default values for b4_parser_class_name,
5132 b4_location_type, b4_filename_type, b4_namespace, and
5133 b4_define_location_comparison, update their names to the
5134 b4_percent_define_ namespace.
5135 * data/glr.c: Don't use b4_check_percent_define_variables and
5136 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
5137 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
5138 (b4_parser_class_name, b4_namespace): Define these using
5139 b4_get_percent_define for parser_class_name and namespace.
5140 * data/location.cc: Use b4_get_percent_define.
5141 * data/push.c: Don't use b4_check_percent_define_variables and
5142 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
5143 * data/yacc.c: Likewise, and don't call m4_exit in
5144 b4_use_push_for_pull_if or m4_wrap code will never execute.
5145 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
5147 (muscle_grow_user_name_list): ... this for consistency with the
5148 terminology used in bison.m4.
5149 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
5150 %define variable names, and rename muscle used_percent_define_variables
5151 to user_percent_define_variables.
5152 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
5153 user_percent_code_qualifiers.
5155 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
5156 {CODE} form is no longer accepted.
5157 * tests/input.at (Reject bad %code qualifiers): Rename to...
5158 (Reject unused %code qualifiers): ... this, and update test output.
5159 (%define error): Update test output.
5161 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
5163 Check for unrecognized %define variables similar to checking for
5164 unrecognized %code qualifiers. Check for redefined %define variables.
5165 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
5167 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
5168 (b4_check_percent_define_variables): New, also wraps it.
5169 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
5170 variables using b4_check_percent_define_variables.
5171 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
5172 all those exercised in the test suite and all those listed in the
5173 `Default values' section of c++.m4. Are there others?
5174 * data/push.c, data/yacc.c: Declare no valid %define variables.
5175 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
5176 similar to muscle_find, but it works even when the muscle stores a
5178 (muscle_grow_used_name_list): New function for constructing the used
5179 name list muscles that b4_check_for_unrecognized_names requires.
5180 * src/parse-gram.y (prologue_declaration): Warn if a variable is
5181 %define'd more than once. Define the b4_used_percent_define_variables
5182 muscle with muscle_grow_used_name_list.
5183 (grammar_declaration): Abbreviate %code code with
5184 muscle_grow_used_name_list.
5185 * tests/input.at (%define errors): New.
5187 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5189 Provide warn_at, complain_at, and fatal_at function callbacks to the
5190 skeletons, and use this for %code qualifier complaints.
5191 * data/bison.m4 (b4_error_at): New, invoked by...
5192 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
5193 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
5194 @fatal_at(...@) directives.
5195 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
5196 qualifiers in b4_used_percent_code_qualifiers and to use
5198 * src/location.c, src/location.h (boundary_set_from_string): New global
5200 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
5202 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
5203 to b4_used_percent_code_qualifiers.
5204 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
5206 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
5207 (lineno): Rename to...
5208 (out_lineno): ... this so I don't misunderstand it again.
5209 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
5210 here; these newlines are in the input but not the output file.
5211 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
5212 (at_directive_perform): ... this new static function, and add handling
5213 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
5215 * tests/input.at (Reject bad %code qualifiers): Update test output with
5216 locations and extend.
5218 * tests/output.at (Output file name: [, Output file name: ]): Remove
5219 bogus comment about these tests failing.
5221 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5223 Clean up b4_check_percent_code_qualifiers a little.
5224 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
5225 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
5226 documentation and add examples.
5227 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
5230 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
5232 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
5233 unreliable -- especially when they're hidden inside another macro.
5234 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
5235 data/c.m4: Remove m4_divert(-1).
5236 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5237 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
5238 m4_divert_push(0) and m4_divert_pop(0).
5239 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
5240 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
5241 pushed and popped by m4sugar, should be first on the stack.
5243 Provide warn, complain, and fatal function callbacks to the skeletons.
5244 This provides more flexibility than m4_fatal, improves the error
5245 message format, and captures messages for translation. Discussed
5247 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
5248 * data/bison.m4 (b4_error): New, invoked by...
5249 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
5250 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
5251 directives. Because these M4 macros might be called when the current
5252 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
5253 the previous removal of uses of m4_divert, which caused trouble.
5254 (b4_check_percent_code_qualifiers): Use b4_complain instead of
5255 m4_fatal to report unrecognized %code qualifiers.
5256 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
5257 push parser requests.
5258 * data/glr.c: Use b4_complain instead of m4_fatal to report
5259 non-deterministic push parser requests.
5260 Update @output usage to @output(...@) form.
5261 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
5262 report missing %defines. Update @output usage to @output(...@) form.
5263 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
5265 * src/main.c (main): Invoke skel_scanner_free.
5266 * src/scan-skel.h (skel_scanner_free): Prototype new function.
5267 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
5268 obstack_for_string from flex-scanner.h.
5269 (YY_DECL): Use to declare skel_lex static.
5270 (decode_at_digraphs): Remove; now handled in the new
5271 SC_AT_DIRECTIVE_ARG start condition.
5272 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
5274 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
5275 at_directive_argv): New static globals.
5276 (INITIAL): Use fail_for_invalid_at.
5277 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
5278 recognize the start of a generalized `@directive(...@)' form and
5280 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
5281 directive args (using the new obstack_for_string), to decode the
5282 contained @ diagraphs, and to perform the directive. It recognizes
5283 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
5285 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
5286 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
5288 (scan_skel): Initialize obstack_for_string on the first call.
5289 (skel_scanner_free): New function to free obstack_for_string.
5290 * tests/input.at (Reject bad %code qualifiers): Update test output.
5292 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
5294 Consolidate the 4 prologue alternative directives (%code, %requires,
5295 %provides, and %code-top) into a single %code directive with an
5296 optional qualifier field. Discussed at
5297 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
5298 * NEWS (2.3a+): Rewrite the existing entry for the prologue
5300 * doc/bison.texinfo (Prologue Alternatives): Update.
5301 (Decl Summary): Update to %code "requires" and %code "provides".
5302 (Calc++ Parser): Update to %code "requires".
5303 (Table of Symbols): Remove entries for %requires, %provides, and
5304 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
5305 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
5306 are replaced by b4_percent_code_provides and b4_percent_code_requires,
5307 which are skeleton-specific.
5308 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
5309 declare what %code qualifiers it supports and to complain if any other
5310 qualifiers were used in the grammar.
5311 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
5312 and b4_user_code([b4_percent_code_provides]) in place of
5313 b4_user_requires and b4_user_provides.
5314 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
5315 Add b4_user_code([b4_percent_code_top]) and
5316 b4_user_code([b4_percent_code]).
5317 Invoke b4_check_percent_code_qualifiers.
5318 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
5319 PERCENT_REQUIRES): Remove.
5320 (grammar_declaration): Remove RHS's for %code-top, %provides, and
5321 %requires. Rewrite the %code RHS as the unqualified form defining the
5322 muscle b4_percent_code. Add another RHS for the qualified %code form,
5323 which defines muscles of the form b4_percent_code_QUALIFIER and the
5324 b4_used_percent_code_qualifiers muscle.
5325 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
5326 PERCENT_REQUIRES): Remove.
5327 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
5328 %code "requires" and %code "provides".
5329 * tests/input.at (Reject bad %code qualifiers): New.
5331 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
5333 Use the new code_props interface for destructors and printers.
5334 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
5335 printer_location members, and change the type of the destructor and
5336 printer members to code_props.
5337 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
5338 symbol_printer_get, semantic_type_destructor_set,
5339 semantic_type_printer_set, default_tagged_destructor_set,
5340 default_tagless_destructor_set, default_tagged_printer_set,
5341 default_tagless_printer_set): Use code_props in arguments and return
5342 types in place of char const * and location.
5343 (symbol_destructor_location_get, symbol_printer_location_get): Remove
5344 since the locations are now contained in the return of
5345 symbol_destructor_get and symbol_printer_get.
5346 * src/output.c (symbol_destructors_output, symbol_printers_output):
5348 (symbol_code_props_output): ... this to eliminate duplicate code.
5349 (output_skeleton): Update to use symbol_code_props_output.
5350 * src/reader.c (symbol_should_be_used): Update use of
5351 symbol_destructor_get.
5352 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
5353 Update uses of the various _destructor_set and _printer_set functions.
5354 * src/symtab.c: (default_tagged_destructor_location,
5355 default_tagless_destructor_location, default_tagged_printer_location,
5356 default_tagless_printer_location): Remove since we...
5357 (default_tagged_destructor, default_tagless_destructor,
5358 default_tagged_printer, default_tagless_printer): ... change the type
5359 of these to code_props.
5360 (symbol_new, semantic_type_new, symbol_destructor_set,
5361 semantic_type_destructor_set, symbol_destructor_get,
5362 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
5363 symbol_check_alias_consistency, default_tagged_destructor_set,
5364 default_tagless_destructor_set, default_tagged_printer_set,
5365 default_tagless_printer_set): Update.
5366 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
5367 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
5369 (symbol_print): Use SYMBOL_CODE_PRINT.
5371 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
5373 Use the new code_props interface for rule actions.
5374 * src/symlist.h (symbol_list): Replace action, action_location, and
5375 used members with a code_props action_props member.
5376 * src/reader.c (symbol_should_be_used, grammar_rule_check,
5377 grammar_midrule_action, grammar_current_rule_merge_set,
5378 grammar_current_rule_symbol_append, packgram): Update.
5379 * src/scan-code.h (translate_rule_action): Remove, no longer used.
5380 * src/scan-code.l (handle_action_dollar): Update.
5381 (translate_rule_action): Remove, no longer used.
5382 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
5384 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5386 Use the new code_props interface in parse-gram.y.
5387 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
5388 Update all uses of translate_* functions to use the new code_props
5389 interface and to use gram_scanner_last_string_free and
5390 code_scanner_last_string_free where possible.
5391 (grammar_declaration): symbol_list_destructor_set and
5392 symbol_list_printer_set now perform the translation, so don't do it
5393 here. Use gram_scanner_last_string_free where possible.
5394 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
5395 translate_code): Remove, no longer used.
5396 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
5397 symbol_list_printer_set): Perform code translation here rather than
5398 depending on the caller to do so.
5400 * src/symlist.h (struct symbol_list): Correct some documentation typos.
5401 * src/scan-gram.h (gram_last_string): Remove declaration.
5402 * src/scan-gram.l (last_string): Declare it static.
5404 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5406 Encapsulate code properties and related functionality for the various
5407 destructors, printers, and actions into a code_props structure and
5408 interface. This patch merely implements code_props in scan-code.h and
5409 scan-code.l. Future patches will rewrite other modules to use it.
5410 Discussed starting at
5411 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
5412 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
5413 consistently initialize const structs that have an empty location
5415 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
5416 to ensure consistency.
5417 * src/scan-code.h (code_props): New structure.
5418 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
5419 function, macro, and const global variable for initializing a
5420 code_props with no code.
5421 (code_props_plain_init, code_props_symbol_action_init,
5422 code_props_rule_action_init, code_props_translate_code): The rest of
5423 the new code_props functional interface. Among other things, the init
5424 functions set the code_props kind field so that
5425 code_props_translate_code will know whether to behave like
5426 translate_symbol_action, translate_rule_action, or translate_code.
5427 These old translate functions must remain until all other modules are
5428 updated to use the new code_props interface.
5429 (code_scanner_last_string_free): New function similar to
5430 gram_scanner_last_string_free.
5431 (code_scanner_free): Add documentation.
5432 * src/scan-code.l: Implement the new interface.
5433 (code_lex): Make it static, add a code_props* argument, and remove the
5435 (last_string): New static global similar to the one in scan-gram.l.
5436 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
5438 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
5439 code_props since Bison may one day use this information for destructors
5441 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
5442 (handle_action_dollar): Use symbol_list_n_get and set used flag
5443 directly since symbol_list_n_used_set is removed.
5444 (translate_action): Add a code_props* argument and remove the rule,
5445 action, and location arguments. Pass the code_props* on to code_lex.
5446 (translate_rule_action, translate_symbol_action, translate_code):
5447 Rewrite as wrappers around the new code_props interface.
5448 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
5449 it would eventually need to break the encapsulation of code_props.
5451 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5453 * etc/.cvsignore: New.
5455 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
5457 Add maintainer-push-check to run maintainer-check using push parsing in
5458 place of pull parsing where available.
5459 * Makefile.am (maintainer-push-check): New.
5460 * data/bison.m4 (b4_use_push_for_pull_if): New.
5461 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
5462 appropriately based on their existing values.
5463 (yypush_parse): Don't print push-parser-specific diagnostics if push
5464 parsing is being used in place of pull parsing.
5465 * data/yacc.c: If push parsing should replace pull parsing, redirect to
5467 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
5468 variable, and insert b4_use_push_for_pull_flag into muscles.
5469 * tests/Makefile.am (maintainer-push-check): New.
5471 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5473 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
5474 (whether successful or failed) so that yypush_parse can be invoked
5475 again to start a new parse using the same yypstate.
5476 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
5477 check multiple yypull_parse invocations on the same yypstate. For pull
5478 mode, extend to check multiple yyparse invocations.
5479 (Exploding the Stack Size with Alloca): Extend to try with
5481 (Exploding the Stack Size with Malloc): Likewise.
5483 * tests/calc.at (Simple LALR Calculator): Don't specify
5484 %skeleton "push.c" since %push-pull-parser implies that now.
5485 * tests/headers.at (export YYLTYPE): Don't check for the push
5486 declarations. Otherwise, this test case can't be used to see if push
5487 mode can truly emulate pull mode.
5488 * tests/input.at (Torturing the Scanner): Likewise.
5489 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
5490 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
5491 AT_YACC_IF, which now includes the case of push mode since %skeleton
5492 need not be used for push mode. This will be more intuitive once
5493 push.c is renamed to yacc.c.
5495 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
5497 For push mode, convert yyparse from a macro to a function, invoke yylex
5498 instead of passing a yylexp argument to yypull_parse, and don't
5499 generate yypull_parse or yyparse unless %push-pull-parser is declared.
5500 Discussed starting at
5501 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
5502 * data/bison.m4 (b4_pull_if): New.
5503 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
5504 * data/push.c: Improve M4 quoting a little.
5505 (b4_generate_macro_args, b4_parenthesize): Remove.
5506 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
5507 any time a pull parser is requested.
5508 Don't #define this as a wrapper around yypull_parse. Instead, when
5509 both push and pull are requested, make it a function that does that
5511 (yypull_parse): If there's a b4_prefix, #define this to
5512 b4_prefix[pull_parse] when both push and pull are requested.
5513 Don't define this as a function unless both push and pull are
5515 Remove the yylexp argument and hard-code yylex invocation instead.
5516 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
5518 * src/getargs.c (pull_parser): New global initialized to true.
5519 * getargs.h (pull_parser): extern it.
5520 * src/output.c (prepare): Insert pull_flag muscle.
5521 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
5522 (prologue_declaration): Set both push_parser and pull_parser = true for
5523 %push-pull-parser. Set push_parser = true and pull_parser = false for
5525 * src/scan-gram.l: Don't accept %push_parser as an alternative to
5526 %push-parser since there's no backward-compatibility concern here.
5527 Scan %push-pull-parser.
5528 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
5529 instead of %push-parser.
5530 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
5531 prototype it in the module that calls yyparse.
5532 * tests/input.at (Torturing the Scanner): Likewise.
5533 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
5535 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
5537 Update etc/bench.pl. Optimize push mode a little (the yyn change
5538 deserves most of the credit).
5539 * Makefile.am (SUBDIRS): Add etc subdirectory.
5540 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
5541 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
5542 yytoken, yyval, and yyloc declarations to...
5543 (yyparse or yypush_parse): ... here to improve performance. For
5544 yypush_parse invocations after the first, be sure to assign yyn its old
5546 (yypstate_new): Don't bother initializing the yyresult field since the
5547 initial value isn't used.
5548 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
5549 remove the #define that, in push mode, set it to yyps->NAME.
5550 * etc/Makefile.am: New.
5551 * etc/bench.pl: Remove and build it instead from...
5552 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
5553 "tests/bison" from the build directory by default rather than just
5554 invoking "bison" from $PATH.
5555 (calc_grammar): Update push parser code: don't declare yylval globally,
5556 don't define yyparse_wrapper, and don't #define yyparse.
5557 (bench_grammar): Update to check all working combinations of yacc.c,
5558 push.c, impure, pure, pull, and push.
5560 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
5562 For push mode, add pull wrappers around yypush_parse.
5563 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
5564 (yypull_parse): New function wrapping yypush_parse.
5565 (yyparse): New #define wrapping yypull_parse.
5566 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
5568 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
5569 prototype yylex in the module that calls yyparse, and don't prototype
5570 yyparse there. Otherwise, the yyparse expansion won't compile.
5571 * tests/input.at (Torturing the Scanner): Likewise.
5573 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
5575 Enable push parsers to operate in impure mode. Thus, %push-parser no
5576 longer implies %pure-parser. The point of this change is to move
5577 towards being able to test the push parser code by running the entire
5578 test suite as if %push-parser had been declared.
5579 * data/push.c (yypush_parse): For impure mode, remove the
5580 yypushed_char, yypushed_val, and yypushed_loc arguments.
5581 Instead, declare these as local variables initialized to the global
5582 yychar, yylval, and yylloc.
5583 For the first yypush_parse invocation only, restore the initial values
5584 of these global variables when it's time to read a token since they
5585 have been overwritten.
5586 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
5588 * tests/calc.at (Simple LALR(1) Calculator): Always declare
5589 %pure-parser along with %push-parser since this test case was designed
5590 for pure push parsers.
5591 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
5592 (AT_YACC_OR_PUSH_IF): New.
5593 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
5594 add a note that it's still wrong for some cases (as it has been for a
5596 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
5597 %push-parser no longer implies %pure-parser.
5599 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5601 Remove some unnecessary differences between the pull parser code and
5602 the push parser code. This patch enables yynerrs in push mode.
5603 * data/push.c: Reformat M4 a little.
5604 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
5605 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
5606 because push mode is on. Instead, if pure mode is on, move yynerrs
5608 (b4_declare_parser_state_variables): ... here.
5609 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
5610 to yyps->NAME so it can be used in yypush_parse.
5611 (yypush_parse): Don't omit uses of yynerrs in push mode.
5613 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5615 Fix bug such that the first pushed token's value and location are
5616 sometimes overwritten (sometimes by %initial-action) before being used.
5617 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
5618 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
5619 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
5620 more closely mimic the pull parser logic.
5621 Don't copy the pushed token to yychar, yylval, and yylloc until it's
5622 time to read a token, which is after any initialization of yylval and
5624 (gottoken): Rename label to...
5625 (yyread_pushed_token): ... for clarity and to avoid infringing on the
5628 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5630 Rearrange initialization of the parser state variables so that the
5631 skeleton doesn't have to have a copy for pull mode and another for push
5632 mode. This patch also fixes at least a bug such that yylloc was not
5633 initialized (with b4_location_initial_line and
5634 b4_location_initial_column) upon calling yypush_parse. However, that
5635 initialization now overwrites the first token's location;
5636 %initial-action assigning @$ already did the same thing, and both bugs
5637 will be fixed in a later patch.
5638 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
5639 (b4_declare_parser_state_variables): Remove initialization of yytoken,
5640 yyss, yyvs, yyls, and yystacksize.
5641 (yypstate_new): Remove initialization of some yypstate fields: yystate,
5642 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
5644 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
5645 yyps->NAME so it can be used in yypush_parse.
5646 (yyparse or yypush_parse): For yypush_parse, don't print the
5647 "Starting parse" diagnostic for invocations after the first.
5648 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
5649 yypush_parse, only do it for the first invocation.
5650 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
5651 initialization to occur in yypush_parse but only on the first
5654 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5656 * data/push.c: Add CPP guards around push parser declarations in both
5657 the header and the code file.
5658 In the code file, move the push parser declarations to the same place
5659 they appear in the header file.
5660 Clean up the M4 some, especially the inconsistent underquoting in
5661 some b4_c_function_def and b4_c_function_decl uses.
5663 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5665 Encapsulate the push parser state variables into an M4 macro so the
5666 push skeleton doesn't have to list them again for pull mode's yyparse.
5667 For push mode, remove yypush_parse's local equivalents of these
5668 variables to eliminate unnecessary copying between the two sets at
5669 run-time. This patch also fixes at least a bug related to multiple
5670 %initial-action invocations in push mode.
5671 * data/push.c (b4_declare_parser_variables): Rename to...
5672 (b4_declare_scanner_communication_variables): ... this for clarity and
5674 (b4_declare_yyparse_variables): Remove and move its contents to the one
5675 spot where it was invoked.
5676 (b4_declare_parser_state_variables): New macro containing the parser
5677 state variables required by push mode.
5678 (struct yypstate): Replace all fields but yynew with
5679 b4_declare_parser_state_variables.
5680 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
5681 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
5682 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
5683 (yyparse or yypush_parse): For yyparse in pull mode, replace local
5684 parser state variable declarations with
5685 b4_declare_parser_state_variables.
5686 Don't initialize parser state variables when calling yypush_parse since
5687 yypstate_new already does that.
5688 Invoke the user's initial action only upon the first yypush_parse
5690 Remove all code that copies between the local parser state variables
5693 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5695 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
5696 prevent a name collision in a future patch where these names will
5697 sometimes be #define'd.
5698 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
5699 since it no longer has the same name as the existing argument.
5700 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
5702 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
5703 and Joel E. Denny <jdenny@ces.clemson.edu>
5705 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
5706 that the argument is case-insensitive, and there's no `=' here.
5707 For the %skeleton entry, mention that %language is better.
5708 (Bison Options): Likewise for --language and --skeleton. Move the
5709 --skeleton entry so that the `Tuning the parser' section is sorted
5710 alphabetically on long options.
5711 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
5712 %language directive in detail here; cross-reference the %language
5713 documentation instead.
5714 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
5715 `%require "2.3b"' so that the example is always up-to-date.
5716 (Table of Symbols): Add entries for %language and %skeleton.
5717 * examples/extexi (normalize): Instead of replacing every %require
5718 argument with the current Bison version, just substitute for
5719 `@value{VERSION}'. This guarantees that we're testing what actually
5720 appears in the documentation.
5721 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
5722 rather than `@VERSION@'.
5724 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
5726 * NEWS: Reword the %language news a bit, and put it earlier.
5728 * src/getargs.c (skeleton_arg): Last arg is now location const *.
5729 Rewrite to simplify the logic.
5730 (language_argmatch): Likewise.
5731 (program_name): We now own this var.
5732 * src/getargs.h (struct bison_language): Use char[] rather than
5735 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
5737 * src/complain.c (program_name): Remove decl; no longer needed.
5738 * src/main.c (program_name): Remove; now belongs to getargs.
5740 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
5742 * NEWS: Document %language.
5744 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
5746 * data/c-skel.m4, data/c++-skel.m4: New files.
5747 * data/glr.c: Complain on push parsers.
5749 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
5751 (Decl Summary): Document %language and %skeleton.
5752 (Command line): Document -L.
5754 * examples/extexi: Rewrite %require directive.
5755 * examples/calc++/Makefile.am: Pass VERSION to extexi.
5757 * src/files.c (compute_exts_from_gc): Look in language structure
5759 (compute_file_name_parts): Check whether .tab should be added.
5760 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
5761 (language, skeleton_arg, language_argmatch): New.
5762 (long_options): Add --language.
5763 (getargs): Use skeleton_arg, add -L/--language.
5764 * src/getargs.h: Include location.h.
5765 (struct bison_language, language, skeleton_arg, language_argmatch): New.
5766 * src/output.c (prepare): Pick default skeleton from struct language.
5767 Don't dispatch C skeletons here.
5768 * src/parse-gram.y (PERCENT_LANGUAGE): New.
5769 (prologue_declaration): Add "%language" rule, use skeleton_arg.
5770 * src/scan-gram.l ("%language"): New rule.
5772 * tests/calc.at: Test %skeleton and %language.
5773 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
5774 (AT_GLR_IF): Look for %skeleton "glr.cc".
5775 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
5776 (AT_YACC_IF): Reject %language.
5778 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
5780 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
5781 since it wasn't used; only the typedef name 'semantic_type' is needed.
5782 Also, omit trailing white space.
5784 * bootstrap: Sync from coreutils.
5785 (gnulib_extra_files): Add build-aux/announce.gen.
5786 (slurp): Adjust .gitignore files like .cvsignore files.
5787 * build-aux/announce-gen: Remove from CVS, since bootstrap
5790 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
5792 Make %push-parser imply %pure-parser. This fixes several bugs; see
5793 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
5794 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
5796 * data/push.c: Don't bother testing b4_push_if when deciding whether
5797 to expand b4_declare_parser_variables globally.
5798 (yypush_parse): Likewise in here.
5800 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
5801 (yy_reduce_print): Reformat M4 for readability.
5803 2006-12-15 Bob Rossi <bob@brasko.net>
5804 and Joel Denny <jdenny@ces.clemson.edu>
5806 * data/push.c (yypstate): Add typedef, and update all uses of
5807 struct yypstate to just yypstate.
5808 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
5810 2006-12-14 Bob Rossi <bob@brasko.net>
5812 * data/push.c (yypush_parse): Declare prototype regardless of
5815 2006-12-14 Bob Rossi <bob@brasko.net>
5817 * data/push.c (yyparse): Remove the prototype and the #define when in
5820 2006-12-13 Bob Rossi <bob@brasko.net>
5822 * data/push.c (yypstate_init): Rename to...
5823 (yypstate_new): ... this and use b4_c_function_def.
5824 (yypstate_delete): New.
5825 (yypush_parse): Change parameters yynval and yynlloc to be const.
5826 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
5827 yypstate_delete functions.
5829 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
5831 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
5832 strange test case titles. Reported by Bob Rossi.
5834 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
5836 * TODO: Add pointer to Sylvain Schmitz's work on static detection
5837 of potential ambiguities in GLR grammers.
5839 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
5841 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
5842 `bison ', use m4_index instead of m4_substr since chopping up a string
5843 containing M4-special characters causes problems here.
5845 Fix a couple of bugs related to special characters in user-specified
5846 file names, and make it easier for skeletons to compute output file
5847 names with the same file name prefix as Bison-computed output file
5849 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
5850 b4_parser_file_name and b4_spec_defines_file instead of
5851 @output_parser_name@ and @output_header_name@, which are now redundant.
5852 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
5853 b4_parser_file_name, b4_spec_defines_file, and the new
5854 @basename(FILENAME@) instead of @output_parser_name@ and
5855 @output_header_name@, which inappropriately escaped the file names as
5857 * src/files.c (all_but_ext): Remove static qualifier.
5858 (compute_output_file_names): Move `free (all_but_ext)' to...
5859 (output_file_names_free): ... here since all_but_ext is needed later.
5860 * src/files.h (all_but_ext): Extern.
5861 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
5862 exactly what MUSCLE_INSERT_STRING used to do.
5863 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
5864 characters are escaped properly.
5865 * src/output.c (prepare): Define muscle file_name_all_but_ext as
5867 For pkgdatadir muscle, maintain previous functionality by using
5868 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
5869 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
5870 digraphs would never be expanded. Hopefully no one has M4-special
5871 characters in his Bison installation path.
5872 * src/scan-skel.l: Don't parse @output_header_name@ and
5873 @output_parser_name@ anymore since they're now redundant.
5874 In @output, use decode_at_digraphs.
5875 Parse a new @basename command that invokes last_component.
5876 (decode_at_digraphs): New.
5877 (BASE_QPUTS): Remove unused.
5878 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
5879 (Output file name): New tests.
5881 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
5883 Warn about output files that are generated by the skeletons and that
5884 conflict with other output files.
5885 * data/glr.c: Don't generate the header file here when glr.cc does.
5886 * src/files.c (file_names, file_names_count): New static globals.
5887 (compute_output_file_names): Invoke output_file_name_check for files
5888 not generated by the skeletons and remove existing checks.
5889 (output_file_name_check): New function that warns about conflicting
5891 (output_file_names_free): Free file_names.
5892 * src/files.h (output_file_name_check): Declare.
5893 * src/scan-skel.l: Invoke output_file_name_check for files generated by
5895 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
5896 (Conflicting output files): New tests.
5898 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5900 * doc/bison.texinfo: Fix a couple of typos.
5902 2006-12-08 Bob Rossi <bob@brasko.net>
5904 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
5906 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
5908 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
5909 (yypush_parse): Rename yypvars argument to yyps and remove redundant
5911 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
5912 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
5914 2006-12-07 Bob Rossi <bob@brasko.net>
5915 and Joel Denny <jdenny@ces.clemson.edu>
5917 * data/push.c (yypvarsinit): Change return type from void* to struct
5918 yypvars*. No longer cast to void* on return.
5919 (struct yypvars): Remove yylen since it need not be remembered between
5920 yypushparse invocations.
5921 (yypushparse): Don't copy between yylen and pv->yylen.
5923 2006-12-05 Bob Rossi <bob@brasko.net>
5925 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
5926 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
5927 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
5928 (struct yypvars): Remove b4_declare_parser_variables.
5929 (yypvarsinit): Remove init code for removed variables.
5930 (global scope): Do not declare b4_declare_parser_variables if
5932 (yypushparse): Add b4_declare_parser_variables.
5933 Init new local variables, and remove init code for removed
5936 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
5937 and yyparse for other modes.
5938 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
5939 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
5940 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
5941 (AT_PURE_LEX_IF): True if pure or push parser.
5943 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
5945 Document Yacc prologue alternatives and default %destructor's and
5946 %printer's as experimental. Don't mention Java yet. Discussed at
5947 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
5948 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
5949 (2.3a): Annotate this entry to say the old forms of these features were
5951 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
5952 Table of Symbols): Say they're experimental. Comment out any mention
5953 of Java (we'll want this back eventually).
5955 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
5957 Support a file name argument to %defines. Deprecate `=' in
5958 %file-prefix, %name-prefix, and %output. Discussed at
5959 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
5960 * NEWS (2.3a+): Mention.
5961 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
5962 form of %defines, and remove `=' from entries for %file-prefix,
5963 %name-prefix, and %output.
5964 * src/parse-gram.y (prologue_declaration): Implement.
5965 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
5966 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
5967 all but one occurrence of %name-prefix.
5968 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
5969 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
5970 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
5971 occurrence of each of %file-prefix and %output. Add check for %defines
5973 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
5974 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
5975 Remove the `=' from %output.
5977 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
5979 Don't escape $ in test case titles since Autoconf 2.61 now does that
5981 * tests/actions.at (Default %printer and %destructor are not for error
5982 or $undefined): Here.
5983 (Default %printer and %destructor are not for $accept): Here.
5984 * tests/input.at (Invalid $n and @n): Here.
5986 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
5988 Rename <!> to <>. Discussed starting at
5989 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
5990 * NEWS (2.3a+): Update.
5991 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
5993 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
5994 * src/scan-gram.l (INITIAL): Implement.
5995 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
5996 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
5998 * tests/actions.at (Default tagless %printer and %destructor,
5999 Default tagged and per-type %printer and %destructor,
6000 Default %printer and %destructor are not for error or $undefined,
6001 Default %printer and %destructor are not for $accept,
6002 Default %printer and %destructor for mid-rule values): Update.
6003 * tests/input.at (Default %printer and %destructor redeclared,
6004 Unused values with default %destructor): Update.
6006 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
6008 Don't let %prec take a nonterminal.
6009 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
6011 * tests/input.at (%prec takes a token): New test checking that %prec
6012 won't take a nonterminal.
6014 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6016 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
6017 it was double-quoted.
6018 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
6019 grammar is maintained with Bison's highest standards.
6020 * src/getargs.c: Fix some typos in Doxygen comments.
6022 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6024 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
6025 later. Reported by Paul Eggert in
6026 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
6027 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
6028 * src/scan-code.l (translate_action): Don't bother invoking
6029 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
6030 (code_scanner_free): Instead of invoking
6031 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
6033 * src/scan-gram.l (gram_scanner_free): Likewise.
6034 * src/scan-skel.l (scan_skel): Likewise.
6036 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
6038 * src/files.c (tr): Change return type to void.
6039 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
6040 has been called previously for the same key.
6041 (muscle_find): Return storage instead of value so that
6042 --enable-gcc-warnings doesn't produce warnings that the return discards
6043 const. aver that the value and storage are the same since storage
6044 could potentially be NULL when value is not.
6045 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
6048 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
6050 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
6051 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
6052 us a slightly cleaner distribution, and also works.
6053 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
6056 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
6057 and Paul Eggert <eggert@cs.ucla.edu>
6059 Don't let Bison leak memory except when it complains.
6060 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
6061 (spec_defines_file, dir_prefix): Now char *, not const char *,
6062 since they are freed.
6063 * src/files.c: Likewise.
6064 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
6066 (tr): Now operates in-place. All uses changed.
6067 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
6069 (compute_file_name_parts, compute_output_file_names): Don't store
6070 read-only data in variables that will be freed.
6071 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
6072 src_extension, and header_extension.
6073 (output_file_names_free): New public function to free
6074 spec_verbose_file, spec_graph_file, spec_defines_file,
6075 parser_file_name, and dir_prefix.
6076 * src/getargs.c (getargs): Don't store read-only data in variables that
6078 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
6079 (which previously existed but was unused), and quotearg_free.
6080 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
6081 * src/muscle_tab.c: Likewise.
6082 (muscle_entry): Make the value char const *,
6083 and add a new storage member that is char * and can be freed.
6084 (muscle_entry_free): New private function.
6085 (muscle_init): Use it instead of free.
6086 (muscle_insert, muscle_grow): Update and use new storage member.
6087 (muscle_code_grow): Free the string passed to muscle_grow
6088 since it's not needed anymore.
6089 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
6090 add a new `char *code' member.
6091 ("{...}"): Declare semantic type as code.
6092 * src/scan-code.h (translate_rule_action):
6093 (translate_symbol_action, translate_code, translate_action): Return
6094 `char const *' rather than `char *' since external code should not free
6096 * src/scan-code.l: Likewise.
6097 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
6098 which is "{...}" in the parser.
6099 * tests/Makefile.am (maintainer-check-valgrind): Set
6100 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
6102 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
6104 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
6105 expecting a non-zero exit status sets --leak-check=summary and
6106 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
6107 this case, and we don't want to hear about it.
6109 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
6111 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
6112 instead of from the template, to simplify configuration a bit.
6113 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
6114 and m4/wint_t.m4, as they are needed with the latest gnulib.
6116 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6118 Disable unset/unused mid-rule value warnings by default, and recognize
6119 --warnings=midrule-values to enable them. Discussed starting at
6120 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
6121 * NEWS (2.3a+): Mention.
6122 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
6123 warnings): Add entry for midrule-values subargument.
6124 * src/reader.c (symbol_should_be_used): Don't return true just because
6125 the value is a set/used mid-rule value unless
6126 --warnings=midrule-values was specified.
6127 * tests/input.at (Unused values, Unused values before symbol
6128 declarations): Run tests with and without --warnings=midrule-values.
6130 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
6131 than LIST_FREE directly.
6133 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6135 Finish implementing --warnings=error, which should not be implied by
6136 --warnings=all (or by its synonyms -W and --warnings without
6138 * src/complain.c (set_warning_issued): New function to report that
6139 warnings are being treated as errors and to record an error if so.
6141 (warn_at, warn): ... here.
6142 * src/getargs.c (warnings_args, warnings_types): Reorder so that
6143 "error - warnings are errors" does not appear above "all - all of the
6145 (getargs): For -W and --warnings without subarguments, don't let
6146 FLAGS_ARGMATCH set warnings_error in warnings_flag.
6147 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
6149 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
6151 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
6152 empty subargument list. For example: `bison --warnings= parser.y'.
6154 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6156 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
6157 the parser header file so that gcc doesn't warn.
6159 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6161 Split the default %destructor/%printer into two kinds: <*> and <!>.
6162 Discussed starting at
6163 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
6164 * NEWS (2.3a+): Mention.
6165 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
6166 previous change today related to mid-rules.
6167 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
6168 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
6169 (TYPE_TAG_ANY): Add as <*>.
6170 (TYPE_TAG_NONE): Add as <!>.
6171 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
6173 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
6174 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
6175 * src/symlist.c (symbol_list_default_new): Split into tagged and
6177 (symbol_list_destructor_set, symbol_list_printer_set): Split
6178 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
6179 SYMLIST_DEFAULT_TAGLESS.
6180 * src/symlist.h: Update symbol_list_default*_new prototypes.
6181 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
6182 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
6183 * src/symtab.c (default_destructor, default_destructor_location,
6184 default_printer, default_printer_location): Split each into tagged and
6186 (symbol_destructor_get, symbol_destructor_location_get,
6187 symbol_printer_get, symbol_printer_location_get): Implement tagged
6188 default and tagless default cases.
6189 (default_destructor_set, default_printer_set): Split each into tagged
6190 and tagless versions.
6191 * src/symtab.h: Update prototypes.
6192 * tests/actions.at (Default %printer and %destructor): Rename to...
6193 (Default tagless %printer and %destructor): ... this, and extend.
6194 (Per-type %printer and %destructor): Rename to...
6195 (Default tagged and per-type %printer and %destructor): ... this, and
6197 (Default %printer and %destructor for user-defined end token): Extend.
6198 (Default %printer and %destructor are not for error or $undefined):
6200 (Default %printer and %destructor are not for $accept): Update.
6201 (Default %printer and %destructor for mid-rule values): Extend.
6202 * tests/input.at (Default %printer and %destructor redeclared): Extend.
6203 (Unused values with default %destructor): Extend.
6205 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
6207 Don't apply the default %destructor/%printer to an unreferenced midrule
6209 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
6210 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
6211 like $@n instead of just @n so that the default %destructor/%printer
6212 logic doesn't see them as user-defined symbols.
6213 (symbol_is_dummy): Check for both forms of the name.
6214 * src/reader.c (packgram): Remove the `$' from each midrule symbol
6215 name for which the midrule value is referenced in any action.
6216 * tests/actions.at (Default %printer and %destructor for mid-rule
6218 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
6219 for change to dummy symbol names.
6221 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
6223 Warn about unset midrule $$ if the corresponding $n is used.
6224 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
6226 (packgram): Before invoking grammar_rule_check on any rule, make sure
6227 all actions have already been scanned in order to set `used' flags.
6228 Otherwise, checking that a midrule's $$ is set will not always work
6229 properly because the midrule check must forward-reference the midrule's
6231 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
6234 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
6236 More improvements to the documentation of the prologue alternatives:
6237 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
6239 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
6240 some text to clarify the relative importance of the new directives and
6241 to show how these directives may be viewed as code labels.
6243 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
6245 Similar to the recently removed %before-header, add %code-top as the
6246 alternative to the pre-prologue. Mentioned at
6247 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
6248 Also, let the prologue alternatives appear in the grammar section.
6249 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
6250 (prologue_declaration): Move the existing prologue alternatives to...
6251 (grammar_declaration): ... here and add %code-top.
6252 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
6254 Clean up and extend documentation for the prologue alternatives.
6255 * NEWS (2.3a+): Describe prologue alternatives.
6256 * doc/bison.texinfo (Prologue): Move discussion of prologue
6258 (Prologue Alternatives): ... this new section, and extend it to discuss
6259 all 4 directives in detail.
6260 (Table of Symbols): Clean up discussion of prologue alternatives and
6263 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6265 DJGPP specific issues.
6267 * djgpp/config.bat: config.hin has been moved to lib. Adjust
6268 config.bat accordingly.
6269 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
6270 * djgpp/config.site: Likewise.
6272 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
6274 Replace %*-header with %provides, %requires, %code. See discussion at
6275 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
6277 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
6278 (b4_user_start_header): Remove.
6279 * data/glr.c: Use new macros instead of b4_*start_header
6281 * data/glr.cc: Likewise.
6282 * data/lalr1.cc: Likewise.
6283 * data/push.c: Likewise.
6284 * data/yacc.c: Likewise.
6286 * doc/bison.texinfo: Remove %before-header, rename
6287 %{start,end,after}-header to %requires, %provides, %code.
6289 * src/parse-gram.y: Likewise (also rename token names accordingly).
6290 * src/scan-gram.l: Likewise.
6291 * tests/actions.at: Likewise.
6293 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
6295 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
6296 Problem reported by Joel E. Denny.
6298 2006-10-14 Jim Meyering <jim@meyering.net>
6300 (Sync from coreutils.)
6301 Work also when the working directory (with e.g. coreutils sources)
6302 is version controlled with git, rather than CVS.
6303 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
6305 In messages and comments, say e.g., "checked-out sources",
6306 rather than "CVS sources".
6307 (version_controlled_file): New function. Work for git as well as
6308 for CVS. Don't use grep's -q option.
6309 (slurp): Call it here, in place of CVS-specific code.
6311 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
6313 Fix testsuite for ./configure --enable-gcc-warnings:
6314 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
6315 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
6316 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
6317 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
6318 * test/regression.at (Diagnostic that expects two alternatives):
6321 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
6323 * bootstrap.conf (gnulib_modules): Add config-h.
6324 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
6325 worry about HAVE_CONFIG_H.
6326 * lib/abitset.c: Likewise.
6327 * lib/bitset.c: Likewise.
6328 * lib/bitset_stats.c: Likewise.
6329 * lib/bitsetv-print.c: Likewise.
6330 * lib/bitsetv.c: Likewise.
6331 * lib/ebitset.c: Likewise.
6332 * lib/get-errno.c: Likewise.
6333 * lib/lbitset.c: Likewise.
6334 * lib/subpipe.c: Likewise.
6335 * lib/timevar.c: Likewise.
6336 * lib/vbitset.c: Likewise.
6337 * lib/bitset.c: Include "bitset.h" first, to test interface.
6338 * lib/bitset_stats.c: Include "bitset_stats.h" first.
6339 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
6340 * lib/bitsetv.c: Include "bitsetv.h" first.
6341 * lib/get-errno.c: Include "get-errno.h" first.
6342 * m4/.cvsignore: Add config-h.m4.
6343 * tests/actions.at (Default %printer and %destructor for ...):
6344 Adjust expected line numbers in output to reflect removal of #if
6345 HAVE_CONFIG_H lines.
6346 * tests/glr-regression.at (Missed %merge type warnings when ...):
6348 * tests/regression.at (Braced code in declaration in rules section):
6350 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
6351 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
6352 Include <config.h> unconditionally.
6354 * bootstrap: Sync from coreutils, as follows:
6356 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
6358 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
6359 variable was sometimes used without being initialized. This
6360 messed up the installation of the INSTALL file in some cases.
6362 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
6364 * bootstrap (usage, main program, symlink_to_gnulib): Add option
6365 --copy. Inspired by a suggestion from Bruno Haible.
6367 2006-10-03 Jim Meyering <jim@meyering.net>
6369 * bootstrap: Undo last change to this file, since now gnulib-tool
6370 sticks with the automake default in generating dependencies.
6372 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
6374 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
6375 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
6377 * doc/bison.1: Add copyright notice.
6379 * data/glr.c: Don't include <stdarg.h>; not used.
6381 * NEWS: The -g and --graph options now output graphs in Graphviz
6382 DOT format, not VCG format.
6383 * doc/bison.1: Likewise.
6384 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
6385 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
6387 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
6388 * TODO: Remove Graphviz entry.
6389 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
6390 remove vcg.c, vcg.h, vcg_defaults.h.
6391 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
6392 * src/graphviz.c, src/graphviz.h: New files.
6393 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
6394 * src/files.h: Make comment more generic.
6395 * src/main.c (main): Likewise.
6396 * src/print_graph.h: Likewise.
6397 * src/getargs.c (usage): Make usage description more generic.
6398 * src/print_graph.c: Include graphviz.h rather than vcg.h.
6399 (static_graph, fgraph): Remove. All uses changed to pass
6400 arguments instead of sharing a static var.
6401 (print_core, print_actions, print_state, print_graph):
6402 Output graphviz format rather than VCG format.
6403 * tests/.cvsignore: Remove *.vcg; add *.dot.
6404 * tests/output.at: Expect *.dot files, not *.vcg files.
6406 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
6407 accommodates the 2006-10-08 change.
6409 2006-10-11 Bob Rossi <bob@brasko.net>
6411 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
6412 (b4_yyssa, b4_yyerror_range): New macros.
6413 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
6414 (yypvarsinit): Remove init of removed fields.
6415 (yypushparse): Remove use of removed fields; use new macros instead.
6417 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
6419 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
6420 in a push parser. Reindent slightly to match yacc.c better.
6422 2006-10-11 Bob Rossi <bob@brasko.net>
6424 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
6426 (yypvarsinit, yypushparse): Remove init of removed fields.
6427 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
6429 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
6431 * THANKS: Add Paolo Bonzini and Bob Rossi.
6433 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
6435 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
6436 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
6437 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
6438 b4_define_user_cde and uses): Remove.
6439 (b4_comment, b4_prefix, b4_sync_start): New.
6440 * data/bison.m4: New file, with most of the content removed from c.m4.
6441 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
6442 * src/output.c (output_skeleton): Pass bison.m4.
6443 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
6446 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
6448 Fix test failure reported by Tom Lane in
6449 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
6450 and try to make such failures easier to catch in the future.
6451 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
6452 that's now the caller's responsibility.
6453 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
6454 Set yychar = YYEOF if it's negative.
6455 * tests/actions.at (yylex): Abort if asked to read past EOF.
6456 * tests/conflicts.at (yylex): Likewise.
6457 * tests/cxx-type.at (yylex): Likewise.
6458 * tests/glr-regression.at (yylex): Likewise.
6459 * tests/input.at (yylex): Likewise.
6460 * tests/regression.at (yylex): Likewise.
6461 * tests/torture.at (yylex): Likewise.
6463 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
6465 Fix problems with translating English-language diagnostics.
6466 * bootstrap: Fix bug introduced in recent bootstrap changes, with
6467 respect to bison-runtime pot generation. The YY_ stuff
6468 wasn't being captured.
6469 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
6470 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
6471 * runtime-po/POTFILES.in: Add data/push.c.
6473 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
6475 Merge bootstrap changes from coreutils.
6477 2006-09-28 Jim Meyering <jim@meyering.net>
6479 Automatically generated dependencies are important even
6480 when all of the sources in a directory come from gnulib.
6481 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
6482 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
6484 2006-09-23 Jim Meyering <jim@meyering.net>
6486 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
6488 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6490 * bootstrap: Add support for --force.
6491 (usage): New function. Describe usage less tersely.
6492 (CVS_only_file): New var.
6494 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
6496 * data/push.c (YYPUSH_MORE): Make it an enum instead.
6497 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
6498 Adjust white space and comments to match GNU style better.
6500 2006-09-20 Bob Rossi <bob@brasko.net>
6502 * data/push.c (yyresult_get): Remove function.
6503 (YYPUSH_MORE): Add #define.
6504 (yypushparse): Modify return value.
6506 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6508 * stamp-h.in: Remove; no longer needed.
6509 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
6510 Remove config.h, config.hin, intl (no longer created).
6511 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
6514 Sync bootstrap from coreutils, as follows:
6516 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
6518 * bootstrap (symlink_to_gnulib): New function.
6519 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
6520 to copies-of-gnulib.
6521 (cp_mark_as_generated, slurp, gnulib_files):
6522 Avoid making a copy if it's the same as the old version.
6523 (gnulib_files): Add support for this variable (used by Bison).
6525 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
6527 * src/getargs.c (usage): Rework to use conventions similar to
6528 coreutils, to make translation a bit easier and the code a bit
6529 smaller. Problem reported by Tim Van Holder.
6531 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
6533 Use some of gnulib's new modules, taken from coreutils.
6535 * bootstrap: Sync from coreutils, except add support for gnulib_files.
6536 * bootstrap.conf: New file.
6537 (gnulib_modules): Add configmake, inttypes, unistd.
6538 (XGETTEXT_OPTIONS): Add complain, complain_at,
6539 fatal, fatal_at, warn, warn_at, unexpected_end.
6540 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
6541 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
6543 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
6545 (GNULIB_AUTOCONF_SNIPPET): Remove.
6546 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
6548 * lib/.cvsignore: Add inttypes_.h.
6549 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
6550 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
6551 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
6552 no-longer-necessary initializations.
6553 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
6554 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
6555 use the unistd module.
6556 * src/system.h: Likewise.
6557 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
6558 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
6559 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
6560 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
6561 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
6562 * src/system.h: Include inttypes.h unconditionally, now that we
6563 use the inttypes module. Don't bother to include stdint.h, since
6564 inttypes.h now does that for us.
6565 (LOCALEDIR): Remove, now that we use the configmake module.
6566 * src/getargs.c: Include configmake.h.
6567 * src/main.c: Likewise.
6568 * src/output.c: Likewise.
6569 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
6570 not from $abs_top_builddir, since config.h moved.
6573 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
6574 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
6576 * src/parse-gram.y (symbol_declaration): Don't put statements
6577 before declarations; it's not portable to C89.
6578 * src/scan-code.l (handle_action_at): Likewise.
6580 * src/scan-code.l: Always initialize braces_level; the old code
6581 left it uninitialized and therefore had undefined behavior.
6583 Don't attempt to redefine 'assert', since it runs afoul of
6584 systems where standard headers (mistakenly) include <assert.h>.
6585 Instead, define and use our own alternative, called 'aver'.
6586 * src/reader.c: Don't include assert.h, since we no longer
6588 * src/scan-code.l: Likewise.
6589 * src/system.h (assert): Remove, replacing with....
6590 (aver): New function, taking a bool arg. All uses changed.
6591 * src/tables.c (pack_vector): Ensure that aver arg is bool,
6592 not merely an integer.
6594 2006-09-15 Bob Rossi <bob@brasko.net>
6596 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
6597 * data/c.m4 (YYPUSH): New.
6598 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
6599 * src/getargs.c (push_parser): New var.
6600 * src/getargs.h (push_parser): New declaration.
6601 * src/output.c (prepare): Add macro insertion of `push_flag'.
6602 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
6603 (prologue_declaration): Parse %push-parser.
6604 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
6605 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
6606 list of removed lines from the traces observed.
6607 (AT_CHECK_CALC_LALR): Added push parser tests.
6609 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
6611 * NEWS: Version 2.3a.
6612 * configure.ac (AC_INIT): Likewise.
6614 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
6615 "#define YYSTYPE int" that caused "make maintainer-check" to fail
6616 due to header ordering dependencies. I don't know why the #define
6619 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
6620 runtime cost when YYDEBUG is not defined, and so that some tests
6621 that used to fail now work. Problem and initial suggestion by
6623 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
6624 * data/glr.cc (b4_parser_class_name):
6625 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
6626 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
6627 (yydebug_) [YYDEBUG]: New member.
6628 (yycdebug_): Now defined only if YYDEBUG.
6629 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
6630 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
6631 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
6633 (debug_stream, set_debug_stream, debug_level, set_debug_level):
6634 Define only if YYDEBUG.
6635 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
6637 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
6638 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
6639 AT_CHECK_CALC_GLR_CC that are working now.
6641 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
6643 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
6644 We don't need them in glr.cc, and glr.c defines them.
6645 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
6646 assumes that defining it to anything is the same as defining
6647 it to 1. Problem reported by Paolo Bonzini.
6649 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
6651 * data/c.m4 (b4_null, b4_case): Define.
6652 * src/output.c (prepare_symbols): Use b4_null.
6653 (user_actions_output): Use b4_case.
6655 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
6657 * data/glr.c (b4_shared_declarations): Put start-header first,
6658 before any #includes that we generate, so that feature-test
6659 macros work. Problem reported by Michael Deutschmann in
6660 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
6661 * data/lalr1.cc: Likewise.
6662 * doc/bison.texinfo (Prologue): Document that feature-test macros
6663 should be defined before any Bison declarations.
6664 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
6665 that depend on location.hh after, not before, Bison decls, since
6666 we now include location.hh after the first user prologue.
6668 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
6669 Sander Brandenburg in
6670 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
6671 Also, fix minor white space and comment issues.
6672 (Prologue): Mention that it's better to define feature-test macros
6673 before Bison declarations. Problem reported by Michael Deutschmann.
6675 * README-cvs: Fix typo: "&" should be "&&". Problem reported
6677 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
6678 This adjusts to recent gnulib changes.
6680 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
6682 Finish implementation of per-type %destructor/%printer. Discussed
6684 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
6686 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
6687 * NEWS (2.3+): Add a description of this feature to the default
6688 %destructor/%printer description.
6689 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
6690 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
6691 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
6692 list node contains a semantic type.
6693 * src/symtab.c, src/symtab.h: Extend with a table that associates
6694 semantic types with their %destructor's and %printer's.
6695 (semantic_type_from_uniqstr, semantic_type_get,
6696 semantic_type_destructor_set, semantic_type_printer_set): New functions
6697 composing the public interface of that table.
6698 (symbol_destructor_get, symbol_destructor_location_get,
6699 symbol_printer_get, symbol_printer_location_get): If there's no
6700 per-symbol %destructor/%printer, look up the per-type before trying
6702 * tests/actions.at (Per-type %printer and %destructor): New test case.
6703 * tests/input.at (Default %printer and %destructor redeclared):
6704 Extend to check that multiple occurrences of %symbol-default in a
6705 single %destructor/%printer declaration is an error.
6706 (Per-type %printer and %destructor redeclared, Unused values with
6707 per-type %destructor): New test cases.
6709 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
6711 Require default %destructor/%printer to be declared using
6712 %symbol-default instead of an empty symbol list, and start working on
6713 new per-type %destructor/%printer. Discussed at
6714 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
6715 * NEWS (2.3+): Add %symbol-default to example.
6716 * bison.texinfo (Freeing Discarded Symbols): Likewise.
6717 (Table of Symbols): Add entry for %symbol-default.
6718 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
6719 (generic_symlist, generic_symlist_item): New nonterminals for creating
6720 a list in which each item is a symbol, semantic type, or
6722 (grammar_declaration): Use generic_symlist in %destructor and %printer
6723 declarations instead of symbols.1 or an empty list.
6724 (symbol_declaration, precedence_declaration, symbols.1): Update actions
6725 for changes to symbol_list.
6726 * src/reader.c: Update for changes to symbol_list.
6727 * src/scan-code.l: Likewise.
6728 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
6729 * src/symlist.c, src/symlist.h: Extend such that a list node may
6730 represent a semantic type or a %symbol-default in addition to just an
6731 ordinary symbol. Add switched functions for setting %destructor's and
6733 * tests/actions.at, tests/input.at: Add %symbol-default to all default
6734 %destructor/%printer declarations.
6736 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
6738 Whether the default %destructor/%printer applies to a particular symbol
6739 isn't a question of whether the user *declares* that symbol (in %token,
6740 for example). It's a question of whether the user by any means
6741 *defines* the symbol at all (by simply using a char token, for
6742 example). $end is defined by Bison whereas any other token with token
6743 number 0 is defined by the user. The error token is always defined by
6744 Bison regardless of whether the user declares it with %token, but we
6745 may one day let the user define error as a nonterminal instead.
6746 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
6747 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
6748 the meaning of "user-defined".
6749 * tests/actions.at (Default %printer and %destructor for user-declared
6750 end token): Rename to...
6751 (Default %printer and %destructor for user-defined end token): ...
6754 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
6755 computation of whether to apply the default, don't maintain a list of
6756 every Bison-defined symbol. Instead, just check for a first character
6757 of '$', which a user symbol cannot have, and check for the error token.
6759 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
6761 Don't apply the default %destructor or %printer to the error token,
6762 $undefined, or $accept. This change fits the general rule that the
6763 default %destructor and %printer are only for user-declared symbols,
6764 and it solves several difficulties that are described in the new test
6766 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
6767 * tests/actions.at (Default %printer and %destructor are not for error
6768 or $undefined, Default %printer and %destructor are not for $accept):
6771 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
6773 Allow %start after the first rule.
6774 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
6775 when parsing the first rule.
6776 (check_and_convert_grammar): Search for it here after all grammar
6777 declarations have been parsed. Skip midrules, which have dummy LHS
6779 * src/symtab.c (symbol_is_dummy): New function.
6780 * src/symtab.h (symbol_is_dummy): Declare it.
6781 * tests/input.at (%start after first rule): New test.
6783 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
6785 Redo some of the previous commit: add back the ability to use
6786 non-aliased/undeclared string literals since it might be useful to
6787 those declaring %token-table.
6788 * src/reader.c (check_and_convert_grammar): Undo changes in previous
6789 commit: don't worry about complaints from symbols_pack.
6790 * src/symtab.c (symbol_new, symbol_class_set,
6791 symbol_check_alias_consistency): Undo changes in previous commit: count
6792 each string literal as a new symbol and token, assign it a symbol
6793 number, and don't complain about non-aliased string literals.
6794 (symbols_pack): Since symbol_make_alias still does not decrement symbol
6795 and token counts but does still set aliased tokens to the same number,
6796 symbol_pack_processor now leaves empty slots in the symbols array.
6798 * tests/regression.at (Undeclared string literal): Remove test case
6799 added in previous commit since non-aliased string literals are allowed
6801 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
6802 remove unnecessary string literal declarations.
6803 * tests/sets.at (Firsts): Likewise.
6805 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
6807 Don't allow an undeclared string literal, but allow a string literal to
6808 be used before its declaration.
6809 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
6810 symbols_pack complained.
6811 * src/symtab.c (symbol_new): Don't count a string literal as a new
6813 (symbol_class_set): Don't count a string literal as a new token, and
6814 don't assign it a symbol number since symbol_make_alias does that.
6815 (symbol_make_alias): It's not necessary to decrement the symbol and
6816 token counts anymore. Don't assume that an alias declaration occurs
6817 before any uses of the identifier or string, and thus don't assert that
6818 one of them has the highest symbol number so far.
6819 (symbol_check_alias_consistency): Complain if there's a string literal
6820 that wasn't declared as an alias.
6821 (symbols_pack): Bail if symbol_check_alias_consistency failed since
6822 symbol_pack asserts that every token has been assigned a symbol number
6823 although undeclared string literals have not.
6824 * tests/regression.at (String alias declared after use, Undeclared
6825 string literal): New test cases.
6826 (Characters Escapes, Web2c Actions): Declare string literals as
6828 * tests/sets.at (Firsts): Likewise.
6830 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
6832 In the grammar scanner, STRING_FINISH unclosed constructs and return
6833 them to the parser in order to improve error messages.
6834 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
6835 SC_BRACED_CODE, SC_PROLOGUE): Implement.
6836 * tests/input.at (Unclosed constructs): New test case.
6837 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
6840 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
6843 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
6845 Handle string aliases for character tokens correctly.
6846 * src/symtab.c (symbol_user_token_number_set): If the token has an
6847 alias, check and set its alias's user token number instead of its own,
6848 which is set to indicate the alias. Previously, every occurrence of
6849 the character token in the grammar overwrote that alias indicator with
6851 * tests/input.at (String aliases for character tokens): New test.
6853 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
6855 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
6857 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
6859 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
6860 to prevent failures when building on older platforms.
6861 Check for autopoint failure.
6862 Set XGETTEXT_OPTIONS to values that check for C format strings,
6863 so that translators are warned about them (this also helps
6864 prevent core dumps).
6866 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
6867 function, since it simplifies our code a bit.
6869 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
6870 rather than -W, so we don't get bogus warnings about sign comparisons.
6871 Add -Wpointer-arith, since that warning is useful (it reports code
6872 that does not conform to C89 and that some compilers reject).
6873 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
6874 since it's no longer needed.
6876 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
6878 Clean up scanners a bit.
6879 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
6880 definitions so gcc won't warn when obstack_for_string is unused.
6881 * src/scan-code.l: config.h and system.h are already #include'd by
6882 scan-code-c.c, so get rid of them here.
6883 * src/scan-gram.l: Likewise.
6884 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
6885 definitions rather than duplicating the rest of it.
6886 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
6888 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
6890 Suppress signed/unsigned comparison warnings for yycheck.
6891 * data/c.m4 (b4_safest_int_type): New macro.
6892 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
6893 a signed int type, cast it to b4_safest_int_type first.
6894 * data/yacc.c: Likewise.
6895 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
6898 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
6900 * doc/bison.texinfo: Fix some typos.
6902 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
6904 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
6905 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
6907 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
6908 the latest gnulib does this a different way.
6909 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
6910 translation was patched, so stop omitting it.
6912 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
6914 Enable declaration of default %printer/%destructor. Make the parser
6915 use these for all user-declared grammar symbols for which the user does
6916 not declare a specific %printer/%destructor. Thus, the parser uses it
6917 for token 0 if the user declares it but not if Bison generates it as
6918 $end. Discussed starting at
6919 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
6920 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
6922 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
6923 * NEWS (2.3+): Mention.
6924 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
6925 declare a %destructor for a mid-rule's semantic value. It's just
6926 impossible to declare one specific to it.
6927 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
6928 code. Describe default %destructor form.
6929 * src/parse-gram.y (grammar_declaration): Parse default
6930 %printer/%destructor declarations.
6931 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
6932 and symbol_destructor_location_get rather than accessing the destructor
6933 and destructor_location members of struct symbol.
6934 (symbol_printers_output): Likewise but for %printer's.
6935 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
6937 * src/symtab.c (default_destructor, default_destructor_location,
6938 default_printer, default_printer_location): New static global
6939 variables to record the default %destructor and %printer.
6940 (symbol_destructor_get, symbol_destructor_location_get,
6941 symbol_printer_get, symbol_printer_location_get): New functions to
6942 compute the appropriate %destructor and %printer for a symbol.
6943 (default_destructor_set, default_printer_set): New functions to set the
6944 default %destructor and %printer.
6945 * src/symtab.h: Prototype all those new functions.
6946 * tests/actions.at (Default %printer and %destructor): New test to
6947 check that the right %printer and %destructor are called, that they're
6948 not called for $end, and that $$ and @$ work correctly.
6949 (Default %printer and %destructor for user-declared end token): New
6950 test to check that the default %printer and %destructor are called for
6951 a user-declared end token.
6952 * tests/input.at (Default %printer and %destructor redeclared, Unused
6953 values with default %destructor): New tests to check related grammar
6954 warnings and errors.
6956 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
6958 Clean up handling of %destructor for the end token (token 0).
6959 Discussed starting at
6960 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
6962 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
6964 Make the skeletons consistent in how they pop the end token and invoke
6966 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
6967 state, which has token number 0, since this would invoke the
6968 %destructor for the end token.
6969 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
6970 until after shifting the end token, or else it won't be popped.
6971 * data/yacc.c (yyparse): Likewise.
6973 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
6974 it's the end token. Upon termination, destroy an unshifted lookahead
6975 even when it's the end token.
6976 * data/lalr1.cc (yy::parser::parse): Likewise.
6977 * data/yacc.c (yyparse): Likewise.
6979 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
6980 value warnings for the end token when the user gives the end token a
6983 * tests/actions.at (Printers and Destructors): Test all the above.
6985 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
6987 Update to latest gnulib and gettext versions.
6988 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
6990 (gnulib_files): Add m4/warning.m4. Don't worry about files
6991 overwritten by autopoint.
6992 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
6993 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
6995 Don't use autoreconf; instead, invoke autopoint etc. by hand,
6996 so that we can remove the intl files at a better time.
6997 (intl_files_to_remove): Remove aclocal.m4, since it gets
6998 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
6999 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
7000 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
7001 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
7002 Remove datarootdir hack; no longer needed.
7003 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
7004 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
7005 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
7007 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
7008 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
7010 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
7012 * bootstrap: Adjust to today's change to gnulib-tool by invoking
7013 it with --assume-autoconf='latest-stable'.
7015 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
7017 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
7018 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
7020 * src/muscle_tab.h (muscle_grow): Replace the header comments with
7021 those from muscle_tab.c since the old ones are misleading.
7023 2006-07-13 Akim Demaille <akim@epita.fr>
7025 Support %define "KEY" {VALUE}.
7026 * src/scan-code.h, src/scan-code.l (translate_action)
7027 (translate_rule_action, translate_symbol_action, translate_code):
7028 Return char *, not const char *.
7029 * src/parse-gram.y (declaration): Rename as...
7030 (prologue_declaration): this.
7031 (string_content): Remove this nonterminal, use STRING.
7032 (braceless, content, content.opt): New nonterminal.
7034 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
7036 * src/scan-gram.l (getargs.h): Don't include it.
7038 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
7040 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
7041 rather than a for-loop that declares a local bool variable. This
7042 should work around a compatibility problem with a Cray x1e C++
7043 compiler reported by Hung Nguyen in
7044 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
7045 The for-loop was introduced in the 2004-11-17 change but I don't
7046 know why it was needed.
7048 2006-07-12 Akim Demaille <akim@epita.fr>
7050 * data/c.m4: Comment changes.
7052 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
7054 * src/complain.c (error_message, ERROR_MESSAGE): New.
7056 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
7057 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
7059 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
7061 * NEWS: Instead of %union, you can define and use your own union type
7062 YYSTYPE if your grammar contains at least one <type> tag.
7063 Your YYSTYPE need not be a macro; it can be a typedef.
7064 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
7065 (Union Decl, Decl Summary): Document this.
7066 * data/glr.c (YYSTYPE): Implement this.
7067 * data/glr.cc (YYSTYPE): Likewise.
7068 * data/lalr1.cc (YYSTYPE): Likewise.
7069 * data/yacc.c (YYSTYPE): Likewise.
7070 * src/output.c (prepare): Output tag_seen_flag.
7071 * src/parse-gram.y (declaration, grammar_declaration):
7072 Use 'union_seen' rather than 'typed' to determine whether
7073 %union has been seen, since grammars can now be typed without
7075 (symbol_declaration, type.opt, symbol_def):
7076 Keep track of whether a tag has been seen.
7077 * src/reader.c (union_seen, tag_seen): New vars.
7079 * src/reader.h (union_seen, tag_seen, typed): Likewise.
7080 * src/scan-code.l (untyped_var_seen): New variable.
7081 (handle_action_dollar): Adjust to above changes.
7082 (handle_action_dollar, handle_action_at):
7083 Improve overflow checking for outlandish numbers.
7084 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
7085 avoid new diagnostics generated by above changes.
7086 * tests/regression.at (YYSTYPE typedef): Add test to check
7087 for type tags without %union.
7089 * src/symlist.c (symbol_list_length): Return int, not unsigned
7090 int, since callers expect int. This may need to get revisited
7091 once we have proper integer overflow checking.
7093 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
7094 object is now static.
7096 * src/getargs.c (flags_argmatch): Return void, not int,
7097 to pacify ./configure --enable-gcc-warnings.
7099 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
7100 since last_string is already defined to FLEX_PREFIX (last_string).
7102 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
7104 Implement --warnings/-W.
7105 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
7107 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
7109 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
7110 (warnings_args, warnings_types): New.
7111 (getargs, short_options, long_options): Accept -W/--warnings.
7112 Sort the options by alphabetical order, upper case letter right
7113 before its lower case.
7115 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
7117 Change %merge result type clash warnings to errors. Discussed at
7118 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
7119 * src/reader.c (record_merge_function_type): Use complain_at.
7120 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7121 declared later): Update test case results.
7123 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
7125 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
7126 to be in alphabetical order.
7127 (trace_args): Spelling fixes.
7129 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
7131 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
7132 so they don't collide with user-defined macros.
7133 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
7134 this was never guaranteed, and now that we're using gnulib stdint,
7135 which defines int_fast16_t to long int, the problem is exposed.
7137 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
7139 * data/c.m4 (b4_basename): Simplify a bit, since we don't
7140 need the full POSIX semantics (and weren't implementing them
7143 Adjust to Autoconf 2.60 and today's gnulib.
7144 * bootstrap (gnulib_modules): Add stdint.
7145 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
7146 no longer copies it.
7147 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
7148 since stdint needs the former and wcwidth (which is now required
7149 by mbswidth) needs the latter.
7150 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
7151 work around a compatibility glitch between gettext 0.14.6 and
7153 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
7154 Do not check for uintptr_t, since new stdint module does the right
7156 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
7157 Add stdint.h, stdint_.h, wcwidth.h.
7158 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
7159 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
7160 stdint.m4, wchar_t.m4, wcwidth.m4.
7161 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
7162 usual order for ../lib/*.h files.
7163 (file_name_split): Use last_component, not base_name, to adjust
7165 * src/parse-gram.h: Include <strverscmp.h> in the usual order
7166 for ../lib/*.h files.
7167 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
7168 Define unconditionally, since we now assume the stdint module.
7169 * src/scan-skel.l: Include <dirname.h>.
7170 (BASE_QPUTS): Use last_component, not base_name.
7171 * src/system.h: Include <unlocked-io.h> in the usual order
7172 for ../lib/*.h files. Include <stdint.h> unconditionally,
7173 since we now use the stdint module.
7174 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
7175 HAVE_UINTPTR_T, since we now use the stdint module.
7176 (base_name): Remove decl, since files now include <dirname.h>
7179 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
7181 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
7183 * data/yacc.c, data/glr.c, data/location.cc: Use them.
7184 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
7186 * tests/calc.at: Adjust.
7188 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
7190 * data/c.m4 (b4_basename): New.
7191 (b4_syncline): Also output the location of its invocation (from
7193 (b4_user_action, b4_define_user_action, b4_user_actions)
7194 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
7195 (b4_user_stype): New.
7196 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
7198 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
7200 In the grammar file, the first column is 1 not 0 on the first line as
7201 on every other line.
7202 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
7203 * tests/input.at (Torturing the Scanner): Update output.
7205 * src/scan-gram.l (scanner_cursor): Declare it static.
7207 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
7209 In warnings, say "previous declaration" rather than "first
7211 * src/symtab.c (redeclaration): Do that here.
7212 * src/reader.c (record_merge_function_type): In the case of a result
7213 type clash, report the previous declaration rather than the very first
7214 one in the grammar file.
7215 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7216 declared later): Add a third declaration to check this behavior.
7217 * tests/input.at (Incompatible Aliases): Update output.
7219 2006-06-27 Akim Demaille <akim@epita.fr>
7221 * doc/Doxyfile.in: New.
7222 * doc/Makefile.am: Use it.
7223 * src/lalr.h, src/symtab.h: Initial doxygenation.
7225 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7227 Don't miss %merge result type warnings just because the LHS types are
7228 declared after the %merge. This continues the effort of the previous
7230 * src/reader.c (get_merge_function): Don't set the merger type yet.
7231 (record_merge_function_type): New function for setting the merger type
7232 and checking for clashes.
7233 (grammar_current_rule_merge_set): Set the location of the %merge for
7235 (packgram): Invoke record_merge_function_type for each rule now that
7236 all symbol type declarations have been parsed.
7237 * src/reader.h (merger_list.type_declaration_location): New member
7238 storing the location of the first %merge from which the type for this
7239 merging function was derived.
7240 * src/symlist.h (symbol_list.merger_declaration_location): New member
7241 storing the location of a rule's %merge, if any.
7242 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
7243 declared later): New test to catch the error fixed by the above patch.
7245 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7247 Get action warnings (grammar_rule_check) right even when symbol
7248 declarations appear after the rules. Discussed at
7249 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
7251 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
7252 Don't mistake the type of $$ in a midrule to be that of its parent
7254 * src/reader.c (grammar_current_rule_end): Don't invoke
7255 grammar_rule_check yet since not all symbol declarations may have been
7257 (grammar_midrule_action): Likewise.
7258 Don't record whether the midrule's $$ has been used yet since actions
7259 haven't been translated yet.
7260 Record the midrule's parent rule and its RHS index within the parent
7262 (grammar_current_rule_action_append): Don't translate the action yet
7263 since not all symbol declarations may have been parsed yet and, thus,
7264 warnings about types for $$, $n, @$, and @n can't be reported yet.
7265 (packgram): Translate the action and invoke grammar_rule_check now that
7266 all symbol declarations have been parsed.
7267 * src/scan-code.l (handle_action_dollar): Now that this is invoked
7268 after parsing the entire grammar file, the symbol list here in the case
7269 of a midrule is actually the midrule's empty RHS, so reference its
7270 parent rule's RHS where necessary.
7271 On the other hand, now that you can already know it's a midrule, you
7272 aren't forced to think $$ has the same type as its parent rule's $$.
7273 (handle_action_at): In the case of a midrule, reference the parent rule
7275 * src/symlist.c (symbol_list_new): Initialize new midrule-related
7277 (symbol_list_length): Now that this is invoked after all rules have
7278 been parsed, a NULL symbol (rather than a NULL symbol list node)
7279 terminates a rule. symbol_list_print already does this correctly.
7280 * src/symlist.h (symbol_list.midrule_parent_rule,
7281 symbol_list.midrule_parent_rhs_index): New members so that midrules can
7282 remember their relationships with their parents.
7283 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
7284 fixed by the above patch.
7285 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
7287 (Unused values): ... this old test case and...
7288 (Unused values before symbol declarations): ... this new test case.
7289 This one is the same as `Unused values' except that all symbol
7290 declarations appear after the rules in order to catch the rest of the
7291 errors fixed by the above patch.
7293 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
7296 * src/reader.c (current_rule): Declare it static since it's no longer
7297 used outside this file.
7298 (grammar_current_rule_action_append): Remove redundant arguments from
7299 translate_rule_action invocation.
7300 * src/reader.h (current_rule): Remove this unused extern.
7301 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
7302 * src/scan-code.l (translate_rule_action): Likewise.
7304 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
7306 Clean up yesterday's patch.
7307 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
7309 * src/reader.c (grammar_current_rule_action_append): ... here for
7310 consistency with grammar_current_rule_symbol_append.
7311 * tests/regression.at (Braced code in declaration in rules section):
7312 Make yyerror and yylex static as usual.
7314 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
7316 Fix bug that mistakes braced code in a declaration in the rules section
7317 to be a rule action. Mentioned at
7318 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
7319 * src/scan-gram.l: Move midrule action detection from the start of the
7320 scanning of any braced code to...
7321 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
7322 action. For readability, use $2 and @2 rather than the equivalent
7324 * tests/regression.at (Braced code in declaration in rules section):
7325 New test to catch the error fixed by the above patch.
7327 Work on code readability some.
7328 * src/scan-code.l (current_rule): Get rid of this misleading and
7329 redundant declaration: it's actually extern'ed in reader.h.
7330 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
7331 translate_action): Add a rule argument and use it instead of the global
7333 (translate_rule_action): This already receives current_rule through an
7334 argument, so pass it on to translate_action instead of assigning
7335 current_rule to current_rule.
7336 (translate_symbol_action, translate_code): Pass rule = NULL to
7339 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
7341 Rename %before-definitions to %start-header and %after-definitions to
7342 %end-header. Don't use these declarations to separate pre-prologue
7343 blocks from post-prologue blocks. Add new order-independent
7344 declarations %before-header and %after-header as alternatives to the
7345 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
7346 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
7347 * NEWS (2.3+): Update for these changes.
7348 * data/glr.c (b4_before_definitions): Update to...
7349 (b4_start_header): ... this.
7350 (b4_after_definitions): Update to...
7351 (b4_end_header): ... this.
7352 * data/glr.cc: Likewise.
7353 * data/lalr1.cc: Likewise.
7354 * data/yacc.c: Likewise.
7355 * doc/bison.texinfo (The prologue): Update names, and replace remaining
7356 prologue blocks with %*-header declarations.
7357 (Calc++ Parser): Likewise.
7358 (Decl Summary): Update names.
7359 (Table of Symbols): Update description.
7360 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
7361 (PERCENT_END_HEADER): ... this.
7362 (PERCENT_BEFORE_DEFINITIONS): Update to...
7363 (PERCENT_START_HEADER): ... this.
7364 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
7365 (declaration): Update token names and m4 macro names.
7366 When parsing %end-header and %start-header, invoke translate_code
7367 before muscle_code_grow, and no longer set global booleans to remember
7368 whether these declarations have been seen.
7369 Parse new %after-header and %before-header.
7370 * src/reader.c (before_definitions, after_definitions): Remove.
7371 (prologue_augment): Accept a new bool argument to specify whether to
7372 augment the pre-prologue or post-prologue.
7373 * src/reader.h (before_definitions, after_definitions): Remove these
7375 (prologue_augment): Add new bool argument.
7376 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
7377 (PERCENT_END_HEADER): ... this.
7378 (PERCENT_BEFORE_DEFINITIONS): Update to...
7379 (PERCENT_START_HEADER): ... this.
7380 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
7381 * tests/actions.at (Printers and Destructors): Update names.
7383 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
7385 Add comparison operators for C++ location classes. Discussed at
7386 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
7387 * data/c++.m4 (b4_define_location_comparison): New boolean %define
7388 declaration indicating whether filename_type has an operator==. If
7389 filename_type is `std::string', it defaults to `1', `0' otherwise.
7390 * data/location.cc: Iff b4_define_location_comparison is `1', add
7391 operator== and operator!= for class position and for class location.
7394 * src/scan-action.l: Remove unused file.
7395 * src/symtab.c (symbol_printer_set): Use printer_location not
7396 destructor_location.
7397 * src/symtab.h (struct symbol): Replace incorrect source comment for
7399 * tests/input.at (Incompatible Aliases): Update output with correct
7402 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
7404 Don't put the pre-prologue in the header file. For the yacc.c code
7405 file and the glr.c header and code files, move the pre-prologue before
7406 the token definitions. Add new %before-definitions and
7407 %after-definitions to declare code that will go in both the header file
7408 and code file. Discussed at
7409 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
7410 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
7412 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
7413 * NEWS (2.3+): Describe these changes.
7414 * data/glr.c (b4_pre_prologue): Move from within to before...
7415 (b4_shared_declarations): ... this.
7416 Add new b4_before_definitions before b4_token_enums.
7417 Add new b4_after_definitions at the end.
7418 * data/glr.cc (b4_pre_prologue): Replace with...
7419 (b4_before_definitions): ... this in the header file.
7420 (b4_after_definitions): New near the end of the header file.
7421 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
7422 code file right before including the header file.
7423 (b4_before_definitions): New in the previous position of
7424 b4_pre_prologue in the header file.
7425 (b4_after_definitions): New near the end of the header file.
7426 * data/yacc.c: Clean up some m4 quoting especially in the header file.
7427 (b4_token_enums_defines): In the code file, move to right before
7428 YYSTYPE for consistency with the header file.
7429 (b4_before_definitions): New right before b4_token_enums_defines in
7430 both the header and code file.
7431 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
7432 header and code file.
7433 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
7434 of prologues for %union dependencies.
7435 (Decl Summary): In %defines description, mention the effect of
7436 %before-definitions and %after-definitions on the header file.
7437 (Calc++ Parser): Forward declare driver in a %before-definitions rather
7438 than in the pre-prologue so that make check succeeds.
7439 (Table of Symbols): Add entries for %before-definitions and
7441 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
7442 %before-definitions.
7443 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
7444 (declaration): Parse those declarations and append to
7445 b4_before_definitions and b4_after_definitions, respectively.
7446 * src/reader.c (before_definitions, after_definitions): New bools to
7447 track whether those declarations have been seen.
7448 (prologue_augment): Add to the post-prologue if %union,
7449 %before-definitions, or %after-definitions has been seen.
7450 * src/reader.h (before_definitions, after_definitions): New extern's.
7451 * src/scan-gram.l: Scan the new declarations.
7452 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
7453 prologue block in a %before-definitions or a %after-definitions based
7454 on whether the %union is declared.
7455 * tests/regression.at (Early token definitions with --yacc, Early token
7456 definitions without --yacc): Move tests for token definitions into the
7457 post-prologue since token names are no longer defined in the
7460 2006-06-20 Akim Demaille <akim@epita.fr>
7462 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
7463 (symbol_get): Use it.
7464 * src/parse-gram.y: Use it.
7466 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
7468 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
7469 build succeeds when configured with --enable-gcc-warnings.
7471 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
7473 * src/parse-gram.y (char_name): New function.
7474 (CHAR, STRING, string_content): For %printer, properly escape.
7475 (ID): Prefer fputs to fprintf.
7476 (id): Reindent to be consistent with other rules.
7477 Properly quote char.
7479 The Translation Project changed its way of publishing translations
7480 to maintainers. I haven't received any responses to my request
7481 for supporting the old way, or for documenting the new way. I
7482 have modified 'bootstrap' to use screen scraping
7483 (in this case, HTML scraping). This is unreliable and inelegant,
7484 but I don't see any better way. Yuck.
7485 * bootstrap (TP_URL, WGET_COMMAND): New vars.
7486 (get_translations): New function, which uses HTML scraping to
7487 deduce locations of latest translations.
7488 Use this function to grab both bison and bison-runtime .po files.
7489 Don't bother priming the pump for the runtime-po domain any more,
7490 as it's now translated better than bison is.
7492 2006-06-19 Akim Demaille <akim@epita.fr>
7494 * src/scan-gram.l: No longer "parse" things after `%union' until
7495 `{'. Rather, return a single "%union" token.
7496 No longer make symbols: return strings, and leave the conversion
7497 to symbols to the parser.
7498 (SC_PRE_CODE, token_type): Remove.
7499 * src/parse-gram.y (%union): New field `character'.
7502 (ID, ID_COLON): Now that the scanner no longer makes them
7503 identifiers, adjust all uses to invoke symbol_get.
7504 (id_colon): New, wraps the conversion from string to symbol.
7505 (%union): Accept a possible union_name.
7506 (symbol): Now can be a char.
7507 * data/c.m4 (b4_union_name): Leave a default value.
7508 * data/glr.c, data/yacc.c: Use it.
7510 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
7512 For associating token numbers with token names for "yacc.c", don't use
7513 #define statements unless `--yacc' is specified; always use enum
7514 yytokentype. Most important discussions start at:
7515 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
7516 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
7518 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
7519 * NEWS (2.3+): Mention.
7520 * data/c.m4 (b4_yacc_if): New.
7521 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
7523 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
7524 on token name definitions.
7525 * src/getargs.c (usage): Capitalize `Yacc' in English.
7526 * src/output.c (prepare): Define b4_yacc_flag.
7527 * tests/regression.at (Early token definitions): Test that tokens names
7528 are defined before the pre-prologue not just before the post-prologue.
7529 Remove this test case and copy to...
7530 (Early token definitions with --yacc): ... this to test #define's.
7531 (Early token definitions without --yacc): ... and this to test enums.
7533 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
7535 * NEWS: Reword the post-2.3 change to not be so optimistic about
7536 removing the old "look-ahead" spelling.
7537 Update previous look-ahead/lookahead change reports.
7538 * REFERENCES: look-ahead -> lookahead (since that's
7539 what he actually wrote).
7540 * doc/refcard.tex: look ahead -> lookahead,
7541 look-ahead -> lookahead
7543 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
7545 For consistency, use `lookahead' instead of `look-ahead' or
7546 `look_ahead'. Discussed starting at
7547 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
7549 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
7550 * NEWS: For the next release, note the change to `--report'.
7551 * TODO, doc/bison.1: Update English.
7552 * doc/bison.texinfo: Update English.
7553 (Understanding Your Parser, Bison Options): Document as
7554 `--report=lookahead' rather than `--report=look-ahead'.
7555 * src/conflicts.c: Update English in comments.
7556 (lookahead_set): Rename from look_ahead_set.
7557 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
7558 (resolve_sr_conflict): Rename local look_ahead_tokens to
7559 lookahead_tokens, and update other uses.
7560 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
7561 count_rr_conflicts, conflicts_free): Update uses.
7562 * src/getargs.c (report_args): Move "lookahead" before alternate
7564 (report_types): Update uses.
7565 (usage): For `--report' usage description, state `lookahead' spelling
7566 rather than `look-ahead'.
7567 * src/getargs.h (report.report_lookahead_tokens): Rename from
7568 report_look_ahead_tokens.
7569 * src/lalr.c: Update English in comments.
7570 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
7571 (state_lookahead_tokens_count): Rename from
7572 state_look_ahead_tokens_count.
7573 Rename local n_look_ahead_tokens to n_lookahead_tokens.
7574 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
7575 Rename local n_look_ahead_tokens to n_lookahead_tokens.
7577 Update English in output.
7578 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
7579 * src/print.c: Update English in comments.
7580 (lookahead_set): Rename from look_ahead_set.
7581 (print_reduction): Rename argument lookahead_token from
7583 (print_core, state_default_rule, print_reductions, print_results):
7585 * src/print_graph.c: Update English in comments.
7586 (print_core): Update uses.
7587 * src/state.c: Update English in comments.
7588 (reductions_new): Update uses.
7589 (state_rule_lookahead_tokens_print): Rename from
7590 state_rule_look_ahead_tokens_print, and update other uses.
7591 * src/state.h: Update English in comments.
7592 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
7593 (state_rule_lookahead_tokens_print): Rename from
7594 state_rule_look_ahead_tokens_print.
7595 * src/tables.c: Update English in comments.
7596 (conflict_row, action_row): Update uses.
7597 * tests/glr-regression.at
7598 (Incorrect lookahead during deterministic GLR,
7599 Incorrect lookahead during nondeterministic GLR): Rename
7600 print_look_ahead to print_lookahead.
7601 * tests/torture.at: Update English in comments.
7602 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
7603 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
7604 (Many lookahead tokens): Update uses.
7605 * data/glr.c: Update English in comments.
7606 * lalr1.cc: Likewise.
7608 * src/conflicts.h: Likewise.
7609 * src/lalr.h: Likewise.
7610 * src/main.c: Likewise.
7611 * src/output.c: Likewise.
7612 * src/parse-gram.c: Likewise.
7613 * src/tables.h: Likewise.
7614 * tests/calc.at: Likewise.
7616 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
7618 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
7620 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
7622 * TODO: Add request from Nelson H. F. Beebe to be able to install
7623 Bison without installing the yacc script.
7625 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
7627 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
7628 and yytext if they're already #define'd.
7629 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
7630 * src/scan-code-c.c: ... here.
7631 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
7634 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
7636 Get Bison to build again when configured with --enable-gcc-warnings.
7637 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
7639 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
7640 loc argument as it shadows a global.
7641 * src/scan-gram.l: Remove stray comma that prevents boundary_set
7644 * src/.cvsignore: Add scan-code.c.
7646 2006-06-07 Akim Demaille <akim@epita.fr>
7648 * src/scan-gram.l: Move the "add a trailing ; to actions" code
7650 * src/scan-code.l: here.
7651 * tests/input.at (Torturing the Scanner): Fix another location
7654 2006-06-07 Akim Demaille <akim@epita.fr>
7656 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
7658 2006-06-06 Akim Demaille <akim@epita.fr>
7660 Extract the parsing of user actions from the grammar scanner.
7661 As a consequence, the relation between the grammar scanner and
7662 parser is much simpler. We can also split "composite tokens" back
7664 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
7665 * src/scan-gram.l (add_column_width, adjust_location): Move to and
7667 * src/location.h, src/location.c (add_column_width)
7668 (location_compute): these.
7669 Fix the column count: the initial column is 0.
7670 (location_print): Be robust to ending column being 0.
7671 * src/location.h (boundary_set): New.
7672 * src/main.c: Adjust to scanner_free being renamed as
7674 * src/output.c: Include scan-code.h.
7675 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
7677 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
7678 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
7679 which is now, again, a separate token.
7680 Adjust all dependencies.
7681 Whereever actions with $ and @ are used, use translate_code.
7682 (action): Remove this nonterminal which is now useless.
7683 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
7684 (grammar_current_rule_action_append): Use translate_code.
7685 (packgram): Bound check ruleno, itemno, and rule_length.
7686 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
7687 (last_string, last_braced_code_loc, max_left_semantic_context)
7688 (scanner_initialize, scanner_free, scanner_last_string_free)
7689 (gram_out, gram_lineno, YY_DECL_): Move to...
7690 * src/scan-gram.h: this new file.
7691 (YY_DECL): Rename as...
7693 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
7694 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
7695 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
7696 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
7697 Move these declarations, and...
7698 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
7700 * src/flex-scanner.h: this new file.
7701 * src/scan-gram.l (rule_length, rule_length_overflow)
7702 (increment_rule_length): Remove.
7703 (last_braced_code_loc): Rename as...
7704 (gram_last_braced_code_loc): this.
7705 Adjust to the changes of the parser.
7706 Move all the handling of $ and @ into...
7707 * src/scan-code.l: here.
7708 * src/scan-gram.l (handle_dollar, handle_at): Remove.
7709 (handle_action_dollar, handle_action_at): Move to...
7710 * src/scan-code.l: here.
7711 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
7712 scan-code.h, scan-code-c.c, scan-gram.h.
7713 (EXTRA_bison_SOURCES): Add scan-code.l.
7714 (BUILT_SOURCES): Add scan-code.c.
7715 (yacc): Be robust to white spaces.
7717 * tests/conflicts.at, tests/input.at, tests/reduce.at,
7718 * tests/regression.at: Adjust the column numbers.
7719 * tests/regression.at: Adjust the error message.
7721 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
7723 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
7724 Use Akim's wording from
7725 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
7727 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
7729 Between Bison releases, manually append `+' to the previous Bison
7730 release number, and use that as a signal to automatically print the
7731 ChangeLog's CVS Id keyword from --version. Discussed starting at
7732 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
7733 * ChangeLog: Add Id header.
7734 * configure.ac (AC_INIT): Append `+' to `2.3'.
7735 * src/.cvsignore: Add revision.c.
7736 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
7737 (BUILT_SOURCES): Add revision.c.
7738 (revision.c): New target rule. This file defines a new global variable
7739 named revision. It initializes it with either the Id from ChangeLog
7740 or, if VERSION doesn't contain `+', with the empty string.
7741 * src/getargs.c (version): Print the value of revision.
7742 * src/revision.h: Extern revision.
7744 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
7746 * NEWS: Version 2.3.
7747 * configure.ac (AC_INIT): Likewise.
7749 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
7751 * data/glr.c (YYRECOVERING): Define to be a function-like macro
7752 with no arguments, not as an object-like macro. This is for
7753 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
7754 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
7755 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
7758 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
7760 * src/getargs.c (usage): Back out yesterday's modification of the
7761 --help output so that we don't have to wait for translation before
7764 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
7766 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
7767 Problem reported by Akim Demaille.
7769 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
7771 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
7773 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
7775 * data/yacc.c (yy_reduce_print): Omit trailing white space in
7776 generated source code. Problem reported by Frans Englich in
7777 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
7779 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
7781 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
7782 shell, not within 'make', so that 'make' by an ordinary builder
7783 (using GNU make) does not worry about configuring gzip. This also
7784 works around a bug reported independently by Keith Thompson and by
7785 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
7786 stderr rather than stdout, messing up the build logs.
7788 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
7790 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
7791 to make sure that YYID will never be unused. This fixes a 'make
7792 maintainer-check' failure caused by the recent changes to the 'Trivial
7793 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
7795 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
7797 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
7799 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
7800 state before an empty RHS is always resolved here. Only the location
7801 of that state is guaranteed to be resolved, and that's enough. This
7802 fixes the remaining bug reported by Derek M. Jones in
7803 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
7804 * tests/glr-regression.at (Uninitialized location when reporting
7805 ambiguity): Test the above case.
7806 Also, the embedded comments in this test case claim it checks the case
7807 of an empty RHS that has inherited the initial location. However, the
7808 corresponding LHS was already resolved, so yyresolveLocations didn't
7809 actually have reason to modify it. Fix this by forcing
7810 nondeterministic operation at the beginning of the parse.
7812 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
7814 * data/c.m4 (b4_yy_symbol_print_generate):
7815 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
7816 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
7817 of the bugs reported today by Derek M Jones in
7818 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
7819 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
7820 defined to be a type name without parens or brackets.
7821 (Location Type): Similarly for YYLTYPE.
7822 * tests/regression.at (Trivial grammars): Put in a test for this
7823 bug that will be caught by 'make maintainer-check' (though not,
7824 alas, by 'make check' unless your compiler is picky).
7826 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
7828 * NEWS: Version 2.2.
7829 * configure.ac (AC_INIT): Likewise.
7831 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
7833 * data/glr.c (yyreportTree): Make room in yystates for the state
7834 preceding the RHS. This fixes the segmentation fault reported by Derek
7836 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
7837 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
7838 to the user. Reported for yyreportTree by Derek M. Jones later in the
7840 * THANKS: Add Derek M. Jones.
7841 Update my email address.
7842 Fix typo in Steve Murphy's name.
7844 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
7846 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
7847 checking against YYLAST that caused the parser to miss a potential
7848 alternative in its diagnostic.
7849 Problem reported by Maria Jose Moron Fernandez in
7850 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
7851 * data/lalr1.cc (yysyntax_error_): Likewise.
7852 * data/yacc.c (yysyntax_error): Likewise.
7853 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
7854 tokens, in case we run into an older C compiler.
7855 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
7856 Use them to check for the off-by-one error fixed above.
7858 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
7859 YYSIZE_T, not size_t.
7860 * tests/regression.at (Trivial grammars): New test, to catch
7861 the error fixed by the above patch.
7863 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7865 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
7867 Reported by Steve Murphy.
7869 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7871 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
7872 * data/glr.cc: b4_location_flag is now b4_locations_flag.
7874 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7876 Implement --trace=m4.
7877 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
7878 * src/output.c (output_skeleton): When set, pass -dV to m4.
7880 Factor the handling of flags in m4.
7881 * src/output.c (prepare): Rename the muscle names debug, defines,
7882 error_verbose to debug_flag, defines_flag, error_verbose_flag.
7883 * data/c.m4: Adjust.
7884 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
7885 Use b4_define_flag_if to define other b4_FLAG_if macros.
7886 (b4_location_if): As a consequence, rename as...
7887 (b4_locations_if): this, for consistency.
7888 Adjust all the skeletons.
7890 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7892 * etc/bench.pm: Shorten bench names.
7894 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
7896 * src/output.h, src/output.c (error_verbose): Move to...
7897 * src/getargs.h, src/getargs.c: here.
7899 Adjust dependencies.
7901 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
7903 * data/c.m4 (b4_copyright): Put the special exception for Bison
7904 skeletons here, so we don't have to put it in each skeleton. All
7905 uses changed. Suggested by Akim Demaille. Also, wrap the
7906 copyright notice, in case it is longer than 80 columns. Replace
7907 comma by newline after title.
7909 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
7911 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
7912 incompatibility, not a bug. Mention that it wasn't fixed as of
7915 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
7917 * examples/extexi: Enforce the precedence of concatenation over
7919 Reported by Tommy Nordgren.
7921 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
7923 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
7924 with the member "token".
7925 Reported by Martin Nylin.
7927 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
7929 * data/glr.c: Switch to Bison 2.2 special-exception language in
7930 the copyright notice. Use more-regular format for titles and
7932 * data/glr.cc: Likewise.
7933 * data/location.cc: Likewise.
7934 * data/yacc.cc: Likewise.
7935 * doc/bison.texinfo (Conditions): Document this.
7936 * NEWS: likewise. Upgrade version to 2.2.
7938 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
7940 * data/glr.cc: Remove dead code.
7942 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
7944 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
7945 that variable and the line breaks the bootstrap. Problem reported
7946 by Juan M. Guerrero.
7948 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
7950 * doc/bison.texinfo (Multiple start-symbols): New.
7952 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
7954 * etc/README, etc/bench.pl: New.
7956 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
7958 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
7960 Reported by Mickael Labau.
7961 * tests/input.at (Torturing the Scanner): Test it.
7963 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
7965 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
7966 Problem reported by Bob Rossi.
7968 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
7970 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
7971 and didn't really work.
7972 For the index, use @ifnotinfo, not @iftex.
7973 Minor cleanups of spacing and terminology.
7975 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
7977 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
7978 of AT_NAME_PREFIX when %name-prefix is not used.
7980 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
7982 Apply --prefix to C++ skeletons too: they change the namespace.
7983 The test suite already exercize these cases.
7984 * data/c++.m4 (b4_namespace): New.
7985 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
7986 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
7987 * data/yacc.c, data/glr.c: Remove a useless `[]'.
7988 * doc/bison.texinfo: Document it.
7989 (Option Cross Key): Use @multitable in all formats. It looks
7990 nicer, even in TeX outputs.
7991 (Rules): Use the same code whatever the output type is.
7992 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
7993 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
7994 * tests/calc.at: Use it, instead of hard coding `yy'.
7996 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
7998 * TODO: Remove dead items.
8000 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
8002 * doc/FAQ: Remove, merged into...
8003 * doc/bison.texinfo (FAQ): this.
8004 * doc/Makefile.am (EXTRA_DIST): Adjust.
8006 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
8008 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
8010 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
8011 * doc/bison.texinfo (Calc++ Scanner): Use it.
8013 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
8015 Fix two nits reported by twlevo, plus one more that I discovered.
8017 * src/assoc.h (assoc_to_string): Give a name to the arg, as
8018 this is the usual Bison style.
8019 * src/location.h (location_print): Likewise.
8021 * src/reader.h (token_name): Likewise.
8023 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
8025 Fix some nits reported by twlevo.
8026 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
8027 and "POSIX". Use more-modern syntax for URLs. Mention C++
8028 and ask for Java. Don't hardwire OS version numbers. Add
8030 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
8031 * src/conflicts.c (solved_conflicts_obstack): Now static.
8033 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
8035 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
8036 page. Say "you can use it" not "you may use it" as on the web page;
8037 we're describing capabilities not granting permission.
8039 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
8041 * data/glr.c (yyresolveLocations): Rename local variables to avoid
8042 shadowing warnings. Use usual patter for iterating through RHS.
8043 * tests/glr-regression.at
8044 (Uninitialized location when reporting ambiguity):
8045 Modify yylex so that it uses its argument, rather than trying
8046 to rely on ARGSUSED (which doesn't work for gcc with warnings).
8047 const char -> char const.
8049 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
8050 Don't use tabs inside commands; it messes up 'ps'.
8051 Problem reported by twlevo.
8053 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
8055 * tests/glr-regression.at (Uninitialized location when reporting
8056 ambiguity): New test case.
8057 * data/glr.c (yyresolveLocations): New function, which uses
8059 (yyresolveValue): Invoke yyresolveLocations before reporting an
8061 * doc/bison.texinfo (Default Action for Locations): Note
8062 YYLLOC_DEFAULT's usage for ambiguity locations.
8063 (GLR Semantic Actions): Cross-reference those notes.
8065 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
8067 * tests/glr-regression.at (Leaked semantic values when reporting
8068 ambiguity): Remove unnecessary union and type declarations.
8069 (Leaked lookahead after nondeterministic parse syntax error): New test
8071 * data/glr.c (yyparse): Check for zero stacks remaining before
8072 attempting to shift the lookahead so that you don't lose it.
8074 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
8076 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
8077 * tests/glr-regression.at (Leaked semantic values when reporting
8078 ambiguity): New test case.
8079 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
8080 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
8081 now unnecessary yystackp parameter.
8082 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
8083 destructors can be called.
8085 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
8086 in existing testcases.
8088 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
8090 Don't leak semantic values for parent RHS when a user action cuts the
8091 parser, and clean up related code a bit.
8092 * tests/glr-regression.at (Leaked merged semantic value if user action
8093 cuts parse): Rename to...
8094 (Leaked semantic values if user action cuts parse): ... this. Add check
8095 for leaked parent RHS values.
8096 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
8097 between an unresolved state (non-empty chain of semantic options) and
8098 an incomplete one (signaled by an empty chain).
8099 (yyresolveStates): Document the interface. Move all manipulation of a
8100 successfully or unsuccessfully resolved yyGLRState to...
8101 (yyresolveValue): ... here so that yyresolveValue always leaves a
8102 yyGLRState with consistent data and thus is easier to understand.
8103 Remove the yyvalp and yylocp parameters since they are always just
8104 taken from the yys parameter. When reporting a discarded merged value
8105 in debugging output, note that it is incompletely merged. Document the
8107 (yyresolveAction): If resolving any of the RHS states fails, destroy
8108 them all rather than leaking them. Thus, as long as user actions are
8109 written to clean up the RHS correctly, yyresolveAction always cleans up
8110 the RHS of a semantic option. Document the interface.
8112 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
8114 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
8115 led to a segmentation fault in GNU Pascal. Problem reported
8118 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
8120 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
8121 mid-rule action inside a nonterminal symbol in order to declare a
8122 destructor for its semantic value.
8124 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
8126 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
8127 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
8128 __cplusplus && ! defined _STDLIB_H && !
8129 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
8130 defined free))]: Include <stdlib.h> rather than rolling our own
8131 declarations of malloc and free, to avoid problems with
8132 incompatible declarations (using 'throw') C++'s stdlib.h. This
8133 should fix Debian bug 340012
8134 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
8135 reported by Guillaume Melquiond.
8137 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
8139 * NEWS: Clarify symbols versus types in unused-value warnings.
8141 * configure.ac (AC_INIT): Bump version number.
8143 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
8145 * NEWS: Version 2.1a.
8146 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
8147 since C99 requires this.
8149 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
8151 * m4/c-working.m4: New file.
8152 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
8154 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
8156 * Makefile.maint: Merge from coreutils.
8158 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
8160 More portability fixes for problems summarized by Nelson H. F. Beebe.
8162 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
8163 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
8164 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
8165 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
8166 messes up because C++ code is compiled in 32-bit mode but linked
8169 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
8171 More portability fixes for problems summarized by Nelson H. F. Beebe.
8173 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
8174 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
8176 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
8177 nodist_PROGRAMS, since we don't need to actually compile the
8178 example if we're just doing a plain 'make'. This avoids bothering
8179 the installer unnecessarily about problems due to weird C++
8182 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
8184 More portability fixes for problems summarized by Nelson H. F. Beebe.
8186 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
8187 than #include "...", and compile with -I'.'. The old method was
8188 not portable, according to Posix and the C standard, and it does
8189 not work with Sun C 5.7, where previous #line directives affect
8190 the working directory used in later #include "..." directives.
8192 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8194 Various DJGGP specific issues in /djgpp
8196 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
8198 More portability fixes for problems summarized by Nelson H. F. Beebe.
8200 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
8201 '#include <map>' works and that you can apply ++ to iterators.
8203 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
8205 Work around portability problems summarized by Nelson H. F. Beebe in
8206 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
8208 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
8209 that '#include <string>' works.
8211 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
8212 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
8213 "warning: sorry: semantics of inline function static data `const
8214 unsigned char translate_table[262]' are wrong (you'll wind up with
8217 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
8218 or, xor to not_, and_, or_, and xor_, respectively. This works
8219 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
8220 random system header somewhere that includes the equivalent of
8223 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
8224 -E" works; it apparently doesn't work with PathScale EKO Compiler
8227 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
8229 During deterministic GLR operation, user actions should be able to
8230 influence the parse by changing yychar. To make this easier to fix and
8231 to make glr.c easier to evolve in general, don't maintain yytoken in
8232 parallel with yychar; just compute yytoken when needed.
8233 * tests/glr-regression.at (Incorrect lookahead during deterministic
8234 GLR): Check that setting yychar in a user action has the intended
8236 * data/glr.c (yyGLRStack): Remove yytokenp member.
8237 (yyclearin): Don't set *yytokenp.
8238 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
8239 yychar rather than *yytokenp to determine the current lookahead.
8240 Compute yytoken locally when needed.
8241 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
8244 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
8245 after `--report' documentation.
8247 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
8249 * src/parse-gram.y (grammar_declaration): Location of printer
8250 symbol is @1, not list->location. Bug reported by twlevo.
8251 * tests/input.at (Incompatible Aliases): Adjust to above change.
8253 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
8255 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
8256 all the test at once. This makes the output easier to read in the
8259 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
8260 got from <http://bro-ids.org/download.html>. The bug is that
8261 when two actions appeared in succession, the second one was
8262 scanned before the first one was added to the grammar rule
8263 as a midrule action. Bison then output the incorrect warning
8264 "parse.y:905.17-906.36: warning: unused value: $3".
8265 * src/parse-gram.y (BRACED_CODE, action): These are no longer
8266 associated with a value.
8267 (rhs): Don't invoke grammar_current_rule_action_append.
8268 (action): Invoke it here instead.
8269 * src/reader.c (grammar_midrule_action): Now extern.
8270 (grammar_current_rule_action_append): Don't invoke
8271 grammar_midrule_action; that is now the scanner's job.
8272 * src/reader.h (last_string, last_braced_code_loc):
8273 (grammar_midrule_action): New decls.
8274 * src/scan-gram.l (last_string): Now extern, sigh.
8275 (last_braced_code_loc): New extern variable.
8276 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
8277 rule already has an action.
8278 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
8279 * tests/input.at (AT_CHECK_UNUSED_VALUES):
8280 Add some tests to check that the above changes fixed the bug.
8282 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
8284 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
8285 All used changed. Check whether the symbol has a destructor,
8286 not whether it is typed.
8287 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
8288 that the values are still reported as unused. All line numbers
8291 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
8293 Work around a bug in bro 0.8, which underparenthesizes its
8294 definition of YYLLOC_DEFAULT.
8295 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
8297 * data/lalr1.cc: Likewise.
8298 * data/yacc.cc: Likewise.
8300 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
8302 Work around a bug in Pike 7.0, and give the Pike folks a
8303 better way to override the usual int widths.
8304 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
8305 user can override the types.
8306 (short): #undef, to work around a bug in Pike 7.0.
8307 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
8308 (union yyalloc.yyss): Use yytype_int16 rather than short.
8310 (yysigned_char): Remove.
8311 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
8312 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
8313 * tests/regression.at (Web2c Actions): Adjust to above changes.
8315 * src/reader.c (check_and_convert_grammar): New function.
8316 (reader): Close the input file even if something went wrong during
8317 parsing. Minor file descriptor leak reported by twlevo.
8319 * src/assoc.c (assoc_to_string): Use a default: abort (); case
8320 to pacify gcc -Wswitch-default.
8321 * src/scan-gram.l (adjust_location): Use a default: break; case
8322 to pacify gcc -Wswitch-default.
8323 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
8324 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
8325 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
8326 Move these decls to scan-skel.l, since they don't need to be
8328 * src/scan-skel.l: Accept the above decls.
8329 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
8332 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
8334 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
8335 since we don't want to insist on a version number at the start
8336 of the changelog every time.
8337 * Makefile.maint: Sync from coreutils a bit better.
8338 (sc_trailing_blank): Renamed from sc_trailing_space.
8340 (sc_no_if_have_config_h, sc_require_config_h):
8341 (sc_prohibit_assert_without_use): New rules.
8342 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
8343 (sc_dd_max_sym_length): Fix leading spaces in rule.
8344 (sc_system_h_headers): Prefix with @.
8345 (sc_useless_cpp_parens, m4-check): Output line numbers.
8346 (changelog-check): Allow version only in head.
8347 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
8348 satisfy new Makefile.maint rule.
8349 * data/glr.c: Likewise.
8350 * data/glr.cc: Likewise.
8351 * data/lalr1.cc: Likewise.
8352 * data/yacc.c: Likewise.
8353 * lib/ebitsetv.c: Likewise.
8354 * lib/lbitset.c: Likewise.
8355 * lib/subpipe.c: Likewise.
8356 * lib/timevar.c: Likewise.
8357 * src/system.h: Likewise.
8358 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
8359 * djgpp/Makefile.maint: Add copyright notice.
8360 * djgpp/README.in: Likewise.
8361 * djgpp/config.bat: Likewise.
8362 * djgpp/config.site: Likewise.
8363 * djgpp/config_h.sed: Likewise.
8364 * djgpp/djunpack.bat: Likewise.
8365 * djgpp/config.sed: Fix copyright notice to match standard format.
8366 * djgpp/subpipe.h: Likewise.
8367 * lib/bitsetv-print.c: Likewise.
8368 * lib/bitsetv.c: Likewise.
8369 * lib/subpipe.h: Likewise.
8370 * lib/timevar.c: Likewise.
8371 * lib/timevar.h: Likewise.
8372 * djgpp/subpipe.c: Use standard recipe for config.h.
8373 * lib/abitset.c: Likewise.
8374 * lib/bitset.c: Likewise.
8375 * lib/bitset_stats.c: Likewise.
8376 * lib/bitsetv-print.c: Likewise.
8377 * lib/bitsetv.c: Likewise.
8378 * lib/ebitsetv.c: Likewise.
8379 * lib/get-errno.c: Likewise.
8380 * lib/lbitset.c: Likewise.
8381 * lib/subpipe.c: Likewise.
8382 * lib/timevar.c: Likewise.
8383 * lib/vbitset.c: Likewise.
8384 * tests/local.at: Likewise.
8385 * src/scan-gram.l: Don't include verify.h, since system.h does
8387 * .x-sc_require_config_h: New file.
8388 * .x-sc_unmarked_diagnostics: New file.
8390 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
8392 Be a bit more systematic about using 'abort'.
8393 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
8394 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
8395 Put 'default: abort ();' before some other case, to satisfy older
8397 * lib/bitset_stats.c (bitset_stats_init): Likewise.
8398 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
8399 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
8400 * src/conflicts.c (resolve_sr_conflict): Likewise.
8401 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
8402 (get_decision_str, get_orientation_str, get_node_alignment_str):
8403 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
8404 (get_linestyle_str, get_arrowstyle_str): Likewise.
8405 * src/conflicts.c (resolve_sr_conflict):
8406 Use a default case rather than one for the one remaining enum
8407 value, to catch invalid enum values as well.
8408 * src/lalr.c (set_goto_map, map_goto):
8409 Prefer "assert (FOO);" to "if (!FOO) abort ();".
8410 * src/nullable.c (nullable_compute, token_definitions_output):
8412 * src/reader.c (packgram, reader): Likewise.
8413 * src/state.c (transitions_to, state_new, state_reduction_find):
8415 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
8416 (symbol_pack): Likewise.
8417 * src/tables.c (conflict_row, pack_vector): Likewise.
8418 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
8419 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
8420 * src/system.h: Don't include <assert.h>.
8421 (assert): New macro.
8423 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
8424 (Destructor Decl, Parser Function, Pure Calling):
8425 Describe rules for braces inside C code more carefully.
8427 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
8429 Fix some porting glitches found by Nelson H. F. Beebe.
8430 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
8431 compilers that don't understand that abort () does not return.
8432 * src/state.c (transitions_to): Likewise.
8433 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
8434 that '#include <cstdlib>' works.
8435 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
8436 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
8437 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
8438 for the benefit of some pre-C99 compilers.
8440 * bootstrap: Undo changes to gnulib files that autoreconf made.
8442 Minor fixups to get 'make maintainer-check' to work.
8443 * configure.ac: Don't use -Wnested-externs, as it's incompatible
8444 with the new verify.h implementation.
8445 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
8446 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
8447 * data/yacc.c (YYUSE): Likewise.
8448 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
8449 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
8450 * src/parse-gram.y (declaration): Don't pass a string constant
8451 to a function that expects char *, since GCC might complain
8452 about the constant value.
8453 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
8454 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
8455 before #defining them.
8456 * tests/glr-regression.at
8457 (Incorrectly initialized location for empty right-hand side in GLR):
8458 In yyerror, use the msg arg.
8459 (Corrupted semantic options if user action cuts parse):
8460 (Incorrect lookahead during deterministic GLR):
8461 (Incorrect lookahead during nondeterministic GLR):
8462 Don't name a local var 'index'; it shadows string.h's 'index'.
8464 2006-01-19 Akim Demaille <akim@epita.fr>
8466 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
8467 location, not just parts of it.
8469 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
8471 * NEWS: Document the fact that multiple %unions are now allowed.
8472 * doc/bison.texinfo (Union Decl): Likewise.
8473 * TODO: This feature is now implemented, so remove it from
8476 * Makefile.maint: Merge with coreutils Makefile.maint.
8477 (CVS_LIST): Use build-aux version if available.
8478 (VERSION_REGEXP): New macro.
8479 (syntax-check-rules): Add sc_no_if_have_config_h,
8480 sc_prohibit_assert_without_use, sc_require_config_h,
8481 sc_useless_cpp_parens.
8482 (sc_obsolete_symbols): Check for O_NDELAY.
8483 (sc_dd_max_sym_length): Track coreutils.
8484 (sc_unmarked_diagnostics): Look in all files, not just *.c.
8485 (sc_useless_cpp_parens): New rule.
8486 (news-date-check): Look for version or today's date.
8487 (changelog-check): Don't require version number near head.
8488 (copyright-check): Use current year instead of hardwiring 2005.
8489 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
8490 (announcement): Add --gpg-key-ID.
8492 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
8495 Avoid undefined behavior that addressed just before the start of an
8496 array. Problem reported by twlevo.
8497 * src/reader.c (packgram): Prepend a new sentinel before ritem.
8498 * src/lalr.c (build_relations): Rely on new sentinel.
8499 * src/gram.c (gram_free): Adjust to new sentinel.
8501 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
8503 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
8504 yylookaheadNeeds. All uses updated.
8505 (yysplitStack): Rename local yynewLookaheadStatuses to
8506 yynewLookaheadNeeds.
8507 * data/glr-regression.at (Incorrect lookahead during nondeterministic
8508 GLR): In comments, change `lookahead status' to `lookahead need'.
8510 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8512 * data/glr.c (yysplitStack): A little stylistic rewrite.
8514 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8516 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
8518 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
8520 * doc/bison.texinfo: Fix some typos.
8521 (GLR Semantic Actions): New subsection discussing special
8522 considerations because GLR semantic actions might be deferred.
8523 (Actions): Mention look-ahead usage of yylval.
8524 (Actions and Locations): Mention look-ahead usage of yylloc.
8525 (Special Features for Use in Actions): Add YYEOF entry and mention it
8526 in the yychar entry.
8527 In the yychar entry, remove mention of the local yychar case (pure
8528 parser) since this is irrelevant information when writing semantic
8529 actions and since it's already discussed in `Table of Symbols' where
8530 yychar is otherwise described as an external variable.
8531 In the yychar entry, don't call it the `current' look-ahead since it
8532 isn't when semantic actions are deferred.
8533 In the yychar and yyclearin entries, add note about deferred semantic
8535 Add yylloc and yylval entries discussing look-ahead usage.
8536 (Look-Ahead Tokens): When discussing yychar, don't call it the
8537 `current' look-ahead, and do mention yylval and yylloc.
8538 (Error Recovery): Cross-reference `Action Features' when mentioning
8540 (Table of Symbols): In the yychar entry, don't call it the `current'
8542 In the yylloc and yylval entries, mention look-ahead usage.
8544 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
8546 * tests/glr-regression.at: Update copyright year to 2006.
8548 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8550 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
8551 use during nondeterministic operation to track which stacks have
8552 actually needed the current lookahead.
8553 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
8554 Allocate, deallocate, resize, and otherwise shuffle space for
8555 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
8556 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
8557 appropriately during nondeterministic operation.
8558 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
8559 members to store the current lookahead to be used by the deferred
8561 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
8562 from which the RHS is taken. Set the lookahead members of the new
8563 yySemanticOption according to the lookahead status for stack yyk.
8564 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
8565 yyaddDeferredAction.
8566 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
8567 members of yySemanticOption before invoking yyuserAction, and then set
8568 them back to their current values afterward.
8569 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
8570 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
8571 * tests/glr-regression.at: Remove `.' from the ends of recent test case
8572 titles for consistency.
8573 (Leaked merged semantic value if user action cuts parse): In order to
8574 suppress lint warnings, use arguments in merge function, and assign
8575 char value < 128 in main.
8576 (Incorrect lookahead during deterministic GLR): New test case.
8577 (Incorrect lookahead during nondeterministic GLR): New test case.
8579 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8581 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
8582 !yyvaluep as signal that no semantic value is available to print.
8583 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
8584 to print a semantic value.
8586 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
8588 * tests/glr-regression.at: For consistency with my newer test cases,
8591 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
8593 * data/glr.c (yyresolveValue): When merging semantic options, if at
8594 least one user action succeeds but a later one cuts the parse, then
8595 destroy the semantic value before returning rather than leaking it.
8596 (yyresolveStates): If a user action cuts the parse and thus
8597 yyresolveValue fails, ignore the (unset) semantic value rather than
8598 corrupting the yyGLRState, and empty the semantic options list since
8599 the user actions should have called all necessary destructors.
8600 Simplify code with YYCHK.
8601 * tests/glr-regression.at (Corrupted semantic options if user action
8602 cuts parse): New test case.
8603 (Undesirable destructors if user action cuts parse): New test case.
8604 Before applying any of this patch, this test case never actually failed
8605 for me... but only because the corrupted semantic options usually
8607 (Leaked merged semantic value if user action cuts parse): New test
8610 2006-01-05 Akim Demaille <akim@epita.fr>
8612 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
8614 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
8616 * data/c.m4 (b4_c_modern): New macro, with a new provision for
8617 _MSC_VER. Problem reported by Cenzato Marco.
8618 (b4_c_function_def): Use it.
8619 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
8621 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
8622 than rolling our own.
8624 2006-01-04 Akim Demaille <akim@epita.fr>
8626 Also warn about non-used mid-rule values.
8627 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
8629 (symbol_list_new): Adjust.
8630 * src/reader.c (symbol_typed_p): New.
8631 (grammar_rule_check): Use it.
8632 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
8634 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
8636 * tests/actions.at (Exotic Dollars): Adjust.
8638 2006-01-04 Akim Demaille <akim@epita.fr>
8640 * src/reader.c (grammar_midrule_action): If $$ is set in a
8641 mid-rule, move the `used' bit to its lhs.
8642 * tests/input.at (Unused values): New.
8643 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
8645 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
8647 * doc/bison.texinfo (Bison Options): Say more accurately what
8649 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
8650 about declarations in the grammar when in Yacc mode, as POSIX does
8651 not require a diagnostic when the grammar uses extensions.
8653 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
8655 Warn about dubious constructions like "%token T T".
8657 * src/symtab.h (struct symbol.declared): New member.
8658 * src/symtab.c (symbol_new): Initialize it to false.
8659 (symbol_class_set): New arg DECLARING, specifying whether
8660 this is a declaration that we want to warn about, if there
8661 is more than one of them. All uses changed.
8663 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
8664 Allow multiple %union directives, whose contents concatenate.
8665 * src/parse-gram.y (grammar_declaration): Likewise.
8666 Use muscle_code_grow, so that we don't need stype_line any more.
8669 * src/muscle_tab.c (muscle_grow): Fix comment.
8671 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
8672 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
8673 Update copyright year to 2006.
8675 2006-01-03 Akim Demaille <akim@epita.fr>
8677 Have glr.cc pass (some of) the calc.at tests.
8678 * data/glr.cc (b4_parse_param_orig): New.
8679 (b4_parse_param): Improve its definition, and bound it more
8680 clearly in the skeleton.
8681 (b4_epilogue): Append, instead of prepending, in order to keep
8683 Simplify the generation of auxiliary functions: locations and
8684 purity are mandated.
8685 (b4_global_tokens_and_yystype): Honor it.
8686 * data/location.cc (c++.m4): Don't include it.
8687 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
8689 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
8691 Be sure to initialize the first position's filename.
8692 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
8694 (AT_CHECK_CALC_GLR_CC): New.
8695 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
8697 2006-01-02 Akim Demaille <akim@epita.fr>
8699 * src/output.c (output_skeleton): Don't hard wire the inclusion of
8701 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
8702 * data/glr.cc: Do not include stack.hh.
8704 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
8706 * data/glr.c: Reformat whitespace with tabs.
8707 (b4_lpure_formals): Remove this unused m4 macro.
8708 * tests/cxx-type.at: Reformat whitespace with tabs.
8709 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
8710 since it's a member. Rename type to isNterm for clarity.
8712 2005-12-29 Akim <akim@sulaco.local>
8714 Let glr.cc catch up with symbol_value_print.
8715 * data/glr.cc (b4_yysymprint_generate): Replace by...
8716 (b4_yy_symbol_print_generate): this.
8717 (yy_symbol_print, yy_symbol_value_print): Declare them.
8719 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
8721 * src/location.h (boundary): Note that a line or column equal
8722 to INT_MAX indicates an overflow.
8723 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
8724 (rule_length_overflow, increment_rule_length, add_column_width):
8726 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
8727 (<SC_BRACED_CODE>"}"):
8728 Use increment_rule_length rather than incrementing it by hand.
8729 (adjust_location, handle_syncline): Diagnose overflow.
8730 (handle_action_dollar, handle_action_at):
8731 Fix bug with monstrosities like $-2147483648.
8732 Remove now-unnecessary checks.
8733 (scan_integer): Verify assumptions and remove now-unnecessary checks.
8734 (convert_ucn_to_byte): Verify assumptions.
8735 (handle_syncline): New arg LOC. All callers changed.
8736 Don't store through a value derived from char const * pointer.
8738 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
8741 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
8743 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
8744 Remove unnecessary forward static decls.
8746 2005-12-27 Akim Demaille <akim@epita.fr>
8748 * src/reader.c (grammar_current_rule_check): Also check that $$
8750 Take the rule to check as argument, hence rename as...
8751 (grammar_rule_check): this.
8752 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
8754 (grammar_rule_begin, grammar_rule_end): these, for consistency.
8755 (grammar_midrule_action, grammar_symbol_append): Now static.
8756 * tests/torture.at (input): Don't rely on the default action
8757 being always performed.
8758 * tests/calc.at: "Set" $$ even when the action is "cut" with
8760 * tests/actions.at (Exotic Dollars): Instead of using unused
8761 values, check that the warning is issued.
8763 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
8765 * NEWS: Improve wording for unused-value warnings.
8767 2005-12-22 Akim Demaille <akim@epita.fr>
8769 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
8770 (b4_yysymprint_generate): Rename as...
8771 (b4_yy_symbol_print_generate): this.
8772 Generate yy_symbol_print instead of yysymprint.
8773 Generate also yy_symbol_value_print, and use it.
8775 2005-12-22 Akim Demaille <akim@epita.fr>
8777 * NEWS: Warn about unused values.
8778 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
8780 (symbol_list_n_get, symbol_list_n_used_set): New.
8781 (symbol_list_n_type_name_get): Use symbol_list_n_get.
8782 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
8783 * src/reader.c (grammar_current_rule_check): Check that values are
8785 * src/symtab.c (symbol_print): Accept 0.
8786 * tests/existing.at: Remove the type information.
8788 Remove useless actions (beware of mid-rule actions: perl -000
8789 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
8790 * tests/actions.at (Exotic Dollars): Use unused values.
8791 * tests/calc.at: Likewise.
8792 * tests/glr-regression.at (No users destructors if stack 0 deleted):
8795 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
8798 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
8800 Undo 2005-12-01 tentative license wording change. The wording is
8801 still being reviewed by the lawyers, and we don't want to wait for
8802 them before publishing a test release. For now, revert to the
8804 * NEWS: Undo 2005-12-01 change.
8805 * data/glr.c: Revert to previous license wording.
8806 * data/glr.cc: Likewise.
8807 * data/lalr1.cc: Likewise.
8808 * data/location.cc: Likewise.
8809 * data/yacc.c: Likewise.
8811 * NEWS: Reword %destructor vs YYABORT etc.
8812 * data/glr.c: Use American spacing, for consistency.
8813 * data/glr.cc: Likewise.
8814 * data/lalr1.cc: Likewise.
8815 * data/yacc.c: Likewise.
8816 * data/yacc.c: Reformat comments slightly.
8817 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
8818 for consistency. Fix some spelling errors and reword recently-included
8820 * tests/cxx-type.at: Cast results of malloc, for C++.
8822 2005-12-21 Joel E. Denny <address@hidden>
8824 * tests/cxx-type.at: Construct a tree, count the parents of shared
8825 nodes, and free each node once and only once. Previously, the memory
8826 for semantic values was leaked instead.
8828 2005-12-21 Joel E. Denny <address@hidden>
8830 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
8831 (yylval, yylloc): If pure, #define to yystackp->yyval and
8832 yystackp->yyloc similar to yychar and yynerrs.
8833 (yyparse): If pure, remove local yylval and yylloc. Add local
8834 yystackp to accommodate pure definitions of yylval and yylloc.
8835 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
8836 yylvalp and yyllocp to &yylval and &yylloc.
8837 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
8838 namespace. Previously, nerrs and char were missing, but lval and lloc
8840 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
8841 yylvalp and yyllocp parameters since, if pure, these are now always
8842 accessible through yystackp. If not pure, they are still accessible
8844 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
8845 `if (YYID (N))' to pacify lint.
8847 2005-12-21 Akim Demaille <akim@epita.fr>
8849 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
8850 destroy the RHS symbols of a rule.
8851 * data/yacc.c (yylen): Initialize to 0.
8852 Keep its value to the number of items to possibly shift.
8853 In particular, a regular successful parse that ends on YYFINAL by
8854 a (internal) YYACCEPT must not have yylen != 0.
8855 (yyerrorlab, yyreturn): Pop the RHS.
8856 Reorder a bit to emphasize the `shifting' bits of code.
8857 (YYPOPSTACK): Now accept a number of items to pop.
8858 * data/lalr1.cc: Likewise.
8859 * data/glr.c: Formatting changes.
8860 Use goto instead of fall through.
8861 * doc/bison.texinfo (Destructor Decl): Complete.
8863 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8865 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
8866 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
8867 * djgpp/config.bat: Replace every occurence of the file name
8868 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
8869 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
8870 * djgpp/config.sed: Replace every occurence of the file name
8871 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
8872 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
8873 * djgpp/djunpack.bat: DJGPP specific file.
8874 * djgpp/fnchange.lst: DJGPP specific file.
8875 * djgpp/README.in: Add new information about how to unpack the bison
8876 source on MSDOS and other systems which have 8.3 file name restrictions
8877 using djunpack.bat and fnchange.lst.
8879 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
8881 * bootstrap (build_cvs_prefix): Remove; unused.
8882 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
8883 when getting gnulib.
8885 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
8887 * data/glr.c: Reorder typedef declarations for structs to match order
8888 of struct declarations.
8889 Rename yystack everywhere to yystackp except in yyparse where it's not
8891 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
8893 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
8894 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
8895 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
8898 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
8900 * tests/sets.at (Accept): Fix typos in regular expression used to
8901 sed out the final state number.
8903 Work around portability problem on Solaris 10: flex-generated
8904 files include <stdio.h> before <config.h>, which messes up
8905 because the latter defines __EXTENSIONS__. Address the problem
8906 by creating two new little files that include <config.h> first,
8907 then include the flex-generated files. Rewrite everyone else
8908 to include <config.h> first, as well.
8909 * lib/timevar.c: Always include "config.h".
8910 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
8911 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
8912 (EXTRA_bison_SOURCES): New macro.
8913 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
8914 * src/system.h: Don't include config.h.
8915 * src/LR0.c: Include <config.h> first.
8916 * src/assoc.c: Likewise.
8917 * src/closure.c: Likewise.
8918 * src/complain.c: Likewise.
8919 * src/conflicts.c: Likewise.
8920 * src/derives.c: Likewise.
8921 * src/files.c: Likewise.
8922 * src/getargs.c: Likewise.
8923 * src/gram.c: Likewise.
8924 * src/lalr.c: Likewise.
8925 * src/location.c: Likewise.
8926 * src/main.c: Likewise.
8927 * src/muscle_tab.c: Likewise.
8928 * src/nullable.c: Likewise.
8929 * src/output.c: Likewise.
8930 * src/parse-gram.y: Likewise.
8931 * src/print.c: Likewise.
8932 * src/print_graph.c: Likewise.
8933 * src/reader.c: Likewise.
8934 * src/reduce.c: Likewise.
8935 * src/relation.c: Likewise.
8936 * src/state.c: Likewise.
8937 * src/symlist.c: Likewise.
8938 * src/symtab.c: Likewise.
8939 * src/tables.c: Likewise.
8940 * src/uniqstr.c: Likewise.
8941 * src/vcg.c: Likewise.
8943 * src/parse-gram.y: Fix minor problems uncovered by lint.
8944 (current_lhs, current_lhs_location): Now static.
8945 (current_assoc): Remove unused variable.
8947 Cleanups so that Bison-generated parsers have less lint.
8948 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
8949 Prepend /*ARGSUSED*/, for lint's sake.
8950 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
8951 definition if 'lint' is defined.
8952 (YYID): New macro (or function, if lint).
8953 All uses of /*CONSTCOND*/0 replaced by YYID(0).
8954 * data/yacc.c: Likewise.
8955 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
8956 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
8957 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
8959 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
8960 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
8961 Use YYID(0) rather than 0, for lint.
8962 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
8963 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
8965 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
8967 * tests/glr-regression.at
8968 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
8969 Close memory leak reported by twlevo.
8971 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
8973 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
8975 (yyparse): Iterate another stack in order to call user destructors.
8976 * tests/glr-regression.at (No users destructors if stack 0 deleted):
8978 (Duplicated user destructor for lookahead): This test now is expected
8981 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
8983 * NEWS: Document the following change.
8984 * data/yacc.c: Say "parser skeleton" rather than "file", since
8985 it's no longer just a file.
8986 * data/glr.c: Grant a special exception for C GLR parsers, that
8987 reads like the already-existing exception for C LALR(1) parsers.
8988 * data/glr.cc: Likewise.
8989 * data/lalr1.cc: Likewise.
8990 * data/location.cc: Likewise.
8991 * data/yacc.c: Reword the "written by" statement to clarify that
8992 it was the parser skeleton, not the entire output file.
8993 * data/glr.c: Written by Paul Hilfinger.
8994 * data/glr.cc: Written by Akim Demaille.
8995 * data/lalr1.cc: Likewise.
8997 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
8999 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
9000 Fix typos in previous change that broke 'make check'.
9001 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
9003 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
9004 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
9005 We can revert this once things settle down.
9007 * src/conflicts.c (conflicts_print): Don't print file name twice
9008 when %expect fails because there were no conflicts.
9009 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
9011 * tests/conflicts.at (%expect not enough, %expect too much):
9012 (%expect with reduce conflicts): Adjust to new behavior.
9014 2005-11-18 Akim Demaille <akim@epita.fr>
9016 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
9018 * NEWS: Document this.
9019 * doc/bison.texinfo (Expect Decl): Likewise.
9021 2005-11-16 Akim Demaille <akim@epita.fr>
9023 Generalize the display of semantic values and locations in traces.
9024 * data/glr.c (yy_reduce_print): Fix indices (again).
9025 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
9027 * data/lalr1.cc (yyreduce_print): Rename as...
9028 (yy_reduce_print): this.
9029 Display values and locations.
9030 * data/yacc.c (yy_reduce_print): Likewise.
9031 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
9032 (yysymprint): Move higher to be visible from yy_reduce_print).
9034 * tests/calc.at: Adjust the expected length of the traces.
9036 2005-11-14 Akim Demaille <akim@epita.fr>
9038 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
9039 from 1 to N, while values and location start at 0.
9040 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
9042 2005-11-14 Akim Demaille <akim@epita.fr>
9044 * data/glr.c (yy_reduce_print): Fix the $ number.
9046 2005-11-14 Akim Demaille <akim@epita.fr>
9048 "Use" parse parameters.
9049 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
9050 * data/glr.c, data/glr.cc: Use them.
9051 * data/glr.c (YYUSE): Have a C++ definition that supports
9054 2005-11-14 Akim Demaille <akim@epita.fr>
9056 * data/glr.c (yyexpandGLRStack): Declare only if defined.
9058 2005-11-14 Akim Demaille <akim@epita.fr>
9061 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
9063 2005-11-12 Akim Demaille <akim@epita.fr>
9065 Let position and location be PODs.
9066 * data/location.cc (position::initialize, location::initialize): New.
9067 (position::position, location::location): Define only if
9068 b4_location_constructors is defined.
9069 * data/lalr1.cc (b4_location_constructors): Define it for backward
9071 * doc/bison.texinfo (Initial Action Decl): Use initialize.
9073 2005-11-12 Akim Demaille <akim@epita.fr>
9075 * data/lalr1.cc: Move the body of the ctor and dtor into the
9076 parser file (instead of the header).
9077 Wrap the implementations in a "namespace yy".
9079 2005-11-12 Akim Demaille <akim@epita.fr>
9081 Have glr.c include its header file when created.
9082 * data/glr.c (b4_shared_declarations): New.
9083 Output them verbatim in the parser if !%defines, otherwise
9084 output then in the header file, and include it instead.
9086 2005-11-11 Akim Demaille <akim@epita.fr>
9088 * data/glr.c: Comment changes.
9090 2005-11-11 Akim Demaille <akim@epita.fr>
9092 When yydebug, report semantic and location values for reductions.
9093 * data/glr.c (yy_reduce_print): Report the semantic values and the
9095 (YY_REDUCE_PRINT): Adjust.
9096 (yyglrReduce): Use them.
9097 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
9098 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
9099 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
9102 2005-11-10 Akim Demaille <akim@epita.fr>
9104 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
9105 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
9106 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
9108 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
9110 * m4/cxx.m4, examples/Makefile.am: Don't build
9111 examples/calc++ if no C++ compiler is available. (trivial change)
9113 2005-11-09 Akim Demaille <akim@epita.fr>
9115 * src/scan-skel.l: Use a couple of asserts.
9117 2005-11-03 Akim Demaille <akim@epita.fr>
9119 In some (weird) cases, the final state number is incorrect.
9120 Reported by Alexandre Duret-Lutz.
9121 * src/LR0.c (state_list_append): Remove the computation of
9123 (save_reductions): Do it here.
9124 (get_state): Alpha conversion.
9125 (generate_states): Use a for loop.
9126 * src/gram.h (item_number_is_rule_number)
9127 (item_number_is_symbol_number): New.
9128 * src/state.c: Use assert.
9129 * src/system.h: Include assert.h.
9130 * tests/sets.at (Accept): New.
9132 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9134 * data/glr.c (yyfill): Adjust comment.
9135 (yyresolveAction): Initialize default location properly
9136 for empty right-hand sides.
9137 (yydoAction): Ditto.
9138 Add comment explaining apparently dead code.
9139 * tests/glr-regression.at
9140 (Incorrectly initialized location for empty right-hand side in GLR):
9143 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
9145 * bootstrap (cleanup_gnulib): New function. Use it to clean up
9146 gnulib when interrupted. This fixes some race conditions and
9147 works around some portability problems (one noted by Paul
9150 2005-10-22 Akim <akim@epita.fr>
9152 * Makefile.cfg: Adjust to config -> build-aux.
9155 2005-10-21 Akim Demaille <akim@epita.fr>
9157 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
9159 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
9160 * data/yacc.c (b4_Pure_if): Rename as...
9161 (b4_yacc_pure_if): this.
9162 (YY_SYMBOL_PRINT, yyparse): Adjust.
9163 * doc/bison.texinfo: Formatting changes.
9165 2005-10-21 Akim Demaille <akim@epita.fr>
9167 Finish the transition config -> build-aux.
9168 * configure.ac, Makefile.am: Use build-aux.
9169 * config/prev-version, config/announce-gen, config/Makefile.am:
9171 * build-aux/prev-version, build-aux/announce-gen,
9172 * build-aux/Makefile.am: here.
9174 2005-10-14 Akim Demaille <akim@epita.fr>
9176 * examples/calc++/test: Use set -x only when VERBOSE.
9178 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
9180 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
9181 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
9183 2005-10-13 Akim Demaille <akim@epita.fr>
9185 * src/scan-skel.l: Output the base name parts of the parser and
9187 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
9189 Use this to exercise C++ outputs in subdirs.
9190 Reported by Oleg Smolsky.
9192 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
9194 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
9195 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
9196 Problem reported by John P. Hartmann.
9197 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
9200 2005-10-12 Akim Demaille <akim@epita.fr>
9202 * src/parse-gram.y (version_check): Exit 63 to please missing
9203 (stands for "version mismatch).
9204 * tests/input.at, doc/bison.texinfo: Adjust.
9206 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
9208 Work around portability problems with Visual Age C compiler
9209 (xlc and xlC_r) reported by John P. Hartmann.
9210 * data/location.cc (initial_column, initial_line): Remove.
9211 All uses replaced by 0 and 1.
9212 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
9213 that xlc complains about.
9214 * src/scan-skel.l (skel_wrap): Likewise.
9215 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
9217 * data/yacc.c (YYMODERN_C): New macro, which also looks at
9218 __STDC_VERSION__. Use it everywhere instead of looking at
9219 __STDC__ and __cplusplus.
9221 2005-10-10 Akim Demaille <akim@epita.fr>
9223 * examples/calc++/test: Be quiet unless VERBOSE.
9225 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
9227 * data/c.m4 (yydestruct, yysymprint):
9228 Use YYUSE instead of casting to void.
9229 * data/glr.c (YYUSE): New macro.
9230 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
9231 Use it instead of rolling our own.
9232 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
9234 Use /*CONSTCOND*/ to suppress lint warnings.
9235 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
9236 (YY_STACK_PRINT): Use 'false' not '0'.
9238 (yysymprint_, yydestruct_): Use it instead of rolling our own.
9239 * data/yacc.c (YYUSE): New macro.
9240 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
9241 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
9242 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
9245 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
9246 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
9248 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
9250 Undo the parts of the unlocked-I/O change that substituted
9251 putc or puts for printf. This might hurt performance a bit,
9252 but some people prefer the printf style.
9253 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
9254 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
9255 All uses replaced by YYFPRINTF and YYDPRINTF.
9256 * data/yacc.c: Likewise.
9257 * lib/bitset.c (bitset_print): Likewise.
9258 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
9260 * lib/lbitset.c (debug_lbitset): Likewise.
9261 * src/closure.c (print_firsts, print_fderives): Likewise.
9262 * src/gram.c (grammar_dump): Likewise.
9263 * src/lalr.c (look_ahead_tokens_print): Likewise.
9264 * src/output.c (escaped_output): Likewise.
9265 (user_actions_output): Break apart two printfs.
9266 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
9267 * src/reduce.c (reduce_print): Likewise.
9268 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
9269 * src/system.h: Include unlocked-io.h rathe than stdio.h.
9271 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
9272 Use assignments rather than casts-to-void to suppress
9273 unused-variable warnings. This pacifies 'lint'.
9274 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
9275 unused-variable warnings.
9277 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9279 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
9281 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
9283 Use unlocked I/O for a minor performance improvement on hosts like
9284 GNU/Linux and Solaris that support unlocked I/O. The basic idea
9285 is to use the gnlib unlocked-io module, and to prefer putc and
9286 puts to printf when either will work (since the latter doesn't
9287 come in an unlocked flavor).
9288 * bootstrap (gnulib_modules): Add unlocked-io.
9289 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
9290 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
9291 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
9292 and similarly for puts and putc and printf.
9293 * data/yacc.c: Likewise.
9294 * lib/bitset.c (bitset_print): Likewise.
9295 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
9296 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
9298 * lib/lbitset.c (debug_lbitset): Likewise.
9299 * src/closure.c (print_firsts, print_fderives): Likewise.
9300 * src/gram.c (grammar_dump): Likewise.
9301 * src/lalr.c (look_ahead_tokens_print): Likewise.
9302 * src/output.c (escaped_output): Likewise.
9303 (user_actions_output): Coalesce two printfs.
9304 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
9305 * src/reduce.c (reduce_print): Likewise.
9306 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
9307 * src/system.h: Include unlocked-io.h rather than stdio.h.
9309 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
9310 this confuses xgettext.
9312 2005-10-02 Akim Demaille <akim@epita.fr>
9314 * bootstrap (gnulib_modules): Add strverscmp.
9315 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
9316 * m4/.cvsignore: Add strverscmp.m4.
9317 * src/parse-gram.y (%require): New token, new rule.
9318 (version_check): New.
9319 * src/scan-gram.l (%require): Adjust.
9320 * tests/input.at (AT_REQUIRE): New.
9322 * doc/bison.texinfo (Require Decl): New.
9323 (Calc++ Parser): Use %require.
9325 2005-10-02 Akim Demaille <akim@epita.fr>
9327 * data/location.cc: New.
9329 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
9330 Akim Demaille <akim@epita.fr>
9332 Make sure -odir/foo.cc creates dir/location.hh etc.
9333 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
9334 (spec_file_prefix, spec_verbose_file, spec_graph_file)
9335 (spec_defines_file): Now const.
9337 (short_base_name): Remove.
9338 * src/files.c: Adjust.
9339 (dirname.h): Include.
9340 (base_name): Don't prototype it.
9341 (finput): Remove, duplicates gram_in.
9342 (full_base_name, short_base_name): Replace by...
9343 (all_but_ext, all_but_tab_ext): these.
9344 (compute_base_names): Rename as...
9345 (compute_file_name_parts): this.
9346 Update to compute the new variables, including dir_prefix.
9347 Adjust dependencies.
9348 * src/output.c (prepare): Output them.
9349 * src/reader.c: Adjust to use gram_in, not finput.
9350 * src/scan-skel.l (@dir_prefix@): New.
9352 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9354 * lib/subpipe.c: New function end_of_output_subpipe() added
9355 to allow support for non-posix systems. This is a no-op function
9358 * lib/subpipe.h: New function end_of_output_subpipe() added
9359 to allow support for non-posix systems. This is a no-op function
9362 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
9363 handle the lack of pipe/fork functionality on non-posix systems.
9365 * djgpp/Makefile.maint: DJGPP specific file.
9367 * djgpp/README.in: DJGPP specific file.
9369 * djgpp/config.bat: DJGPP specific configuration file.
9371 * djgpp/config.sed: DJGPP specific configuration file.
9373 * djgpp/config.site: DJGPP specific configuration file.
9375 * djgpp/config_h.sed: DJGPP specific configuration file.
9377 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
9379 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
9381 2005-10-02 Akim Demaille <akim@epita.fr>
9383 * data/location.cc: New, extract from...
9384 * data/lalr1.cc: here.
9385 (location.hh): Include it after the user prologue, in case the
9386 filename type is defined by the user.
9387 Forward declation location and position before the pre-prologue.
9388 (yyresult_): Rename as...
9389 (yyresult): this, it's a local variable, not an attribute.
9390 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
9392 2005-10-01 Akim Demaille <akim@epita.fr>
9394 * examples/extexi: Restore the #line generation.
9396 2005-09-30 Akim Demaille <akim@epita.fr>,
9397 Alexandre Duret-Lutz <adl@gnu.org>
9399 Move the token type and YYSTYPE in the parser class.
9400 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
9401 (parser::token): New, from the moved free definition of tokens.
9402 (parser::semantic_value): Now a full definition instead of an
9403 indirection to YYSTYPE.
9404 (b4_post_prologue): No longer included in the header file, but
9405 in the implementation file.
9406 * doc/bison.texi (C+ Language Interface): Update.
9407 * src/parse-gram.y: Support unary %define.
9408 * tests/actions.at: Define global_tokens_and_yystype for backward
9409 compatibility until we update the tests.
9410 * tests/calc.at: Idem.
9411 (first_line, first_column, last_line, last_column): Define for lalr1.cc
9412 to simplify the code.
9414 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
9416 Port to SunOS 4.1.4, which lacks strtoul and strerror.
9417 Ah, the good old days! Problem reported by Peter Klein.
9418 * bootstrap (gnulib_modules): Add strerror, strtoul.
9419 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
9420 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
9422 2005-09-29 Akim Demaille <akim@epita.fr>
9424 * data/c.m4 (b4_error_verbose_if): New.
9425 * data/lalr1.cc: Use it.
9426 (YYERROR_VERBOSE_IF): Remove.
9427 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
9428 parser members, replaced by...
9429 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
9431 (yysyntax_error_): Takes the state number as argument.
9432 (yyreduce_print_): Use the argument yyrule, not the former
9435 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
9437 * bootstrap (gnulib_modules): Add verify.
9438 * lib/.cvsignore: Add verify.h.
9439 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
9440 * src/system.h (verify): Remove.
9441 Include verify.h instead.
9442 * src/tables.c (tables_generate): Use new API for 'verify'.
9444 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
9446 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
9447 local variables whose names begin with 'yy'.
9448 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
9449 Trivial changes from Joel E. Denny.
9451 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
9453 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
9454 don't use alloca any more.
9456 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
9457 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
9458 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
9459 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
9460 to match yacc.c, to test more hosts.
9462 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
9464 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
9465 doesn't affect behavior.
9466 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
9468 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
9469 This works a bit better with glibc, if user code has already included
9471 * doc/bison.texinfo (Bison Parser): Document that users can't
9472 arbitrarily use malloc and free for other purposes. Document
9473 that <alloca.h> and <malloc.h> might be included.
9474 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
9475 user must declare alloca.
9477 * HACKING (release): Forwarn the Translation Project about
9480 2005-09-20 Akim Demaille <akim@epita.fr>
9482 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
9484 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
9486 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
9487 (YYSTACK_ALLOC_MAXIMUM): Use it.
9488 (yysyntax_error): New function.
9489 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
9490 multiple syntax errors are reported, and alloca is being used.
9491 Instead, reallocate buffers twice as big each time, so that
9492 we waste at most half the allocated memory. Start with a small
9493 (128-byte) buffer that will suffice in most cases anyway.
9494 Use yysyntax_error to do most of the work.
9496 * doc/bison.texinfo (Error Reporting, Table of Symbols):
9497 yynerrs is the number of errors reported, not the number of
9500 * tests/glr-regression.at (Duplicated user destructor for lookahead):
9501 Mark it as expected to fail.
9502 Cast result of malloc; problem reported by twlevo@xs4all.nl.
9503 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
9504 Don't start user-code symbols with "yy", to avoid name space problems.
9506 2005-09-19 Akim Demaille <akim@epita.fr>
9508 Remove the traits, failed experiment.
9509 It never proved useful, and anyway because of the current
9510 definition, it was not possible to have several specialization of
9511 this traits, making it useless.
9512 * data/lalr1.cc (yy:traits): Remove.
9513 Inline its definitions in the parser class.
9515 2005-09-19 Akim Demaille <akim@epita.fr>
9517 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
9518 least Mac OSX with a /usr/local install of gettext.
9520 2005-09-19 Akim Demaille <akim@epita.fr>
9522 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
9523 and yytoken for similarity with the other skeletons.
9525 2005-09-19 Akim Demaille <akim@epita.fr>
9527 * NEWS, configure.ac: update version number to 2.1a.
9529 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
9531 * NEWS: Version 2.1.
9533 * NEWS: Remove notice of yytname change, since it was never in an
9535 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
9537 * src/output.c (prepare): Likewise.
9538 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
9539 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
9540 is not defined. This is an awful hack, but it's enough for now.
9541 All callers changed.
9542 * tests/glr-regression-at (make_value): Args are const pointers now,
9543 to avoid GCC warning.
9544 (Duplicated user destructor for lookahead): New test. Currently
9545 skipped. It fails on my host but I'm not sure it'll always fail.
9547 2005-09-16 Akim Demaille <akim@epita.fr>
9549 * src/symtab.h (struct symbol): Declare the printer and destructor
9550 as const, to avoid accidental calls to free.
9551 (symbol_destructor_set, symbol_printer_set): Adjust.
9552 * src/symtab.c: Adjust.
9554 2005-09-16 Akim Demaille <akim@epita.fr>
9556 * data/c.m4 (b4_token_enums): New.
9557 (b4_token_defines): Rename as...
9558 (b4_token_enums_defines): this.
9559 (b4_token_defines): New, output only the #defines.
9560 * data/yacc.c, data/glr.c: Adjust.
9561 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
9562 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
9565 2005-09-16 Akim Demaille <akim@epita.fr>
9567 * data/lalr1.cc (yylex_): Remove, inline its code.
9568 (yyreport_syntax_error_): Remove, replaced by...
9569 (yysyntax_error_): this which returns a string and leaves to the
9570 caller the call to the users' error function.
9571 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
9572 Move from members of the parser object...
9573 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
9574 to local variables of the parse function.
9576 2005-09-16 Akim Demaille <akim@epita.fr>
9578 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
9579 since it's in Bison's name space.
9581 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
9583 * data/glr.c (yyresolveValue): Add default case to pacify
9584 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
9586 * NEWS: Document when yyparse started to return 2.
9587 * doc/bison.texinfo (Parser Function): Document when yyparse
9590 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
9591 (b4_filename_type): Renamed back from b4_file_name_type. All uses
9593 (class position): file_name -> filename (reverting). All uses changed.
9595 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
9597 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
9598 do anything if $@ exists. This reverts part of the 2005-07-07
9601 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
9603 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
9604 contains obsolete information and isn't worth distributing as a
9605 separate file anyway.
9606 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
9607 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
9608 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
9609 (yyparse): Abort if user code uses longjmp to throw an unexpected
9612 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
9614 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
9615 Suggested by twlevo@xs4all.nl.
9617 * data/glr.c (YYCHK1): Do not assume YYE is in range.
9618 This avoids a diagnostic from gcc -Wswitch-enum.
9619 Problem reported by twlevo@xs4all.nl.
9621 * doc/bison.texinfo: Don't use "filename", as per GNU coding
9622 standards. Use "file name" or "file" or "name", depending on
9624 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
9625 not to hack/foo.tab.c.
9626 (Calc++ Top Level): 2nd arg of main is not const.
9627 * data/glr.c: b4_filename -> b4_file_name.
9628 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
9630 (class position): filename -> file_name. All uses changed.
9631 * data/yacc.c: b4_filename -> b4_file_name.
9632 * lib/bitset.h: filename -> file_name in local vars.
9633 * lib/bitset_stats.c: Likewise.
9634 * src/files.c: Likewise.
9635 * src/scan-skel.l ("@output ".*\n): Likewise.
9636 * src/files.c (file_name_split): Renamed from filename_split.
9637 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
9639 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
9641 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
9642 to accommodate latest gnulib.
9644 * tests/glr-regression.at (Duplicate representation of merged trees):
9645 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
9647 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
9650 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
9652 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
9653 All uses changed. Invoke user destructor after an error during a
9654 split parse (trivial change from Joel E. Denny).
9656 * tests/glr-regression.at
9657 (User destructor after an error during a split parse): New test case.
9658 Problem reported by Joel E. Denny in:
9659 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
9661 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
9663 * README-cvs: Give URLs for recommended tools.
9664 Mention Gzip version problem, and bootstrapping issues.
9665 Remove troubleshooting section, as it's somewhat obsolete.
9667 * bootstrap (no_cache): New var, to accommodate different wget
9668 variants. Use it instead of '-C off'. Problem reported by
9671 * data/glr.c (yydestroyStackItem): New function.
9672 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
9673 debugging information. Problem reported by Joel E. Denny.
9675 2005-08-25 Akim Demaille <akim@epita.fr>
9677 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
9679 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
9681 * data/glr.c (yyrecoverSyntaxError, yyreturn):
9682 Don't invoke destructor on unresolved entries.
9683 * tests/glr-regression.at
9684 (User destructor for unresolved GLR semantic value): New test case.
9685 Problem reported by Joel E. Denny in:
9686 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
9688 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
9690 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
9692 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
9693 lib-prefix.m4, po.m4.
9695 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
9696 in yydestruct diagnostic, since it might not be an error.
9697 Problem reported by Joel Denny near end of
9698 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
9699 * data/lalr1.cc (yyerturn): Likewise.
9700 * data/yacc.c (yyreturn): Likewise.
9701 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
9703 * src/files.c: Remove obsolete FIXME comment.
9705 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
9706 with the other templates, and to fix bogus run-on messages such
9707 as the one reported at the end of
9708 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
9709 All callers changed to avoid the newline.
9710 (yyprocessOneStack): Output two lines rather than one, to accommodate
9711 the above change. This changes the debug output format slightly.
9713 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
9714 reported by Joel E. Denny in
9715 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
9717 * tests/glr-regression.at (Duplicate representation of merged trees):
9718 New test, from Joel E. Denny in:
9719 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
9720 * THANKS: Add Joel E. Denny.
9722 * configure.ac (AC_INIT): Bump to 2.0c.
9724 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
9726 * NEWS: Version 2.0b.
9728 * Makefile.am (SUBDIRS): Put examples before tests, so that
9729 "make check" doesn't finish with "All 1 tests passed".
9731 * tests/regression.at (Token definitions): Don't rely on
9732 AT_PARSER_CHECK for data that contains backslashes. It currently
9733 uses 'echo', and 'echo' isn't portable if its argument contains
9734 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
9735 that the byte '\0xff' is not printable in the C locale; it is,
9736 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
9737 not printable, so use '\0x81' to test.
9739 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
9740 version of GCC, since the macro is used with non-GCC compilers.
9742 Fix core dump reported by Pablo De Napoli in
9743 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
9744 * tests/regression.at (Invalid inputs with {}): New test.
9745 * src/parse-gram.y (token_name): Translate type before using
9748 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
9749 the user's name space. All uses changed to __attribute__
9751 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
9752 Add __attribute__ ((__noreturn__)).
9754 * etc/clcommit: Remove. We weren't using it, and it failed
9755 "make maintainer-distcheck".
9756 * Makefile.maint: Merge from coreutils.
9757 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
9758 (syntax-check-rules): Change list of rules as described below.
9759 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
9760 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
9761 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
9762 (sc_trailing_space): New rules.
9763 (sc_xalloc_h_in_src): Remove.
9764 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
9765 (sc_space_tab, sc_error_exit_success, sc_changelog):
9766 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
9767 (makefile-check, po-check, author_mark_check):
9768 (makefile_path_separator_check, copyright-check):
9769 Use grep -n, to make it easier to find violations.
9770 Use CVS_LIST and CVS_LIST_EXCEPT.
9771 (header_regexp, h_re): Remove.
9773 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
9774 (my-distcheck): Use more-modern GCC flags.
9775 (signatures, %.asc): Remove.
9776 (rel-files, announcement): Remove signatures.
9777 Restore old updating code, even though we don't use it, so
9778 that we're the same as coreutils.
9779 (alpha, beta, major): Depend on news-date-check.
9780 Make the upload commands.
9782 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
9783 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
9784 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
9785 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
9786 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
9787 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
9788 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
9789 * tests/sets.at: Likewise.
9791 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
9792 we comment out the Autoconf version number.
9793 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
9794 it's error-prone and "make maintainer-distcheck" rejects it.
9796 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
9797 Indent calls to "error" to pacify "make maintainer-distcheck",
9798 when the calls are not intended to be translated.
9799 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
9801 * src/Makefile.am (DEFS): Use +=, to pacify
9802 "make maintainer-distcheck".
9803 (bison_SOURCES): Add scan-skel.h.
9804 (sc_tight_scope): New rule, from coreutils.
9806 * src/files.c (src_extension, header_extension):
9807 Now static, not extern.
9808 * src/getargs.c (short_options): Likewise.
9809 * src/muscle_tab.c (muscle_table): Likewise.
9810 * src/parse-gram.y (current_class, current_type, current_prec):
9812 * src/reader.c (grammar_end, previous_rule_end): Likewise.
9813 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
9814 * src/main.c (main): Cast bindtextdomain and textdomain calls to
9815 void, to avoid warning when NLS is disabled.
9816 * src/output.c: Include scan-skel.h.
9817 (scan_skel): Remove decl, since scan-skel.h does this.
9819 Indent calls to "error" to pacify "make maintainer-distcheck".
9820 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
9821 * src/reader.h (gram_end, gram_lineno): New decls to pacify
9822 "make maintainer-distcheck".
9823 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
9824 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
9825 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
9826 (skel_lex_destroy, scan_skel): Move these decls to...
9827 * src/scan-skel.h: New file.
9828 * src/uniqstr.c (uniqstr_assert):
9829 Indent calls to "error" to pacify "make maintainer-distcheck".
9831 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
9834 * tests/torture.at: Revamp to avoid misuse of atoi that
9835 "make maintainer-distcheck" complained about.
9837 * examples/extexi (message): Don't print a message more than once,
9838 and omit line-number decoration that makes Emacs compile think
9839 that informative messages are worth worrying about.
9841 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
9843 * configure.ac: Update version number.
9845 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
9847 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
9848 autogenerated by the maintainer.
9849 * examples/calc++/.cvsignore: Add *.yy.
9851 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
9852 * lib/bitset_stats.c (bitset_stats_init): Likewise.
9853 * lib/bitsetv.c (bitsetv_alloc): Likewise.
9855 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
9857 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
9858 from maintainer-distcheck about casting the argument of 'free'.
9860 * NEWS: Mention recent yytname changes.
9861 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
9863 * bootstrap: For translations that have not yet been upgraded to
9864 the new runtime-po domain, prime the pump by extracting the
9865 relevant strings from the obsolete translations. This code can be
9866 removed once the bison-runtime domain has been translated by each
9869 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
9870 now that token names are already quoted.
9872 Fix problem reported by Anthony Heading.
9873 * data/glr.c (YYTOKEN_TABLE): New macro.
9874 (yytname): Define if YYTOKEN_TABLE.
9875 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
9876 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
9877 (YYERROR_VERBOSE): Define the same way the other skeletons do.
9878 * src/output.c (prepare_symbols): Output token_table_flag.
9880 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
9882 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
9883 again if the first call fails.
9885 * data/glr.c (yytnamerr): New function.
9886 (yyreportSyntaxError): Use it to dequote most string literals.
9887 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
9888 with other skeletons. All uses changed.
9889 (yytnameerr_): New function.
9890 (yyreport_syntax_error): Use it to dequote most string literals.
9891 * data/yacc.c (yytnamerr): New function.
9892 (yyerrlab): Use it to decode most string literals.
9893 * doc/bison.texinfo (Decl Summary, Calling Convention):
9894 Clarify quoting convention of yytname.
9895 * src/output.c (prepare_symbols): Quote all names. This undoes
9896 the 2005-04-17 change, which is now accomplished (mostly) via
9897 changes in the parsers as described above.
9898 * tests/regression.at (Token definitions, Web2c Actions):
9899 Undo most 2005-04-17 change here, too.
9901 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
9903 Fix more problems reported by twlevo@xs4all.nl.
9904 * tests/cxx-type.at: Don't pipe output of ./types through sed to
9905 remove trailing spaces. This loses the exit status of ./types,
9906 and isn't needed since ./types shouldn't be emitting trailing
9908 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
9909 as the stack isn't valid in that case.
9911 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
9912 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
9913 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
9914 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
9916 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
9917 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
9918 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
9921 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
9922 overly-picky compilers that reject 'char *foo = "bar";'.
9924 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
9925 to FILE * parameter, not to stderr. This fixes a typo introduced
9926 in the 2005-07-12 change.
9928 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
9929 warnings from GCC 4.
9931 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
9932 (yyglrShiftDefer, yysplitStack):
9933 Remove unused parameters b4_pure_formals. All uses changed.
9934 (yyglrShift): Remove unused parameters b4_user_formals.
9936 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
9938 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
9940 Destructor cleanups and regularization among the three skeletons.
9941 * NEWS: Document the behavior changes.
9942 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
9943 stack before failing, as the cleanup code will do it for us now.
9944 * data/lalr1.cc (yyerrlab): Likewise.
9945 * data/glr.c (yyparse): Pop everything off the stack before
9946 freeing it, so that destructors get called properly.
9947 * data/lalr1.cc (yyreturn): Likewise.
9948 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
9949 This is more consistent.
9950 * doc/bison.texinfo (Destructor Decl): Mention more reasons
9951 why destructors might be called. 1.875 -> 2.1.
9952 (Destructor Decl, Decl Summary, Table of Symbols):
9953 Some English-language cleanups for %destructor.
9954 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
9955 Add output line for destructor of start symbol.
9956 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
9957 because of that same extra output line.
9959 * NEWS: Document minor wording changes in diagnostics of
9960 Bison-generated parsers.
9961 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
9962 Remove unused formals. All uses changed.
9963 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
9964 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
9965 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
9966 Rename yyoverflowab to yyexhaustedlab.
9967 When memory exhaustion occurs during syntax-error reporting,
9968 report it separately rather than in a single diagnostic; this
9970 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
9971 (Memory Exhausted): Renamed from Parser Stack Overflow.
9972 Revamp wording slightly to prefer "memory exhaustion".
9973 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
9975 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
9977 Add i18n support to the GLR skeleton. Partially fix the C++
9978 skeleton; a C++ expert needs to finish this. Remove debugging
9979 msgids; there's little point to having them translated, since they
9980 can be understood only by someone who can read the
9981 (English-language) source code.
9983 Generate runtime-po/bison-runtime.pot automatically, so that we
9984 don't have to worry about garbage getting in that file. We'll
9985 make sure after the next official release that old msgids don't
9987 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
9989 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
9991 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
9992 Fix typos in explanations of the runtime file.
9993 * bootstrap: Change gettext keyword from YYI18N to YY_.
9994 Use standard Makefile.in.in in runtime-po, since we'll arrange
9995 for backward-compatible bison-runtime.po files in a different way.
9996 * data/glr.c (YY_): New macro, from yacc.c.
9997 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
9998 Translate messages intended for users.
9999 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
10000 the wording in the other skeletons. We don't know that the memory
10002 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
10003 Use same method that yacc.c uses.
10004 Don't translate debugging messages.
10005 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
10006 it doesn't work (yet), and requires C++ expertise to fix.
10007 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
10008 Move defn to a more logical place, to be consistent with other
10010 Don't translate debugging messages.
10011 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
10012 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
10013 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
10014 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
10016 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
10017 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
10019 * tests/glr-regression.at (Badly Collapsed GLR States):
10021 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10022 yylex should return 0 at EOF rather than aborting.
10024 Improve tests for stack overflow in GLR parser.
10025 Problem reported by twlevo@xs4all.nl.
10026 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
10028 (yyStackOverflow): Just longjmp, but with value 2 so that caller
10029 can handle the problem.
10030 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
10031 (yyparse): New local variable yyresult to record the result.
10032 Use result of setjmp to set it, rather than storing itinto
10034 (yyDone): Remove label.
10035 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
10036 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
10037 if YYABORT is used).
10038 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
10039 yyparse status; put status > 1 into diagnostic.
10040 Check that status==2 works.
10041 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
10042 Use exit status 3 for failure to open (which shouldn't happen).
10044 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
10046 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
10047 1 on syntax error; just let yyparse do its thing.
10048 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
10049 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
10050 (Exploding the Stack Size with Alloca):
10051 (Exploding the Stack Size with Malloc):
10052 Expect exit status 2, not 1, since the parser is supposed to blow
10053 its stack. Problem reported by twlevo@xs4all.nl.
10055 * data/glr.c (yyparse): Don't assume that the initial calls
10056 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
10057 Print a stack-overflow message and fail instead.
10058 Initialize the line-number information before creating the stack,
10059 so that the stack-overflow message can report line zero safely.
10061 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
10063 Fix problems reported by twlevo@xs4all.nl.
10064 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
10065 (yyuserMerge): Provide a default case if b4_mergers is empty.
10066 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
10067 * tests/glr-regression.at
10068 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10069 Add casts to pacify C++ compilers.
10070 * tests/glr-regression.at (Improper merging of GLR delayed action
10071 sets): Declare yylex before using it.
10072 * tests/Makefile.am (maintainer-check-g++): Fix a stray
10073 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
10074 test for valgrind; valgrind is independent of g++.
10075 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
10076 for compatibility with POSIX 1003.1-2001 (if running coreutils).
10077 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
10078 Use a destructor, so that we can expand the stack. Change
10079 YYSTYPE to char * so that we can free it. Cast result of malloc.
10081 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10083 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
10084 a valgrind failure. Problem reported by twlevo@xs4all.nl.
10086 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
10088 * PACKAGING: New file, suggested by Bruno Haible and taken from
10089 similar wording in gettext's PACKAGING file.
10090 * NEWS: Mention PACKAGING.
10091 * Makefile.am (EXTRA_DIST): Add PACKAGING.
10093 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
10095 * NEWS: Document recent i18n improvements.
10096 * bootstrap: Get runtime translations into runtime-po.
10097 Create runtime-po files automatically, if possible.
10098 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
10099 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
10100 does not infringe on the user's name space.
10101 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
10102 * doc/bison.texinfo (Internationalization): Revamp the English
10103 and Texinfo syntax a bit, to try to make it clearer.
10104 (Bison Options, Option Cross Key): Mention --print-localedir.
10105 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
10106 YYENABLE_NLS. Quote a bit more.
10107 * runtime-po/.cvsignore: New file.
10108 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
10109 * runtime-po/Rules-quot: Remove; now created by bootstrap.
10110 * runtime-po/quot.sed: Likewise.
10111 * runtime-po/boldquot.sed: Likewise.
10112 * runtime-po/en@quot.header: Likewise.
10113 * runtime-po/en@boldquot.header: Likewise.
10114 * runtime-po/insert-header.sin: Likewise.
10115 * runtime-po/remove-potcdate.sin: Likewise.
10116 * runtime-po/Makevars: Likewise.
10117 * runtime-po/LINGUAS: Likewise.
10118 * runtime-po/de.po: Likewise; we will rely on the translation project
10119 to maintain this, so "bootstrap" should get it.
10120 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
10122 * src/main.c (main): Bind the bison-runtime domain, too.
10124 2005-07-12 Bruno Haible <bruno@clisp.org>
10126 * data/yacc.c: Include <libintl.h> when NLS is enabled.
10127 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
10128 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
10129 * runtime-po: New directory.
10130 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
10131 $(DOMAIN).pot-update rule, so that old messages are never dropped.
10132 * runtime-po/Rules-quot: New file, copied from po/.
10133 * runtime-po/quot.sed: Likewise.
10134 * runtime-po/boldquot.sed: Likewise.
10135 * runtime-po/en@quot.header: Likewise.
10136 * runtime-po/en@boldquot.header: Likewise.
10137 * runtime-po/insert-header.sin: Likewise.
10138 * runtime-po/remove-potcdate.sin: Likewise.
10139 * runtime-po/Makevars: New file.
10140 * runtime-po/POTFILES.in: New file.
10141 * runtime-po/LINGUAS: New file.
10142 * runtime-po/bison-runtime.pot: New file.
10143 * runtime-po/de.po: New file.
10144 * m4/bison.m4: New file.
10145 * Makefile.am (SUBDIRS): Add runtime-po.
10146 (aclocaldir, aclocal_DATA): New variables.
10147 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
10149 * src/getargs.c (usage): Document --print-localedir option.
10150 (PRINT_LOCALEDIR_OPTION): New enum item.
10151 (long_options): Add --print-localedir option.
10152 (getargs): Handle --print-localedir option.
10153 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
10154 (Internationalization): New section.
10156 2005-07-12 Akim Demaille <akim@epita.fr>
10158 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
10159 for consistency with the rest of the code.
10160 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
10163 2005-07-12 Akim Demaille <akim@epita.fr>
10165 * src/parse-gram.y: Use %printer instead of YYPRINT.
10167 2005-07-12 Akim Demaille <akim@epita.fr>
10169 * src/symtab.h, src/symtab.c (symbol_print): New.
10170 * src/symlist.h, src/symlist.c (symbol_list_print): New.
10171 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
10173 2005-07-12 Akim Demaille <akim@epita.fr>
10175 * data/glr.c (b4_syncline): Fix (swap) the definitions of
10176 b4_at_dollar and b4_dollar_dollar.
10178 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
10180 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
10181 and Pennello's paper.
10183 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
10185 * data/yacc.c (yyparse): Undo previous patch. Instead,
10186 set yylsp[0] and yyvsp[0] only if the initial action
10187 sets yylloc and yylval, respectively.
10189 * data/yacc.c (yyparse): In the initial action, set
10190 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
10191 This avoids the use of undefined variables if the initial
10192 action does not set yylloc and/or yylval.
10194 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
10196 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
10197 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
10198 Remove from CVS. These files are automatically generated.
10199 * examples/extexi: Clarify that this file is now part of Bison,
10200 not GNU M4, and that it works with any POSIX-compatible Awk.
10201 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
10202 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
10203 so that we also get calc++-parser.yy. Geneate it.
10204 Use $(AWK), not gawk, since any conforming Awk will do.
10205 Put comment before action, since older 'make' can't handle comment
10207 $(BUILT_SOURCES): List all built sources, not just some of them.
10208 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
10209 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
10210 $($(calc_sources_generated)): Remove unnecessary test for existence
10211 of target. (This had a shell syntax error anyway; a stray "x".)
10212 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
10214 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
10216 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
10217 implied by the other modules.
10219 2005-07-06 Akim Demaille <akim@epita.fr>
10221 Bind examples/calc++ to the package.
10222 * examples/calc++/Makefile: Remove, replaced by...
10223 * examples/calc++/Makefile.am: ... this new file.
10224 * examples/calc++/test: Remove input.
10225 * examples/calc++/compile: Remove.
10226 * examples/Makefile.am: New.
10227 * configure.ac, Makefile.am: Adjust.
10228 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
10230 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
10232 * data/glr.c (yyFail): Drastically simplify; since the format argument
10233 never had any % directives, we can simply pass it to yyerror.
10234 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
10235 be modified later, as that is the usual style in glr.c.
10236 Problems reported by Paul Hilfinger.
10238 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
10239 and size overflow errors.
10240 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
10241 in case the user prolog sets feature-test macros like _GNU_SOURCE.
10242 (YYSIZEMAX): New macro.
10243 (yystpcpy): New function, taken from yacc.c.
10244 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
10245 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
10246 so that we don't have to maintain their signatures.
10247 (yyFail): Check for buffer overflow, by using vsnprintf rather
10248 than vsprintf. Allocate a bigger buffer if possible.
10249 Report an error if buffer allocation fails.
10250 (yyStackOverflow): New function.
10251 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
10252 the initialization was successful. It might fail if storage was
10254 (yyexpandGLRStack): Add more checks for storage allocation failure.
10255 Use yyStackOverflow to report failures.
10256 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
10257 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
10258 Don't assume stack number fits in int.
10259 (yysplitStack): Check for storage allocation failure.
10260 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
10261 can print diagnostics on storage allocation failure. All callers
10263 (yyresolveValue): Use yybool for boolean.
10264 (yyreportSyntaxError): Check for size-calculation overflow.
10265 This code is taken from yacc.c.
10266 (yyparse): Check for storage allocation errors when allocating
10269 2005-07-05 Akim Demaille <akim@epita.fr>
10271 Extract calc++ from the documentation.
10272 * doc/bison.texinfo (Calc++): Add the extraction marks.
10273 * examples/extexi: New, from the aborted GNU Programming 2E.
10274 Separate the different paragraph of a file with empty lines.
10275 * examples/Makefile: Use it to extract the whole calc++ example.
10277 2005-06-24 Akim Demaille <akim@epita.fr>
10279 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
10282 2005-06-22 Akim Demaille <akim@epita.fr>
10284 * doc/bison.texinfo (C++ Language Interface): First stab.
10285 (C++ Parsers): Remove.
10287 2005-06-22 Akim Demaille <akim@epita.fr>
10289 * data/lalr1.cc (yylex_): Honor %lex-param.
10291 2005-06-22 Akim Demaille <akim@epita.fr>
10293 Start a set of simple examples.
10294 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
10295 * examples/calc++/calc++-driver.hh,
10296 * examples/calc++/calc++-parser.yy,
10297 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
10298 * examples/calc++/compile, examples/calc++/test: New.
10300 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
10302 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
10303 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
10304 which stems from the 2005-05-27 patch.
10306 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10308 * data/glr.c: Modify treatment of unused parameters to permit use
10309 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
10311 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
10313 Fix infringement on user name space reported by Janos Zoltan Szabo.
10314 * data/yacc.c (yyparse): strlen -> yystrlen.
10316 2005-05-30 Akim Demaille <akim@epita.fr>
10318 * data/lalr1.cc (_): New.
10319 Translate the various messages.
10321 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
10323 Fix infringement on user name space reported by Bruno Haible.
10324 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
10325 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
10326 the user's name space.
10327 (alloca): Include <stdlib.h> to get it, if it's not built in.
10328 (YYMALLOC, YYFREE): Define only if needed.
10329 (malloc, free): Declare, but only if needed, as this infringes on
10330 the user name space.
10332 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
10334 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
10335 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
10337 * lib/ebitset.c (min, max): Undef before defining.
10338 * lib/vbitset.c (min, max): Likewise.
10339 * lib/subpipe.c (create_subpipe): Save local variables in case
10340 vfork clobbers them.
10342 2005-05-24 Bruno Haible <bruno@clisp.org>
10344 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
10345 error message syntax used by gcc-4.0.
10347 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
10349 * README: Mention m4 1.4.3. Remove obsolete advice about
10350 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
10352 * bootstrap: Remove workaround for problem I encountered with
10353 gettext 0.14.1; it seems to be fixed now.
10355 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
10357 * NEWS: Version 2.0a.
10359 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
10360 the previous change.
10362 Various maintainer cleanups.
10363 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
10364 conftest*, for benefit of CVS commands run at the same time as
10365 "configure". Add build-aux, since "bootstrap" now creates it and
10367 * Makefile.cfg (move_if_change): Remove.
10368 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
10369 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
10370 (po_repo, do-po-update, po-update, wget_files, get-targets):
10371 (config.guess-url_prefix, config.sub-url_prefix):
10372 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
10373 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
10374 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
10376 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
10377 this is now the recommended name.
10378 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
10379 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
10380 ylwrap. These files now go into build-aux.
10381 * config/move-if-change: Remove.
10382 * config/prev-version.txt: Bump from 1.75 to 2.0.
10384 * bootstrap: Add stdio-safer, unistd-safer modules.
10385 Remove m4/glibc2.m4 (introduced by latest gnulib, but
10387 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
10388 fopen-safer.c, stdio-safer.h, unistd-safer.h.
10389 * lib/subpipe.c: Include "unistd-safer.h".
10390 (create_subpipe): Make sure all the newly-created
10391 file descriptors are > 2, so that diagnostics don't
10392 get sent down them (which might cause Bison to hang, in theory).
10393 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
10394 * src/files.c (xfopen): Use fopen_safer, not fopen.
10396 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
10397 yesterday's yacc.c fix.
10399 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
10401 * data/glr.c, data/lalr1.cc: Update copyright date.
10403 Fix a destructor bug reported by Wolfgang Spraul in
10404 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
10405 * data/yacc.c (yyabortlab): Don't call destructor, and
10406 don't set yychar to EMPTY.
10407 (yyoverflowlab): Don't call destructor.
10408 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
10409 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
10410 since we no longer output the message "discarding lookahead token
10413 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10415 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
10416 fix a small glitch in debugging output.
10417 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
10418 after YY_SYMBOL_PRINT where needed.
10420 (struct yyGLRState): Add some comments.
10421 (struct yySemanticOption): Add some comments.
10422 (union yyGLRStackItem): Add comment.
10424 (yymergeOptionSets): Correct this to properly perform the union,
10425 avoiding infinite reported by Michael Rosien.
10428 * tests/glr-regression.at: Add test for GLR merging error reported
10431 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
10433 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
10434 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
10435 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
10436 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
10437 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
10438 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
10439 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
10440 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
10441 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
10442 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
10443 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
10444 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
10445 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
10446 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
10447 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
10448 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
10449 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
10450 src/derives.h, src/files.c, src/files.h, src/getargs.c,
10451 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
10452 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
10453 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
10454 src/output.h, src/parse-gram.c, src/parse-gram.h,
10455 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
10456 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
10457 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
10458 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
10459 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
10460 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
10461 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
10462 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
10463 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
10464 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
10465 tests/reduce.at, tests/regression.at, tests/sets.at,
10466 tests/synclines.at, tests/testsuite.at, tests/torture.at:
10467 Update FSF postal mail address.
10469 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
10471 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
10472 Problem reported by Ralf Menzel.
10474 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
10476 * tests/actions.at: Test that stack overflow invokes destructors.
10477 From Marcus Holland-Moritz.
10478 * data/yacc.c (yyerrlab): Move the code that destroys the stack
10480 (yyreturn): to here. That way, destructors are called properly
10481 even if the stack overflows, or the user calls YYACCEPT or
10482 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
10483 (yyoverflowlab): Destroy the lookahead.
10485 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
10487 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
10489 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
10491 * NEWS: Bison-generated C parsers no longer quote literal strings
10492 associated with tokens.
10493 * src/output.c (prepare_symbols): Don't escape strings,
10494 since users don't want to see C escapes.
10495 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
10497 * tests/input.at (Torturing the Scanner): Likewise.
10498 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
10500 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
10502 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
10503 the data size is known to be too small and we can't increase it.
10504 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
10506 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
10508 * src/parse-gram.y: Include quotearg.h.
10509 (string_as_id): Quote $1 before using it as a key, since the
10510 lexer no longer quotes it for us.
10511 (string_content): Don't strip quotes, since lexer no longer
10513 * src/scan-gram.l: Include quotearg.h.
10514 ("\""): Omit quote.
10515 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
10516 a key, since the rest of the lexer doesn't quote it.
10517 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
10518 * tests/regression.at (Token definitions): Check for backslashes
10521 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
10522 (YYSIZE_T): Define to unsigned long int when using an older compiler.
10523 (yyparse): Revamp code to generate long syntax error message, to
10524 make it easier to translate, and to avoid problems with arithmetic
10525 overflow. Change "virtual memory" to "memory" in diagnostic, since
10526 we don't know whether the memory is virtual.
10528 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
10530 * NEWS: Bison-generated C parsers now use the _ macro to
10532 * data/yacc.c (_) [!defined _]: New macro.
10533 All English strings wrapped inside this macro.
10534 * doc/bison.texinfo (Bison Parser): Document _.
10535 * po/POTFILES.in: Include src/parse-gram.c, since it now
10536 includes translateable strings that parse-gram.y doesn't.
10538 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
10540 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
10541 reverting the 2004-10-11 change to this function.
10542 (symbol_check_alias_consistency): Don't call symbol_type_set
10543 if the type name is already correct.
10544 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
10546 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
10548 * tests/regression.at (Token definitions): Don't use a token named
10549 c, as that generates a "#define c ..." that runs afoul of buggy
10550 stdlib.h that uses the identifier c as a member of struct
10551 drand48_data. Problem reported by Horst Wente.
10553 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
10555 * bootstrap: Change translation URL from
10556 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
10557 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
10558 redirection glitches. Problem reported by twlevo@xs4all.nl.
10560 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
10562 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
10563 after operands; POSIX says this isn't portable for the c99 command.
10565 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
10567 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
10568 immediately if a data overrun has occurred; this may help us track
10569 down what may be a spurious failure on MacOS.
10571 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
10573 Respond to problems reported by twlevo@xs4all.nl.
10575 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
10577 * src/vcg.h: Comment fix.
10578 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
10579 (G_CMAX): Change to -1 instead of INT_MAX.
10581 * data/yacc.c (yyparse): Omit spaces before #line.
10583 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
10585 * src/tables.c (state_number_to_vector_number): Put it inside an
10586 "#if 0", since it's not currently used. Problem reported by
10589 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
10591 * src/output.c (escaped_output): Renamed from
10592 escaped_file_name_output, since we now use it for symbol tags as
10593 well. All uses changed.
10594 (symbol_destructors_output, symbol_printers_output):
10595 Escape symbol tags too.
10596 Problem reported by Matyas Forstner in
10597 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
10599 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
10601 * src/output.c (user_actions_output, token_definitions_output,
10602 symbol_destructors_output, symbol_printers_output): Likewise.
10603 * src/reader.c (prologue_augment): Likewise.
10604 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
10606 * src/vcg.c (output_edge): Don't quote linestyle arg.
10607 Problem reported by twlevo@xs4all.nl.
10609 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
10611 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
10612 example, reported by Derek M Jones. Also, make the example even
10613 more outrageous, to better illustrate how bad the problem is.
10615 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
10617 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
10618 putsym. Typo reported by Sebastian Piping.
10620 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
10622 * doc/bison.texinfo (Language and Grammar): some -> same
10623 (Epilogue): int he -> in the
10624 Typos reported by Sebastian Piping via Justin Pence.
10626 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
10628 * tests/glr-regression.at (Improper handling of embedded actions
10629 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
10630 embedded actions and $-N in GLR parsers", work around an Autoconf bug
10631 with dollar signs in test names.
10632 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
10633 for a similar reason.
10635 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
10637 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
10638 wants to redefine G_VIEW.
10640 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
10642 * src/vcg.c (get_view_str): Remove case for normal_view.
10643 Problem reported by twlevo@xs4all.nl.
10645 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
10647 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
10648 Problem reported by twlevo@xs4all.nl.
10650 * doc/bison.texinfo: Change @dircategory from "GNU programming
10651 tools" to "Software development". Requested by Richard Stallman
10654 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
10656 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
10657 Problem reported by twlevo@xs4all.nl.
10659 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
10661 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
10662 keyword; it's not needed with modern compilers, and it doesn't
10663 affect correctness with older compilers. Suggested by
10666 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
10668 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
10669 gcc -Wswitch-default.
10670 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
10671 * data/yacc.c (yyparse): Likewise.
10673 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
10675 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
10676 already. Let config.h define any nonstandard values.
10678 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
10680 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
10681 for the benefit of slower hosts. Problem reported by
10682 Nelson H. F. Beebe.
10684 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
10686 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
10687 being defined and not used.
10688 * data/lalr1.cc (yyparse): Likewise.
10689 Use "if (false)" rather than "if (0)".
10691 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
10693 * TODO: Mention that we should allow NUL bytes in tokens.
10695 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
10697 * src/scan-skel.l (<<EOF>>): Don't close standard output.
10698 Problem reported by Hans Aberg.
10700 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
10702 * src/getargs.c (version): Happy new year; update overall
10703 program copyright date from 2004 to 2005.
10705 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
10706 Problem reported by Hans Aberg.
10707 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
10708 (Output file names.): Add a test for the case when standard output
10711 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
10713 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
10714 to fix an oversight in the Bison 2.0 manual.
10716 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
10718 * NEWS: Version 2.0. Reformat the existing news items since
10719 1.875, so that related items are grouped together.
10720 * configure.ac (AC_INIT): Bump version to 2.0.
10721 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
10723 * tests/torture.at (Exploding the Stack Size with Alloca): Set
10724 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
10725 otherwise, we're not testing alloca. Unfortunately there's no
10726 simple way to consult HAVE_ALLOCA here.
10728 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
10731 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
10732 hand. This avoids a warning about comparing int to size_t when
10733 GCC warnings are enabled.
10735 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
10737 * NEWS: Bison-generated parsers no longer default to using the
10738 alloca function (when available) to extend the parser stack, due
10739 to widespread problems in unchecked stack-overflow detection.
10740 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
10741 responsibility to set it to a positive value. This lets the user
10742 specify a value that is not a preprocessor constant.
10743 * data/yacc.c (YYMAXDEPTH): Likewise.
10744 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
10745 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
10746 to be a compile-time constant. However, explain the constraints on it.
10747 Also, explain the constraints on YYINITDEPTH.
10748 (Table of Symbols): Explain that alloca is no longer the default.
10749 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
10752 * doc/bison.texinfo (Location Default Action): Mention that n must
10753 be zero when k is zero. Suggested by Frank Heckenbach.
10755 2004-12-22 Akim Demaille <akim@epita.fr>
10757 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
10758 (parser::state_type, parser::semantic_type, parser::location_type):
10759 Private, not public.
10760 (parser::parse): Return ints, not bool.
10761 Returning a bool introduces a problem: 0 corresponds to false, and
10762 it seems weird to return false on success. Returning true changes
10763 the conventions for yyparse.
10764 Alternatively we could return void and send an exception.
10765 There is no clear consensus (yet?).
10766 (state_stack, semantic_stack, location_stack): Rename as...
10767 (state_stack_type, semantic_stack_type, location_stack_type): these.
10768 Private, not public.
10769 * tests/c++.at: New.
10770 * tests/testsuite.at, tests/Makefile.am: Adjust.
10772 2004-12-21 Akim Demaille <akim@epita.fr>
10774 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
10776 2004-12-21 Akim Demaille <akim@epita.fr>
10778 Don't impose std::string for filenames.
10780 * data/lalr1.cc (b4_filename_type): New.
10781 (position::filename): Use it.
10782 (parser.hh): Move the inclusion of stack.hh and location.hh below
10783 the user code, so that needed headers for the filename type can be
10785 Forward declare them before the user code.
10786 * tests/Makefile.am (check-local, installcheck-local): Pass
10787 TESTSUITEFLAGS to the TESTSUITE.
10789 2004-12-20 Akim Demaille <akim@epita.fr>
10791 Use more STL like names: my_class instead of MyClass.
10793 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
10794 (SemanticStack, SemanticType, StateStack, StateType)
10795 (TokenNumberType, Stack, Slice, Traits, Parser::location)
10796 (Parser::value): Rename as...
10797 (location_stack, location_type, rhs_number_type, semantic_stack)
10798 (semantic_type, state_stack, state_type, token_number_type, stack)
10799 (slice, traits, parser::yylloc, parser::yylval): these.
10801 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
10803 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
10805 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
10806 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
10808 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
10810 Remove uses of 'short int' and 'unsigned short int'. This raises
10811 some arbitrary limits. It uses more memory but nowadays that's
10812 not much of an issue.
10814 This change does not affect the generated parsers; that's a different
10815 task, as some users will want to conserve memory there.
10817 Ideally we should use size_t to represent all object counts, and
10818 something like ptrdiff_t to represent signed differences of object
10819 counts; but that will require more code-cleanup than I have the
10820 time to do right now.
10822 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
10823 Use size_t, not int or short int, to count objects.
10824 * src/closure.c (nritemset, closure): Likewise.
10825 * src/closure.h (nritemset, closure): Likewise.
10826 * src/nullable.c (nullable_compute): Likewise.
10827 * src/print.c (print_core): Likewise.
10828 * src/print_graph.c (print_core): Likewise.
10829 * src/state.c (state_compare, state_hash): Likewise.
10830 * src/state.h (struct state): Likewise.
10831 * src/tables.c (default_goto, goto_actions): Likewise.
10833 * src/gram.h (rule_number, rule): Use int, not short int.
10834 * src/output.c (prepare_rules): Likewise.
10835 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
10836 errs, reductions): Likewise.
10837 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
10839 * src/tables.c (vector_number, tally, action_number,
10840 ACTION_NUMBER_MINIMUM): Likewise.
10841 * src/output.c (muscle_insert_short_int_table): Remove.
10843 2004-12-17 Akim Demaille <akim@epita.fr>
10845 * data/lalr1.cc: Extensive Doxygenation.
10846 (error_): Rename as...
10847 (error): this, since it is visible to the user.
10849 (Parser::message): Now an automatic variable from...
10850 (Parser::yyreport_syntax_error_): here.
10851 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
10853 * tests/input.at: Escape $.
10855 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
10857 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
10858 Parenthesize rhs to avoid obscure problems with mistakes like
10859 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
10860 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
10861 b4_rhs_location): Likewise.
10862 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
10863 b4_rhs_location): Likewise.
10865 2004-12-16 Akim Demaille <akim@epita.fr>
10867 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
10868 yacc.c: be sure to stay within yycheck_.
10869 * tests/actions.at: Re-enable C++ tests.
10871 2004-12-16 Akim Demaille <akim@epita.fr>
10873 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
10876 2004-12-16 Akim Demaille <akim@epita.fr>
10878 Use #define to handle the %name-prefix.
10880 * data/glr.c, data/yacc.c: Comment changes.
10881 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
10882 so that one can refer to yylex in the parser file, and have it
10883 renamed, as is the case with other skeletons.
10885 2004-12-16 Akim Demaille <akim@epita.fr>
10887 Move lalr1.cc internals into yy*.
10889 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
10890 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
10891 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
10892 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
10893 (empty_, final_, terror_, errcode_, ntokens_)
10894 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
10895 (looka_, ilooka_, error_range_, nerrs_):
10897 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
10898 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
10899 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
10900 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
10901 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
10902 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
10903 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
10904 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
10907 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
10909 Fix some problems reported by twlevo at xs4all.
10910 * src/symtab.c (symbol_new): Report an error if the input grammar
10911 contains too many symbols. This is better than calling abort() later.
10912 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
10913 (struct node, struct graph):
10914 Rename member expand to stretch. All uses changed.
10915 (struct graph): Remove member layoutalgorithm. All uses removed.
10916 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
10917 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
10919 (N_STRETCH): Rename from N_EXPAND. All uses changed.
10921 2004-12-15 Akim Demaille <akim@epita.fr>
10923 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
10924 Add more Doxygen comments.
10925 (symprint_, stack_print_, reduce_print_, destruct_, pop)
10926 (report_syntax_error_, translate_): Rename as...
10927 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
10928 (yypop_, yyreport_syntax_error_, yytranslate_): this.
10930 2004-12-15 Akim Demaille <akim@epita.fr>
10932 * data/lalr1.cc (lex_): Rename as...
10934 Move the trace here.
10935 Take the %name-prefix into account.
10936 Reported by Alexandre Duret-Lutz.
10938 2004-12-15 Akim Demaille <akim@epita.fr>
10940 Simplify the C++ parser constructor.
10942 * data/lalr1.cc (debug_): Rename as...
10943 (yydebug_): so that the parser's internals are always in the yy*
10946 (b4_parse_param_decl): Remove the leading comma as it is now only
10947 called as unique argument list.
10948 (Parser::Parser): Remove the constructor accepting a location and
10949 an initial debugging level.
10950 Remove from the other ctor the argument for the debugging level.
10951 (debug_level_type, debug_level, set_debug_level): New.
10953 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
10956 2004-12-15 Akim Demaille <akim@epita.fr>
10958 Remove b4_root related material: failure experiment
10959 (which goal was to allow to derive from a class).
10961 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
10962 definitions and uses.
10964 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
10966 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
10967 not 2, since it's not portable to subtract 1 from the start of an
10968 array. The new item 0 is never set or used. All uses changed.
10970 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
10971 the default definition of YYLLOC_DEFAULT. Problem reported
10972 by Frank Heckenbach.
10974 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
10976 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
10977 the normal case and one for the error case. Just use the
10978 first one uniformly. Problem reported by Frank Heckenbach.
10979 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
10980 use exactly the same macro in both places.
10981 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
10982 so that the normal-case YYRHSLOC works for the error case too.
10984 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
10985 (YYLLOC_DEFAULT): Use the same macro as glr.c.
10986 * doc/bison.texinfo (Location Default Action): Don't claim that
10987 we have an array of locations. Use the same macro for both glr
10988 and lalr parsers. Mention YYRHSLOC. Mention what happens when
10991 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
10993 * HACKING: Update email addresses to send announcements to.
10995 * configure.ac (AC_INIT): Bump version to 1.875f.
10997 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
10999 * NEWS: Version 1.875e.
11000 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
11002 * src/scan-skel.l: Include "complain.h", for "fatal".
11004 * src/relation.h (relation_print, relation_digraph):
11005 Relation sizes are of type relation_node, not size_t (this is
11006 merely a doc fix, since the two types are equivalent).
11007 (relation_transpose): Relation sizes are of type relation_node,
11009 * src/relation.c: Likewise.
11010 (top, infinity): Now of type relation_node, not int.
11011 (traverse, relation_transpose): Use relation_node, not int.
11013 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
11014 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
11015 (yyparse): Remove unused local introduced in 2004-10-25 patch.
11017 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
11018 specifying whether the test should be skipped. Use it tp
11019 specify that the [%defines %skeleton "lalr1.cc"] tests currently
11020 fail on some hosts, and should be skipped.
11022 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
11024 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
11025 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
11026 unless otherwise specified below.
11028 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
11029 to allocate kernel_base, kernel_items, kernel_size, since
11030 they needn't be initialized to 0.
11031 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
11032 * src/closure.c (new_closure): Likewise, for itemset.
11033 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
11034 * src/lalr.c (set_goto_map): Likewise, for temp_map.
11035 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
11036 (build_relations): Likewise for edge, states1, includes.
11037 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
11038 * src/reader.c (packgram): Likewise, for ritem, rules.
11039 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
11040 * src/relation.c (relation_digraph): Likewise for VERTICES.
11041 (relation_transpose): Likewise for new_R, end_R.
11042 * src/symtab.c (symbols_token_translations_init): Likewise for
11043 token_translations.
11044 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
11045 (token_actions): Likewise for yydefact, actrow, conflrow,
11047 (save_column): Likewise for froms[symno], tos[symno].
11048 (goto_actions): Likewise for state_count.
11049 (pack_table): Likewise for base, pos, check.
11050 (tables_generate): Likewise for width.
11052 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
11053 for initial core. Just have a separate core, so we needn't worry
11054 about whether kernel_size and kernel_base are initialized.
11056 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
11057 kernel_size, kernel_items): Remove unnecessary initialization.
11058 * src/conflicts.c (conflicts): Likewise.
11059 * src/derives.c (derives): Likewise.
11060 * src/muscle_tablc (muscle_insert): Likewise.
11061 * src/relation.c (relation_digraph): Likewise.
11062 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
11063 conflrow, conflict_table, conflict_list, table, check):
11066 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
11067 This is because all callers pass unsigned int.
11068 * src/closure.h (new_closure): Likewise.
11070 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
11071 (build_relations): Initialize includes[i] in all cases.
11072 * src/reader.c (packgram): Always initialize rules[ruleno].prec
11073 and rules[ruleno].precsym. Initialize members in order.
11074 * src/relation.c (relation_transpose): Always initialize new_R[i]
11076 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
11078 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
11079 conflict_list[0] was always 0, but now it isn't initialized.
11081 * src/table.c (table_grow): When conflict_table grew, the grown
11082 area wasn't cleared. Fix this.
11084 * lib/.cvsignore: Add strdup.c, strdup.h.
11085 * m4/.cvsignore: Add strdup.m4.
11087 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
11089 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
11090 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
11091 GOTO_NUMBER_MAXIMUM, since we occasionally compute
11092 ngotos + 1 without checking for overflow.
11093 (build_relations): Use END_NODE, not -1, to denote end of edges.
11094 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
11095 build_relations): Use goto_number, not int, for goto numbers.
11096 * src/tables.c (save_column, default_goto): Likewise.
11098 2004-11-23 Akim Demaille <akim@epita.fr>
11100 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
11101 of #defining from yystype.
11102 Don't typedef yystype, C++ does not need it.
11103 This lets it possible to forward declare it as union.
11105 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
11107 * bootstrap (gnulib_modules): Add extensions.
11108 Problem reported by Jim Meyering.
11110 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
11112 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
11113 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
11114 src/system.h, src/tables.c: XFREE -> free, to accommodate
11115 recent change to gnulib xalloc.h.
11116 Problem reported by Jim Meyering.
11118 2004-11-17 Akim Demaille <akim@epita.fr>
11120 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
11122 2004-11-17 Akim Demaille <akim@epita.fr>,
11123 Alexandre Duret-Lutz <adl@gnu.org>
11125 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
11127 (YYCDEBUG): Adjust.
11128 Use it instead of cdebug_.
11129 (Parser::debug_stream, Parser::set_debug_stream): New.
11130 (Parser::symprint_): Define cdebug_ for temporary backward
11132 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
11135 2004-11-17 Akim Demaille <akim@epita.fr>
11137 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
11138 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
11139 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
11140 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
11142 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
11144 * data/glr.c (yyloc_default): Remove; not used.
11145 Problem reported by Frank Heckenbach.
11147 2004-10-25 Akim Demaille <akim@epita.fr>
11149 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
11150 Introduce another definition to address simple location arrays.
11151 (yyGLRStack): New member: yyerror_range.
11152 (yyrecoverSyntaxError, yyparse): Update it.
11153 (yyrecoverSyntaxError): Use it when shifting the error token to
11154 have an accurate range, equivalent to the one computed by both
11155 yacc.c and lalr1.cc.
11156 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
11157 that column numbers start at column 0, as per GNU Coding
11158 Standards, the others tests, and the doc.
11159 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
11160 Adjust to the above change (first column is 0).
11161 And adjust the location of the "<error>", now covering the whole
11164 2004-10-22 Akim Demaille <akim@epita.fr>
11165 and Paul Eggert <eggert@cs.ucla.edu>
11167 Remove some arbitrary limits on goto numbers and relations.
11168 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
11169 initial values, since they're never used.
11170 (set_goto_map): ngotos is now unsigned, so test for overflow
11171 by seeing whether it wraps around to zero.
11172 * src/lalr.h (goto_number): Now size_t, not short int.
11173 (GOTO_NUMBER_MAXIMUM): Remove.
11174 * src/relation.c (relation_print, traverse, relation_transpose):
11175 Check for END_NODE rather than looking at sign.
11176 * src/relation.h (END_NODE): New macro.
11177 (relation_node): Now size_t, not short int.
11179 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
11181 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
11182 keyword, not an identifier. Problem reported by Baron Schwartz in
11183 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
11185 2004-10-11 Akim Demaille <akim@epita.fr>
11187 * src/symtab.c (symbol_check_alias_consistency): Also check
11188 type names, destructors, and printers.
11189 Reported by Alexandre Duret-Lutz.
11190 Recode the handling of associativity and precedence in terms
11191 of symbol_precedence_set.
11192 Accept no redeclaration at all, not even equal to the previous
11194 (redeclaration): New.
11195 Use it to factor redeclaration complaints.
11196 (symbol_make_alias): Don't set the type of the alias, let
11197 symbol_check_alias_consistency do it as for other features.
11198 * src/symtab.h (symbol): Add new member prec_location, and
11200 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
11201 * tests/input.at (Incompatible Aliases): New.
11203 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
11205 .cvsignore fixes to accommodate gnulib changes,
11206 and the practice of naming build directories "_build".
11207 * .cvsignore: Add "_*". Sort.
11208 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
11209 * m4/.cvsignore: Add "*_gl.m4".
11211 2004-10-06 Akim Demaille <akim@epita.fr>
11213 * src/parse-gram.y (add_param): Fix the truncation of trailing
11216 2004-10-05 Akim Demaille <akim@epita.fr>
11218 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
11219 whether the reducion was empty or not. This leaves room to
11220 improve the use of YYLLOC_DEFAULT in such a case.
11221 lalr1.cc is still experimental, so changing this is acceptable.
11222 And finally, there are probably not many users who changed the
11223 handling of locations in GLR, so changing is admissible too.
11225 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
11226 empty reduction, set @$ to an empty location ending the previously
11228 Adjust uses to make sure the code is triggered on empty
11230 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
11231 expected output: empty reductions have empty locations.
11233 2004-09-29 Akim Demaille <akim@epita.fr>
11235 * data/lalr1.cc: Move towards a more standard C++ coding style
11236 for templates: Class < T > -> Class<T>.
11238 2004-09-29 Akim Demaille <akim@epita.fr>
11240 * data/lalr1.cc: Reinstall the former ctor, for sake of
11241 compatibility, but warn it will be removed.
11242 Move towards a more standard C++ coding style (i.e., type *var ->
11245 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
11247 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
11248 since it's less likely to work if NULs are involved in the future.
11250 2004-09-27 Akim Demaille <akim@epita.fr>
11252 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
11254 2004-09-27 Akim Demaille <akim@epita.fr>
11256 * data/lalr1.cc (b4_parse_param_decl_1): New.
11257 (b4_parse_param_decl): Use it to have different names between attribute
11258 and argument names.
11259 (b4_cc_constructor_call): Likewise.
11261 2004-09-24 Akim Demaille <akim@epita.fr>
11263 * src/parse-gram.y (add_param): Strip the leading and trailing
11264 blanks from a formal argument declaration.
11265 (YY_LOCATION_PRINT): New.
11267 2004-09-24 Akim Demaille <akim@epita.fr>
11269 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
11270 after the location.
11272 2004-09-24 Akim Demaille <akim@epita.fr>
11274 * doc/bison.texinfo (Table of Symbols): Sort.
11276 2004-09-21 Akim Demaille <akim@epita.fr>
11278 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
11279 the useless parentheses.
11280 Suggested by Paul Eggert.
11282 2004-09-20 Akim Demaille <akim@epita.fr>
11284 Let the initial-action act on the look-ahead, and use it for the
11285 "initial push" (corresponding to an hypothetical beginning-of-file).
11286 And let lalr1.cc honor %initial-action.
11288 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
11290 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
11291 (Parser::Parser): Remove the ctor that used to initialize it.
11292 (Parser::parse): Like in the other skeletons, issue the "starting
11293 parse" message before any action.
11294 Honor %initial-action.
11295 Initialize the stacks with the lookahead.
11296 * data/yacc.c: Let $$ and @$ in %initial-action designate the
11298 Push them in the stacks.
11299 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
11301 2004-09-20 Akim Demaille <akim@epita.fr>
11303 * doc/bison.texinfo (Initial Action Decl): New.
11305 2004-09-20 Akim Demaille <akim@epita.fr>
11307 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
11308 clearer criterion to define it.
11309 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
11310 When reducing on an empty RHS, use the latest stacked location as
11312 yylloc is not always available.
11313 * data/glr.c: Likewise.
11314 Also, honor initial-actions.
11316 2004-09-20 Akim Demaille <akim@epita.fr>
11318 * data/yacc.c (YY_LOCATION_PRINT): New.
11319 Define when we know YYLTYPE's structure, i.e., when the default
11320 YYLLOC_DEFAULT is used.
11321 * data/c.m4 (b4_yysymprint_generate): Use it.
11322 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
11323 value of the result.
11324 (error_start_): Replace with...
11325 (error_range_): this location array.
11326 This allows to replace code relying on the implementation of
11327 locations by portable code.
11328 * data/yacc.c (yylerrsp): Replace with...
11329 (yyerror_range): this.
11330 Every time a token is popped, update yyerror_range[0], to have an
11331 accurate location for the error token.
11332 * data/glr.c (YY_LOCATION_PRINT): New.
11333 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
11334 deference a pointer.
11335 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
11336 report the location in %printers.
11338 * src/scan-skel.l: Instead of abort, report error messages to ease
11339 understanding skeleton scanning failures.
11341 2004-09-16 Akim Demaille <akim@epita.fr>
11343 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
11344 (iterator, const_iterator): these, to be more in the C++ spirit.
11345 Also, return reverse iterators so that when displaying the stack
11346 we display its bottom first.
11347 (Parser::stack_print_, Parser::reduce_print_): Match the messages
11349 We should probably use vector here though.
11351 2004-09-16 Akim Demaille <akim@epita.fr>
11353 Have more complete shift traces.
11355 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
11356 to report Shifts instead of ad hoc YYDPRINTF invocations,
11357 including for the error token.
11358 * data/lalr1.cc (symprint_): Output the location.
11359 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
11360 output the location within the %printer.
11361 Activate GLR tests, at least to make sure they compile properly.
11362 They still don't pass though.
11363 * tests/calc.at: Adjust expect verbose output, since now "Entering
11364 state..." is on a different line than the "Shifting" message.
11366 2004-09-08 Akim Demaille <akim@epita.fr>
11368 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
11369 Bison directive from the Bison file to the invocation of this
11370 macro, so that these directives are passed to
11371 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
11372 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
11373 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
11374 the extra Bison directives instead of the whole series.
11375 Change the grammar so that there are recoverable errors, and
11376 unrecoverable errors. Now we can have the parser give up before
11377 consuming the whole input. As a result we now can observe that
11378 the lookahead is freed when needed.
11379 Change the parser source to parse argv[1] instead of a hard coded
11381 Simplify yylex, and give a value and location to EOF.
11382 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
11383 passed directives already coded in the file.
11384 Add some tests to check the location of "error".
11385 For some tests, the C++ parser is correct, and not yacc.c.
11386 For other tests, they provide different, but unsatisfying, values,
11387 so keep the C++ value so that at least one parser is "correct"
11388 according to the test suite.
11389 (Actions after errors): Remove, this is subsumed by the
11390 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
11392 2004-09-06 Akim Demaille <akim@epita.fr>
11394 * data/lalr1.cc: Adjust the indentation of the labels.
11395 (Parser::pop): New.
11398 2004-09-06 Akim Demaille <akim@epita.fr>
11400 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
11401 argument, an informative message.
11402 Call YY_SYMBOL_PRINT.
11403 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
11404 * data/lalr1.cc (destruct_): Likewise.
11405 In addition, no longer depend on b4_yysymprint_generate and
11406 b4_yydestruct_generate to generate these functions, do it "by
11409 2004-09-03 Akim Demaille <akim@epita.fr>
11411 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
11412 invoked, yydestruct the lookahead.
11413 * tests/calc.at (Calculator $1): Update the expected lengths of
11414 traces: there is an added line for the discarded lookahead.
11415 * doc/bison.texinfo (Destructor Decl): Some rewording.
11416 Define "discarded" symbols.
11418 2004-09-02 Akim Demaille <akim@epita.fr>
11420 * data/lalr1.cc (translate_, destruct_): No reason to be static.
11422 2004-09-02 Akim Demaille <akim@epita.fr>
11424 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
11425 (YYDSYMPRINTF): Rename as...
11426 (YY_SYMBOL_PRINT): this.
11427 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
11429 Use it instead of direct symprint_ calls.
11430 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
11433 2004-09-02 Akim Demaille <akim@epita.fr>
11435 * data/lalr1.cc (b4_yysymprint_generate): New.
11436 (symprint_): New member function, defined when YYDEBUG.
11437 Use it consistently instead of token/nterm debugging output by
11439 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
11440 %printer calls to use cdebug_ when using lalr1.cc.
11442 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
11444 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
11445 with #ifdef YYDEBUG.
11447 2004-08-26 Akim Demaille <akim@epita.fr>
11449 * doc/bison.texinfo (Implementing Loops): Rename as...
11450 (Implementing Gotos/Loops): this.
11452 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
11454 Adjust to latest gnulib.
11455 * bootstrap (gnulib_modules): Add xalloc-die.
11456 Set LC_ALL=C so that file names sort consistently.
11457 Prefer the gnulib copies of gettext.m4, glibc21.m4,
11458 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
11459 uintmax_t.m4, ulonglong.m4.
11460 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
11461 po.m4 since we are now using _gl.m4 instead.
11463 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
11465 * src/scan-action.l: Remove. Scanning of semantic actions is
11466 handled in scan-gram.l.
11468 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
11470 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
11472 * src/location.h (struct): The file member is a uniqstr.
11473 (equal_boundaries): Use UNIQSTR_EQ for comparison.
11475 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
11477 Fix bug with non-%union parsers that have printers or destructors,
11478 which led to a Bison core dump. Reported by Peter Fales in
11479 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
11481 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
11482 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
11483 not to our own type.
11484 * src/output.c (symbol_destructors_output, symbol_printers_output):
11485 Don't assume %union.
11486 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
11487 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
11488 UNION-FLAG. All callers changed.
11489 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
11490 Use type char, not unsigned int, when declaring an array of char;
11491 this lets us remove a cast.
11492 (Printers and Destructors): Add non-%union test cases.
11494 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
11496 * doc/bison.texinfo: Minor editorial changes, mostly to the new
11497 GLR writeups. E.g., avoid frenchspacing and the future tense,
11498 change "lookahead" to "look-ahead", and change "wrt" to "with
11501 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11503 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
11504 New sections, split off from the GLR Parsers section. Put the new
11505 Simple GLR Parser near the start of the GLR section, for clarity.
11506 Rewrite connective text.
11508 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
11510 * doc/bison.texinfo (Simple GLR Parsers): New section.
11512 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
11514 * NEWS, TODO, doc/bison.texinfo:
11515 Use "look-ahead" instead of "lookahead", to be consistent.
11516 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
11517 while we're fixing "look-ahead".
11518 * src/conflicts.c (shift_set): Renamed from shiftset.
11519 (look_ahead_set): Renamed from lookaheadset.
11520 * src/print.c: Likewise.
11521 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
11522 name for "lookahead".
11523 (report_types, usage): Likewise.
11524 * src/getargs.h (report_look_ahead_tokens): Renamed from
11526 * src/lalr.c (compute_look_ahead_tokens): Renamed from
11527 compute_lookaheads.
11528 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
11529 (look_ahead_tokens_print): Renamed from lookaheads_print.
11530 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
11531 state_rule_lookaheads_print.
11532 * src/state.h: Likewise.
11533 (reductions.look_ahead_tokens): Renamed from lookaheads.
11534 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
11535 AT_DATA_LOOKAHEADS_GRAMMAR.
11537 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
11539 * README: Update location of patched M4 distribution.
11541 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
11543 Don't assume the C++ compiler takes the same arguments as the C compiler
11545 * configure.ac (O0CXXFLAGS): New var.
11546 * tests/atlocal.in (CXXFLAGS): Use it.
11548 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
11550 Fix some "make check" problems with C++ reported by
11551 Albert Chin-A-Young for Tru64 C++ in this thread:
11552 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
11554 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
11555 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
11556 Output to a .cc file for C++, not to a .c file.
11557 * tests/calc.at (AT_CHECK_CALC): Likewise.
11558 * tests/regression.at (AT_CHECK_DANCER): Likewise.
11559 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
11561 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
11563 * tests/calc.at, tests/actions.at: Workaround for SGI
11564 C++ compiler. (trivial change)
11566 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
11568 Spent a few hours checking out which prerequisite versions the
11569 current sources actually require. I went all the way back to
11570 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
11571 a seemingly endless set of combinations of versions more recent
11572 than that. The bottom line is that the current sources require
11573 fairly recent versions of the build tools, and it'll be some work
11575 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
11576 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
11577 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
11578 Add comments explaining why those particular versions are
11581 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
11582 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
11583 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
11585 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
11586 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
11588 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
11590 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
11591 0.11.5. Suggested by Bruno Haible.
11592 * bootstrap: Remove gettext version checking.
11594 * doc/bison.texinfo (Decl Summary): Also mention that %union
11595 can depend on prerequisite types. Problem reported by Tim
11598 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
11600 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
11601 * README-alpha: Don't tell people not to package this.
11603 * bootstrap: Don't assume $(...) works; use `...` instead.
11604 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
11607 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
11608 put into the -d output file, and mention what to do if YYSTYPE is
11609 defined as a macro.
11611 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
11613 Undo change made earlier today: it caused autopoint to not bring
11614 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
11617 * bootstrap: Check that gettext version matches what's in
11618 configure.ac. Warn users to ignore robots.txt ERROR 404.
11619 * bootstrap: Undo today's earlier change (logged below).
11620 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
11622 The gettext version checking is causing more trouble than it's
11623 curing; remove it. Problem reported by Paul Hilfinger.
11625 * bootstrap: Issue a warning that one can expect a message
11626 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
11627 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
11629 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
11631 Ensure that the C++ compiler used for testing actually works on a
11632 simple test program; if not, skip the C++-related tests. Problem
11633 reported by Vin Shelton in:
11634 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
11636 * m4/cxx.m4: New file.
11637 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
11638 * tests/atlocal.in (BISON_CXX_WORKS): Add.
11639 * tests/local.at (AT_COMPILE_CXX): Use it.
11641 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
11643 * data/glr.c (yylloc): Output this macro even if locations are not
11644 being generated, as the GLR parser needs it even in that case.
11645 Problem reported by Troy A. Johnson
11646 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
11648 * configure.ac (AC_INIT): Update to 1.875e.
11650 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
11652 * NEWS: Version 1.875d.
11653 * configure.ac (AC_INIT): Likewise.
11654 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
11656 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
11657 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
11658 lalr1.cc runs afoul of the first, and the last two are no longer
11659 supported by GCC 3.4.0.
11660 * README: Mention GNU m4 1.4 or later; mention m4 patches.
11661 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
11663 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
11665 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
11666 unsigned int, for compatibility with latest gnulib hash module.
11667 * src/state.c (state_hash, state_hasher): Likewise.
11668 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
11669 * src/uniqstr.c (hash_uniqstr): Likewise.
11671 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
11673 * NEWS: Unescaped newlines are no longer allowed in char & strings.
11675 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
11676 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
11677 character and string literals.
11678 (unexpected_end): New function.
11679 (unexpected_eof): Use it.
11680 (unexpected_newline): New function.
11681 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
11684 * NEWS: Document %expect-rr.
11686 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
11687 Fix typo by replacing $1 with $option.
11688 Remove more 'intl'-related files.
11689 Don't DEFUN AM_INTL_SUBDIR twice.
11691 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
11692 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
11694 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
11695 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
11696 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
11697 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
11698 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
11699 * src/.cvsignore: Add *.output.
11701 * src/parse-gram.y: Put copyright notice inside %{ %} so it
11702 gets copied to the output file.
11704 2004-04-28 Paul Eggert <eggert@twinsun.com>
11706 Get files from the gnulib and po repositories, instead of relying
11707 on them being in our CVS. Upgrade to latest versions of gnulib
11710 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
11711 * bootstrap: Bootstrap from gnulib and po repositories.
11712 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
11713 * README-cvs: Document these changes. Remove version numbers from
11714 mentions of build tools, since they change so often. Mention Flex.
11716 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
11717 (gl_USE_SYSTEM_EXTENSIONS): Add.
11718 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
11719 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
11721 (AC_ISC_POSIX): Remove; we no longer support this
11722 ancient OS, as it gets in the way of latest Autoconf & gnulib.
11723 (AC_HEADER_STDC): Remove: we now assume C89 or better.
11724 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
11725 Do not check for C89 headers, except for locale.h which is used
11726 by the Yacc library and must port to K&R hosts.
11727 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
11728 Do not check for C89 functions, except for setlocale which is
11729 used by the Yacc library.
11730 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
11731 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
11732 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
11733 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
11734 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
11735 AM_GNU_GETTEXT): Remove; now done by:
11736 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
11737 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
11740 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
11741 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
11742 Define to empty, as gnulib.mk will do the rest for us.
11743 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
11745 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
11746 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
11748 * src/files.c: Include gnulib's xstrndup.h.
11750 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
11751 (REALLOC): Use xnrealloc, for likewise.
11752 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
11753 (strnlen, memrchr): Remove decls; functions no longer used.
11754 Include <stpcpy.h>.
11756 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
11757 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
11758 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
11759 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
11760 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
11761 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
11762 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
11763 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
11764 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
11765 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
11766 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
11767 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
11768 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
11769 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
11770 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
11771 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
11772 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
11773 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
11774 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
11775 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
11776 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
11777 Remove, as these files are now generated automatically
11778 by bootstrap or automake.
11780 * po/ChangeLog: Remove: all but one entry was a duplicate
11781 of this file, and I moved that 2000-11-02 entry here.
11783 * config/.cvsignore: Add Makefile, depcomp, install-sh.
11784 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
11785 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
11786 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
11787 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
11788 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
11789 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
11790 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
11791 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
11792 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
11793 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
11795 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
11796 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
11797 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
11798 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
11799 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
11800 * src/.cvsignore: Remove *_.c.
11803 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
11804 support it. (The latest stable gzip doesn't.)
11806 2004-04-27 Paul Eggert <eggert@twinsun.com>
11808 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
11809 case, as stos_ is now used by destructors due to the 2004-02-09
11812 Remove more K&R C support.
11813 * lib/libiberty.y (PARAMS): Remove. All uses removed.
11814 * lib/subpipe.c (errno): Remove decl.
11815 Include <stdlib.h> unconditionally.
11816 (EXIT_FAILURE): Remove macro.
11817 * src/complain.c (vfprintf, strerror): Remove.
11818 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
11820 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
11821 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
11822 (strchr, strspn, memchr): Remove decls.
11823 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
11824 unconditionally. Do not declare perror.
11825 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
11828 * src/complain.c (_): Remove useless defn, as system.h defines this.
11830 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
11831 with latest obstack.h.
11832 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
11833 to procedure types, as obstack.h now does that for us.
11834 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
11836 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
11837 so that this include file can stand alone.
11838 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
11839 does this now. Include subpipe.h first after config.h, to
11840 test whether it can stand alone.
11842 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
11843 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
11844 unused declaration.
11846 * tests/synclines.at (%union synch line): Put a dummy member in
11847 the union, because empty unions aren't allowed in C. Caught
11850 2004-04-13 Jim Meyering <jim@meyering.net>
11852 * src/conflicts.c (conflicts_print): Correct format string typo:
11853 use `%%' to produce literal `%'. (trivial change)
11855 2004-03-30 Paul Eggert <eggert@twinsun.com>
11857 * src/getargs.c (version): Update copyright year to 2004.
11859 * data/c.m4 (b4_int_type): Use 'short int' rather than
11860 'short', and similarly for 'long', 'unsigned', etc.
11861 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
11862 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
11863 yy_yypstack, yydumpstack): Likewise.
11864 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
11865 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
11867 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
11868 yy_stack_print, yyparse): Likewise.
11869 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
11870 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
11871 * lib/bitset.c (bitset_print): Likewise.
11872 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
11873 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
11874 * lib/bitsetv.c (bitsetv_dump): Likewise.
11875 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
11876 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
11878 * src/LR0.c (allocate_itemsets): Likewise.
11879 * src/gram.h (rule_number, rule): Likewise.
11880 * src/lalr.h (goto_number): Likewise.
11881 * src/nullable.c (nullable_compute): Likewise.
11882 * src/output.c (prepare_rules): Likewise.
11883 * src/relation.c (relation_print, relation_digraph): Likewise.
11884 * src/relation.h (relation_node): Likewise.
11885 * src/state.h (state_number, transitions, errs, reductions,
11886 struct state): Likewise.
11887 * src/symtab.h (symbol_number, struct symbol): Likewise.
11888 * src/tables.c (vector_number, tally, action_number,
11889 default_goto, goto_actions): Likewise.
11890 * tests/existing.at (GNU Cim Grammar): Likewise.
11891 * tests/regression.at (Web2c Actions): Likewise.
11893 * src/output.c (muscle_insert_short_int_table): Renamed from
11894 muscle_insert_short_table. All uses changed.
11896 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11898 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
11899 (declaration): Replace expected_conflicts with expected_sr_conflicts.
11900 Add %expect-rr rule.
11902 * src/scan-gram.l: Recognize %expect-rr.
11904 * src/conflicts.h (expected_sr_conflicts): Rename from
11905 expected_conflicts.
11906 (expected_rr_conflicts): Declare.
11908 * src/conflicts.c (expected_sr_conflicts): Rename from
11909 expected_conflicts.
11910 (expected_rr_conflicts): Define.
11911 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
11913 Use expected_sr_conflicts in place of expected_conflicts.
11914 Warn if expected_rr_conflicts used in non-GLR parser.
11916 * doc/bison.texinfo: Add documentation for %expect-rr.
11918 2004-03-08 Paul Eggert <eggert@gnu.org>
11920 Add support for hex token numbers. Suggested by Odd Arild Olsen in
11921 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
11923 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
11925 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
11926 * src/scan-gram.l (scan_integer): New function.
11928 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
11929 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
11930 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
11931 Say "long int", not "long", for uniformity with GNU style.
11933 2004-02-25 Paul Eggert <eggert@twinsun.com>
11935 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
11936 compilers. This fixes a problem with Intel's C++ compiler being
11937 chatty, reported by Guido Trentalancia in
11938 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
11940 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
11942 Support %destructor and merge error locations in lalr1.cc.
11944 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
11945 (Parser::stos_): Define unconditionally.
11946 (Parser::destruct_): New method. Generate its body with
11947 b4_yydestruct_generate.
11948 (Parser::error_start_): New attribute.
11949 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
11950 token which are discarded.
11951 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
11952 error_start_ when erroneous token are discarded.
11953 (Parser::parse) <yyerrlab1>: Compute the location of the error
11954 token so that it covers all the discarded tokens.
11955 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
11956 it can be called with `%skeleton "lalr1.cc"', and do that.
11958 2004-02-02 Paul Eggert <eggert@twinsun.com>
11960 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
11961 $(top_srcdir)/lib and ../lib. This fixes a bug reported
11962 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
11963 There's no need to mention top_builddir since Automake does that
11965 (INCLUDES): Remove, as Automake says it's obsolescent.
11966 Contents migrated into AM_CPPFLAGS as described above.
11967 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
11969 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11971 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
11972 (yyreportSyntaxError): Handle case where lookahead token is
11975 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11977 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
11978 resulting parsers are compilable with C++.
11980 2003-12-23 Paul Eggert <eggert@twinsun.com>
11982 * config/depcomp, config/install-sh: Sync with Automake 1.8.
11983 * src/output.c (output_skeleton): Rename local var.
11984 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
11985 Bison tokens, as this runs afoul of the 2003-10-07 change that
11986 disallowed NUL bytes in character constants or string literals.
11988 * tests/local.at: Require Autoconf 2.59's Autotest.
11989 * tests/testsuite.at: Don't include local.at, since we now assume
11990 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
11992 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
11993 multiple inclusion warnings.
11995 2003-12-02 Akim Demaille <akim@epita.fr>
11997 * doc/bison.texinfo (How Can I Reset the Parser): More about start
12001 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
12003 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
12005 2003-10-07 Paul Eggert <eggert@twinsun.com>
12007 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
12008 if testsuite doesn't exist.
12010 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
12011 literals, unfortunately.
12012 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
12013 Complain about NUL bytes in character constants or string literals.
12015 2003-10-05 Paul Eggert <eggert@twinsun.com>
12017 * NEWS: Don't document %no-default-prec, as it's still
12019 * doc/bison.texinfo: Document %no-default-prec only if
12020 the defaultprec flag is set. Normally it's not.
12022 2003-10-04 Paul Eggert <eggert@twinsun.com>
12024 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
12025 non-modifiable lvalue, instead of a modifiable one.
12026 * doc/bison.texinfo (Actions): Document that $$ can
12027 be assigned to. Do not claim that $$ and $N are
12028 array element references: user code should not rely on this.
12030 2003-10-01 Paul Eggert <eggert@twinsun.com>
12032 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
12033 (grammar_declaration): Use it.
12034 * src/scan-gram.l: New token %no-default-prec.
12035 * tests/conflicts.at: Revamp tests to use %no-default-prec.
12036 * NEWS, doc/bison.texinfo: Document the above.
12038 2003-10-01 Akim Demaille <akim@epita.fr>
12040 VCG no longer supports long_straight_phase.
12042 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
12043 * src/print_graph.c (print_graph): Adjust.
12045 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
12046 and Paul Eggert <eggert@twinsun.com>
12048 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
12049 Table of Symbols): Document %default-prec.
12050 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
12051 (grammar_declaration): Set default_prec on %default-prec.
12052 * src/scan-gram.l (%default-prec): New token.
12053 * src/reader.h (default_prec): New flag.
12054 * src/reader.c: Likewise.
12055 (packgram): Handle it.
12056 * tests/conflicts.at (%default-prec without %prec,
12057 %default-prec with %prec, %default-prec 1): New tests.
12059 2003-09-30 Paul Eggert <eggert@twinsun.com>
12061 * tests/testsuite.at: Include local.at, not input.at, fixing
12062 a typo in the 2003-08-25 patch.
12064 2003-08-27 Akim Demaille <akim@epita.fr>
12066 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
12069 2003-08-26 Akim Demaille <akim@epita.fr>
12071 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
12072 "<\#" to avoid magic from Gnus when posting parts of this script.
12074 2003-08-26 Akim Demaille <akim@epita.fr>
12076 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
12077 (Parser::parse): here.
12078 Adjust: nerrs and errstatus is now replaced by...
12079 (Parser::nerrs_, Parser::errstatus_): New.
12081 2003-08-25 Akim Demaille <akim@epita.fr>
12083 * config/announce-gen, Makefile.cfg: New.
12084 * Makefile.am: Adjust.
12085 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
12086 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
12088 2003-08-25 Akim Demaille <akim@epita.fr>
12090 When reducing initial empty rules, Bison parser read an initial
12091 location that is not defined. This results in garbage, and that
12092 affects Bison's own parser. Therefore we need (i) to extend Bison
12093 to support a means to initialize this location, and (ii) to use
12094 this CVS Bison to fix CVS Bison's parser.
12096 * src/reader.h, reader.c (epilogue_augment): Remove, replace
12098 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
12099 * src/parse-gram.y: Adjust.
12100 (%initial-action): New.
12101 (%error-verbose): Since we require CVS Bison, there is no reason
12103 * src/scan-gram.l: Adjust.
12104 * src/Makefile.am (YACC): New, to make sure we use our own parser.
12105 * data/yacc.c (yyparse): Use b4_initial_action.
12107 2003-08-25 Akim Demaille <akim@epita.fr>
12109 * doc/bison.texinfo: Don't promote stdout for error messages.
12111 2003-08-25 Akim Demaille <akim@epita.fr>
12113 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
12114 From Alexandre Duret-Lutz.
12116 2003-08-25 Akim Demaille <akim@epita.fr>
12120 2003-08-25 Akim Demaille <akim@epita.fr>
12122 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
12125 2003-08-25 Akim Demaille <akim@epita.fr>
12127 * data/lalr1.cc (Parser::reduce_print_): New.
12130 2003-08-25 Akim Demaille <akim@epita.fr>
12132 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
12133 error recovery loops. This patch is based on
12134 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
12135 Also, augment the similarity between lalr1.cc and yacc.c.
12136 Note: the locations of error recovery rules are not correct yet.
12138 * data/lalr1.cc: Comment changes to augment the similarity between
12139 lalr1.cc and yacc.c.
12140 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
12141 (yyerrlab1): Remove, but where it used to be (now the bottom part of
12142 yyerrlab), when hitting EOF, pop the whole stack here instead of
12143 merely falling thru the default error handling mechanism.
12144 (yyerrorlab): New label, with the old contents of YYERROR,
12145 plus the following change: pop the stack of rhs corresponding
12146 to the production that invoked YYERROR. That is how Yacc
12147 behaves (required by POSIX).
12148 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
12151 2003-08-25 Akim Demaille <akim@epita.fr>
12153 Tune local.at so that people can "autom4te -l autotest calc.at -o
12154 calc" for instance, to extract a sub test suite.
12156 * tests/testsuite.at: Move the initialization, Autotest version
12157 requirement, and AT_TESTED invocation into...
12158 * tests/local.at: here.
12159 * tests/testsuite.at: Include it for compatibility with Autoconf
12161 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
12164 2003-08-04 Paul Eggert <eggert@twinsun.com>
12166 Rework code slightly to avoid gcc -Wtraditional warnings.
12167 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
12168 The returned value is now stored in *YY0. All callers changed.
12169 * src/output.c (merge_output): Adjust to the above change.
12171 2003-07-26 Paul Eggert <eggert@twinsun.com>
12173 * data/glr.c (YYASSERT): New macro.
12174 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
12175 yyresolveStates, yyprocessOneStack):
12176 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
12177 Derived from a suggestion by Frank Heckenbach.
12179 2003-07-25 Paul Eggert <eggert@twinsun.com>
12181 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
12182 for portability to K&R C (after ansi2knr, presumably). See
12183 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
12184 by Frank Heckenbach, though I have omitted the structure-initialization
12185 part of his glr-knr.diff patch since I recall that the Portable
12186 C Compiler didn't require that change.
12188 Let the user specify how to allocate and free memory.
12189 Derived from a suggestion by Frank Heckenbach in
12190 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
12191 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
12192 All uses of free, malloc, realloc changed to use these macros,
12193 and unnecessary casts removed.
12194 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
12196 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
12198 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
12199 use s.empty() rather than s == "" to test for empty string; see
12200 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
12203 2003-06-25 Akim Demaille <akim@epita.fr>
12205 * config/depcomp, config/install-sh: Update from masters.
12207 2003-06-20 Paul Eggert <eggert@twinsun.com>
12209 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
12210 and return properly parenthesized result.
12211 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
12212 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
12213 Remove unnecessary parentheses from uses.
12214 * doc/bison.texinfo (Location Default Action): Describe the
12215 conventions for parentheses.
12217 2003-06-19 Paul Eggert <eggert@twinsun.com>
12219 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
12220 yyreportTree): Do not assume that size_t is the same width as int,
12221 when printing sizes. Print sizes using an unsigned format.
12222 Problem reported by Frank Heckenbach in
12223 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
12225 Port to Forte Developer 7 C compiler.
12226 * data/glr.c (struct YYLTYPE): If locations are not being used,
12227 declare a single dummy member, as empty structs do not conform
12229 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
12230 the Forte Developer 7 C compiler complains that end-of-loop
12231 code is not reached.
12233 2003-06-17 Paul Eggert <eggert@twinsun.com>
12235 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
12236 avoid warnings from picky compilers about redefinition of PARAMS.
12238 2003-06-17 Paul Eggert <eggert@twinsun.com>
12242 * NEWS: Document 1.875b.
12244 * lib/bbitset.h: Do not include config.h; that's the includer's job.
12245 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
12246 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
12247 Don't use 'index' in comments, as it's a builtin fn on some hosts.
12248 * lib/bitset_stats.c: Include gettext.h unconditionally, as
12249 per recent gettext manual's suggestion.
12250 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
12251 Use prototypes, not old-style definitions.
12252 * lib/lbitset.c (lbitset_unused_clear): Likewise.
12253 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
12254 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
12255 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
12256 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
12257 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
12258 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
12259 vbitset_or_and_cmp, vbitset_copy): Likewise.
12261 * lib/libiberty.h: Do not include config.h; that's the includer's job.
12262 Do not include <stdlib.h>.
12263 (PARAMS): Define unconditionally for C89.
12264 (ATTRIBUTE_NORETURN): Remove.
12265 (ATTRIBUTE_UNUSED): Define unconditionally.
12267 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
12268 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
12269 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
12270 * lib/vbitset.c, lib/vbitset.h: New files.
12271 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
12272 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
12275 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
12276 `How Can I Reset @code{yyparse}', since texinfo does not allow
12277 arbitrary @ in node names.
12279 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
12280 shouldn't be needed according to the gettext 0.12.1 documentation
12281 but which seem to be needed anyway: codeset.m4 glibc21.m4
12282 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
12283 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
12284 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
12286 * lib/.cvsignore: Add stdbool.h.
12287 * m4/.cvsignore: Add nls.m4, po.m4.
12289 Upgrade to CVS gnulib.
12290 * stdbool_.h: File renamed from stdbool.h.in.
12291 * configure.ac (AM_STDBOOL_H): Invoke this instead of
12293 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
12294 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
12295 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
12296 (MOSTLYCLEANFILES): New var.
12297 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
12298 (stdbool.h): New rule.
12299 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
12300 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
12301 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
12302 m4/quote.m4: Upgrade to today's gnulib.
12304 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
12305 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
12306 the tests right now.
12307 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
12308 yyerror are declared before use; C99 requires this.
12310 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12312 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
12314 (yyrecoverSyntaxError): Correct the logic for setting and testing
12316 Correct comment on handling EOF.
12317 Allow states with only a default reduction, rather than failing
12318 (I can't quite reconstruct why these were not allowed before).
12320 Fixes to avoid problem that $-N rules in GLR parsers can cause
12321 buffer overruns, corrupting state.
12323 * src/output.c (prepare_rules): Output max_left_semantic_context
12325 * src/reader.h (max_left_semantic_context): New variable declaration.
12326 * src/scan-gram.l (max_left_semantic_context): Define.
12327 (handle_action_dollar): Update max_left_semantic_context.
12328 * data/glr.c (YYMAXLEFT): New definition.
12329 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
12330 (yyresolveAction): Ditto.
12332 Fixes to problems with location handling in GLR parsers reported by
12333 Frank Heckenbach (2003/06/05).
12335 * data/glr.c (YYLTYPE): Make trivial if locations not used.
12336 (YYRHSLOC): Add parentheses, and define only if locations used.
12337 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
12338 locations not used.
12339 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
12340 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
12342 * tests/cxx-type.at: Exercise location information; update tests
12343 to differentiate output with and without locations.
12344 Remove forward declarations of yylex and yyerror---caused errors
12345 because default YYLTYPE not yet defined.
12346 Change semantic actions to compute strings, rather than printing
12347 them directly (to test proper passing of semantics values). Change
12348 output to prefix notation and update test data and expected results.
12349 (yylex): Track locations.
12350 (stmtMerge): Return value rather than printing, and include arguments
12353 2003-06-03 Paul Eggert <eggert@twinsun.com>
12355 Avoid warnings generated by GCC 2.95.4 when Bison is
12356 configured with --enable-gcc-warnings.
12357 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
12358 yy::]b4_parser_class_name[::translate_,
12359 yy::Stack::operator[] (unsigned),
12360 yy::Stack::operator[] (unsigned) const,
12361 yy::Slice::operator[] (unsigned),
12362 yy::Slice::operator[] (unsigned) const):
12363 Rename local vars to avoid warnings.
12364 * tests/glr-regression.at (Improper handling of embedded actions
12365 and $-N in GLR parsers): Remove unused local variable from yylex.
12366 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
12367 (void) as arg when not pure, since we now assume C89 when building
12368 Bison. Pacify GCC by using parameter.
12370 2003-06-02 Paul Eggert <eggert@twinsun.com>
12372 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
12373 yy::Location::lines, yy::Location::columns): Rename arguments
12374 to avoid shadowing; this removes a warning generated by GCC 3.3.
12376 2003-06-01 Paul Eggert <eggert@twinsun.com>
12378 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
12379 to g++, as GCC 3.3 complains if you do it.
12380 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
12381 everything that WARNING_CFLAGS has, except omit warnings
12382 not suitable for C++.
12383 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
12384 * tests/atlocal.in (CXXFLAGS): New var.
12385 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
12387 Fix a GLR parser bug I reported in February; see
12388 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
12389 The problem was that GLR parsers did not conform to the C standard,
12390 because actions like { $1 = $2 + $3; } expanded to expressions
12391 that invoked YYFILL in separate subexpressions, and YYFILL assigned
12392 to a local variable. The C standard says that expressions
12393 like (var = f ()) + (var = f ()) have undefined behavior.
12394 Another problem was that GCC sometimes issues warnings that
12395 yyfill and its parameters are unused.
12397 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
12398 as possibly unused.
12399 (yyfill): New function.
12401 (yyuserAction): Change type of yynormal to bool, so that it matches
12402 the new yyfill signature. Mark it as possibly unused.
12405 Follow up on a bug I reported in February, where a Bison-generated
12406 parser can loop. Provide a test case and a fix for yacc.c. I
12407 don't have a fix for lalr1.cc or for glr.c, unfortunately.
12408 The original bug report is in:
12409 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
12411 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
12412 macro's size was becoming unwieldy.
12413 (yyerrlab): Do not discard an empty lookahead symbol, as this
12414 might destroy garbage.
12415 (yyerrorlab): New label, with the old contents of YYERROR,
12416 plus the following change: pop the stack of rhs corresponding
12417 to the production that invoked YYERROR. That is how Yacc
12418 behaves, and POSIX requires this behavior.
12419 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
12420 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
12421 Define 'alarm' to do nothing if unistd.h is not available.
12422 Add a new rule "exp: '-' error;" to test the above change to
12423 data/yacc.c. Use 'alarm' to abort any test taking longer than
12424 10 seconds, as it's probably looping.
12425 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
12426 Also, the new yacc.c generates two fewer diagnostics for an
12429 2003-05-24 Paul Eggert <eggert@twinsun.com>
12431 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
12432 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
12433 This fixes a problem reported by John Bowman when the Compaq/HP
12434 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
12435 -ansi -Wall -gall).
12436 * data/yacc.c (union yyalloc): Likewise.
12437 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
12439 Switch from 'int' to 'bool' where that makes sense.
12441 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
12442 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
12443 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
12444 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
12445 Return or accept bool, not int. All callers changed.
12446 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
12447 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
12448 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
12449 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
12450 bitset_or_and_cmp_): Likewise.
12451 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
12452 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
12453 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
12454 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
12455 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
12456 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
12457 bitset_stats_or_and_cmp): Likewise.
12458 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
12459 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
12460 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
12461 ebitset_xor_cmp): Likewise.
12462 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
12463 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
12464 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
12465 lbitset_xor_cmp): Likewise.
12466 * lib/bbitset.h: Include <stdbool.h>.
12467 (struct bitset_vtable): The following members now return bool, not
12468 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
12469 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
12471 * src/conflicts.c (count_rr_conflicts): Likewise.
12472 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
12474 * lib/ebitset.c (ebitset_obstack_init): Likewise.
12475 * lib/lbitset.c (lbitset_obstack_init): Likewise.
12476 * src/getargs.c (debug_flag, defines_flag, locations_flag,
12477 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12478 graph_flag): Likewise.
12479 * src/getargs.h (debug_flag, defines_flag, locations_flag,
12480 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
12481 graph_flag): Likewise.
12482 * src/output.c (error_verbose): Likewise.
12483 * src/output.h (error_verbose): Likewise.
12484 * src/reader.c (start_flag, typed): Likewise.
12485 * src/reader.h (typed): Likewise.
12486 * src/getargs.c (LOCATIONS_OPTION): New constant.
12487 (long_options, getargs): Use it.
12488 * src/lalr.c (build_relations): Use bool, not int.
12489 * src/nullable.c (nullable_compute): Likewise.
12490 * src/print.c (print_reductions): Likewise.
12491 * src/tables.c (action_row, pack_vector): Likewise.
12492 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
12493 * src/output.c (prepare): Use it.
12494 * src/output.c (token_definitions_output,
12495 symbol_destructors_output, symbol_destructors_output): Use string,
12496 not boolean integer, to keep track of whether to output separator.
12497 * src/print_graph.c (print_core): Likewise.
12498 * src/state.c (state_rule_lookaheads_print): Likewise.
12500 * config/install-sh: Sync from automake 1.7.5.
12502 2003-05-14 Paul Eggert <eggert@twinsun.com>
12504 * src/parse-gram.y (rules_or_grammar_declaration): Require a
12505 semicolon after a grammar declaration, in the interest of possible
12506 future changes to the Bison input language.
12507 Do not allow a stray semicolon at the start of the grammar.
12508 (rhses.1): Allow one or more semicolons after any rule, including
12509 just before "|" as required by POSIX.
12510 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
12513 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
12515 %parse-param support for lalr1.cc.
12517 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
12518 b4_cc_constructor_calls, b4_cc_constructor_call,
12519 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
12521 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
12522 parse-param arguments.
12523 (yy::b4_parser_class_name): Declare instance variables to
12524 hold parse-param arguments.
12525 * tests/calc.at: s/value/semantic_value/ because value clashes
12526 with a member of yy::b4_parser_class_name. Adjust C++ code
12527 to handle %parse-param. Enable %parse-param test in C++.
12529 2003-05-12 Paul Eggert <eggert@twinsun.com>
12531 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
12532 English a bit. Fix fclose typo. Change "const char" to "char
12533 const", and use ANSI C rather than K&R for "main". Suggest
12534 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
12535 and suggest yy_switch_to_buffer.
12537 2003-05-05 Paul Eggert <eggert@twinsun.com>
12539 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
12540 C89. This avoids a diagnostic on compilers that define __STDC__
12541 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
12542 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
12544 2003-05-03 Paul Eggert <eggert@twinsun.com>
12546 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
12547 Do not overrun array bounds.
12548 This should fix a bug reported today by Olatunji Oluwabukunmi in
12549 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
12551 2003-04-29 Akim Demaille <akim@epita.fr>
12553 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
12554 * src/getargs.c, src/getargs.h: here, as bool, not int.
12555 (nondeterministic_parser): New.
12556 * src/parse-gram.y, src/scan-gram.l: Support
12557 %nondeterministic-parser.
12558 * src/output.c (prepare): Use nondeterministic_parser instead
12559 of glr_parser where appropriate.
12560 * src/tables.c (conflict_row, action_row, save_row)
12561 (token_actions, token_actions, pack_vector): Ditto.
12563 2003-04-29 Akim Demaille <akim@epita.fr>
12565 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
12567 2003-04-29 Akim Demaille <akim@epita.fr>
12569 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
12570 with %pure-parser and %locations to exercise the patch from Yakov
12573 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
12575 * data/yacc.c: (b4_lex_param): Corrected for the case where
12576 %lex-param is provided and %pure-parser isn't.
12578 2003-04-27 Paul Eggert <eggert@twinsun.com>
12580 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
12581 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
12582 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
12583 if it is not defined.
12584 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
12586 2003-04-26 Paul Eggert <eggert@twinsun.com>
12588 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
12589 Declare to be of type suitable for the ninf value itself, not of
12590 type suitable for the corresponding table, since the latter might
12591 be unsigned but the ninf value might be negative. This fixes a
12592 bug reported by Alexandre Duret-Lutz in
12593 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
12595 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
12596 invokes it. We shouldn't invoke it twice because it will attempt
12597 to put error.o in the archive twice. This fixes a glitch reported
12598 by Martin Mokrejs in
12599 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
12601 2003-04-21 Paul Eggert <eggert@twinsun.com>
12603 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
12606 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
12608 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
12609 Fix obvious typo that results in uncompilable GLR parsers
12610 when both %pure-parser and %locations are used. (trivial change)
12612 2003-04-17 Paul Eggert <eggert@twinsun.com>
12614 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
12615 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
12616 Do not insert the expected token via unput, as this runs afoul
12617 of a POSIX-compatibility bug in flex 2.5.31.
12618 All uses changed to BEGIN the parent state,
12619 since we no longer insert the expected token via unput.
12620 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
12621 that is no longer emitted after the above change.
12623 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
12624 the first one. This change is from Paul Hilfinger, and it fixes
12625 regression reported by Werner Lemberg in
12626 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
12628 (resolve_sr_conflict): Don't invoke state_errs_set
12629 unless one or more tokens have been explicitly made errors.
12630 Otherwise, the above change causes Bison to abort.
12632 * tests/existing.at (GNU pic Grammar): New test case, taken from
12635 2003-03-31 Akim Demaille <akim@epita.fr>
12637 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
12639 2003-03-31 Akim Demaille <akim@epita.fr>
12641 * src/output.c (prepare_symbols): Avoid trailing spaces in the
12644 2003-03-31 Akim Demaille <akim@epita.fr>
12646 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
12647 From Paul Hilfinger.
12649 2003-03-29 Akim Demaille <akim@epita.fr>
12651 * m4/error.m4: Do not put under dynamic conditions some code which
12652 expansion is under static control.
12654 2003-03-29 Akim Demaille <akim@epita.fr>
12656 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
12658 2003-03-29 Akim Demaille <akim@epita.fr>
12660 * doc/bison.texinfo (Strings are Destroyed): New.
12662 2003-03-13 Paul Eggert <eggert@twinsun.com>
12664 * .cvsignore: Add configure.lineno.
12665 * src/.cvsignore: Add yacc.
12666 * tests/.cvsignore: Add testsuite.log.
12667 * doc/fdl.texi: Sync with latest FSF version.
12669 2003-03-12 Paul Eggert <eggert@twinsun.com>
12671 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
12672 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
12673 cursor, instead of leaving it undefined. This fixes a bug
12674 reported by Tim Van Holder in
12675 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
12676 * tests/input.at (Torturing the Scanner): Test the scanner on
12677 an empty input file, which was Tim Van Holder's test case.
12679 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
12680 <sys/resource.h> can be included, include sys/time.h and
12681 sys/times.h first, if available. This works around the SunOS
12682 4.1.4 porting bug reported by Bruce Becker in
12683 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
12685 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
12686 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
12687 AC_HEADER_SYS_WAIT.
12689 Merge changes from gnulib. This was prompted because the CVS
12690 snapshot didn't build on Solaris 7 due to strnlen problems.
12692 These changes need to be merged back into gnulib:
12693 * lib/hash.c: Include <stdbool.h> unconditionally.
12694 * m4/onceonly.m4 (m4_quote): New macro.
12695 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
12696 Quote AC_FOREACH variable-expansions properly.
12697 The 2003-01-03 obstack.h change also needs merging.
12698 {end of changes requiring merging}
12700 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
12701 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
12702 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
12703 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
12704 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
12705 New files, imported from gnulib.
12706 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
12709 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
12710 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
12713 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
12715 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
12716 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
12717 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
12718 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
12719 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
12720 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
12721 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
12722 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
12723 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
12724 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
12725 (jm_PREREQ_ARGMATCH): Remove.
12726 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
12727 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
12729 * src/system.h: Include <stdbool.h> unconditionally.
12731 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
12732 assuming at least C89 in the bitset code for some time now.
12734 2003-03-03 Akim Demaille <akim@epita.fr>
12738 2003-03-02 Akim Demaille <akim@epita.fr>
12740 * doc/bison.texinfo (Table of Symbols): Reactivate the
12741 documentation for %lex-param, and %parse-param.
12743 2003-03-02 Akim Demaille <akim@epita.fr>
12745 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
12746 generate verbose error messages.
12747 Use the number of tokens as an upper bound in yytname, as it
12748 cannot be a non terminal.
12750 2003-03-02 Akim Demaille <akim@epita.fr>
12752 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
12755 2003-03-02 Akim Demaille <akim@epita.fr>
12757 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
12758 Use them to exercise yycheck overrun.
12759 Based on Andrew Suffield's grammar.
12761 2003-03-02 Akim Demaille <akim@epita.fr>
12763 Create tests/local.at for Bison generic testing macros.
12765 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
12766 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
12768 * tests/calc.at (AT_CHECK_CALC): Adjust.
12769 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
12770 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
12771 * tests/local.at: here.
12772 (AT_COMPILE_CXX): Tags the tests using it as c++.
12773 Ignore the test if CXX is not functional.
12775 2003-03-01 Paul Eggert <eggert@twinsun.com>
12777 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
12778 not loc->end, since loc->end might contain garbage and this leads
12779 to undefined behavior on some platforms.
12780 (id_loc, token_start): Use (IF_LINTed) initial values that do not
12781 depend on *loc, so that the reader doesn't give the the false
12782 impression that *loc is initialized.
12783 (<INITIAL>"%%"): Do not bother setting code_start, since its value
12784 does not survive the return.
12786 2003-03-01 Akim Demaille <akim@epita.fr>
12788 * src/scan-gram.l (code_start): Always initialize it when entering
12789 into yylex, as SC_EPILOGUE is activated *before* the corresponding
12790 yylex invocation. An alternative would be making it static, but
12791 then it starts with the second %%'s beginning, instead of its end.
12793 2003-02-28 Paul Eggert <eggert@twinsun.com>
12795 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
12796 around a UnixWare 7.1.1 porting bug reported by John Hughes in
12797 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
12799 2003-02-26 Paul Eggert <eggert@twinsun.com>
12801 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
12802 Remove Sequent/Pyramid discussion (nobody uses them any more).
12803 Merge VMS and MS-DOS discussion; these ports may well be dead
12804 but let's keep mentioning them for now. Put <> around email
12805 addresses. Add copyright notice.
12807 2003-02-24 Paul Eggert <eggert@twinsun.com>
12809 * data/glr.c (yy_reduce_print): yylineno -> yylno,
12810 to avoid collision with flex use of yylineno.
12811 Problem reported by Bruce Lilly in
12812 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
12813 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
12814 * data/yacc.c (yy_reduce_print): Likewise.
12816 * config/depcomp: Sync with Automake 1.7.3.
12818 2003-02-21 Akim Demaille <akim@epita.fr>
12820 * data/lalr1.cc: Use temporary variables instead of casts to
12821 change integer types.
12822 Suggested by Paul Eggert.
12824 2003-02-21 Akim Demaille <akim@epita.fr>
12826 * doc/bison.texinfo: Use "location" consistently to refer to @n,
12827 to avoid confusions with lalr1.cc's notion of Position.
12828 Suggested by Paul Eggert.
12830 2003-02-20 Akim Demaille <akim@epita.fr>
12832 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
12833 before initial_columns.
12834 (location.hh): Use consistent variable names when defining the
12836 Use "last" so that we subtract from Positions, not from unsigned.
12838 2003-02-20 Akim Demaille <akim@epita.fr>
12840 * data/lalr1.cc (position.hh): New subfile, including the extended
12841 and Doxygen'ed documentation of class Position.
12842 (location.hh): Use it.
12843 Document a` la Doxygen.
12844 With the help of Benoit Perrot.
12846 2003-02-20 Akim Demaille <akim@epita.fr>
12848 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
12850 Redefine AT_YYERROR_SEES_LOC_IF using it.
12851 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
12853 Don't use the location in yy::Parser::error_ and
12854 yy::Parser::print_ when not %locations.
12855 Activate more lalr1.cc tests.
12857 2003-02-19 Akim Demaille <akim@epita.fr>
12859 * data/lalr1.cc: When displaying a line number, be sure to make it
12862 2003-02-19 Akim Demaille <akim@epita.fr>
12864 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
12866 (YYABORT, YYACCEPT, YYERROR): New.
12867 * tests/calc.at: Renable the lalr1.cc test.
12869 2003-02-19 Akim Demaille <akim@epita.fr>
12871 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
12872 error recovery, mixing with/without pops and discarding of the
12875 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
12877 2003-02-17 Paul Eggert <eggert@twinsun.com>
12879 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
12880 * tests/testsuite.at (AT_COMPILE): Use them.
12881 This fixes the testsuite problem reported by Robert Lentz in
12882 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
12884 2003-02-12 Paul Eggert <eggert@twinsun.com>
12886 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
12887 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
12888 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
12889 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
12890 Check for malloc failure, for consistency with yacc.c.
12891 (yytname_size): Remove, for consistency with yacc.c.
12893 The bug still remains in data/lalr1.cc, as I didn't have time
12896 2003-02-06 Akim Demaille <akim@epita.fr>
12898 * configure.ac (GXX): Rename as...
12899 (CXX): this, to keep the original Autoconf semantics.
12901 * data/lalr1.cc: Fix b4_copyright invocations.
12902 If YYDEBUG is not defined, don't depend upon name_ being defined.
12903 (location.hh): Include string and iostream.
12904 (Position::filename): New member.
12905 (Position::Position ()): New.
12906 (operator<< (Position)): New.
12907 (operator- (Position, int)): New.
12908 (Location::first, Location::last): Rename as...
12909 (Location::begin, Location::end): these, to mock the conventional
12911 (operator<< (Location)): New.
12912 * tests/atlocal.in (CXX): New.
12913 * tests/testsuite.at (AT_COMPILE_CXX): New.
12914 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
12915 locations in a more synthetic way.
12916 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
12918 Adjust the C locations to match those from Emacs: first column is
12920 Change all the expected results.
12921 Conform to the GCS: simplify the locations when applicable.
12922 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
12923 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
12924 these CPP macros with the m4 macros new defined by...
12925 (AT_CHECK_PUSHDEFS): this, i.e.:
12926 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
12927 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
12929 (AT_CHECK_POPDEFS): Undefine them.
12930 (AT_CHECK_CALC_LALR1_CC): New.
12931 Use it for the first lalr1.cc test.
12933 2003-02-04 Akim Demaille <akim@epita.fr>
12935 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
12936 Location as is defined.
12938 2003-02-04 Akim Demaille <akim@epita.fr>
12940 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
12941 name_ being defined.
12943 2003-02-03 Paul Eggert <eggert@twinsun.com>
12945 * src/gram.h (start_symbol): Remove unused decl.
12947 Use more-consistent naming conventions for local vars.
12949 * src/derives.c (derives_compute): Change type of local var from
12950 int to rule_number.
12951 * src/gram.c (grammar_rules_partial_print): Likewise.
12952 * src/print.c (print_core): Likewise.
12953 * src/reduce.c (reduce_grammar_tables): Likewise.
12955 * src/gram.c (grammar_dump): Change name of item_number *
12956 local var from r to rp.
12957 * src/nullable.c (nullable_compute): Likewise.
12959 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
12961 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
12962 for symbol or symbol_number var.
12963 * src/reader.c (grammar_start_symbol_set): Likewise.
12964 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
12966 * src/state.c (transitions_to): Likewise.
12967 * src/state.h: Likewise.
12968 * src/tables.c (symbol_number_to_vector_number): Likewise.
12970 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
12973 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
12976 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
12979 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
12980 Use str, not s, for char * var. Use ch, not c, for character var.
12981 Use size for size var.
12983 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
12985 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
12987 * src/uniqstr.h: Likewise.
12989 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
12990 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
12991 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
12992 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
12993 param to have same name as that of enum, so that we don't use
12994 "s" to stand for a non-state.
12996 2003-02-02 Akim Demaille <akim@epita.fr>
12998 * src/scan-skel.l: Scan more than one inert character per yylex
13001 2003-02-01 Paul Eggert <eggert@twinsun.com>
13005 * po/LINGUAS: Add ms.
13007 2003-01-30 Akim Demaille <akim@epita.fr>
13009 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
13011 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13013 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
13016 Changes in response to error report by S. Eken: GLR mode does not
13017 handle negative $ indices or $ indices in embedded rules correctly.
13018 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
13020 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
13021 (b4_rhs_location): Ditto.
13022 (yyfill): New function to copy from stack tree into array
13024 (yyuserAction): Modify to allow incremental move of semantic values
13025 to rhs array when in GLR mode.
13026 Define YYFILL to use in user-defined actions to fill semantic array
13028 Remove dummy use of yystack, as there is now a guaranteed use.
13029 (yydoAction): Modify to allow incremental move of semantic values
13030 to rhs array when in GLR mode.
13031 (yyresolveAction): Ditto.
13032 (yyglrShiftDefer): Update comment.
13033 (yyresolveStates): Use X == NULL for pointers, not !X.
13034 (yyglrReduce): Ditto.
13035 (yydoAction): Ditto
13037 * tests/glr-regr1.at: Rename to ...
13038 * tests/glr-regression.at: Add new regression test for the problems
13039 described above (adapted from S. Eken).
13040 Update copyright notice.
13041 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
13042 * tests/Makefile.am: Ditto.
13044 2003-01-28 Paul Eggert <eggert@twinsun.com>
13046 * data/lalr1.cc: Do not use @output_header_name@ unless
13047 b4_defines_flag is set. This fixes two bugs reported by
13049 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
13050 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
13052 2003-01-21 Paul Eggert <eggert@twinsun.com>
13054 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
13055 we don't need to worry about yyerrlab1 being reported as an
13056 "unused label" by non-GCC C compilers. The downside is that if
13057 locations are used then a couple of statements are duplicated each
13058 time YYERROR is invoked, but the upside is that the warnings
13060 (yyerrlab1): Move code to YERROR.
13061 (yyerrlab2): Remove. Change uses back to yyerrlab1.
13062 This reverts some of the 2002-12-27 change.
13064 2003-01-17 Paul Eggert <eggert@twinsun.com>
13066 * src/output.c (symbol_printers_output): Fix typo that led
13067 to core dump. Problem reported by Antonio Rus in
13068 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
13070 2003-01-13 Akim Demaille <akim@epita.fr>,
13071 Quoc Peyrot <chojin@lrde.epita.fr>,
13072 Robert Anisko <anisko_r@lrde.epita.fr>
13074 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
13075 when the stacks contain one element, as the loop would otherwise
13076 free the last state, and then use the top state (the one we just
13077 popped). This means that the initial elements will not be freed
13078 explicitly, as is the case in yacc.c; it is not a problem, as
13079 these elements have fake values.
13081 2003-01-11 Paul Eggert <eggert@twinsun.com>
13083 * NEWS: %expect-violations are now just warnings, reverting
13084 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
13085 bootstrapping problem reported by Matthias Klose; see
13086 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
13087 * src/conflicts.c (conflicts_print): Likewise.
13088 * tests/conflicts.at (%expect not enough, %expect too much,
13089 %expect with reduce conflicts): Likewise.
13090 * doc/bison.texinfo (Expect Decl): Document this. Also mention
13091 that the warning is enabled if the number of conflicts changes
13092 (not necessarily increases).
13094 * src/getargs.c (version): Update copyright year.
13096 2003-01-09 Akim Demaille <akim@epita.fr>
13098 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
13100 2003-01-08 Paul Eggert <eggert@twinsun.com>
13102 * Makefile.maint (WGETFLAGS):
13103 New macro, containing "-C off" to disable proxy caches.
13104 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
13105 (rel-check): Use $(WGET) instead of wget.
13107 2003-01-06 Paul Eggert <eggert@twinsun.com>
13109 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
13110 the GLR paper of Scott, Johnstone and Hussain.
13112 2003-01-04 Paul Eggert <eggert@twinsun.com>
13114 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
13115 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
13116 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
13117 (EXTRA_LIBRARIES): New var, for liby.a.
13118 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
13119 (EXTRA_SCRIPTS): New var, for yacc.
13121 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
13122 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
13123 Problem reported by Nelson H. F. Beebe.
13125 2003-01-03 Paul Eggert <eggert@twinsun.com>
13127 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
13128 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
13129 when compiling Bison 1.875's `bitset bset = obstack_alloc
13130 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
13132 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
13133 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
13134 grow to a huge size with typical invocation.
13136 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
13137 Use the pattern recommended by Autoconf 2.57, except also protect
13138 against double-definition.
13139 * src/system.h: Likewise.
13140 Portability issues reported by Nelson H. F. Beebe.
13142 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
13143 All uses changed. Provide a definition in both C and C++.
13144 (yytrue, yyfalse): Define even if defined (__cplusplus).
13146 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
13147 Reported by Nelson H. F. Beebe.
13149 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
13151 2003-01-02 Paul Eggert <eggert@twinsun.com>
13153 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
13154 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
13155 Bug reported by Nelson H. F. Beebe.
13157 2003-01-01 Paul Eggert <eggert@twinsun.com>
13161 2002-12-30 Paul Eggert <eggert@twinsun.com>
13163 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
13165 (<INITIAL>","): Here. This causes stray "," to be treated
13168 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
13169 last brace in braced code when not in Yacc mode, for compatibility
13170 with Bison 1.35. This resurrects the 2001-12-15 patch to
13173 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
13174 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
13176 2002-12-28 Paul Eggert <eggert@twinsun.com>
13178 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
13179 that of SYM's type. This fixes Debian bug 168069, reported by
13182 2002-12-28 Paul Eggert <eggert@twinsun.com>
13186 Switch back to the Yacc style of conflict reports, undoing some
13187 of the 2002-07-30 change.
13188 * doc/bison.texinfo (Understanding): Use Yacc style for
13189 conflict reports. Also, use new way of locating rules.
13190 * src/conflicts.c (conflict_report):
13191 Renamed from conflict_report_yacc, removing the old
13192 'conflict_report'. Translate the entire conflict report at once,
13193 so that we don't assume that "," has the same interpretation in
13195 (conflicts_output): Use Yacc-style conflict report for each state,
13196 instead of our more-complicated style.
13197 (conflicts_print): Use Yacc-style conflict report, except print
13198 the input file name when not emulating Yacc.
13199 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
13200 Conflicted Reduction, %expect not enough, %expect too much,
13201 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
13202 * tests/existing.at (GNU Cim Grammar): Likewise.
13203 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
13205 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
13206 fatal): Don't invoke fflush; it's not needed and it might even be
13207 harmful for stdout, as stdout might not be open.
13208 * src/reduce.c (reduce_print): Likewise.
13210 2002-12-27 Paul Eggert <eggert@twinsun.com>
13212 Fix a bug where error locations were not being recorded correctly.
13213 This problem was originally reported by Paul Hilfinger in
13214 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
13216 * data/yacc.c (yyparse): New local var yylerrsp, to record the
13217 top of the location stack's error locations.
13218 (yyerrlab): Set it. When discarding a token, push its location
13219 onto yylerrsp so that we don't lose track of the error's end.
13220 (yyerrlab1): Now is only the target of YYERROR, so that we can
13221 properly record the location of the action that failed. For GCC
13222 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
13223 GCC warning about yyerrlab1 being unused if YYERROR is unused.
13224 (yyerrlab2): New label, which yyerrlab now falls through to.
13225 Compute the error's location by applying YYLLOC_DEFAULT to
13226 the locations of all the symbols that went into the error.
13227 * doc/bison.texinfo (Location Default Action): Mention that
13228 YYLLOC_DEFAULT is also invoked for syntax errors.
13229 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
13230 Error locations include the locations of all the tokens that were
13231 discarded, not just the last token.
13233 2002-12-26 Paul Eggert <eggert@twinsun.com>
13235 * src/files.c: Include quote.h.
13236 (compute_output_file_names): Warn if we detect conflicting
13237 outputs to the same file. This should catch the misunderstanding
13238 exemplified by Debian Bug 165349, reported by Bruce Stephens..
13240 * src/conflicts.c (conflicts_print): If the user specifies
13241 "%expect N", report an error if there are any reduce/reduce
13242 conflicts. This is what the manual says should happen.
13243 This fixes Debian bug 130890, reported by Anthony DeRobertis.
13244 * tests/conflicts.at (%expect with reduce conflicts): New test.
13246 Don't use m4_include on relative file names, as it doesn't work as
13247 desired if there happens to be a file with that name under ".".
13249 * m4sugar/version.m4: Remove; it was included but it wasn't used.
13250 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
13251 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
13252 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
13253 * src/output.c (output_skeleton): Use full path names when
13254 specifying a file to include; don't rely on include path, as
13255 it's unreliable when the working file contains a file with
13258 2002-12-25 Paul Eggert <eggert@twinsun.com>
13260 Remove obsolete references to bison.simple and bison.hairy.
13261 Problem mentioned by Aubin Mahe in
13262 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
13263 * data/glr.c: Comment fix.
13264 * doc/bison.1: Remove references. Also, mention "yacc".
13266 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
13269 * src/parse-gram.y (declaration): Use enum "report_states" rather
13270 than its numeric value 1.
13272 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
13273 opening a new one. This fixes Debian bug 165349, reported by
13276 2002-12-24 Paul Eggert <eggert@twinsun.com>
13280 * Makefile.maint (cvs-update): Don't assume that the shell
13281 supports $(...), as Solaris sh doesn't.
13283 * src/parse-gram.y (lloc_default): Remove test for empty
13284 nonterminals at the end, since it didn't change the result.
13286 2002-12-24 Paul Eggert <eggert@twinsun.com>
13288 If the user does not define YYSTYPE as a macro, Bison now declares it
13289 using typedef instead of defining it as a macro. POSIX requires this.
13290 For consistency, YYLTYPE is also declared instead of defined.
13292 %union directives can now have a tag before the `{', e.g., the
13293 directive `%union foo {...}' now generates the C code
13294 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
13295 The default union tag is `YYSTYPE', for compatibility with Solaris 9
13296 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
13297 instead of `yyltype'.
13299 `yystype' and `yyltype' are now obsolescent macros instead of being
13300 typedefs or tags; they are no longer documented and will be
13301 withdrawn in a future release.
13303 * data/glr.c (b4_location_type): Remove.
13304 (YYSTYPE): Renamed from yystype.
13305 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
13306 (struct YYLTYPE): Renamed from struct yyltype.
13307 (YYLTYPE): Renamed from yyltype.
13308 (yyltype, yystype): New (and obsolescent) macros,
13309 for backward compatibility.
13310 * data/yacc.c: Likewise.
13312 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
13313 does not specify a union tag. This is for compatibility with
13316 * src/parse-gram.y (add_param): 2nd arg is now char * not char
13317 const *, since it is now modified by stripping surrounding { }.
13318 (current_braced_code): Remove.
13319 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
13320 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
13321 trailing " {...}". Now of type <chars>.
13322 (grammar_declaration): Adjust to bundled tokens.
13323 (code_content): Remove; stripping is now done by add_param.
13324 (print_token_value): Print contents of bundled tokens.
13325 (token_name): New function.
13327 * src/reader.h (braced_code, current_braced_code): Remove.
13328 (token_name): New decl.
13330 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
13331 token_type, not braced_code code_kind. All uses changed.
13332 (SC_PRE_CODE): New state, for scanning after a keyword that
13333 has (or usually has) an immediately-following braced code.
13334 (token_type): New local var, to keep track of which token type
13335 to return when scanning braced code.
13336 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
13337 <INITIAL>"%parse-param", <INITIAL>"%printer",
13338 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
13339 instead of returning a token type immediately.
13340 (<INITIAL>"{"): Set token type.
13341 (<SC_BRACED_CODE>"}"): Use it.
13342 (handle_action_dollar, handle_action_at): Now returns bool
13343 indicating success. Fail if ! current_rule; this prevents a core dump.
13344 (handle_symbol_code_dollar, handle_symbol_code_at):
13345 Remove; merge body into caller.
13346 (handle_dollar, handle_at): Complain in invalid contexts.
13348 * NEWS, doc/bison.texinfo: Document the above.
13349 * NEWS: Fix years and program names in copyright notice.
13351 2002-12-17 Paul Eggert <eggert@twinsun.com>
13353 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
13354 Reporting, Table of Symbols): Omit mentions of %lex-param and
13355 %parse-param from the documentation for now.
13357 2002-12-15 Paul Eggert <eggert@twinsun.com>
13359 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
13360 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
13361 lookahead symbol, and which sets yychar in parser actions) and it
13362 disagreed with the Bison documentation. Bug
13363 reported by Andrew Walrond.
13365 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
13366 as the caller now does that.
13367 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
13368 (YYEMPTY): Parenthesize right hand side, since others use it.
13369 (yyparse): Don't assume that our generated code is the only code
13372 2002-12-13 Paul Eggert <eggert@twinsun.com>
13376 POSIX requires a "yacc" command.
13377 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
13378 (MOSTLYCLEANFILES): Add yacc.
13380 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
13381 as an alias for bison y.
13383 * po/LINGUAS: Add da.
13385 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
13386 problem with latest <getopt.h>.
13387 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
13389 * doc/fdl.texi: Upgrade to 1.2.
13390 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
13391 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
13392 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
13394 * config/install-sh: Sync with autotools.
13396 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
13397 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
13398 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
13399 locations are requested.
13400 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
13401 locations are requested.
13403 2002-12-12 Paul Eggert <eggert@twinsun.com>
13405 Remove unportable casts and storage allocation tricks.
13406 While we're at it, remove almost all casts, since they
13407 usually aren't needed and are a sign of trouble.
13409 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
13411 * src/derives.c (derives_compute): Do not subtract NTOKENS from
13412 the pointer DSET returned by malloc; this isn't portable.
13413 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
13414 Similarly for DERIVES.
13415 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
13416 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
13417 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
13419 * src/derives.c (derives_compute): Do not bother invoking
13420 int_of_rule_number, since rule numbers are integers.
13422 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
13423 rather than XMALLOC (char, N).
13425 * src/files.c (filename_split): Rewrite to avoid cast.
13427 * src/gram.h (symbol_number_as_item_number,
13428 item_number_as_symbol_number, rule_number_as_item_number,
13429 item_number_as_rule_number):
13430 Now inline functions rather than macros, to avoid casts.
13431 * src/state.h (state_number_as_int): Likewise.
13432 * src/tables.c (state_number_to_vector_number,
13433 symbol_number_to_vector_number): Likewise.
13435 * src/gram.h (int_of_rule_number): Remove; no longer used.
13437 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
13438 since the resulting storage is always stored into.
13440 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
13443 * src/muscle_tab.c (muscle_m4_output):
13444 Now inline. Return bool, not int.
13445 * src/state.c (state_compare): Likewise.
13446 * src/symtab.c (symbol_check_defined,
13447 symbol_check_alias_consistency, symbol_pack, symbol_translation,
13448 hash_compare_symbol, hash_symbol):
13450 * src/uniqstr.c (uniqstr_print): Likewise.
13451 * src/muscle_tab.c (muscle_m4_output_processor):
13452 New function, to avoid casts.
13453 * src/state.c (state_comparator, stage_hasher): Likewise.
13454 * src/symtab.c (symbol_check_defined_processor,
13455 symbol_check_alias_consistency_processor, symbol_pack_processor,
13456 symbol_translation_processor, hash_symbol_comparator,
13457 hash_symbol_hasher): Likewise.
13458 * src/uniqstr.c (uniqstr_print_processor): Likewise.
13459 * src/muscle_tab.c (muscles_m4_output):
13460 Use new functions instead of casting old functions unportably.
13461 * src/state.c (state_hash_new): Likewise.
13462 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
13463 symbols_token_translations_init):
13465 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
13467 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
13468 var instead of casting to long, to avoid casts.
13469 (prepare_states): Use MALLOC rather than alloca, so that we don't
13470 have to worry about alloca.
13471 * src/state.c (state_hash_lookup): Likewise.
13473 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
13474 local var instead of casting to unsigned char, to avoid casts.
13476 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
13477 STATE_ALLOC): Remove.
13478 (transitions_new, errs_new, reductions_new, state_new): Use malloc
13479 rather than calloc, and use offsetof to avoid allocating slightly
13481 (state_new): Initialize all members.
13483 * src/state.c (state_hash): Use unsigned accumulator, not signed.
13485 * src/symtab.c (symbol_free): Remove; unused.
13486 (symbol_get): Remove cast in lhs of assignment.
13487 (symbols_do): Now static. Accept generic arguments, not
13488 hashing-related ones.
13490 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
13491 (symbol_processor): Remove.
13492 (symbols_do): Remove decl; now static.
13494 * src/system.h (alloca): Remove; decl no longer needed.
13495 (<stddef.h>): Include, for offsetof.
13496 (<inttypes.>, <stdint.h>): Include if available.
13497 (uintptr_t): New type, if system lacks it.
13498 (CALLOC, MALLOC, REALLOC): New macros.
13499 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
13502 * src/tables.c (table_size): Now int, to pacify GCC.
13503 (table_grow, table_ninf_remap): Use signed table size.
13504 (save_row): Don't bother initializing locals when not needed.
13505 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
13506 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
13508 * src/vcg.h: Correct misspellings.
13510 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
13513 * src/getargs.c (getargs): Don't assume EOF == -1.
13515 2002-12-09 Paul Eggert <eggert@twinsun.com>
13517 Change identifier spellings to avoid collisions with names
13518 that are reserved by POSIX.
13520 Don't use names ending in _t, since POSIX reserves them.
13521 For consistency, remove _e and _s endings -- they're weren't
13522 needed to remove ambiguity. All uses changed.
13523 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
13524 turn was just renamed from struniq_t.
13525 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
13526 which in turn was just renamed from struniq_processor_t.
13527 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
13528 in turn was renamed from hash_compare_struniq_t.
13529 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
13530 (state_list): Renamed from state_list_t.
13531 * src/assoc.h (assoc): Renamed from assoc_t.
13532 * src/conflicts.c (enum conflict_resolution): Renamed from
13533 enum conflict_resolution_e.
13534 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
13535 (rule_list): Renamed from rule_list_t.
13536 * src/getargs.h (enum trace): Renamed from enum trace_e.
13537 (enum report): Renamed from enum report_e.
13538 * src/gram.h (item_number): Renamed from item_number_t.
13539 (rule_number): Renamed from rule_number_t.
13540 (struct rule_s): Remove the "rule_s" part; not used.
13541 (rule): Renamed from rule_t.
13542 (rule_filter): Renamed from rule_filter_t.
13543 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
13544 (goto_list): Renamed from goto_list_t.
13545 * src/lalr.h (goto_number): Renamed from goto_number_t.
13546 * src/location.h (location): Renamed from location_t.
13547 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
13548 and moved here from:
13549 * src/muscle_tab.h (muscle_entry_t): here.
13550 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
13551 (rule_list): Renamed from rule_list_t.
13552 * src/print_graph.c (static_graph): Renamed from graph.
13553 * src/reader.h (braced_code): Renamed from braced_code_t.
13554 Remove brace_code_e tag.
13555 * src/relation.h (relation_node): Renamed from relation_node_t.
13556 (relation_nodes): Renamed from relation_nodes_t.
13557 (relation): Renamed from relation_t.
13558 * src/state.h (state_number): Renamed from state_number_t.
13559 (struct state): Renamed from struct state_s.
13560 (state): Renamed from state_t.
13561 (transitions): Renamed from transitions_t. Unused (and
13562 misspelled) transtion_s tag removed.
13563 (errs): Renamed from errs_t. Unused errs_s tag removed.
13564 (reductions): Renamed from reductions_t. Unused tag
13565 reductions_s removed.
13566 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
13567 (struct symbol_list): Renamed from struct symbol_list_s.
13568 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
13569 (struct symbol): Renamed from struct symbol_s.
13570 (symbol): Renamed from symbol_t.
13571 * src/tables.c (vector_number): Renamed from vector_number_t.
13572 (action_number): Renamed from action_t.
13573 * src/tables.h (base_number): Renamed from base_t.
13574 * src/vcg.h (enum color): Renamed from enum color_e.
13575 (enum textmode): Renamed from enum textmode_e.
13576 (enum shape): Renamed from enum shape_e.
13577 (struct colorentry): Renamed from struct colorentry_s.
13578 (struct classname): Renamed from struct classname_s.
13579 (struct infoname): Renamed from struct infoname_s.
13580 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
13581 (enum decision): Renamed from enum decision_e.
13582 (enum orientation): Renamed from enum orientation_e.
13583 (enum alignment): Renamed from enum alignment_e.
13584 (enum arrow_mode): Renamed from enum arrow_mode_e.
13585 (enum crossing_type): Renamed from enum crossing_type_e.
13586 (enum view): Renamed from enum view_e.
13587 (struct node): Renamed from struct node_s.
13588 (node): Renamed from node_t.
13589 (enum linestyle): Renamed from enum linestyle_e.
13590 (enum arrowstyle): Renamed from enum arrowstyle_e.
13591 (struct edge): Renamed from struct edge.
13592 (edge): Renamed from edge_t.
13593 (struct graph): Renamed from struct graph_s.
13594 (graph): Renamed from graph_t.
13595 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
13596 Rename value_t -> value.
13597 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
13598 value_t_as_yystype -> value_as_yystype.
13600 Don't include <errno.h> in the mainstream code, since it
13601 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
13602 * lib/get-errno.c, lib/get-errno.h: New files.
13603 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
13605 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
13606 * src/output.c (output_skeleton): Likewise.
13607 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
13609 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
13611 (handle_action_dollar, handle_action_at): Likewise.
13612 * src/system.h: Do not include <errno.h>.
13613 (TAB_EXT): Renamed from EXT_TAB.
13614 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
13616 Avoid str[a-z]*, since <string.h> reserves that name space.
13617 Change all instances of "struniq" in names to "uniqstr", and
13618 likewise for "STRUNIQ" and "UNIQSTR".
13619 * src/uniqstr.c: Renamed from src/struniq.c.
13620 * src/uniqstr.h: Renamed from src/struniq.h.
13621 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
13622 * src/files.c (strsuffix): Remove; unused.
13623 (concat2): Renamed from stringappend. Now static.
13624 * src/files.h (strsuffix, stringappend): Remove; unused.
13625 * src/parse-gram.y (<chars>): Renamed from <string>.
13626 (<uniqstr>): Renamed from <struniq>.
13627 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
13628 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
13629 (struct graph_s.expand): Renamed from struct graph_s.stretch.
13630 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
13631 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
13632 (N_EXPAND): Renamed from N_STRETCH.
13634 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
13635 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
13636 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
13638 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
13639 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
13640 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
13641 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
13642 (BASE_MAXIMUM): Renamed from BASE_MAX.
13643 (BASE_MINIMUM): Renamed from BASE_MIN.
13644 (ACTION_MAX): Remove; unused.
13645 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
13646 Unnecessary casts removed from above defines.
13649 Fix misspelling in names.
13650 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
13651 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
13655 * lib/timevar.c (timevar_report): Renamed from time_report,
13656 for consistency with other names.
13657 * lib/timevar.h (timevar_report): New decl.
13658 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
13661 Sort include-file uses.
13663 Reorder all include files under src to be in the order "system.h".
13664 then the ../lib include files in angle brackets (alphabetized),
13665 then the . include files in double-quotes (alphabetized). Fix
13666 dependency breakages encountered in this process, as follows:
13667 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
13668 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
13669 * src/state.h: Include "symtab.h".
13671 2002-12-08 Paul Eggert <eggert@twinsun.com>
13673 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
13674 since this causes problems when __file__ contains character
13675 sequences like "@" that are treated specially by src/scan-skel.l.
13676 Instead, just use the file's basename. This fixes the bug
13677 reported by Martin Mokrejs in
13678 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
13680 2002-12-06 Paul Eggert <eggert@twinsun.com>
13682 Add support for rules that do not have trailing semicolons, as
13683 POSIX requires. Improve the quality of locations in Bison
13686 * src/location.c: Include <quotearg.h>.
13687 (empty_location): Now const.
13688 (location_print): New function. Follow the recommendation of the
13689 GNU Coding Standards for locations that span file boundaries.
13690 * src/location.h: Do not include <quotearg.h>; no longer needed.
13691 (boundary): New type.
13692 (location_t): Use it. This allows locations to span file boundaries.
13693 All member uses changed: file -> start.file or end.file (as needed),
13694 first_line -> start.line, first_column -> start.column,
13695 last_line -> end.line, last_column -> end.column.
13696 (equal_boundaries): New function.
13697 (LOCATION_RESET, LOCATION_STEP): Remove.
13698 (LOCATION_PRINT): Remove. All callers changed to use location_print.
13699 (empty_location): Now const.
13700 (location_print): New decl.
13701 * src/parse-gram.y (lloc_default): New function, which handles
13702 empty locations more accurately.
13703 (YYLLOC_DEFAULT): Use it.
13704 (%token COLON): Remove.
13705 (%token ID_COLON): New token.
13707 (declarations, rules): Remove trailing semicolon.
13708 (declaration, rules_or_grammar_declaration):
13709 Allow empty (";") declaration.
13710 (symbol_def): Remove empty actions; no longer needed.
13711 (rules_or_grammar_declaration): Remove trailing semicolon.
13712 (semi_colon.opt): Remove.
13713 * src/reader.h: Include location.h.
13714 (scanner_cursor): New decl.
13715 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
13717 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
13719 (STEP): Remove. No longer needed, now that adjust_location does
13720 the work. All uses removed.
13721 (scanner_cursor): New var.
13722 (adjust_location): Renamed from extend_location. It now sets
13723 *loc and adjusts the scanner cursor. All uses changed.
13724 Don't bother testing for CR.
13725 (handle_syncline): Remove location arg; now updates scanner cursor.
13726 All callers changed.
13727 (unexpected_end_of_file): Now accepts start boundary of token or
13728 comment, not location. All callers changed. Update scanner cursor,
13730 (SC_AFTER_IDENTIFIER): New state.
13731 (context_state): Renamed from c_context. All uses changed.
13732 (id_loc, code_start, token_start): New local vars.
13733 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
13734 processing of Yacc white space and equivalents here.
13735 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
13736 instead of returning ID immediately, since we need to search for
13737 a subsequent colon.
13738 (<INITIAL>"'", "\""): Save token_start.
13739 (<INITIAL>"%{", "{", "%%"): Save code_start.
13740 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
13741 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
13742 BEGIN context_state at end, not INITIAL.
13743 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
13744 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
13745 Return correct token start.
13746 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
13747 the start of a character, string or multiline comment is found.
13748 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
13749 Reduction): Adjust reported locations to match the more-precise
13750 results now expected.
13751 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
13752 * tests/reduce.at (Useless Rules, Reduced Automaton,
13753 Underivable Rules): Likewise.
13754 * tests/regression.at (Invalid inputs): No longer `expecting ";"
13755 or "|"' now that so many other tokens are allowed by the new grammar.
13757 * src/complain.h (current_file): Remove duplicate decl;
13758 current_file is now owned by files.h.
13759 * src/complain.c, src/scan-gram.l: Include files.h.
13761 2002-12-06 Paul Eggert <eggert@twinsun.com>
13763 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
13764 promotes to int; it might be unsigned int.
13765 * data/yacc.c (yy_reduce_print): Likewise.
13767 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
13768 be #defined in the prologue, not in the Bison declarations.
13769 This fixes Debian Bug 102878, reported by Shaul Karl.
13771 2002-12-02 Paul Eggert <eggert@twinsun.com>
13773 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
13774 * lib/strtoul.c: New file, from gnulib.
13775 This fixes a porting bug reported by Peter Klein in
13776 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
13778 2002-11-30 Paul Eggert <eggert@twinsun.com>
13780 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
13781 and put only a forward declaration in the prologue. This is for
13782 consistency with the other scanner helper functions.
13784 Type clashes now generate warnings, not errors, since it
13785 appears that POSIX may allow some grammars with type clashes.
13786 * src/reader.c (grammar_current_rule_check): Warn about
13787 type clashes instead of complaining.
13788 * tests/input.at (Type Clashes): Expect warnings, not complaints.
13790 Add Yacc library, since POSIX requires it.
13791 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
13792 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
13793 * lib/main.c, lib/yyerror.c: New files.
13795 gram_error can be static; it need not be extern.
13796 * src/reader.h (gram_error): Remove decl.
13797 * src/parse-gram.y (gram_error): Now static. Add static decl.
13798 (print_token_value): Omit parameter names from forward decl,
13801 2002-11-29 Paul Eggert <eggert@twinsun.com>
13803 * doc/bison.texinfo: Emphasize that yylex and yyerror must
13804 be declared before being used. E.g., one should typically
13805 declare them in the prologue. Use GNU coding style in examples.
13806 Put "const" consistently after the type it modifies. Mention
13807 that C99 supports "inline". Mention that yyerror traditionally
13810 %parse-param and %lex-param now take just one argument, the
13811 declaration; the argument name is deduced from the declaration.
13813 * doc/bison.texinfo (Parser Function, Pure Calling, Error
13814 Reporting, Table of Symbols): Document this.
13815 * src/parse-gram.y (add_param): New function.
13817 (declaration): Implement new rule for %parse-param and %lex-param.
13818 * src/scan-gram.l: "," now elicits a warning, rather than being
13819 a token; this is more compatible with byacc.
13820 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
13822 2002-11-27 Paul Eggert <eggert@twinsun.com>
13824 Rename identifiers to avoid real and potential collisions.
13826 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
13827 to avoid collision with lex macro described by Bruce Lilly in
13828 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
13829 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
13830 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
13831 * src/parse-gram.y (print_token_value): Renamed from yyprint.
13833 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
13834 The name "yycontrol" violates the name space rules, and this stuff
13835 wasn't being used anyway.
13836 (input): Remove action; this stuff wasn't being used.
13837 (gram_error): Rename local variable yylloc -> loc.
13838 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
13839 (YY_DECL): Don't use "yy" at start of local variables.
13840 All uses changed, e.g., yylloc -> loc.
13841 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
13842 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
13843 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
13844 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
13846 * src/parse-gram.y (gram_error): loc is now const *.
13847 * src/reader.h (gram_error): Likewise.
13849 2002-11-24 Paul Eggert <eggert@twinsun.com>
13853 * tests/actions.at (Actions after errors): Use an output format
13854 more similar to that of the Printers and Destructors test.
13855 Test the position of the ';' token too.
13856 (Printers and Destructors): Likewise.
13857 (Printers and Destructors: %glr-parser): Remove for now, to avoid
13858 unnecessarily alarming people when the test fails.
13860 * data/yacc.c (yyerrlab1): Move this label down, so that the
13861 parser does not discard the lookahead token if the user code
13862 invokes YYERROR. This change is required for POSIX conformance.
13864 * lib/error.c: Sync with gnulib.
13866 2002-11-22 Paul Eggert <eggert@twinsun.com>
13868 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
13869 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
13870 * lib/xmalloc.c: Likewise.
13872 2002-11-20 Paul Eggert <eggert@twinsun.com>
13874 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
13876 2002-11-20 Paul Eggert <eggert@twinsun.com>
13878 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
13879 should use `if (! x) abort ();' rather than `assert (x);', and
13880 anyway it's one less thing to worry about configuring.
13882 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
13883 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
13884 and replace all instances of assert with abort.
13885 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
13886 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
13888 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
13889 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
13890 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
13891 hash_find_entry, hash_rehash, hash_insert): Likewise.
13892 * src/conflicts.c (resolve_sr_conflict): Likewise.
13893 * src/lalr.c (set_goto_map, map_goto): Likewise.
13894 * src/nullable.c (nullable_compute): Likewise.
13895 * src/output.c (prepare_rules, token_definitions_output): Likewise.
13896 * src/reader.c (packgram, reader): Likewise.
13897 * src/state.c (state_new, state_free, state_transitions_set,
13898 state_reduction_find): Likewise.
13899 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
13900 symbol_pack): Likewise.
13901 * src/tables.c (conflict_row, pack_vector): Likewise.
13902 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
13903 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
13904 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
13905 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
13907 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
13908 (ARGMATCH_CONSTRAINT): New macro.
13909 (ARGMATCH_ASSERT): Use it.
13911 * src/system.h (verify): New macro.
13912 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
13913 rather than assert.
13914 * src/tables.c (tables_generate): Likewise.
13916 * src/struniq.c (struniq_assert): Now returns void, and aborts
13917 if the assertion is false.
13918 (struniq_assert_p): Remove.
13919 * src/struniq.h: Likewise.
13921 2002-11-18 Paul Eggert <eggert@twinsun.com>
13923 * data/glr.c (yygetLRActions): Replace `yyindex' with
13924 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
13925 This fixes the regression with Sun ONE Studio 7 cc that I reported in
13926 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
13928 2002-11-18 Akim Demaille <akim@epita.fr>
13930 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
13932 From Tim Van Holder.
13934 2002-11-17 Paul Eggert <eggert@twinsun.com>
13936 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
13937 to "SyntaxError" for consistency with my 2002-11-15 change.
13939 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
13940 not define to {}, since this breaks the common use of `YYDPRINTF
13941 ((...));' if a single statement is desired (e.g. before `else').
13942 Work around GCC warnings by surrounding corresponding calls with
13944 (yyhasResolvedValue): Remove unused function.
13945 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
13947 (yyreportSyntaxError): Renamed from yyreportParseError.
13948 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
13950 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
13951 extern when possible. Remove unused initializations.
13953 2002-11-16 Akim Demaille <akim@epita.fr>
13955 Augment the similarity between GLR and LALR traces.
13957 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
13958 (YY_REDUCE_PRINT): New.
13959 (yyparse): Use them.
13960 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
13962 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
13963 state reached after the reduction/recovery, since...
13964 (yyparse, yyprocessOneStack): Report the state we are entering in.
13966 2002-11-16 Akim Demaille <akim@epita.fr>
13968 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
13969 Add support for --trace=skeleton.
13970 * src/scan-skel.l: %option debug.
13971 Scan strings of non-@ or \n instead of character by character.
13972 (scan_skel): Handle trace_skeleton.
13974 (@output_parser_name@, @output_header_name@): ``Restore'' their
13975 support (used to be M4 macros).
13976 * data/yacc.c: Quote larger chunks, a la glr.c.
13977 * data/lalr1.cc: Likewise.
13978 The header guards are no longer available, so use some other
13979 string than `YYLSP_NEEDED'.
13981 2002-11-16 Akim Demaille <akim@epita.fr>
13983 Make the ``Printers and Destructors'' test more verbose, taking
13984 `yacc.c''s behavior as (possibly wrong) reference.
13986 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
13987 instead of fprint on stdout.
13988 Set and report the last_line of the symbols.
13989 Consistently display values and locations.
13991 2002-11-16 Paul Eggert <eggert@twinsun.com>
13993 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
13995 2002-11-15 Paul Eggert <eggert@twinsun.com>
13997 * tests/actions.at (Actions after errors): New test case.
13999 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
14000 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
14001 tests/action.at, tests/calc.at, tests/conflicts.at,
14002 tests/cxx-type.at, tests/regression.at:
14003 "parse error" -> "syntax error" for POSIX compatibility.
14004 "parsing stack overflow..." -> "parser stack overflow" so
14005 that code matches Bison documentation.
14007 2002-11-15 Akim Demaille <akim@epita.fr>
14009 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
14010 take two BRACED_CODE, not two string_content.
14011 Free the scanner's obstack when we are done.
14012 (code_content): New.
14013 * tests/calc.at: Adjust.
14014 * doc/bison.texinfo: Adjust.
14015 Also, make sure to include the `,' for these declarations.
14017 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
14019 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
14020 definition; avoids potential autoreconf problems.
14022 2002-11-15 Akim Demaille <akim@epita.fr>
14024 Always check the value returned by yyparse.
14026 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
14027 returned by yyparse.
14028 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
14030 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
14031 returned by yyparse.
14033 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14035 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
14038 2002-11-14 Paul Eggert <eggert@twinsun.com>
14040 * src/output.c (output_skeleton): Call xfopen instead of
14041 duplicating xfopen's body.
14043 Fix bugs reported by Nelson H. F. Beebe in
14044 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
14046 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
14047 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
14048 Group compiler. Instead, use "$CC -E bar.c". Include the .h
14049 file twice in the grammar, as an extra check.
14051 * tests/input.at (Torturing the Scanner): Surround the
14052 backslash-newline tests with "#if 0", to make it less likely that
14053 we'll run into compiler bugs. Bring back solitary \ inside
14054 comment, but add a closing comment to work around HP C bug. Don't
14055 test backslash-newline in C character constant.
14057 2002-11-14 Akim Demaille <akim@epita.fr>
14059 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
14060 status of the compiler.
14061 Calling `exit 1' is no longer needed.
14062 Reported by Nelson H. F. Beebe.
14064 2002-11-14 Akim Demaille <akim@epita.fr>
14066 * tests/atlocal.in (CPPFLAGS): We have config.h.
14067 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
14069 * tests/actions.at, tests/calc.at, tests/conflicts.at,
14070 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
14071 * tests/regression.at, tests/torture.at: Use them for all the
14072 grammars that are to be compiled.
14073 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
14074 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
14075 * doc/bison.texinfo (GLR Parsers): Document `inline'.
14077 2002-11-14 Akim Demaille <akim@epita.fr>
14079 * doc/bison.texinfo: Various formatting changes (alignments in
14080 samples, additional @group/@end group, GCS in samples.
14081 Use @deffn instead of simple @table to define the directives,
14082 macros, variables etc.
14084 2002-11-13 Paul Eggert <eggert@twinsun.com>
14086 Fix some bugs reported by Albert Chin-A-Young in
14087 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
14089 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
14090 -o c"; the HP C compiler chatters during compilation.
14091 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
14092 * tests/headers.at (export YYLTYPE): Likewise.
14094 * tests/input.at (Torturing the Scanner): Remove lines containing
14095 solitary backslashes, as they tickle a bug in the HP C compiler.
14097 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
14098 comments, since they're not portable. Use GNU coding style.
14100 2002-11-13 Akim Demaille <akim@epita.fr>
14102 * data/yacc.c: Leave bigger chunks of quoted text.
14103 (YYDSYMPRINTF): New.
14104 Use it to report symbol activities.
14105 * data/glr.c (YYDSYMPRINTF): New.
14108 2002-11-12 Paul Eggert <eggert@twinsun.com>
14112 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
14113 (yyglrReduce): Return yyok, not 0.
14114 This should avoid the enumerated-type warnings reported
14115 by Nelson H. F. Beebe in
14116 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
14118 * lib/bbitset.h (BITSET_INLINE): Remove.
14119 * lib/bitset.h [! BITSET_INLINE]: Remove.
14120 (bitset_set, bitset_reset, bitset_test): Rename local vars
14121 to avoid shadowing warnings by GCC.
14123 * data/glr.c (inline): Remove #define. It's the user's
14124 responsibility to #define it away, just like 'const'.
14125 This fixes one of the bugs reported by Nelson H. F. Beebe in
14126 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
14128 * Makefile.maint (po-check): Scan .l and .y files instead of the
14129 .c and the .h files that they generate. This fixes the bug
14130 reported by Tim Van Holder in:
14131 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
14132 Look for N_ as well as for _. Try to avoid matching #define for
14134 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
14135 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
14136 * src/scan-gram.l: Revamp regular expressions so that " and '
14137 do not confuse xgettext.
14139 * src/struniq.h (struniq_new): Do not declare the return type
14140 to be 'const'; this violates the C standard.
14141 * src/struniq.c (struniq_new): Likewise.
14143 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
14145 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
14146 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
14149 2002-11-12 Akim Demaille <akim@epita.fr>
14151 * Makefile.maint: Sync with Autoconf:
14152 (local_updates): New.
14154 2002-11-12 Akim Demaille <akim@epita.fr>
14156 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
14158 2002-11-12 Akim Demaille <akim@epita.fr>
14160 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
14163 2002-11-12 Akim Demaille <akim@epita.fr>
14165 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
14168 2002-11-12 Akim Demaille <akim@epita.fr>
14170 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
14171 Use it to test the GLR parser.
14173 2002-11-12 Akim Demaille <akim@epita.fr>
14175 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
14177 * data/glr.c (yystos): New.
14178 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
14179 (YYDSYMPRINT): New.
14180 (yyval): Don't define it, it is handled via M4.
14181 (yyrecoverParseError): Free verbosely the discarded symbols.
14182 * data/yacc.c (yysymprint): Remove, rather...
14183 (b4_yysymprint_generate): invoke.
14184 * data/c.m4 (b4_yysymprint_generate): New.
14185 Accept pointers as arguments, as opposed to the version from
14187 (b4_yydestruct_generate): Likewise.
14188 * tests/cations.at (Printers and Destructors): Use Bison directives
14189 instead of CPP macros.
14190 Don't rely on internal details.
14192 2002-11-12 Akim Demaille <akim@epita.fr>
14194 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
14195 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
14196 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
14197 it against YYEMPTY and so forth), work on yytoken (i.e., set
14198 it to YYEMPTY etc.).
14199 (yydestruct): Replace with a b4_yydestruct_generate invocation.
14200 (b4_symbol_actions): Remove.
14201 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
14202 for 0, end-of-input.
14204 2002-11-12 Akim Demaille <akim@epita.fr>
14206 * doc/bison.texinfo (Destructor Decl): New.
14208 2002-11-12 Akim Demaille <akim@epita.fr>
14210 * src/tables.c (tables_generate): Use free for pointers that
14211 cannot be NULL, not XFREE.
14212 (pack_vector): Use assert, not fatal, for bound violations.
14213 * src/state.c (state_new): Likewise.
14214 * src/reader.c (reader): Likewise.
14215 * src/lalr.c (set_goto_map): Likewise.
14216 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
14219 2002-11-12 Akim Demaille <akim@epita.fr>
14221 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
14223 * src/scan-gram.l (last_string): Is global to the file, not to
14225 * src/parse-gram.y (input): Don't append the epilogue here,
14226 (epilogue.opt): do it here, and free the scanner's obstack.
14227 * src/reader.c (epilogue_set): Rename as...
14228 (epilogue_augment): this.
14229 * data/c.m4 (b4_epilogue): Defaults to empty.
14231 2002-11-12 Akim Demaille <akim@epita.fr>
14233 * src/getargs.c (long_options): Remove duplicates.
14234 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
14236 * doc/bison.rnh: Remove.
14237 * doc/bison.texinfo (VMS Invocation): Remove.
14239 2002-11-12 Akim Demaille <akim@epita.fr>
14241 * src/struniq.h, src/struniq.c (struniq_t): Is const.
14242 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
14244 Use struniq for symbols.
14246 * src/symtab.h (symbol_t): The tag member is a struniq.
14247 (symbol_type_set): Adjust.
14248 * src/symtab.c (symbol_new): Takes a struniq.
14249 (symbol_free): Don't free the tag member.
14250 (hash_compare_symbol_t, hash_symbol_t): Rename as...
14251 (hash_compare_symbol, hash_symbol): these.
14252 Use the fact that tags as struniqs.
14253 (symbol_get): Use struniq_new.
14254 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
14256 * src/reader.h (merger_list, grammar_currentmerge_set): The name
14257 and type members are struniqs.
14258 * src/reader.c (get_merge_function)
14259 (grammar_current_rule_merge_set): Adjust.
14260 (TYPE, current_type): Are struniq.
14262 Use struniq for file names.
14264 * src/files.h, src/files.c (infile): Split into...
14265 (grammar_file, current_file): these.
14266 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
14267 * src/reduce.c (reduce_print): Likewise.
14268 * src/getargs.c (getargs): Likewise.
14269 * src/complain.h, src/complain.c: Likewise.
14270 * src/main.c (main): Call struniqs_new early enough to use it for
14272 Don't free the input file name.
14274 2002-11-12 Akim Demaille <akim@epita.fr>
14276 * src/symtab.c (symbol_free): Remove dead deactivated code:
14277 type_name are properly removed.
14278 Don't use XFREE to free items that cannot be NULL.
14279 * src/struniq.h, src/struniq.c: New.
14280 * src/main.c (main): Initialize/free struniqs.
14281 * src/parse-gram.y (%union): Add astruniq member.
14283 * src/scan-gram.l (<{tag}>): Return a struniq.
14284 Free the obstack bit that used to store it.
14285 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
14287 2002-11-11 Paul Eggert <eggert@twinsun.com>
14289 Revamp to fix many (but not all) of the C- and M4-related quoting
14290 problems. Among other things, this fixes the Bison bug reported
14291 by Jan Hubicka when processing the Bash grammar; see:
14292 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
14294 Use new @ escapes consistently. Represent brackets with @{ and @}
14295 rather than @<:@ and @:>@, since this works a bit better with dumb
14296 editors like vi. Represent @ with @@, since @ is now consistently
14297 an escape. Use @oline@ and @ofile@ rather than __oline__ and
14298 __ofile__, to avoid unexpected expansions. Similarly, use @output
14299 rather than #output.
14301 * data/c.m4 (b4_copyright): Omit file name from comment, since
14302 the file name could contain "*/".
14303 (b4_synclines_flag): Don't quote the 2nd argument; it should already
14304 be quoted. All uses changed.
14306 * data/glr.c: Use new @ escapes consistently.
14307 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
14308 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
14309 Remove, since they couldn't handle arbitrary characters in file
14311 * data/lalr1.cc: Likewise.
14312 * data/yacc.c: Likewise.
14314 * src/files.c (output_infix): Remove; all uses removed.
14315 * src/files.h: Likewise.
14317 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
14318 mishandled funny characters in file names, and anyway it isn't
14320 * data/yacc.c: Likewise.
14321 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
14323 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
14324 * data/yacc.c: Likewise.
14326 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
14328 (muscle_init): Quote filename as a C string.
14329 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
14330 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
14331 * src/output.c (escaped_file_name_output): New function.
14332 (prepare_symbols): Quote tokens for M4.
14333 (prepare): Don't insert output_infix, output_prefix,
14334 output_parser_name, output_header_name; this is now down by scan-skel.
14335 Insert skeleton as a C string.
14337 * src/output.c (user_actions_output, symbol_destructors_output,
14338 symbol_printers_output): Quote filenames for C and M4.
14339 * src/reader.c (prologue_augment, epilogue_set): Likewise.
14341 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
14342 escapes other than \\ and \'; this simplifies the code.
14343 (<SC_STRING>): Likewise, for \\ and \".
14344 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
14345 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
14346 Use new escapes @{ and @} for [ and ].
14348 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
14349 them with auto vars.
14350 Switch to new escape scheme, where @ is the escape character uniformly.
14351 Abort if a stray escape character is found. Avoid unbounded input
14352 buffer when parsing non-escaped text.
14354 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
14355 __oline__, #output, $@, and @{ do not have unintended meanings.
14357 2002-11-09 Paul Eggert <eggert@twinsun.com>
14359 Fix the test failure due to GCC warnings described in
14360 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
14361 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
14362 evaluate to 0 if it's impossible for NINF to be in the respective
14364 (yygetLRActions, yyrecoverParseError): Use them.
14366 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
14367 counted in the token inserted at end of file. Now takes
14368 location_t *, not location_t, so that the location can be
14369 adjusted. All uses changed.
14371 * tests/regression.at (Invalid inputs): Adjust wording in
14372 diagnostic to match the new behavior.
14374 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
14375 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
14376 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
14377 abort ();'. This reduces the runtime of the "Many lookaheads"
14378 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
14381 2002-11-07 Paul Eggert <eggert@twinsun.com>
14383 * src/parse-gram.y (CHARACTER): Remove unused token.
14386 * src/scan-gram.l: Remove stack option. We no longer use the
14387 stack, since the stack was never deeper than 1; instead, use the
14388 new auto var c_context to record the stacked value.
14390 Remove nounput option. At an unexpected end of file, we now unput
14391 the minimal input necessary to end cleanly; this simplifies the
14394 Avoid unbounded token sizes where this is easy.
14396 (unexpected_end_of_file): New function.
14397 Use it to systematize the error message on unexpected EOF.
14398 (last-string): Now auto, not static.
14399 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
14400 (scanner_last_string_free): Remove; not used.
14401 (percent_percent_count): Move decl to just before use.
14402 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
14403 not the (never otherwised-used) CHARACTER.
14405 2002-11-07 Akim Demaille <akim@epita.fr>
14407 Let yyerror always receive the msg as last argument, so that
14408 yyerror can be variadic.
14410 * data/yacc.c (b4_yyerror_args): New.
14411 Use it when calling yyerror.
14412 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
14413 Use it when calling yyerror.
14414 * doc/bison.texinfo (Error Reporting): Adjust.
14415 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
14416 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
14418 2002-11-06 Akim Demaille <akim@epita.fr>
14420 #line should have quoted strings.
14421 Ideally, this should be done by m4_quotearg.
14423 * src/scan-skel.l: Include quotearg.h.
14425 * src/output.c (symbol_printers_output)
14426 (symbol_destructors_output): Quote the file name.
14428 2002-11-06 Akim Demaille <akim@epita.fr>
14430 * tests/regression.at (Invalid inputs): Adjust to the recent
14433 2002-11-06 Akim Demaille <akim@epita.fr>
14435 Restore --no-lines.
14436 Reported by Jim Kent.
14438 * data/c.m4 (b4_syncline): New.
14439 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
14440 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
14441 * src/output.c (user_actions_output): Likewise.
14442 (prepare): Define 'b4_synclines_flag'.
14443 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
14445 2002-11-06 Akim Demaille <akim@epita.fr>
14447 * src/main.c (main): Free `infile'.
14448 * src/scan-gram.l (handle_syncline): New.
14450 * src/output.c (user_actions_output, symbol_destructors_output)
14451 (symbol_printers_output): Use the location's file name, not
14453 * src/reader.c (prologue_augment, epilogue_set): Likewise.
14455 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14457 * src/tables.c (matching_state): Don't allow states to match if
14458 either has GLR conflict entries.
14460 2002-11-05 Paul Eggert <eggert@twinsun.com>
14462 * src/scan-gram.l: Use more accurate diagnostics, e.g.
14463 "integer out of range" rather than "invalid value".
14464 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
14467 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
14468 Also, remove one static variable in the scanner.
14470 * src/scan-gram.l (braces_level): Now auto, not static.
14471 Initialize to zero if the compiler is being picky.
14472 (INITIAL): Clear braces_level instead of incrementing it.
14473 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
14474 as POSIX 1003.1-2001 requires.
14475 * src/system.h (IF_LINT): New macro, taken from coreutils.
14476 * configure.ac: Define "lint" if --enable-gcc-warnings.
14478 2002-11-05 Akim Demaille <akim@epita.fr>
14480 * src/scan-gram.l: When it starts with `%', complain about the
14481 whole directive, not just that `invalid character: %'.
14483 2002-11-04 Akim Demaille <akim@epita.fr>
14485 * Makefile.maint: Update from Autoconf.
14486 (update, cvs-update, po-update, do-po-update): New.
14488 2002-11-04 Akim Demaille <akim@epita.fr>
14490 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
14492 Have yyerror `use' its arguments.
14493 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
14494 returns true when location & yacc & pure & parse-param.
14495 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
14497 2002-11-04 Akim Demaille <akim@epita.fr>
14499 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
14501 * src/scan-gram.l: Use [\'] instead of ['] to pacify
14504 Use quote, not quote_n since LOCATION_PRINT no longer uses the
14507 2002-11-03 Paul Eggert <eggert@twinsun.com>
14509 * src/reader.c (get_merge_function, grammar_current_rule_check):
14510 Use consistent diagnostics for reporting type name clashes.
14511 Quote the types with <>, for consistency with Yacc.
14512 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
14514 2002-11-03 Akim Demaille <akim@epita.fr>
14516 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
14518 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
14519 (b4_parse_param): Remove.
14520 Use b4_identification.
14521 Propagate b4_pure_args where needed to pass them to yyerror.
14522 * data/glr.m4 (b4_parse_param): Remove.
14523 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
14524 (b4_lpure_formals): New.
14525 Use b4_identification.
14526 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
14527 b4_user_formals and b4_user_args.
14528 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
14529 (yyreportAmbiguity): When using a pure parser, also need
14530 the location, and the parse-params.
14532 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
14533 When using a pure parser, also need the parse-params.
14535 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
14536 (%pure-parser + %parse-param) LALR and GLR parsers.
14537 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
14538 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
14539 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
14540 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
14541 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
14542 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
14543 * doc/bison.texinfo: Untabify the whole file.
14544 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
14545 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
14546 (Error Reporting): Adjust to these new directives.
14547 Document %error-verbose, deprecate YYERROR_VERBOSE.
14549 2002-11-03 Akim Demaille <akim@epita.fr>
14551 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
14552 AT_CHECK_CALC_GLR invocations to use % directives, instead of
14553 command line options.
14554 * tests/cxx-type.at: Formatting changes.
14556 2002-11-03 Paul Eggert <eggert@twinsun.com>
14558 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
14559 to count columns correctly, and to check for invalid inputs.
14561 Use mbsnwidth to count columns correctly. Account for tabs, too.
14562 Include mbswidth.h.
14563 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
14564 (extend_location): New function.
14565 (YY_LINES): Remove.
14567 Handle CRLF in C code rather than in Lex code.
14568 (YY_INPUT): New macro.
14569 (no_cr_read): New function.
14571 Scan UCNs, even though we don't fully handle them yet.
14572 (convert_ucn_to_byte): New function.
14574 Handle backslash-newline correctly in C code.
14575 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
14576 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
14578 (tag, splice): New EREs. Do not allow NUL or newline in tags.
14579 Use {splice} wherever C allows backslash-newline.
14580 YY_STEP after space, newline, vertical-tab.
14581 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
14583 (letter, id): Don't assume ASCII; e.g., spell out a-z.
14585 ({int}, handle_action_dollar, handle_action_at): Check for integer
14588 (YY_STEP): Omit trailing semicolon, so that it's more like C.
14590 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
14591 as well as \000. Check for UCHAR_MAX, not 255.
14592 Allow \x with an arbitrary positive number of digits, as in C.
14593 Check for overflow here.
14594 Allow \? and UCNs, for compatibility with C.
14596 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
14597 with quote slot used by complain_at.
14599 * tests/input.at: Add tests for backslash-newline, m4 quotes
14600 in symbols, long literals, and funny escapes in strings.
14602 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
14603 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
14604 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
14605 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
14606 * m4/mbswidth.m4: New file, from GNU coreutils.
14608 * doc/bison.texinfo (Grammar Outline): Document // comments.
14609 (Symbols): Document that trigraphs have no special meaning in Bison,
14610 nor is backslash-newline allowed.
14611 (Actions): Document that trigraphs have no special meaning.
14613 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
14616 2002-11-02 Paul Eggert <eggert@twinsun.com>
14618 * src/reader.c: Don't include quote.h; not needed.
14619 (get_merge_function): Reword warning to be consistent with
14620 type clash diagnostic in grammar_current_rule_check.
14622 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
14623 bug in trigraph handling.
14625 * src/output.c (prepare_symbols): When printing token names,
14626 escape "[" as "@<:@" and likewise for "]".
14628 * src/system.h (errno): Remove declaration, as we are now
14629 assuming C89 or better, and C89 guarantees errno.
14631 2002-10-30 Paul Eggert <eggert@twinsun.com>
14633 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
14634 Check for close failures.
14635 * src/files.h (xfclose): Return void, not int, since it always
14637 * src/files.c (xfclose): Likewise. Report I/O error if ferror
14639 * src/output.c (output_skeleton): Use xfclose rather than fclose
14640 and ferror. xfclose now checks ferror.
14642 * data/glr.c (YYLEFTMOST_STATE): Remove.
14643 (yyreportTree): Use a stack-based leftmost state. This avoids
14644 our continuing battles with bogus warnings about initializers.
14646 2002-10-30 Akim Demaille <akim@epita.fr>
14648 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
14651 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14653 * tests/glr-regr1.at: New test for reported regressions.
14654 * tests/testsuite.at: Add glr-regr1.at test.
14655 * tests/Makefile.am: Add glr-regr1.at test.
14657 2002-10-24 Paul Eggert <eggert@twinsun.com>
14661 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
14662 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
14663 we use malloc. Don't assume 'A' through 'Z' are contiguous.
14664 Don't assume strdup exists; POSIX says its an XSI extension.
14665 Check for buffer overflow on input.
14667 2002-10-24 Akim Demaille <akim@epita.fr>
14669 * src/output.c (output_skeleton): Don't disable M4sugar comments
14670 too soon: it results in comments being expanded.
14671 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
14674 2002-10-24 Akim Demaille <akim@epita.fr>
14676 * data/yacc.c (m4_int_type): New.
14677 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
14678 char' as only yacc.c wants K&R portability.
14679 * data/glr.c (yysigned_char): Remove.
14680 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
14681 Reported by Quoc Peyrot.
14683 2002-10-23 Paul Eggert <eggert@twinsun.com>
14685 * src/main.c (main): With --trace=time, report times even if a
14686 non-fatal error occurs. Formerly, the times were reported in some
14687 such cases but not in others.
14688 * src/reader.c (reader): Just return if a complaint has been issued,
14689 instead of exiting, so that 'main' can report times.
14691 2002-10-22 Akim Demaille <akim@epita.fr>
14693 * src/system.h: Include sys/types.
14694 Reported by Bert Deknuydt.
14696 2002-10-23 Paul Eggert <eggert@twinsun.com>
14698 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
14699 Suggested by Art Haas.
14701 2002-10-22 Paul Eggert <eggert@twinsun.com>
14703 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
14704 decl; not needed any more.
14705 * src/main.c (main): Use return to exit, undoing yesterday's change.
14706 The last OS that we could find where this wouldn't work is
14707 SunOS 3.5, and that's too old to worry about now.
14709 * data/glr.c (struct yyltype): Define members even when not
14710 doing locations. This is more consistent with yacc.c, and it
14711 works around the following bug reports:
14712 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
14713 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
14715 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
14716 @acronym consistently. Standardize on "Yacc" instead of "YACC",
14717 "Algol" instead of "ALGOL". Give a bit more history about BNF.
14719 2002-10-22 Akim Demaille <akim@epita.fr>
14721 * data/README: New.
14723 2002-10-21 Paul Eggert <eggert@twinsun.com>
14725 Be consistent about 'bool'; the old code used an enum in one
14726 module and an int in another, and this violates the C standard.
14727 * m4/stdbool.m4: New file, from coreutils 4.5.3.
14728 * configure.ac (AC_HEADER_STDBOOL): Add.
14729 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
14730 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
14731 * src/symtab.c (hash_compare_symbol_t): Likewise.
14732 * src/system.h (bool, false, true): Use a definition consistent
14733 with ../lib/hash.c. All uses changed.
14735 * src/complain.c (warning_issued): Renamed from warn_message_count,
14736 so that we needn't worry about integer overflow (!).
14737 Now of type bool. All uses changed.
14738 (complaint_issued): Renamed from complain_message_count; likewise.
14740 * src/main.c (main): Use exit to exit with failure.
14742 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
14743 rather than 1 and 0.
14744 * src/main.c (main): Likewise.
14745 * src/getargs.c (getargs): Likewise.
14746 * src/reader.c (reader): Likewise.
14748 * src/getarg.c (getargs): Remove duplicate code for
14749 "Try `bison --help'".
14751 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
14752 What was that "2" for?
14754 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
14755 * src/getargs.c (usage): Likewise.
14757 * src/getargs.c (getargs): When there are too few operands, report
14758 the last one. When there are too many, report the first extra
14759 one. This is how diffutils does it.
14761 2002-10-20 Paul Eggert <eggert@twinsun.com>
14763 Remove K&R vestiges.
14764 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
14765 * src/complain.c (VA_START): Remove. Assume prototypes.
14766 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
14767 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
14768 fatal): Assume prototypes.
14769 * src/complain.h: Assume prototypes.
14770 * src/system.h (PARAMS): Remove.
14771 Include <limits.h> unconditionally, since it's guaranteeed even
14772 for a freestanding C89 compiler.
14773 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
14774 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
14776 2002-10-20 Akim Demaille <akim@epita.fr>
14778 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
14779 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
14780 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
14781 (yyresolveStates, yyresolveAction, yyresolveStack)
14782 (yyprocessOneStack): Use them.
14783 (yy_reduce_print): New.
14784 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
14786 2002-10-20 Akim Demaille <akim@epita.fr>
14788 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
14789 arguments and output `void'.
14790 (b4_c_function): Rename as...
14791 (b4_c_function_def): this.
14792 (b4_c_function_decl, b4_c_ansi_function_def)
14793 (b4_c_ansi_function_decl): New.
14794 Change the interpretation of the arguments: before `int, foo', now
14796 * data/yacc.c (yyparse): Prototype and define thanks to these.
14797 Adjust b4_c_function_def uses.
14798 * data/glr.c (yyparse): Likewise, but ANSI only.
14800 2002-10-20 Akim Demaille <akim@epita.fr>
14802 * src/output.c (prepare): Move the definition of `tokens_number',
14803 `nterms_number', `undef_token_number', `user_token_number_max'
14805 (prepare_tokens): Here.
14806 (prepare_tokens): Rename as...
14807 (prepare_symbols): this.
14808 (prepare): Move the definition of `rules_number' to...
14809 (prepare_rules): here.
14810 (prepare): Move the definition of `last', `final_state_number',
14811 `states_number' to...
14812 (prepare_states): here.
14813 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
14815 2002-10-20 Akim Demaille <akim@epita.fr>
14817 * src/tables.h, src/tables.c, src/output.c: Comment changes.
14819 2002-10-20 Akim Demaille <akim@epita.fr>
14821 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
14824 2002-10-20 Akim Demaille <akim@epita.fr>
14826 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
14827 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
14829 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
14831 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
14832 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
14835 2002-10-19 Paul Eggert <eggert@twinsun.com>
14837 Do not create a temporary file, as that involves security and
14838 cleanup headaches. Instead, use a pair of pipes.
14839 Derived from a suggestion by Florian Krohm.
14840 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
14841 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
14842 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
14843 (BISON_PREREQ_SUBPIPE): Add.
14844 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
14845 Add subpipe.h, subpipe.c.
14846 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
14847 * po/POTFILES.in: Add lib/subpipe.c.
14848 * src/output.c: Include "subpipe.h".
14849 (m4_invoke): Remove decl.
14850 (scan_skel): New decl.
14851 (output_skeleton): Use pipe rather than temporary file for m4 input.
14852 Check that m4sugar.m4 is readable, to avoid deadlock.
14853 Check for pipe I/O error.
14854 * src/scan-skel.l (readpipe): Remove decl.
14855 (scan_skel): New function, to be used in place of m4_invoke.
14856 Read from stream rather than file.
14858 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
14859 float, as this generates a warning on Solaris 8 + GCC 3.2 with
14860 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
14861 this generates a more-accurate value anyway.
14863 * lib/timevar.c (timervar_accumulate): Rename locals to
14864 avoid confusion with similarly-named more-global.
14865 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
14867 * src/output.c (prepare): Use xstrdup to convert char const *
14868 to char *, to avoid GCC warning.
14870 2002-10-19 Akim Demaille <akim@epita.fr>
14872 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
14873 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
14874 Use them to have `calc.y' ready for %pure-parser.
14875 * data/yacc.c (YYLEX): Pass a yylex return type to
14876 b4_c_function_call.
14878 2002-10-19 Akim Demaille <akim@epita.fr>
14880 Prototype support of %lex-param and %parse-param.
14882 * src/parse-gram.y: Add the definition of the %lex-param and
14883 %parse-param tokens, plus their rules.
14884 Drop the `_' version of %glr-parser.
14886 * src/scan-gram.l (INITIAL): Scan them.
14887 * src/muscle_tab.c: Comment changes.
14888 (muscle_insert, muscle_find): Rename `pair' as `probe'.
14889 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
14890 (muscle_entry_s): The `value' member is no longer const.
14891 Adjust all dependencies.
14892 * src/muscle_tab.c (muscle_init): Adjust: use
14893 MUSCLE_INSERT_STRING.
14894 Initialize the obstack earlier.
14895 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
14896 (muscle_pair_list_grow): New.
14897 * data/c.m4 (b4_c_function_call, b4_c_args): New.
14898 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
14899 * tests/calc.at: Use %locations, not --locations.
14900 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
14902 2002-10-19 Akim Demaille <akim@epita.fr>
14904 * src/getargs.c (usage): Take status as argument and exit
14906 Report the traditional `Try ... --help' message when status != 0.
14907 (usage, version): Don't take a FILE * as arg, it is pointless.
14908 (getargs): When there is an incorrect number of arguments, make it
14909 an error, and report it GNUlically thanks to `usage ()'.
14911 2002-10-18 Paul Eggert <eggert@twinsun.com>
14913 * data/glr.c (yyreportParseError): Don't assume that sprintf
14914 yields the length of the printed string, as this is not true
14915 on SunOS 4.1.4. Reported by Peter Klein.
14917 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
14918 * tests/conflicts.at (%nonassoc and eof): Likewise.
14919 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
14921 2002-10-17 Akim Demaille <akim@epita.fr>
14923 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
14924 * src/getargs.c (trace_types, trace_args): Adjust.
14925 * src/reader.c (grammar_current_rule_prec_set)
14926 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
14927 Standardize error messages.
14928 And s/@prec/%prec/!
14929 (reader): Use trace_flag to enable scanner/parser debugging,
14930 instead of an adhoc scheme.
14931 * src/scan-gram.l: Remove trailing debugging code.
14933 2002-10-16 Paul Eggert <eggert@twinsun.com>
14935 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
14938 * NEWS: Officially drop support for building Bison with K&R C,
14939 since it didn't work anyway and it's not worth worrying about.
14940 * Makefile.maint (wget_files): Remove ansi2knr.c.
14941 (ansi2knr.c-url_prefix): Remove.
14942 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
14943 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14944 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14946 2002-10-15 Paul Eggert <eggert@twinsun.com>
14948 Stop using the "enum_" trick for K&R-style function definitions;
14949 it confused me, and I was the author! Instead, assume that people
14950 who want to use K&R C compilers (when using these modules in GCC,
14951 perhaps?) will run ansi2knr.
14953 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
14954 All uses of "enum_" changed to "enum ".
14955 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
14956 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
14958 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
14959 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
14960 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
14961 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
14962 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
14963 abitset_not, abitset_ones, abitset_or, abitset_or_and,
14964 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
14965 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
14966 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
14967 Use function prototypes; this removes the need for declaring
14968 static functions simply to provide their prototypes.
14969 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
14970 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
14971 bitset_count_, bitset_create, bitset_dump, bitset_first,
14972 bitset_free, bitset_init, bitset_last, bitset_next,
14973 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
14974 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
14975 bitset_print, bitset_release_memory, bitset_toggle_,
14976 bitset_type_choose, bitset_type_get, bitset_type_name_get,
14977 debug_bitset): Likewise.
14978 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
14979 * lib/bitset_stats.c (bitset_log_histogram_print,
14980 bitset_percent_histogram_print, bitset_stats_and,
14981 bitset_stats_and_cmp, bitset_stats_and_or,
14982 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
14983 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
14984 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
14985 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
14986 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
14987 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
14988 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
14989 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
14990 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
14991 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
14992 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
14993 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
14994 bitset_stats_zero): Likewise.
14995 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
14996 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
14997 bitsetv_dump, debug_bitsetv): Likewise.
14998 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
14999 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
15000 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
15001 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
15002 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
15003 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
15004 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
15005 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
15006 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
15007 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
15008 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
15010 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
15011 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
15012 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
15013 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
15014 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
15015 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
15016 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
15017 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
15018 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
15019 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
15020 lbitset_xor_cmp, lbitset_zero): Likewise.
15022 2002-10-14 Akim Demaille <akim@epita.fr>
15026 2002-10-14 Akim Demaille <akim@epita.fr>
15028 * tests/Makefile.am (maintainer-check-posix): New.
15030 2002-10-14 Akim Demaille <akim@epita.fr>
15032 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
15035 2002-10-14 Akim Demaille <akim@epita.fr>
15037 * src/tables.c (table_ninf_remap): base -> tab.
15038 Reported by Matt Rosing.
15040 2002-10-14 Paul Eggert <eggert@twinsun.com>
15042 * tests/action.at, tests/calc.at, tests/conflicts.at,
15043 tests/cxx-type.at, tests/headers.at, tests/input.at,
15044 tests/regression.at, tests/synclines.at, tests/torture.at:
15045 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
15046 so that the tests still work even if POSIXLY_CORRECT is set.
15047 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
15049 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
15050 for portability to K&R hosts. Fix typo: signed char is guaranteed
15051 only to 127, not to 128.
15052 * data/glr.c (yysigned_char): New type.
15053 * data/yacc.c (yysigned_char): Likewise.
15054 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
15056 2002-10-13 Paul Eggert <eggert@twinsun.com>
15058 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
15059 true due to limited range of data type" warning from GCC.
15061 * data/c.m4 (b4_token_defines): Protect against double-inclusion
15062 by wrapping enum yytokentype's definition inside #ifndef
15063 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
15065 2002-10-13 Akim Demaille <akim@epita.fr>
15067 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
15068 Un yy- yyrhs to avoid the name clash with the global YYRHS.
15070 2002-10-13 Akim Demaille <akim@epita.fr>
15072 * Makefile.maint: Update from Autoconf 2.54.
15073 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
15075 2002-10-13 Akim Demaille <akim@epita.fr>
15077 * src/print.c (print_state): Separate the list of solved conflicts
15078 from the other items.
15079 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
15081 2002-10-13 Akim Demaille <akim@epita.fr>
15083 Let nondeterministic skeletons be usable with deterministic
15086 With the patch, GAWK compiled by GCC without -O2 passes its test
15087 suite using a GLR parser driven by LALR tables. It fails with -O2
15088 because `struct stat' gives two different answers on my machine:
15089 88 (definition of an auto var) and later 96 (memset on this var).
15090 Hence the stack is badly corrumpted. The headers inclusion is to
15091 blame: if I move the awk.h inclusion before GLR's system header
15092 inclusion, the two struct stat have the same size.
15094 * src/tables.c (pack_table): Always create conflict_table.
15095 (token_actions): Always create conflict_list.
15096 * data/glr.c (YYFLAG): Remove, unused.
15098 2002-10-13 Akim Demaille <akim@epita.fr>
15100 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
15102 (VALGRIND, GXX): New.
15103 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
15104 * tests/bison.in: Run $PREBISON a pre-command.
15105 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
15106 (maintainer-check-g++): New.
15107 * Makefile.am (maintainer-check): New.
15109 2002-10-13 Akim Demaille <akim@epita.fr>
15111 * data/glr.c: Formatting changes.
15112 Tweak some trace messages to match yacc.c's.
15114 2002-10-13 Akim Demaille <akim@epita.fr>
15116 GLR parsers sometimes raise parse errors instead of performing the
15118 Reported by Charles-Henry de Boysson.
15120 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
15121 check the length of the traces when %glr.
15122 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
15124 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
15126 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
15127 (yyltype): Remove the yy prefix from the member names.
15128 (yytable): Complete its comment.
15129 (yygetLRActions): Map error action number from YYTABLE from
15131 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
15132 (which was a bug: it should have been YYTABEL_NINF, and yet it was
15133 not satisfying as we could compare an YYACTION computed from
15134 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
15135 only value for error actions.
15136 (yyreportParseError): In verbose parse error messages, don't issue
15137 `error' in the list of expected tokens.
15138 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
15139 next action to perform to match glr.c's decoding.
15140 (yytable): Complete its comment.
15142 2002-10-13 Paul Eggert <eggert@twinsun.com>
15144 Fix problem reported by Henrik Grubbstroem in
15145 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
15146 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
15147 because the Bison parser reads the second action before reducing
15149 * src/scan-gram.l (rule_length): New static var.
15150 Use it to keep track of the rule length in the scanner, since
15151 we can't expect the parser to be in lock-step sync with the scanner.
15152 (handle_action_dollar, handle_action_at): Use this var.
15153 * tests/actions.at (Exotic Dollars): Test for the problem.
15155 2002-10-12 Paul Eggert <eggert@twinsun.com>
15157 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
15158 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
15159 Include <sys/time.h> when checking for clock_t and struct tms.
15160 Use same include order as source.
15161 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
15162 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
15164 * lib/timevar.c: Update copyright date and clarify comments.
15165 (get_time) [IN_GCC]: Keep the GCC version for reference.
15167 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
15168 GCC version as of today, then merge Bison's changes.
15169 Change "GCC" to "Bison" in copyright notice. timevar.def's
15170 author is Akim, so change that too.
15172 * src/reader.c (grammar_current_rule_check):
15173 Don't worry about the default action if $$ is untyped.
15174 Prevents bogus warnings reported by Jim Gifford in
15175 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
15177 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
15178 * data/glr.c, data/lalr1.cc, data/yacc.c:
15179 Output token definitions before the first part of user declarations.
15180 Fixes compatibility problem reported by Jim Gifford for kbd in
15181 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
15183 2002-10-11 Paul Eggert <eggert@twinsun.com>
15185 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
15186 (yyparse): here. This undoes some of the 2002-07-25 change.
15187 Compatibility problem reported by Ralf S. Engelschall with
15188 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
15190 2002-10-11 Akim Demaille <akim@epita.fr>
15192 * tests/regression.at Characters Escapes): New.
15193 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
15195 Reported by Jan Nieuwenhuizen.
15197 2002-10-11 Akim Demaille <akim@epita.fr>
15201 2002-10-10 Paul Eggert <eggert@twinsun.com>
15203 Portability fixes for bitsets; this also avoids several GCC
15206 * lib/abitset.c: Include <stddef.h>, for offsetof.
15207 * lib/lbitset.c: Likewise.
15209 * lib/abitset.c (abitset_bytes): Return a size that is aligned
15210 properly for vectors of objects. Do not assume that adding a
15211 header size to a multiple of a word size yields a value that is
15212 properly aligned for the whole union.
15213 * lib/bitsetv.c (bitsetv_alloc): Likewise.
15215 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
15216 unique names for structures.
15217 * lib/ebitset.c (ebitset_bytes): Likewise.
15218 * lib/lbitset.c (lbitset_bytes): Likewise.
15220 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
15221 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
15222 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
15223 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
15224 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
15225 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
15226 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
15227 to improve the type-checking that GCC can do.
15228 * lib/bitset.c (bitset_op4_cmp): Likewise.
15229 * lib/bitset_stats.c (bitset_stats_count,
15230 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
15231 bitset_stats_copy, bitset_stats_disjoint_p,
15232 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
15233 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
15234 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
15235 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
15236 bitset_stats_and_or_cmp, bitset_stats_andn_or,
15237 bitset_stats_andn_or_cmp, bitset_stats_or_and,
15238 bitset_stats_or_and_cmp): Likewise.
15239 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
15240 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
15241 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
15242 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
15244 * lib/abitset.h: Include bitset.h, not bbitset.h.
15245 * lib/ebitset.h: Likewise.
15246 * lib/lbitset.h: Likewise.
15248 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
15249 All instances of parameters of type enum bitset_opts are now of
15250 type enum_bitset_opts, to conform to the C Standard, and similarly
15251 for enum_bitset_type.
15252 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
15253 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
15255 Do not use "struct bitset_struct" to mean different things in
15256 different modules. Not only is this confusing, it violates
15257 the C Standard, which requires that structure types in different
15258 modules must be compatible if one is to be passed to the other.
15259 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
15260 All instances of "struct bitset_struct *" replaced with "bitset".
15261 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
15262 (union bitset_union, struct abitset_struct, struct ebitset_struct,
15263 struct lbitset_struct, struct bitset_stats_struct): New types.
15264 All uses of struct bitset_struct changed to union bitset_union,
15266 * lib/abitset.c (struct abitset_struct, abitset,
15267 struct bitset_struct): Remove.
15268 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
15269 struct bitset_struct): Remove.
15270 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
15271 bitset_struct): Remove.
15272 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
15275 Do not call a function of type T using a call that assumes the
15276 function is of a different type U. Standard C requires that a
15277 function must be called with a type that is compatible with its
15279 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
15281 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
15283 * lib/ebitset.c (PFV): Remove.
15284 * lib/lbitset.c (PFV): Likewise.
15285 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
15286 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
15288 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
15289 (ebitset_vtable): Use them.
15290 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
15291 lbitset_xor): New functions.
15292 (lbitset_vtable): Use them.
15294 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
15297 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
15299 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
15300 Use offsetof, for simplicity.
15302 2002-10-06 Paul Eggert <eggert@twinsun.com>
15304 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
15305 the same width as int. This reapplies a hunk of the 2002-08-12 patch
15306 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
15307 which was inadvertently undone by the 2002-09-30 patch.
15308 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
15309 the same width as int.
15311 2002-10-04 Paul Eggert <eggert@twinsun.com>
15315 * configure.ac (AC_INIT), NEWS: Increment version number.
15317 * doc/bison.texinfo: Minor spelling, grammar, and white space
15319 (Symbols): Mention that any negative value returned from yylex
15320 signifies end-of-input. Warn about negative chars. Mention
15321 the portable Standard C character set.
15323 The GNU coding standard says CFLAGS and YFLAGS are reserved
15324 for the installer to set.
15325 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
15326 * src/Makefile.am (AM_CFLAGS): Likewise.
15327 (AM_YFLAGS): Renamed from YFLAGS.
15329 Fix some MAX and MIN problems.
15330 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
15331 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
15332 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
15333 * src/reader.c (reader): Use it.
15335 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
15336 POSIX 1003.1-2001 has removed fgrep.
15338 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
15340 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
15341 interpreted as signed.
15342 * lib/ebitset.c (ebitset_list): Fix bug.
15344 2002-10-01 Paul Eggert <eggert@twinsun.com>
15346 More fixes for 64-bit hosts and large bitsets.
15348 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
15349 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
15350 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
15351 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
15352 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
15353 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
15354 bitset_count_): Likewise.
15355 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
15356 bitset_first, bitset_last): Likewise.
15357 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
15358 bitset_stats_list_reverse, bitset_stats_size,
15359 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
15361 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
15362 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
15363 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
15364 bitsetv_reflexive_transitive_closure): Likewise.
15365 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
15366 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
15368 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
15371 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
15372 Use size_t, not unsigned int, to count bytes.
15373 * lib/abitset.h (abitset_bytes): Likewise.
15374 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
15376 * lib/bitset.h (bitset_bytes): Likewise.
15377 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
15378 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
15379 * lib/bitsetv.c (bitsetv_alloc): Likewise.
15380 * lib/ebitset.c (ebitset_bytes): Likewise.
15381 * lib/ebitset.h (ebitset_bytes): Likewise.
15382 * lib/lbitset.c (lbitset_bytes): Likewise.
15383 * lib/lbitset.h (lbitset_bytes): Likewise.
15385 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
15386 abitset_subset_p, abitset_disjoint_p, abitset_and,
15387 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
15388 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
15389 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
15390 abitset_or_and, abitset_or_and_cmp):
15391 Use bitset_windex instead of unsigned int.
15392 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15393 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
15394 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
15395 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
15397 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
15399 * lib/bitset.c (bitset_print):
15400 Use proper printf formats for widths of integer types.
15401 * lib/bitset_stats.c (bitset_percent_histogram_print,
15402 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
15403 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
15404 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
15405 * lib/lbitset.c (lbitset_bytes): Likewise.
15407 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
15408 BITSET_SIZE_MAX): New macros.
15409 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
15410 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
15411 to BITSET_WINDEX_MAX.
15413 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
15414 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
15415 since we now return the bitset_bindex type (not int).
15417 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
15418 when computing sizes.
15419 * lib/ebitset.c (ebitset_elts_grow): Likewise.
15421 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
15422 and avoid cast to unsigned.
15424 2002-09-30 Akim Demaille <akim@epita.fr>
15426 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
15427 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
15428 Updates from Michael Hayes.
15430 2002-09-30 Art Haas <ahaas@neosoft.com>
15432 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
15434 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
15437 2002-09-27 Akim Demaille <akim@epita.fr>
15441 2002-09-27 Akim Demaille <akim@epita.fr>
15443 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
15444 (Because of AC_LIBSOURCE).
15446 2002-09-27 Akim Demaille <akim@epita.fr>
15448 Playing with Autoscan.
15450 * configure.ac: Remove the old LIBOBJ tweaks.
15451 (AC_REPLACE_FUNCS): Add strrchr and strtol.
15452 * lib/strrchr.c: New.
15453 * lib/strtol.c: New, from the Coreutils 4.5.1.
15455 2002-09-27 Akim Demaille <akim@epita.fr>
15457 Playing with Autoscan.
15459 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
15460 * lib/Makefile.am (libbison_a_SOURCES): No longer include
15461 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
15462 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
15465 2002-09-24 Akim Demaille <akim@epita.fr>
15467 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
15468 (Frequently Asked Questions, Parser Stack Overflow): New.
15470 2002-09-13 Akim Demaille <akim@epita.fr>
15472 Playing with autoscan.
15474 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
15475 * src/files.c (skeleton_find): Remove, unused.
15476 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
15477 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
15479 2002-09-13 Akim Demaille <akim@epita.fr>
15481 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
15482 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
15484 2002-09-13 Akim Demaille <akim@epita.fr>
15486 * configure.ac: Require 2.54.
15487 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
15488 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
15489 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
15490 Remove, provided by Autoconf macros.
15492 2002-09-12 Akim Demaille <akim@epita.fr>
15494 * m4/prereq.m4: Update, from Coreutils 4.5.1.
15496 2002-09-12 Akim Demaille <akim@epita.fr>
15498 * m4/prereq.m4: Update, from Fileutils 4.1.5.
15499 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
15500 Reported by Martin Mokrejs.
15502 2002-09-10 Akim Demaille <akim@epita.fr>
15504 * src/parse-gram.y: Associate a human readable string to each
15506 * tests/regression.at (Invalid inputs): Adjust.
15508 2002-09-10 Gary V. Vaughan <gary@gnu.org>
15510 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
15511 with an Autoconf-2.5x style configure.ac.
15513 2002-09-06 Paul Eggert <eggert@twinsun.com>
15515 * doc/bison.texinfo (Conditions): Make explicit that the GPL
15516 exception applies only to yacc.c. This is a modification of a
15517 patch originally suggested by Akim Demaille.
15519 2002-09-06 Akim Demaille <akim@epita.fr>
15521 * data/c.m4 (b4_copyright): Move the GPL exception comment from
15523 * data/yacc.c: here.
15525 * data/lalr1.cc (struct yyltype): Don't define it, since we use
15527 (b4_ltype): Default to yy::Location from location.hh.
15529 2002-09-04 Jim Meyering <jim@meyering.net>
15531 * data/yacc.c: Guard the declaration of yytoknum also with
15532 `#ifdef YYPRINT', so it is declared only when used.
15534 2002-09-04 Akim Demaille <akim@epita.fr>
15536 * configure.in: Rename as...
15537 * configure.ac: this.
15540 2002-09-04 Akim Demaille <akim@epita.fr>
15542 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
15543 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
15544 translate maintainer only messages.
15546 2002-08-12 Paul Eggert <eggert@twinsun.com>
15550 * Makefile.am (SUBDIRS): Remove intl.
15551 (DISTCLEANFILES): Remove.
15552 * NEWS: Mention that GNU M4 is now required. Clarify what is
15553 meant by "larger grammars". Mention the pt_BR translation.
15554 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
15555 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
15556 Bump version from 0.11.2 to 0.11.5.
15557 (BISON_PREREQ_STAGE): Remove.
15558 (AM_GNU_GETTEXT): Use external gettext.
15559 (AC_OUTPUT): Remove intl/Makefile.
15561 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
15563 * data/glr.c: Include string.h, for strlen.
15564 (yyreportParseError): Use size_t for yysize.
15565 (yy_yypstack): No longer nested inside yypstates, as nested
15566 functions are not portable. Do not assume size_t is the
15568 (yypstates): Do not assume that ptrdiff_t is the same width
15569 as int, and similarly for yyposn and YYINDEX.
15571 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
15573 * lib/Makefile.am (INCLUDES): Do not include from the intl
15574 directory, which has been removed.
15575 * src/Makefile.am (INCLUDES): Likewise.
15577 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
15578 (bitsets_sources, additional_bitsets_sources, timevars_sources):
15581 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
15582 * tests/Makefile.am (EXTRA_DIST): Likewise.
15584 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
15585 Do not assume that bitset_windex is the same width as unsigned.
15587 * lib/abitset.c (abitset_unused_clear): Do not assume that
15588 bitset_word is the same width as int.
15589 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
15590 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
15591 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
15592 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
15593 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
15595 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
15596 portability to one's complement hosts!).
15597 * lib/ebitset.c (ebitset_op1): Likewise.
15598 * lib/lbitset.c (lbitset_op1): Likewise.
15600 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
15601 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
15602 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
15603 Sync with fileutils.
15604 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
15605 lib/gettext.h: Sync with diffutils.
15607 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
15608 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
15610 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
15611 PROTOTYPES to check for prototypes, and "defined __STDC__" to
15614 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
15615 size_t; the old version tried to do this but casted improperly.
15616 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
15617 (bitset_test): Now returns int, not unsigned long.
15619 * lib/bitset_stats.c: Include "gettext.h".
15621 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
15622 name locals "index", as it generates unnecessary warnings on some
15623 hosts that have an "index" function.
15625 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
15626 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
15627 they need translation.
15628 * src/LR0.c (state_list_append, new_itemsets, get_state,
15629 append_states, generate_states): Likewise.
15630 * src/assoc.c (assoc_to_string): Likewise.
15631 * src/closure.c (print_closure, set_firsts, closure): Likewise.
15632 * src/gram.c (grammar_dump): Likewise.
15633 * src/injections.c (injections_compute): Likewise.
15634 * src/lalr.c (lookaheads_print): Likewise.
15635 * src/relation.c (relation_transpose): Likewise.
15636 * src/scan-gram.l: Likewise.
15637 * src/tables.c (table_grow, pack_vector): Likewise.
15639 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
15640 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
15641 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
15642 * m4/mbstate_t.m4: Sync with fileutils.
15643 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
15645 * po/LINGUAS: Add pt_BR.
15646 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
15647 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
15649 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
15651 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
15653 * src/complain.c (strerror_r): Remove decl; not needed.
15654 (strerror): Use same pattern as ../lib/error.c.
15656 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
15658 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
15660 * src/main.c (main): Cast result of bindtextdomain and textdomain
15661 to void, to avoid a GCC warning when --disable-nls is in effect.
15663 * src/scan-gram.l: Use strings rather than escapes when possible,
15664 to minimize the number of warnings from xgettext.
15665 (handle_action_dollar, handle_action_at): Don't use isdigit,
15666 as it mishandles negative chars and it may not work as expected
15667 outside the C locale.
15669 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
15670 this is a GCC extension and is not portable to other compilers.
15672 * src/system.h (alloca): Use same pattern as ../lib/error.c.
15673 Do not include <ctype.h>; no longer needed.
15674 Do not include <malloc.h>; no longer needed (and generates
15675 warnings on OpenBSD 3.0).
15677 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
15680 * tests/regression.at: Do not use 'cc -c input.c -o input';
15681 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
15683 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
15684 exit status as failure, not just exit status 1. Sun C exits
15685 with status 2 sometimes.
15687 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
15688 Use it for the two large tests.
15690 2002-08-02 Akim Demaille <akim@epita.fr>
15692 * src/conflicts.c (conflicts_output): Don't output rules never
15693 reduced here, since anyway that computation doesn't work.
15694 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
15695 (rule_useless_p, rule_never_reduced_p): New.
15696 (grammar_rules_partial_print): Use a filter instead of a range.
15697 Display the title only if needed.
15698 (grammar_rules_print): Adjust.
15699 (grammar_rules_never_reduced_report): New.
15700 * src/tables.c (action_row): Move the computation of rules never
15702 (token_actions): here.
15703 * src/main.c (main): Make the parser before making the report, so
15704 that rules never reduced are computed.
15705 Call grammar_rules_never_reduced_report.
15706 * src/print.c (print_results): Report rules never reduced.
15707 * tests/conflicts.at, tests/reduce.at: Adjust.
15709 2002-08-01 Akim Demaille <akim@epita.fr>
15711 Instead of attaching lookaheads and duplicating the rules being
15712 reduced by a state, attach the lookaheads to the reductions.
15714 * src/state.h (state_t): Remove the `lookaheads',
15715 `lookaheads_rule' member.
15716 (reductions_t): Add a `lookaheads' member.
15717 Use a regular array for the `rules'.
15718 * src/state.c (reductions_new): Initialize the lookaheads member
15720 (state_rule_lookaheads_print): Adjust.
15721 * src/state.h, src/state.c (state_reductions_find): New.
15722 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
15723 (count_rr_conflicts): Adjust.
15724 * src/lalr.c (LArule): Remove.
15725 (add_lookback_edge): Adjust.
15726 (state_lookaheads_count): New.
15727 (states_lookaheads_initialize): Merge into...
15728 (initialize_LA): this.
15729 (lalr_free): Adjust.
15730 * src/main.c (main): Don't free nullable and derives too early: it
15731 is used by --verbose.
15732 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
15734 2002-08-01 Akim Demaille <akim@epita.fr>
15736 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
15738 (set_derives, free_derives): Rename as...
15739 (derives_compute, derives_free): this.
15740 Adjust all dependencies.
15741 * src/nullable.c (set_nullable, free_nullable): Rename as...
15742 (nullable_compute, nullable_free): these.
15743 (rule_list_t): Store rule_t *, not rule_number_t.
15744 * src/state.c (state_rule_lookaheads_print): Directly compare rule
15745 pointers, instead of their numbers.
15746 * src/main.c (main): Call nullable_free, and derives_free earlier,
15747 as they were lo longer used.
15749 2002-08-01 Akim Demaille <akim@epita.fr>
15751 * lib/timevar.c (get_time): Include children time.
15752 * src/lalr.h (LA, LArule): Don't export them: used with the
15754 * src/lalr.c (LA, LArule): Static.
15755 * src/lalr.h, src/lalr.c (lalr_free): New.
15756 * src/main.c (main): Call it.
15757 * src/tables.c (pack_vector): Check whether loc is >= to the
15759 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
15760 (tables_generate): do it, since that's also it which allocates
15762 Don't free LA and LArule, main does.
15764 2002-07-31 Akim Demaille <akim@epita.fr>
15766 Separate parser tables computation and output.
15768 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
15769 (conflict_list, conflict_list_cnt, table, check, table_ninf)
15770 (yydefgoto, yydefact, high): Move to...
15771 * src/tables.h, src/tables.c: here.
15772 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
15773 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
15774 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
15775 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
15776 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
15777 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
15778 (action_row, save_row, token_actions, save_column, default_goto)
15779 (goto_actions, sort_actions, matching_state, pack_vector)
15780 (table_ninf_remap, pack_table, prepare_actions): Move to...
15781 * src/tables.c: here.
15782 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
15783 * src/output.c (token_actions, output_base, output_conflicts)
15784 (output_check): Merge into...
15785 (prepare_actions): this.
15786 (actions_output): Rename as...
15787 (user_actions_output): this.
15788 * src/main.c (main): Call tables_generate and tables_free.
15790 2002-07-31 Akim Demaille <akim@epita.fr>
15792 Steal GCC's --time-report support.
15794 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
15795 stolen/adjusted from GCC.
15796 * m4/stage.m4: Remove time related checks.
15797 * m4/timevar.m4: New.
15798 * configure.in: Adjust.
15799 * src/system.h: Adjust to using timevar.h.
15800 * src/getargs.h, src/getargs.c: Support trace_time for
15802 * src/main.c (stage): Remove.
15803 (main): Replace `stage' invocations with timevar calls.
15804 * src/output.c: Insert pertinent timevar calls.
15806 2002-07-31 Akim Demaille <akim@epita.fr>
15808 Let --trace have arguments.
15810 * src/getargs.h (enum trace_e): New.
15811 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
15812 (long_options, short_options): --trace/-T takes an optional
15814 Change all the uses of trace_flag to reflect the new flags.
15815 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
15817 Strengthen `stage' portability.
15819 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
15820 * configure.in: Use it.
15821 Don't check for malloc.h and sys/times.h.
15822 * src/system.h: Include them when appropriate.
15823 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
15824 times and struct tms are available.
15826 2002-07-30 Akim Demaille <akim@epita.fr>
15828 In verbose parse error message, don't report `error' as an
15830 * tests/actions.at (Printers and Destructors): Adjust.
15831 * tests/calc.at (Calculator $1): Adjust.
15832 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
15833 error message, do not report the parser accepts the error token in
15836 2002-07-30 Akim Demaille <akim@epita.fr>
15838 Normalize conflict related messages.
15840 * src/complain.h, src/complain.c (warn, complain): New.
15841 * src/conflicts.c (conflicts_print): Use them.
15842 (conflict_report_yacc): New, extracted from...
15843 (conflicts_print): here.
15844 * tests/conflicts.at, tests/existing.at: Adjust.
15846 2002-07-30 Akim Demaille <akim@epita.fr>
15848 Report rules which are never reduced by the parser: those hidden
15851 * src/LR0.c (save_reductions): Don't make the final state too
15852 different: save its reduction (accept) instead of having a state
15853 without any action (no shift or goto, no reduce).
15854 Note: the final state is now a ``regular'' state, i.e., the
15855 parsers now contain `reduce 0' as default reduction.
15856 Nevertheless, since they decide to `accept' when yystate =
15857 final_state, they still will not reduce rule 0.
15858 * src/print.c (print_actions, print_reduction): Adjust.
15859 * src/output.c (action_row): Track reduced rules.
15860 (token_actions): Report rules never reduced.
15861 * tests/conflicts.at, tests/regression.at: Adjust.
15863 2002-07-30 Akim Demaille <akim@epita.fr>
15865 `stage' was accidently included in a previous patch.
15866 Initiate its autoconfiscation.
15868 * configure.in: Look for malloc.h and sys/times.h.
15869 * src/main.c (stage): Adjust.
15870 Report only when trace_flag.
15872 2002-07-29 Akim Demaille <akim@epita.fr>
15874 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
15876 (errs_t): symbol_t*, not symbol_number_t.
15877 (reductions_t): rule_t*, not rule_number_t.
15878 (FOR_EACH_SHIFT): New.
15879 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
15880 * src/print.c, src/print_graph.c: Adjust.
15882 2002-07-29 Akim Demaille <akim@epita.fr>
15884 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
15886 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
15887 (endtoken, accept): these.
15888 * src/reader.c (reader): Set endtoken's default tag to "$end".
15889 Set undeftoken's tag to "$undefined" instead of "$undefined.".
15890 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
15893 2002-07-29 Akim Demaille <akim@epita.fr>
15895 * src/reduce.c (reduce_grammar): When the language is empty,
15896 complain about the start symbol, not the axiom.
15898 * tests/reduce.at (Empty Language): New.
15900 2002-07-26 Akim Demaille <akim@epita.fr>
15902 * src/reader.h, src/reader.c (gram_error): ... can't get
15903 yycontrol without making too strong assumptions on the parser
15905 * src/output.c (prepare_tokens): Use the real 0th value of
15906 token_translations instead of `0'.
15907 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
15909 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
15910 for the time being: %locations ought to provide it to yyerror.
15912 2002-07-25 Akim Demaille <akim@epita.fr>
15914 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
15915 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
15916 * tests/regression.at (Web2c Actions): Adjust.
15918 2002-07-25 Akim Demaille <akim@epita.fr>
15920 Stop storing rules from 1 to nrules + 1.
15922 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
15923 * src/nullable.c, src/output.c, src/print.c, src/reader.c
15924 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
15925 Iterate from 0 to nrules.
15926 Use rule_number_as_item_number and item_number_as_rule_number.
15927 Adjust to `derive' now containing possibly 0.
15928 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
15929 Handle the `- 1' part in rule numbers from/to item numbers.
15930 * src/conflicts.c (log_resolution): Fix the message which reversed
15932 * src/output.c (action_row): Initialize default_rule to -1.
15933 (token_actions): Adjust.
15934 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
15936 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
15938 2002-07-25 Akim Demaille <akim@epita.fr>
15940 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
15941 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
15942 (b4_c_knr_arg_decl): New.
15943 * data/yacc.c: Use it to define yysymprint, yydestruct, and
15944 yyreport_parse_error.
15946 2002-07-25 Akim Demaille <akim@epita.fr>
15948 * data/yacc.c (yyreport_parse_error): New, extracted from...
15950 (yydestruct, yysymprint): Move above yyparse.
15953 2002-07-25 Akim Demaille <akim@epita.fr>
15955 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
15957 (b4_sint_type, b4_uint_type): these.
15958 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
15959 * tests/regression.at (Web2c Actions): Adjust.
15961 2002-07-25 Akim Demaille <akim@epita.fr>
15963 * src/gram.h (TIEM_NUMBER_MAX): New.
15964 (item_number_of_rule_number, rule_number_of_item_number): Rename
15966 (rule_number_as_item_number, item_number_as_rule_number): these.
15967 Adjust dependencies.
15968 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
15969 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
15970 (symbol_number_to_vector_number): New.
15971 (order): Of vector_number_t* type.
15972 (base_t, BASE_MAX, BASE_MIN): New.
15973 (froms, tos, width, pos, check): Of base_t type.
15974 (action_number_t, ACTION_MIN, ACTION_MAX): New.
15975 (actrow): Of action_number_t type.
15976 (conflrow): Of unsigned int type.
15977 (table_ninf, base_ninf): New.
15978 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
15979 (muscle_insert_int_table, muscle_insert_base_table)
15980 (muscle_insert_rule_number_table): New.
15981 (prepare_tokens): Output `toknum' as int_table.
15982 (action_row): Returns a rule_number_t.
15983 Use ACTION_MIN, not SHRT_MIN.
15984 (token_actions): yydefact is rule_number_t*.
15985 (table_ninf_remap): New.
15986 (pack_table): Use it for `base' and `table'.
15987 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
15989 (YYPACT_NINF, YYTABLE_NINF): these.
15990 (yypact, yytable): Compute their types instead of hard-coded
15992 * tests/regression.at (Web2c Actions): Adjust.
15994 2002-07-19 Akim Demaille <akim@epita.fr>
15996 * src/scan-gram.l (id): Can start with an underscore.
15998 2002-07-16 Akim Demaille <akim@epita.fr>
16000 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
16001 Adjust all former `associativity' dependencies.
16002 * src/symtab.c (symbol_new): Default associativity is `undef', not
16004 (symbol_check_alias_consistence): Adjust.
16006 2002-07-09 Akim Demaille <akim@epita.fr>
16008 * doc/bison.texinfo: Properly set the ``header'' part.
16009 Use @dircategory ``GNU programming tools'' as per Texinfo's
16013 2002-07-09 Akim Demaille <akim@epita.fr>
16015 * lib/quotearg.h: Protect against multiple inclusions.
16016 * src/location.h (location_t): Add a `file' member.
16017 (LOCATION_RESET, LOCATION_PRINT): Adjust.
16018 * src/complain.c (warn_at, complain_at, fatal_at): Drop
16019 `error_one_per_line' support.
16021 2002-07-09 Akim Demaille <akim@epita.fr>
16023 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
16024 * src/reader.c (lineno): Remove.
16025 Adjust all dependencies.
16026 (get_merge_function): Take a location and use complain_at.
16027 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
16028 * tests/regression.at (Invalid inputs, Mixing %token styles):
16031 2002-07-09 Akim Demaille <akim@epita.fr>
16033 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
16034 recovery rule, and forbid extensions when --yacc.
16035 (gram_error): Use complain_at.
16036 * src/reader.c (reader): Exit if there were parse errors.
16038 2002-07-09 Akim Demaille <akim@epita.fr>
16040 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
16041 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
16042 Reported by R Blake <blakers@mac.com>.
16044 2002-07-09 Akim Demaille <akim@epita.fr>
16046 * data/yacc.c: Output the copyright notive in the header.
16048 2002-07-03 Akim Demaille <akim@epita.fr>
16050 * src/output.c (froms, tos): Are state_number_t.
16051 (save_column): sp, sp1, and sp2 are state_number_t.
16052 (prepare): Rename `final' as `final_state_number', `nnts' as
16053 `nterms_number', `nrules' as `rules_number', `nstates' as
16054 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
16056 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
16057 * data/lalr1.cc (nsym_): Remove, unused.
16059 2002-07-03 Akim Demaille <akim@epita.fr>
16061 * src/lalr.h, src/lalr.c (goto_number_t): New.
16062 * src/lalr.c (goto_list_t): New.
16064 * src/nullable.c (rule_list_t): New.
16066 * src/types.h: Remove.
16068 2002-07-03 Akim Demaille <akim@epita.fr>
16070 * src/closure.c (print_fderives): Use rule_rhs_print.
16071 * src/derives.c (print_derives): Use rule_rhs_print.
16072 (rule_list_t): New, replaces `shorts'.
16073 (set_derives): Add comments.
16074 * tests/sets.at (Nullable, Firsts): Adjust.
16076 2002-07-03 Akim Demaille <akim@epita.fr>
16078 * src/output.c (prepare_actions): Free `tally' and `width'.
16079 (prepare_actions): Allocate and free `order'.
16080 * src/symtab.c (symbols_free): Free `symbols'.
16081 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
16082 * src/output.c (m4_invoke): Move to...
16083 * src/scan-skel.l: here.
16084 (<<EOF>>): Close yyout, and free its name.
16086 2002-07-03 Akim Demaille <akim@epita.fr>
16088 Fix some memory leaks, and fix a bug: state 0 was examined twice.
16090 * src/LR0.c (new_state): Merge into...
16091 (state_list_append): this.
16092 (new_states): Merge into...
16093 (generate_states): here.
16094 (set_states): Don't ensure a proper `errs' state member here, do it...
16095 * src/conflicts.c (conflicts_solve): here.
16096 * src/state.h, src/state.c: Comment changes.
16097 (state_t): Rename member `shifts' as `transitions'.
16098 Adjust all dependencies.
16099 (errs_new): For consistency, also take the values as argument.
16100 (errs_dup): Remove.
16101 (state_errs_set): New.
16102 (state_reductions_set, state_transitions_set): Assert that no
16103 previous value was assigned.
16105 (states_free): Use it.
16106 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
16107 temporary storage: use `errs' and `nerrs' as elsewhere.
16108 (set_conflicts): Allocate and free this `errs'.
16110 2002-07-02 Akim Demaille <akim@epita.fr>
16112 * lib/libiberty.h: New.
16113 * lib: Update the bitset implementation from upstream.
16114 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
16115 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
16116 * src/main.c: Adjust bitset stats calls.
16118 2002-07-01 Paul Eggert <eggert@twinsun.com>
16120 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
16121 char, so that negative chars don't collide with $.
16123 2002-06-30 Akim Demaille <akim@epita.fr>
16125 Have the GLR tests be `warning' checked, and fix the warnings.
16127 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
16128 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
16129 (yyremoveDeletes): `yyi' and `yyj' are size_t.
16130 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
16131 (yyaddDeferredAction): static.
16132 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
16133 (yyreportParseError): yyprefix is const.
16134 yytokenp is used only when verbose.
16135 (yy__GNUC__): Replace with __GNUC__.
16136 (yypdumpstack): yyi is size_t.
16137 (yypreference): Un-yy local variables and arguments, to avoid
16138 clashes with `yyr1'. Anyway, we are not in the user name space.
16139 (yytname_size): be an int, as is compared with ints.
16140 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
16142 * tests/cxx-gram.at: Use quotation to protect $1.
16143 Use AT_COMPILE to enable warnings hunts.
16144 Prototype yylex and yyerror.
16146 Include `string.h', not `strings.h'.
16147 Produce and prototype stmtMerge only when used.
16148 yylex takes a location.
16150 2002-06-30 Akim Demaille <akim@epita.fr>
16152 We spend a lot of time in quotearg, in particular when --verbose.
16154 * src/symtab.c (symbol_get): Store a quoted version of the key.
16155 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
16156 Adjust all callers.
16158 2002-06-30 Akim Demaille <akim@epita.fr>
16160 * src/state.h (reductions_t): Rename member `nreds' as num.
16161 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
16162 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
16164 2002-06-30 Akim Demaille <akim@epita.fr>
16166 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
16167 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
16168 (shifts_to): Rename as...
16169 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
16170 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
16171 (TRANSITION_IS_DISABLED, transitions_to): these.
16173 2002-06-30 Akim Demaille <akim@epita.fr>
16175 * src/print.c (print_shifts, print_gotos): Merge into...
16176 (print_transitions): this.
16177 (print_transitions, print_errs, print_reductions): Align the
16178 lookaheads columns.
16179 (print_core, print_transitions, print_errs, print_state,
16180 print_grammar): Output empty lines separator before, not after.
16181 (state_default_rule_compute): Rename as...
16182 (state_default_rule): this.
16183 * tests/conflicts.at (Defaulted Conflicted Reduction),
16184 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
16185 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
16187 2002-06-30 Akim Demaille <akim@epita.fr>
16189 Display items as we display rules.
16191 * src/gram.h, src/gram.c (rule_lhs_print): New.
16192 * src/gram.c (grammar_rules_partial_print): Use it.
16193 * src/print.c (print_core): Likewise.
16194 * tests/conflicts.at (Defaulted Conflicted Reduction),
16195 (Unresolved SR Conflicts): Adjust.
16196 (Unresolved SR Conflicts): Adjust and rename as...
16197 (Resolved SR Conflicts): this, as was meant.
16198 * tests/regression.at (Web2c Report): Adjust.
16200 2002-06-30 Akim Demaille <akim@epita.fr>
16202 * src/print.c (state_default_rule_compute): New, extracted from...
16203 (print_reductions): here.
16204 Pessimize, but clarify the code.
16205 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
16207 2002-06-30 Akim Demaille <akim@epita.fr>
16209 * src/output.c (action_row): Let default_rule be always a rule
16212 2002-06-30 Akim Demaille <akim@epita.fr>
16214 * src/closure.c (print_firsts, print_fderives, closure):
16215 Use BITSET_EXECUTE.
16216 * src/lalr.c (lookaheads_print): Likewise.
16217 * src/state.c (state_rule_lookaheads_print): Likewise.
16218 * src/print_graph.c (print_core): Likewise.
16219 * src/print.c (print_reductions): Likewise.
16220 * src/output.c (action_row): Likewise.
16221 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
16223 2002-06-30 Akim Demaille <akim@epita.fr>
16225 * src/print_graph.c: Use report_flag.
16227 2002-06-30 Akim Demaille <akim@epita.fr>
16229 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
16231 * src/relation.h, src/relation.c (traverse, relation_digraph)
16232 (relation_print, relation_transpose): New.
16234 2002-06-30 Akim Demaille <akim@epita.fr>
16236 * src/state.h, src/state.c (shifts_to): New.
16237 * src/lalr.c (build_relations): Use it.
16239 2002-06-30 Akim Demaille <akim@epita.fr>
16241 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
16242 (item_number_of_rule_number, rule_number_of_item_number): New.
16243 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
16244 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
16245 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
16246 Propagate their use.
16247 Much remains to be done, in particular wrt `shorts' from types.h.
16249 2002-06-30 Akim Demaille <akim@epita.fr>
16251 * src/symtab.c (symbol_new): Initialize the `printer' member.
16253 2002-06-30 Akim Demaille <akim@epita.fr>
16255 * src/LR0.c (save_reductions): Remove, replaced by...
16256 * src/state.h, src/state.c (state_reductions_set): New.
16257 (reductions, errs): Rename as...
16258 (reductions_t, errs_t): these.
16259 Adjust all dependencies.
16261 2002-06-30 Akim Demaille <akim@epita.fr>
16263 * src/LR0.c (state_list_t, state_list_append): New.
16264 (first_state, last_state): Now symbol_list_t.
16265 (this_state): Remove.
16266 (new_itemsets, append_states, save_reductions): Take a state_t as
16268 (set_states, generate_states): Adjust.
16269 (save_shifts): Remove, replaced by...
16270 * src/state.h, src/state.c (state_shifts_set): New.
16271 (shifts): Rename as...
16273 Adjust all dependencies.
16274 * src/state.h (state_t): Remove the `next' member.
16276 2002-06-30 Akim Demaille <akim@epita.fr>
16278 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
16281 2002-06-30 Akim Demaille <akim@epita.fr>
16283 Use hash.h for the state hash table.
16285 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
16286 (allocate_storage): Use state_hash_new.
16287 (free_storage): Use state_hash_free.
16288 (new_state, get_state): Adjust.
16289 * src/lalr.h, src/lalr.c (states): Move to...
16290 * src/states.h (state_t): Remove the `link' member, no longer
16292 * src/states.h, src/states.c: here.
16293 (state_hash_new, state_hash_free, state_hash_lookup)
16294 (state_hash_insert, states_free): New.
16295 * src/states.c (state_table, state_compare, state_hash): New.
16296 * src/output.c (output_actions): Do not free states now, since we
16297 still need to know the final_state number in `prepare', called
16298 afterwards. Do it...
16299 * src/main.c (main): here: call states_free after `output'.
16301 2002-06-30 Akim Demaille <akim@epita.fr>
16303 * src/state.h, src/state.c (state_new): New, extracted from...
16304 * src/LR0.c (new_state): here.
16305 * src/state.h (STATE_ALLOC): Move to...
16306 * src/state.c: here.
16307 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
16308 * src/state.h, src/state.c: here.
16310 2002-06-30 Akim Demaille <akim@epita.fr>
16312 * src/reader.c (gensym): Rename as...
16313 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
16314 (getsym): Rename as...
16315 (symbol_get): this.
16317 2002-06-30 Akim Demaille <akim@epita.fr>
16319 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
16320 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
16321 * src/output.c, src/print.c, src/print_graph.c: Propagate.
16322 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
16324 2002-06-30 Akim Demaille <akim@epita.fr>
16326 Make the test suite pass with warnings checked.
16328 * tests/actions.at (Printers and Destructors): Improve.
16329 Avoid unsigned vs. signed issues.
16330 * tests/calc.at: Don't exercise the scanner here, do it...
16331 * tests/input.at (Torturing the Scanner): here.
16333 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16335 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
16336 reorganize first lines parallel to yacc.c.
16338 2002-06-28 Akim Demaille <akim@epita.fr>
16340 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
16341 (b4_token_enum, b4_token_defines): New, factored from...
16342 * data/lalr1.cc, data/yacc.c, glr.c: here.
16344 2002-06-28 Akim Demaille <akim@epita.fr>
16346 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
16348 * src/output.c (merger_output): static.
16350 2002-06-28 Akim Demaille <akim@epita.fr>
16352 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
16353 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
16355 * src/output.c (save_row): Initialize all the variables to pacify GCC.
16357 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16359 Accumulated changelog for new GLR parsing features.
16361 * src/conflicts.c (count_total_conflicts): Change name to
16362 conflicts_total_count.
16363 * src/conflicts.h: Ditto.
16364 * src/output.c (token_actions): Use the new name.
16365 (output_conflicts): Change conflp => conflict_list_heads, and
16366 confl => conflict_list for better readability.
16367 * data/glr.c: Use the new names.
16368 * NEWS: Add self to GLR announcement.
16370 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
16372 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
16375 * data/bison.glr: Change name to glr.c
16376 * data/glr.c: Renamed from bison.glr.
16377 * data/Makefile.am: Add glr.c
16381 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
16382 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
16384 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16386 * data/bison.glr: Be sure to restore the
16387 current #line when returning to the skeleton contents after having
16388 exposed the input file's #line.
16390 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16392 * data/bison.glr: Bring up to date with changes to bison.simple.
16394 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16396 * data/bison.glr: Correct definitions that use b4_prefix.
16397 Various reformatting.
16398 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
16399 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
16400 yytokenp argument; now part of stack.
16401 (yychar): Define to behave as documented.
16402 (yyclearin): Ditto.
16404 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16406 * src/reader.h: Add declaration for free_merger_functions.
16408 * src/reader.c (merge_functions): New variable.
16409 (get_merge_function): New function.
16410 (free_merger_functions): New function.
16411 (readgram): Check for %prec that is not followed by a symbol.
16412 Handle %dprec and %merge declarations.
16413 (packgram): Initialize dprec and merger fields in rules array.
16415 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
16416 conflict_list_cnt, conflict_list_free): New variables.
16417 (table_grow): Also grow conflict_table.
16418 (prepare_rules): Output dprec and merger tables.
16419 (conflict_row): New function.
16420 (action_row): Output conflict lists for GLR parser. Don't use
16421 default reduction in conflicted states for GLR parser so that there
16422 are spaces for the conflict lists.
16423 (save_row): Also save conflict information.
16424 (token_actions): Allocate conflict list.
16425 (merger_output): New function.
16426 (pack_vector): Pack conflict table, too.
16427 (output_conflicts): New function to output yyconflp and yyconfl.
16428 (output_check): Allocate conflict_tos.
16429 (output_actions): Output conflict tables, also.
16430 (output_skeleton): Output b4_mergers definition.
16431 (prepare): Output b4_max_rhs_length definition.
16432 Use 'bison.glr' as default skeleton for GLR parsers.
16434 * src/gram.c (glr_parser): New flag.
16435 (grammar_free): Call free_merger_functions.
16437 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
16438 all pairs of conflicting reductions, rather than just all tokens
16439 causing conflicts. Needed to size conflict tables.
16440 (conflicts_output): Modify call to count_rr_conflicts for new
16442 (conflicts_print): Ditto.
16443 (count_total_conflicts): New function.
16445 * src/reader.h (merger_list): New type.
16446 (merge_functions): New variable.
16448 * src/lex.h (tok_dprec, tok_merge): New token types.
16450 * src/gram.h (rule_s): Add dprec and merger fields.
16451 (glr_parser): New flag.
16453 * src/conflicts.h (count_total_conflicts): New function.
16455 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
16457 * doc/bison.texinfo (Generalized LR Parsing): New section.
16458 (GLR Parsers): New section.
16459 (Language and Grammar): Mention GLR parsing.
16460 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
16461 Correct typo ("tge" -> "the").
16463 * data/bison.glr: New skeleton for GLR parsing.
16465 * tests/cxx-gram.at: New tests for GLR parsing.
16467 * tests/testsuite.at: Include cxx-gram.at.
16469 * tests/Makefile.am: Add cxx-gram.at.
16471 * src/parse-gram.y:
16473 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
16475 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
16477 2002-06-27 Akim Demaille <akim@epita.fr>
16479 * src/options.h, src/options.c: Remove.
16480 * src/getargs.c (short_options, long_options): New.
16482 2002-06-27 Akim Demaille <akim@epita.fr>
16484 * data/bison.simple, data/bison.c++: Rename as...
16485 * data/yacc.c, data/lalr1.cc: these.
16486 * doc/bison.texinfo (Environment Variables): Remove.
16488 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
16490 * src/getargs.c (report_argmatch): Initialize strtok().
16492 2002-06-20 Akim Demaille <akim@epita.fr>
16494 * data/bison.simple (b4_symbol_actions): New, replaces...
16495 (b4_symbol_destructor, b4_symbol_printer): these.
16496 (yysymprint): Be sure to call YYPRINT only for tokens, and using
16497 user token numbers.
16499 2002-06-20 Akim Demaille <akim@epita.fr>
16501 * data/bison.simple (yydestructor): Rename as...
16502 (yydestruct): this.
16504 2002-06-20 Akim Demaille <akim@epita.fr>
16506 * src/symtab.h, src/symtab.c (symbol_type_set)
16507 (symbol_destructor_set, symbol_precedence_set): The location is
16509 Adjust all callers.
16511 2002-06-20 Akim Demaille <akim@epita.fr>
16513 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
16515 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
16517 * src/symtab.h, src/symtab.c (symbol_class_set)
16518 (symbol_user_token_number_set): Likewise.
16519 Adjust all callers.
16520 Promote complain_at.
16521 * tests/input.at (Type Clashes): Adjust.
16523 2002-06-20 Akim Demaille <akim@epita.fr>
16525 * data/bison.simple (YYLEX): Fix the declaration when
16528 2002-06-20 Akim Demaille <akim@epita.fr>
16530 * data/bison.simple (yysymprint): Don't print the token number,
16532 * tests/actions.at (Destructors): Rename as...
16533 (Printers and Destructors): this.
16534 Also exercise %printer.
16536 2002-06-20 Akim Demaille <akim@epita.fr>
16538 * data/bison.simple (YYDSYMPRINT): New.
16539 Use it to remove many of the #if YYDEBUG/if (yydebug).
16541 2002-06-20 Akim Demaille <akim@epita.fr>
16543 * src/symtab.h, src/symtab.c (symbol_t): printer and
16544 printer_location are new members.
16545 (symbol_printer_set): New.
16546 * src/parse-gram.y (PERCENT_PRINTER): New token.
16547 Handle its associated rule.
16548 * src/scan-gram.l: Adjust.
16549 (handle_destructor_at, handle_destructor_dollar): Rename as...
16550 (handle_symbol_code_at, handle_symbol_code_dollar): these.
16551 * src/output.c (symbol_printers_output): New.
16552 (output_skeleton): Call it.
16553 * data/bison.simple (yysymprint): New. Cannot be named yyprint
16554 since there are already many grammar files with a user `yyprint'.
16555 Replace the calls to YYPRINT to calls to yysymprint.
16556 * tests/calc.at: Adjust.
16557 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
16558 taking advantage of parser very internal details (stack size!).
16560 2002-06-20 Akim Demaille <akim@epita.fr>
16562 * src/scan-gram.l: Complete the scanner with the missing patterns
16564 Use `quote' and `symbol_tag_get' where appropriate.
16566 2002-06-19 Akim Demaille <akim@epita.fr>
16568 * tests/actions.at (Destructors): Augment to test locations.
16569 * data/bison.simple (yydestructor): Pass it the current location
16570 if locations are enabled.
16571 Prototype only when __STDC__ or C++.
16572 Change the argument names to move into the yy name space: there is
16575 2002-06-19 Akim Demaille <akim@epita.fr>
16577 * data/bison.simple (b4_pure_if): New.
16578 Use it instead of #ifdef YYPURE.
16580 2002-06-19 Akim Demaille <akim@epita.fr>
16582 * data/bison.simple (b4_location_if): New.
16583 Use it instead of #ifdef YYLSP_NEEDED.
16585 2002-06-19 Akim Demaille <akim@epita.fr>
16587 Prepare @$ in %destructor, but currently don't bind it in the
16588 skeleton, as %location use is not cleaned up yet.
16590 * src/scan-gram.l (handle_dollar, handle_destructor_at)
16591 (handle_action_at): New.
16592 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
16593 a braced_code_t and a location as additional arguments.
16594 (handle_destructor_dollar): Instead of requiring `b4_eval', just
16595 unquote one when outputting `b4_dollar_dollar'.
16597 * data/bison.simple (b4_eval): Remove.
16598 (b4_symbol_destructor): Adjust.
16599 * tests/input.at (Invalid @n): Adjust.
16601 2002-06-19 Zack Weinberg <zack@codesourcery.com>
16603 * doc/bison.texinfo: Document ability to have multiple
16606 2002-06-18 Akim Demaille <akim@epita.fr>
16608 * src/files.c (compute_base_names): When computing the output file
16609 names from the input file name, strip the directory part.
16611 2002-06-18 Akim Demaille <akim@epita.fr>
16613 * data/bison.simple.new: Comment changes.
16614 Reported by Andreas Schwab.
16616 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
16618 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
16619 there are no `label `yyoverflowlab' defined but not used' warnings
16620 when yyoverflow is defined.
16622 2002-06-18 Akim Demaille <akim@epita.fr>
16624 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
16626 (symbol_destructor_set): Adjust.
16627 * src/output.c (symbol_destructors_output): Output the destructor
16629 Output the symbol name.
16630 * data/bison.simple (b4_symbol_destructor): Adjust.
16632 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
16633 and Akim Demaille <akim@epita.fr>
16635 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
16636 what's left on the stack when the error recovery hits EOF.
16637 * tests/actions.at (Destructors): Complete to exercise this case.
16639 2002-06-17 Akim Demaille <akim@epita.fr>
16641 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
16642 arguments is really empty, not only equal to `[]'.
16643 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
16645 (symbol_destructor_set): New.
16646 * src/output.c (symbol_destructors_output): New.
16647 * src/reader.h (brace_code_t, current_braced_code): New.
16648 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
16649 (handle_dollar): Rename as...
16650 (handle_action_dollar): this.
16651 (handle_destructor_dollar): New.
16652 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
16653 (grammar_declaration): Use it.
16654 * data/bison.simple (yystos): Is always defined.
16655 (yydestructor): New.
16656 * tests/actions.at (Destructors): New.
16657 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
16659 2002-06-17 Akim Demaille <akim@epita.fr>
16661 * src/symlist.h, src/symlist.c (symbol_list_length): New.
16662 * src/scan-gram.l (handle_dollar, handle_at): Compute the
16663 rule_length only when needed.
16664 * src/output.c (actions_output, token_definitions_output): Output
16666 * src/symtab.c: Don't access directly to the symbol tag, use
16668 * src/parse-gram.y: Use symbol_list_free.
16670 2002-06-17 Akim Demaille <akim@epita.fr>
16672 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
16673 (symbol_list_prepend, get_type_name): Move to...
16674 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
16675 (symbol_list_prepend, symbol_list_n_type_name_get): here.
16676 Adjust all callers.
16677 (symbol_list_free): New.
16678 * src/scan-gram.l (handle_dollar): Takes a location.
16679 * tests/input.at (Invalid $n): Adjust.
16681 2002-06-17 Akim Demaille <akim@epita.fr>
16683 * src/reader.h, src/reader.c (symbol_list_new): Export it.
16684 (symbol_list_prepend): New.
16685 * src/parse-gram.y (%union): `list' is a new member.
16686 (symbols.1): New, replaces...
16687 (terms_to_prec.1, nterms_to_type.1): these.
16688 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
16689 Take a location as additional argument.
16690 Adjust all callers.
16692 2002-06-15 Akim Demaille <akim@epita.fr>
16694 * src/parse-gram.y: Move %token in the declaration section so that
16695 we don't depend upon CVS Bison.
16697 2002-06-15 Akim Demaille <akim@epita.fr>
16699 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
16700 * src/print.c (print_core): Use it.
16702 2002-06-15 Akim Demaille <akim@epita.fr>
16704 * src/conflicts.c (log_resolution): Accept the rule involved in
16705 the sr conflicts instead of the lookahead number that points to
16707 (flush_reduce): Accept the current lookahead vector as argument,
16708 instead of the index in LA.
16709 (resolve_sr_conflict): Accept the current number of lookahead
16710 bitset to consider for the STATE, instead of the index in LA.
16711 (set_conflicts): Adjust.
16712 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
16714 2002-06-15 Akim Demaille <akim@epita.fr>
16716 * src/state.h (state_t): Replace the `lookaheadsp' member, a
16717 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
16718 Adjust all dependencies.
16719 * src/lalr.c (initialize_lookaheads): Split into...
16720 (states_lookaheads_count, states_lookaheads_initialize): these.
16723 2002-06-15 Akim Demaille <akim@epita.fr>
16725 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
16727 (grammar_rules_print): here.
16728 * src/reduce.c (reduce_output): Use it.
16729 * tests/reduce.at (Useless Rules, Reduced Automaton)
16730 (Underivable Rules): Adjust.
16732 2002-06-15 Akim Demaille <akim@epita.fr>
16734 Copy BYacc's nice way to report the grammar.
16736 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
16738 Don't print the rules' location, it is confusing and useless.
16739 (rule_print): Use grammar_rhs_print.
16740 * src/print.c (print_grammar): Use grammar_rules_print.
16742 2002-06-15 Akim Demaille <akim@epita.fr>
16744 Complete and rationalize `useless thing' warnings.
16746 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
16747 (symbol_tag_print): New.
16748 Use them everywhere in place of accessing directly the tag member.
16749 * src/gram.h, src/gram.c (rule_print): New.
16750 Use it where a rule used to be printed `by hand'.
16751 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
16752 (reduce_grammar_tables): Report the useless rules.
16753 (reduce_print): Useless things are a warning, not an error.
16755 * tests/reduce.at (Useless Nonterminals, Useless Rules):
16756 (Reduced Automaton, Underivable Rules): Adjust.
16757 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
16758 * tests/conflicts.at (Unresolved SR Conflicts)
16759 (Solved SR Conflicts): Adjust.
16761 2002-06-15 Akim Demaille <akim@epita.fr>
16763 Let symbols have a location.
16765 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
16767 Adjust all callers.
16768 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
16769 Use location_t, not int.
16770 * src/symtab.c (symbol_check_defined): Take advantage of the
16772 * tests/regression.at (Invalid inputs): Adjust.
16774 2002-06-15 Akim Demaille <akim@epita.fr>
16776 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
16777 (input): Don't try to initialize yylloc here, do it in the
16779 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
16780 * src/gram.h (rule_t): Change line and action_line into location
16781 and action_location, of location_t type.
16782 Adjust all dependencies.
16783 * src/location.h, src/location.c (empty_location): New.
16784 * src/reader.h, src/reader.c (grammar_start_symbol_set)
16785 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
16786 (grammar_current_rule_symbol_append)
16787 (grammar_current_rule_action_append): Expect a location as argument.
16788 * src/reader.c (grammar_midrule_action): Adjust to attach an
16789 action's location as dummy symbol location.
16790 * src/symtab.h, src/symtab.c (startsymbol_location): New.
16791 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
16794 2002-06-14 Akim Demaille <akim@epita.fr>
16796 Grammar declarations may be found in the grammar section.
16798 * src/parse-gram.y (rules_or_grammar_declaration): New.
16799 (declarations): Each declaration may end with a semicolon, not
16801 (grammar_declaration): `"%union"'.
16802 (grammar): Branch to rules_or_grammar_declaration.
16804 2002-06-14 Akim Demaille <akim@epita.fr>
16806 * src/main.c (main): Invoke scanner_free.
16808 2002-06-14 Akim Demaille <akim@epita.fr>
16810 * src/output.c (m4_invoke): Extracted from...
16811 (output_skeleton): here.
16814 2002-06-14 Akim Demaille <akim@epita.fr>
16816 * src/parse-gram.y (directives, directive, gram)
16817 (grammar_directives, precedence_directives, precedence_directive):
16819 (declarations, declaration, grammar, grammar_declaration)
16820 (precedence_declaration, precedence_declarator): these.
16821 (symbol_declaration): New.
16823 2002-06-14 Akim Demaille <akim@epita.fr>
16825 * src/files.c (action_obstack): Remove, unused.
16826 (output_obstack): Remove it, and all its dependencies, as it is no
16828 * src/reader.c (epilogue_set): Build the epilogue in the
16830 * src/output.h, src/output.c (muscle_obstack): Move to...
16831 * src/muscle_tab.h, src/muscle_tab.h: here.
16832 (muscle_init): Initialize muscle_obstack.
16833 (muscle_free): New.
16834 * src/main.c (main): Call it.
16836 2002-06-14 Akim Demaille <akim@epita.fr>
16838 * src/location.h: New, extracted from...
16839 * src/reader.h: here.
16840 * src/Makefile.am (noinst_HEADERS): Merge into
16841 (bison_SOURCES): this.
16843 * src/parse-gram.y: Use location_t instead of Bison's.
16844 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
16845 Use location_t instead of ints.
16847 2002-06-14 Akim Demaille <akim@epita.fr>
16849 * data/bison.simple, data/bison.c++: Be sure to restore the
16850 current #line when returning to the skeleton contents after having
16851 exposed the input file's #line.
16853 2002-06-12 Akim Demaille <akim@epita.fr>
16855 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
16857 * tests/actions.at (Exotic Dollars): New.
16859 2002-06-12 Akim Demaille <akim@epita.fr>
16861 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
16863 * tests/input.at (Torturing the Scanner): New.
16865 2002-06-11 Akim Demaille <akim@epita.fr>
16867 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
16868 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
16869 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
16870 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
16871 * src/reader.c (reader): Use it.
16873 2002-06-11 Akim Demaille <akim@epita.fr>
16875 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
16876 Adjust all callers.
16877 (scanner_last_string_free): New.
16879 2002-06-11 Akim Demaille <akim@epita.fr>
16881 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
16882 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
16883 (last_string, YY_OBS_FREE): New.
16884 Use them when returning an ID.
16886 2002-06-11 Akim Demaille <akim@epita.fr>
16888 Have Bison grammars parsed by a Bison grammar.
16890 * src/reader.c, src/reader.h (prologue_augment): New.
16891 * src/reader.c (copy_definition): Remove.
16893 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
16894 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
16895 (grammar_current_rule_prec_set, grammar_current_rule_check)
16896 (grammar_current_rule_symbol_append)
16897 (grammar_current_rule_action_append): Export.
16898 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
16899 (symbol_list_action_append): Remove.
16900 Hook the routines from reader.
16901 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
16902 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
16904 * src/reader.c (read_declarations): Remove, unused.
16906 * src/parse-gram.y: Handle the epilogue.
16907 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
16908 (grammar_start_symbol_set): this.
16909 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
16910 * src/reader.c (readgram): Remove, unused.
16911 (reader): Adjust to insert eoftoken and axiom where appropriate.
16913 * src/reader.c (copy_dollar): Replace with...
16914 * src/scan-gram.h (handle_dollar): this.
16915 * src/parse-gram.y: Remove `%thong'.
16917 * src/reader.c (copy_at): Replace with...
16918 * src/scan-gram.h (handle_at): this.
16920 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
16923 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
16926 * src/reader.h, src/reader.c (grammar_rule_end): New.
16928 * src/parse.y (current_type, current_class): New.
16929 Implement `%nterm', `%token' support.
16930 Merge `%term' into `%token'.
16931 (string_as_id): New.
16932 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
16935 * src/parse-gram.y: Be sure to handle properly the beginning of
16938 * src/parse-gram.y: Handle %type.
16939 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
16941 * src/parse-gram.y: More directives support.
16942 * src/options.c: No longer handle source directives.
16944 * src/parse-gram.y: Fix %output.
16946 * src/parse-gram.y: Handle %union.
16947 Use the prologue locations.
16948 * src/reader.c (parse_union_decl): Remove.
16950 * src/reader.h, src/reader.c (epilogue_set): New.
16951 * src/parse-gram.y: Use it.
16953 * data/bison.simple, data/bison.c++: b4_stype is now either not
16954 defined, then default to int, or to the contents of %union,
16955 without `union' itself.
16957 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
16959 * src/output.c (actions_output): Don't output braces, as they are
16960 already handled by the scanner.
16962 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
16963 characters to themselves.
16965 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
16966 that the epilogue has a proper #line.
16968 * src/parse-gram.y: Handle precedence/associativity.
16970 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
16972 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
16973 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
16974 at all to define terminals that cannot be emitted.
16976 * src/scan-gram.l: Escape M4 characters.
16978 * src/scan-gram.l: Working properly with escapes in user
16979 strings/characters.
16981 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
16982 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
16984 Use more modest sizes, as for the time being the parser does not
16985 release memory, and therefore the process swallows a huge amount
16988 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
16989 stricter %token grammar.
16991 * src/symtab.h (associativity): Add `undef_assoc'.
16992 (symbol_precedence_set): Do nothing when passed an undef_assoc.
16993 * src/symtab.c (symbol_check_alias_consistence): Adjust.
16995 * tests/regression.at (Invalid %directive): Remove, as it is now
16997 (Invalid inputs): Adjust to the new error messages.
16998 (Token definitions): The new grammar doesn't allow too many
17001 * src/lex.h, src/lex.c: Remove.
17002 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
17003 (copy_character, copy_string2, copy_string, copy_identifier)
17004 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
17005 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
17006 (parse_action): Remove.
17007 * po/POTFILES.in: Adjust.
17009 2002-06-11 Akim Demaille <akim@epita.fr>
17011 * src/reader.c (parse_action): Don't store directly into the
17012 rule's action member: return the action as a string.
17013 Don't require `rule_length' as an argument: compute it.
17014 (grammar_current_rule_symbol_append)
17015 (grammar_current_rule_action_append): New, eved out from
17017 Remove `action_flag', `rulelength', unused now.
17019 2002-06-11 Akim Demaille <akim@epita.fr>
17021 * src/reader.c (grammar_current_rule_prec_set).
17022 (grammar_current_rule_check): New, eved out from...
17024 Remove `xaction', `first_rhs': useless.
17025 * tests/input.at (Type clashes): New.
17026 * tests/existing.at (GNU Cim Grammar): Adjust.
17028 2002-06-11 Akim Demaille <akim@epita.fr>
17030 * src/reader.c (grammar_midrule_action): New, Eved out from
17033 2002-06-11 Akim Demaille <akim@epita.fr>
17035 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
17037 (readgram): Use them as replacement of inlined code, crule and
17040 2002-06-11 Akim Demaille <akim@epita.fr>
17042 * src/reader.c (grammar_end, grammar_symbol_append): New.
17043 (readgram): Use them.
17044 Make the use of `p' as local as possible.
17046 2002-06-10 Akim Demaille <akim@epita.fr>
17048 GCJ's parser requires the tokens to be defined before the prologue.
17050 * data/bison.simple: Output the token definition before the user's
17052 * tests/regression.at (Braces parsing, Duplicate string)
17053 (Mixing %token styles): Check the output from bison.
17054 (Early token definitions): New.
17056 2002-06-10 Akim Demaille <akim@epita.fr>
17058 * src/symtab.c (symbol_user_token_number_set): Don't complain when
17059 assigning twice the same user number to a token, so that we can
17061 * src/lex.c (lex): here.
17062 Also use `symbol_class_set' instead of hand written code.
17063 * src/reader.c (parse_assoc_decl): Likewise.
17065 2002-06-10 Akim Demaille <akim@epita.fr>
17067 * src/symtab.c, src/symtab.c (symbol_class_set)
17068 (symbol_user_token_number_set): New.
17069 * src/reader.c (parse_token_decl): Use them.
17070 Use a switch instead of ifs.
17071 Use a single argument.
17073 2002-06-10 Akim Demaille <akim@epita.fr>
17075 Remove `%thong' support as it is undocumented, unused, duplicates
17076 `%token's job, and creates useless e-mail traffic with people who
17077 want to know what it is, why it is undocumented, unused, and
17078 duplicates `%token's job.
17080 * src/reader.c (parse_thong_decl): Remove.
17081 * src/options.c (option_table): Remove "thong".
17082 * src/lex.h (tok_thong): Remove.
17084 2002-06-10 Akim Demaille <akim@epita.fr>
17086 * src/symtab.c, src/symtab.c (symbol_type_set)
17087 (symbol_precedence_set): New.
17088 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
17089 (value_components_used): Remove, unused.
17091 2002-06-09 Akim Demaille <akim@epita.fr>
17093 Move symbols handling code out of the reader.
17095 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
17096 (axiom): Move to...
17097 * src/symtab.h, src/symtab.c: here.
17099 * src/gram.c (start_symbol): Remove: use startsymbol->number.
17100 * src/reader.c (startval): Rename as...
17101 * src/symtab.h, src/symtab.c (startsymbol): this.
17102 * src/reader.c: Adjust.
17104 * src/reader.c (symbol_check_defined, symbol_make_alias)
17105 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
17106 (token_translations_init)
17108 * src/symtab.c: here.
17109 * src/reader.c (packsymbols): Move to...
17110 * src/symtab.h, src/symtab.c (symbols_pack): here.
17111 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
17114 2002-06-03 Akim Demaille <akim@epita.fr>
17116 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
17119 2002-06-03 Akim Demaille <akim@epita.fr>
17121 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
17122 structs with non literals.
17123 * src/scan-skel.l: never-interactive.
17124 * src/conflicts.c (enum conflict_resolution_e): No trailing
17126 * src/getargs.c (usage): Split long literal strings.
17127 Reported by Hans Aberg.
17129 2002-05-28 Akim Demaille <akim@epita.fr>
17131 * data/bison.c++: Use C++ ostreams.
17132 (cdebug_): New member.
17134 2002-05-28 Akim Demaille <akim@epita.fr>
17136 * src/output.c (output_skeleton): Be sure to allocate enough room
17137 for `/' _and_ for `\0' in full_skeleton.
17139 2002-05-28 Akim Demaille <akim@epita.fr>
17141 * data/bison.c++: Catch up with bison.simple:
17142 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17143 and Paul Eggert <eggert@twinsun.com>: `error' handing.
17144 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
17145 and popping traces.
17147 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17149 * src/output.c (output_skeleton): Put an explicit path in front of
17150 the skeleton file name, rather than relying on the -I directory,
17151 to partially alleviate effects of having a skeleton file lying around
17152 in the current directory.
17154 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17156 * src/conflicts.c (log_resolution): Correct typo:
17157 obstack_printf should be obstack_fgrow1.
17159 2002-05-26 Akim Demaille <akim@epita.fr>
17161 * src/state.h (state_t): `solved_conflicts' is a new member.
17162 * src/LR0.c (new_state): Set it to 0.
17163 * src/conflicts.h, src/conflicts.c (print_conflicts)
17164 (free_conflicts, solve_conflicts): Rename as...
17165 (conflicts_print, conflicts_free, conflicts_solve): these.
17167 * src/conflicts.c (enum conflict_resolution_e)
17168 (solved_conflicts_obstack): New, used by...
17169 (log_resolution): this.
17170 Adjust to attach the conflict resolution to each state.
17171 Complete the description with the precedence/associativity
17173 (resolve_sr_conflict): Adjust.
17174 * src/print.c (print_state): Output its solved_conflicts.
17175 * tests/conflicts.at (Unresolved SR Conflicts)
17176 (Solved SR Conflicts): Exercise --report=all.
17178 2002-05-26 Akim Demaille <akim@epita.fr>
17180 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
17181 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
17182 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
17183 (token_number_t, item_number_as_token_number)
17184 (token_number_as_item_number, muscle_insert_token_number_table):
17186 (symbol_number_t, item_number_as_symbol_number)
17187 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
17188 these, since it is more appropriate.
17190 2002-05-26 Akim Demaille <akim@epita.fr>
17192 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
17194 * data/bison.simple (yystos) [YYDEBUG]: New.
17195 (yyparse) [YYDEBUG]: Display the symbols which are popped during
17197 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
17199 2002-05-25 Akim Demaille <akim@epita.fr>
17201 * doc/bison.texinfo (Debugging): Split into...
17202 (Tracing): this new section, its former contents, and...
17203 (Understanding): this new section.
17204 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
17206 (report_flag): this.
17207 Adjust all dependencies.
17208 (report_args, report_types, report_argmatch): New.
17209 (usage, getargs): Report/support -r, --report.
17211 (struct option_table_struct): Rename as..,
17212 (struct option_table_s): this.
17213 Rename the `set_flag' member to `flag' to match with getopt_long's
17215 * src/options.c (option_table): Split verbose into an entry for
17216 %verbose, and another for --verbose.
17217 Support --report/-r, so remove -r from the obsolete --raw.
17218 * src/print.c: Attach full item sets and lookaheads reports to
17219 report_flag instead of trace_flag.
17220 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
17222 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17223 and Paul Eggert <eggert@twinsun.com>
17225 * data/bison.simple (yyparse): Correct error handling to conform to
17226 POSIX and yacc. Specifically, after syntax error is discovered,
17227 do not reduce further before shifting the error token.
17228 Clean up the code a bit by removing the labels yyerrdefault,
17229 yyerrhandle, yyerrpop.
17230 * NEWS: Document the above.
17232 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17234 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
17235 type; it isn't always big enough, since it doesn't necessarily
17236 include non-terminals.
17237 (yytranslate): Expand definition of yy_token_number_type, so that
17238 the latter can be removed.
17239 (yy_token_number_type): Remove, only one use.
17240 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
17241 don't use TokenNumberType as element type.
17243 * tests/regression.at: Modify expected output to agree with change
17244 to yyr1 and yytranslate.
17246 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
17248 * src/reader.c (parse_action): Use copy_character instead of
17251 2002-05-13 Akim Demaille <akim@epita.fr>
17253 * tests/regression.at (Token definitions): Prototype yylex and
17256 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17258 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
17259 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
17261 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
17263 2002-05-07 Akim Demaille <akim@epita.fr>
17265 * tests/synclines.at: Be sure to prototype yylex and yyerror to
17266 avoid GCC warnings.
17268 2002-05-07 Akim Demaille <akim@epita.fr>
17272 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
17273 over the RHS of each rule.
17274 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
17275 * src/state.h (state_t): Member `nitems' is unsigned short.
17276 * src/LR0.c (get_state): Adjust.
17277 * src/reader.c (packgram): Likewise.
17278 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
17280 (muscle_insert_int_table): Remove, unused.
17281 (prepare_rules): Remove `max'.
17283 2002-05-06 Akim Demaille <akim@epita.fr>
17285 * src/closure.c (print_firsts): Display of the symbol tags.
17286 (bitmatrix_print): Move to...
17287 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
17289 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
17291 2002-05-06 Akim Demaille <akim@epita.fr>
17293 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
17296 2002-05-06 Akim Demaille <akim@epita.fr>
17298 * src/LR0.c (new_state, get_state): Instead of using the global
17299 `kernel_size' and `kernel_base', have two new arguments:
17300 `core_size' and `core'.
17303 2002-05-06 Akim Demaille <akim@epita.fr>
17305 * src/reader.c (packgram): No longer end `ritem' with a 0
17306 sentinel: it is not used.
17308 2002-05-05 Akim Demaille <akim@epita.fr>
17310 New experimental feature: display the lookaheads in the report and
17313 * src/print (print_core): When --trace-flag, display the rules
17315 * src/print_graph.c (print_core): Likewise.
17316 Swap the arguments.
17319 2002-05-05 Akim Demaille <akim@epita.fr>
17321 * tests/torture.at (Many lookaheads): New test.
17323 2002-05-05 Akim Demaille <akim@epita.fr>
17325 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
17326 (GENERATE_MUSCLE_INSERT_TABLE): this.
17327 (output_int_table, output_unsigned_int_table, output_short_table)
17328 (output_token_number_table, output_item_number_table): Replace with...
17329 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
17330 (muscle_insert_short_table, muscle_insert_token_number_table)
17331 (muscle_insert_item_number_table): these.
17332 Adjust all callers.
17333 (prepare_tokens): Don't free `translations', since...
17334 * src/reader.h, src/reader.c (grammar_free): do it.
17336 * src/gram.h, src/gram.c (grammar_free): here.
17337 * data/bison.simple, data/bison.c++: b4_token_number_max is now
17340 2002-05-05 Akim Demaille <akim@epita.fr>
17342 * src/output.c (output_unsigned_int_table): New.
17343 (prepare_rules): `i' is unsigned.
17344 `prhs', `rline', `r2' are unsigned int.
17345 Rename muscle `rhs_number_max' as `rhs_max'.
17346 Output muscles `prhs_max', `rline_max', and `r2_max'.
17348 * data/bison.simple, data/bison.c++: Adjust to use these muscles
17349 to compute types instead of constant types.
17350 * tests/regression.at (Web2c Actions): Adjust.
17352 2002-05-04 Akim Demaille <akim@epita.fr>
17354 * src/symtab.h (SALIAS, SUNDEF): Rename as...
17355 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
17356 Adjust dependencies.
17357 * src/output.c (token_definitions_output): Be sure not to output a
17358 `#define 'a'' when fed with `%token 'a' "a"'.
17359 * tests/regression.at (Token definitions): New.
17361 2002-05-03 Paul Eggert <eggert@twinsun.com>
17363 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
17366 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
17368 * Makefile.am (SUBDIRS): Remove intl.
17369 (EXTRA_DIST): Add config/config.rpath.
17371 2002-05-03 Akim Demaille <akim@epita.fr>
17373 * data/bison.simple (m4_if): Don't output empty enums.
17374 And actually, output valid enum definitions :(.
17376 2002-05-03 Akim Demaille <akim@epita.fr>
17378 * configure.bat: Remove, completely obsolete.
17379 * Makefile.am (EXTRA_DIST): Adjust.
17380 Don't distribute config.rpath...
17381 * config/Makefile.am (EXTRA_DIST): Do it.
17383 2002-05-03 Akim Demaille <akim@epita.fr>
17385 * configure.in (GETTEXT_VERSION): New.
17386 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
17388 2002-05-03 Akim Demaille <akim@epita.fr>
17390 * data/bison.simple (b4_token_enum): New.
17391 (b4_token_defines): Use it to output tokens both as #define and
17393 Suggested by Paul Eggert.
17394 * src/output.c (token_definitions_output): Don't output spurious
17397 2002-05-03 Akim Demaille <akim@epita.fr>
17399 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
17401 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
17403 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
17404 Update the stack class, give a try to deque as the default container.
17406 2002-05-02 Akim Demaille <akim@epita.fr>
17408 * data/bison.simple (yyparse): Do not implement @$ = @1.
17409 (YYLLOC_DEFAULT): Adjust to do it.
17410 * doc/bison.texinfo (Location Default Action): Fix.
17412 2002-05-02 Akim Demaille <akim@epita.fr>
17414 * src/reader.c (parse_braces): Merge into...
17415 (parse_action): this.
17417 2002-05-02 Akim Demaille <akim@epita.fr>
17419 * configure.in (ALL_LINGUAS): Remove.
17420 * po/LINGUAS, hr.po: New.
17422 2002-05-02 Akim Demaille <akim@epita.fr>
17424 Remove the so called hairy (semantic) parsers.
17426 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
17427 * src/gram.h, src/gram.c (semantic_parser): Remove.
17428 (rule_t): Remove the guard and guard_line members.
17429 * src/lex.h (token_t): remove tok_guard.
17430 * src/options.c (option_table): Remove %guard and %semantic_parser
17432 * src/output.c, src/output.h (guards_output): Remove.
17434 (token_definitions_output): Don't output the `T'
17436 (output_skeleton): Don't output the guards.
17437 * src/files.c, src/files.c (attrsfile): Remove.
17438 * src/reader.c (symbol_list): Remove the guard and guard_line
17440 Adjust dependencies.
17441 (parse_guard): Remove.
17442 * data/bison.hairy: Remove.
17443 * doc/bison.texinfo (Environment Variables): Remove occurrences of
17446 2002-05-02 Akim Demaille <akim@epita.fr>
17448 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
17449 (parse_guard): Rename the formal argument `stack_offset' as
17450 `rule_length', which is more readable.
17452 (copy_at, copy_dollar): Instead of outputting the hard coded
17453 values of $$, $n and so forth, output invocation to b4_lhs_value,
17454 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
17455 Note: this patch partially drops `semantic-parser' support: it
17456 always does `rule_length - n', where semantic parsers ought to
17458 * data/bison.simple, data/bison.c++ (b4_lhs_value)
17459 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
17461 2002-05-02 Akim Demaille <akim@epita.fr>
17463 * configure.in (AC_INIT): Bump to 1.49b.
17464 (AM_INIT_AUTOMAKE): Short invocation.
17466 2002-05-02 Akim Demaille <akim@epita.fr>
17470 2002-05-01 Akim Demaille <akim@epita.fr>
17472 * src/skeleton.h: Remove.
17474 2002-05-01 Akim Demaille <akim@epita.fr>
17476 * src/skeleton.h: Fix the #endif.
17477 Reported by Magnus Fromreide.
17479 2002-04-26 Paul Eggert <eggert@twinsun.com>
17481 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
17482 Define if we define YYSTYPE and YYLTYPE, respectively.
17483 (YYCOPY): Fix [] quoting problem in the non-GCC case.
17485 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
17487 * src/scan-skel.l: Postprocess quadrigraphs.
17489 * src/reader.c (copy_character): New function, used to output
17490 single characters while replacing `[' and `]' with quadrigraphs, to
17491 avoid troubles with M4 quotes.
17492 (copy_comment): Output characters with copy_character.
17493 (read_additionnal_code): Likewise.
17494 (copy_string2): Likewise.
17495 (copy_definition): Likewise.
17497 * tests/calc.at: Exercise M4 quoting.
17499 2002-04-25 Akim Demaille <akim@epita.fr>
17501 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
17502 between `!' and the command.
17503 Reported by Paul Eggert.
17505 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
17507 * tests/calc.at: Exercise prologue splitting.
17509 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
17510 `b4_post_prologue' instead of `b4_prologue'.
17512 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
17514 (output): Free pre_prologue_obstack and post_prologue_obstack.
17515 * src/files.h, src/files.c (attrs_obstack): Remove.
17516 (pre_prologue_obstack, post_prologue_obstack): New.
17517 * src/reader.c (copy_definition): Add a parameter to specify the
17518 obstack to fill, instead of using attrs_obstack unconditionally.
17519 (read_declarations): Pass pre_prologue_obstack to copy_definition if
17520 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
17522 2002-04-23 Paul Eggert <eggert@twinsun.com>
17524 * data/bison.simple: Remove unnecessary commentary and white
17525 space differences from 1_29-branch.
17526 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
17528 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
17529 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
17530 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
17531 constructors or destructors.
17533 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
17535 2002-04-23 Akim Demaille <akim@epita.fr>
17537 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
17538 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
17539 location with columns.
17540 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
17541 All reported by Paul Eggert.
17543 2002-04-22 Akim Demaille <akim@epita.fr>
17545 * src/reduce.c (dump_grammar): Move to...
17546 * src/gram.h, src/gram.c (grammar_dump): here.
17547 Be sure to separate long item numbers.
17548 Don't read the members of a rule's prec if its nil.
17550 2002-04-22 Akim Demaille <akim@epita.fr>
17552 * src/output.c (table_size, table_grow): New.
17553 (MAXTABLE): Remove, replace uses with table_size.
17554 (pack_vector): Instead of dying when the table is too big, grow it.
17556 2002-04-22 Akim Demaille <akim@epita.fr>
17558 * data/bison.simple (yyr1): Its type is that of a token number.
17559 * data/bison.c++ (r1_): Likewise.
17560 * tests/regression.at (Web2c Actions): Adjust.
17562 2002-04-22 Akim Demaille <akim@epita.fr>
17564 * src/reader.c (token_translations_init): 256 is now the default
17565 value for the error token, i.e., it will be assigned another
17566 number if the user assigned 256 to one of her tokens.
17567 (reader): Don't force 256 to error.
17568 * doc/bison.texinfo (Symbols): Adjust.
17569 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
17570 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
17571 etc. instead of 10, 20, 30 (which was used to `jump' over error
17572 (256) and undefined (2)).
17574 2002-04-22 Akim Demaille <akim@epita.fr>
17576 Propagate more token_number_t.
17578 * src/gram.h (token_number_as_item_number)
17579 (item_number_as_token_number): New.
17580 * src/output.c (GENERATE_OUTPUT_TABLE): New.
17581 Use it to create output_item_number_table and
17582 output_token_number_table.
17583 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
17584 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
17585 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
17586 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
17588 2002-04-22 Akim Demaille <akim@epita.fr>
17590 * src/output.h, src/output.c (get_lines_number): Remove.
17592 2002-04-19 Akim Demaille <akim@epita.fr>
17594 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
17596 (Debugging): More details about enabling the debugging features.
17597 (Table of Symbols): Describe $$, $n, @$, and @n.
17598 Suggested by Tim Josling.
17600 2002-04-19 Akim Demaille <akim@epita.fr>
17602 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
17604 2002-04-10 Akim Demaille <akim@epita.fr>
17606 * src/system.h: Rely on HAVE_LIMITS_H.
17607 Suggested by Paul Eggert.
17609 2002-04-09 Akim Demaille <akim@epita.fr>
17611 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
17612 full stderr, and strip it according to the bison options, instead
17613 of composing the error message from different bits.
17614 This makes it easier to check for several error messages.
17615 Adjust all the invocations.
17616 Add an invocation exercising the error token.
17617 Add an invocation demonstrating a stupid error message.
17618 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
17620 Error message are for stderr, not stdout.
17622 2002-04-09 Akim Demaille <akim@epita.fr>
17624 * src/gram.h, src/gram.c (error_token_number): Remove, use
17626 * src/reader.c (reader): Don't specify the user token number (2)
17627 for $undefined, as it uselessly prevents using it.
17628 * src/gram.h (token_number_t): Move to...
17629 * src/symtab.h: here.
17630 (state_t.number): Is a token_number_t.
17631 * src/print.c, src/reader.c: Use undeftoken->number instead of
17633 (Even though this 2 is not the same as above: the number of the
17634 undeftoken remains being 2, it is its user token number which
17636 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
17637 `user_token_number_max'.
17638 Output `undef_token_number'.
17639 * data/bison.simple, data/bison.c++: Use them.
17640 Be sure to map invalid yylex return values to
17641 `undef_token_number'. This saves us from gratuitous SEGV.
17643 * tests/conflicts.at (Solved SR Conflicts)
17644 (Unresolved SR Conflicts): Adjust.
17645 * tests/regression.at (Web2c Actions): Adjust.
17647 2002-04-08 Akim Demaille <akim@epita.fr>
17649 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
17651 Remove the duplicate `typedefs'.
17652 (RhsNumberType): Fix the declaration and various other typos.
17654 * data/bison.simple: Use __ofile__.
17655 * src/scan-skel.l: Handle __ofile__.
17657 2002-04-08 Akim Demaille <akim@epita.fr>
17659 * src/gram.h (item_number_t): New, the type of item numbers in
17660 RITEM. Note that it must be able to code symbol numbers as
17661 positive number, and the negation of rule numbers as negative
17663 Adjust all dependencies (pretty many).
17664 * src/reduce.c (rule): Remove this `short *' pointer: use
17666 * src/system.h (MINSHORT, MAXSHORT): Remove.
17667 Include `limits.h'.
17668 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
17669 (shortcpy): Remove.
17670 (MAXTABLE): Move to...
17671 * src/output.c (MAXTABLE): here.
17672 (prepare_rules): Use output_int_table to output rhs.
17673 * data/bison.simple, data/bison.c++: Adjust.
17674 * tests/torture.at (Big triangle): Move the limit from 254 to
17676 * tests/regression.at (Web2c Actions): Ajust.
17678 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
17679 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
17680 passes, but produces negative #line number, once fixed, GCC is
17681 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
17683 * src/state.h (state_h): Code input lines on ints, not shorts.
17685 2002-04-08 Akim Demaille <akim@epita.fr>
17687 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
17688 and then the grammar.
17690 2002-04-08 Akim Demaille <akim@epita.fr>
17692 * src/system.h: No longer using strndup.
17694 2002-04-07 Akim Demaille <akim@epita.fr>
17696 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
17697 * src/output.c (output_table_data): Return the longest number.
17698 (prepare_tokens): Output `token_number_max').
17699 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
17701 Use them to define yy_token_number_type/TokenNumberType.
17702 Use this type for yytranslate.
17703 * tests/torture.at (Big triangle): Push the limit from 124 to
17705 * tests/regression.at (Web2c Actions): Adjust.
17707 2002-04-07 Akim Demaille <akim@epita.fr>
17709 * tests/torture.at (Big triangle): New.
17710 (GNU AWK Grammar, GNU Cim Grammar): Move to...
17711 * tests/existing.at: here.
17713 2002-04-07 Akim Demaille <akim@epita.fr>
17715 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
17717 Adjust dependencies.
17719 2002-04-07 Akim Demaille <akim@epita.fr>
17721 * src/reader.c: Normalize increments to prefix form.
17723 2002-04-07 Akim Demaille <akim@epita.fr>
17725 * src/reader.c, symtab.c: Remove debugging code.
17727 2002-04-07 Akim Demaille <akim@epita.fr>
17729 Rename all the `bucket's as `symbol_t'.
17731 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
17732 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
17733 * src/symtab.c, src/symtab.h (bucket): Rename as...
17735 (symbol_list_new, bucket_check_defined, bucket_make_alias)
17736 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
17737 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
17738 (buckets_new, buckets_free, buckets_do): Rename as...
17739 (symbol_list_new, symbol_check_defined, symbol_make_alias)
17740 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
17741 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
17742 (symbols_new, symbols_free, symbols_do): these.
17744 2002-04-07 Akim Demaille <akim@epita.fr>
17746 Use lib/hash for the symbol table.
17748 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
17750 * src/lex.c (lex): Set the `number' member of new terminals.
17751 * src/reader.c (bucket_check_defined, bucket_make_alias)
17752 (bucket_check_alias_consistence, bucket_translation): New.
17753 (reader, grammar_free, readgram, token_translations_init)
17754 (packsymbols): Adjust.
17755 (reader): Number the predefined tokens.
17756 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
17757 for predefined tokens.
17758 * src/symtab.h (bucket): Remove all the hash table related
17760 * src/symtab.c (symtab): Replace by...
17761 (bucket_table): this.
17762 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
17763 (buckets_new, buckets_do): New.
17765 2002-04-07 Akim Demaille <akim@epita.fr>
17767 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
17768 (start_symbol, max_user_token_number, semantic_parser)
17769 (error_token_number): Initialize.
17770 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
17773 (errtoken, eoftoken, undeftoken, axiom): Extern.
17775 2002-04-07 Akim Demaille <akim@epita.fr>
17777 * src/gram.h (rule_s): prec and precsym are now pointers
17778 to the bucket giving the priority/associativity.
17779 Member `associativity' removed: useless.
17780 * src/reduce.c, src/conflicts.c: Adjust.
17782 2002-04-07 Akim Demaille <akim@epita.fr>
17784 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
17785 Properly escape the symbols' TAG when outputting them.
17787 2002-04-07 Akim Demaille <akim@epita.fr>
17789 * src/lalr.h (LA): Is a bitsetv, not bitset*.
17791 2002-04-07 Akim Demaille <akim@epita.fr>
17793 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
17794 (LArule): this, which is an array to rule_t*.
17795 * src/print.c, src/conflicts.c: Adjust.
17797 2002-04-07 Akim Demaille <akim@epita.fr>
17799 * src/gram.h (rule_t): Rename `number' as `user_number'.
17800 `number' is a new member.
17801 Adjust dependencies.
17802 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
17804 2002-04-07 Akim Demaille <akim@epita.fr>
17806 As a result of the previous patch, it is no longer needed
17807 to reorder ritem itself.
17809 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
17811 2002-04-07 Akim Demaille <akim@epita.fr>
17813 Be sure never to walk through RITEMS, but use only data related to
17814 the rules themselves. RITEMS should be banished.
17816 * src/output.c (output_token_translations): Rename as...
17817 (prepare_tokens): this.
17818 In addition to `translate', prepare the muscles `tname' and
17819 `toknum', which were handled by...
17820 (output_rule_data): this.
17821 Remove, and move the remainder of its outputs into...
17822 (prepare_rules): this new routines, which also merges content from
17823 (output_gram): this.
17824 (prepare_rules): Be sure never to walk through RITEMS.
17825 (output_stos): Rename as...
17826 (prepare_stos): this.
17827 (output): Always invoke prepare_states, after all, just don't use it
17828 in the output if you don't need it.
17830 2002-04-07 Akim Demaille <akim@epita.fr>
17832 * src/LR0.c (new_state): Display `nstates' as the name of the
17833 newly created state.
17834 Adjust to initialize first_state and last_state if needed.
17835 Be sure to distinguish the initial from the final state.
17836 (new_states): Create the itemset of the initial state, and use
17838 * src/closure.c (closure): Now that the initial state has its
17839 items properly set, there is no need for a special case when
17840 creating `ruleset'.
17842 As a result, now the rule 0, reducing to $axiom, is visible in the
17843 outputs. Adjust the test suite.
17845 * tests/conflicts.at (Solved SR Conflicts)
17846 (Unresolved SR Conflicts): Adjust.
17847 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
17848 * tests/conflicts.at (S/R in initial): New.
17850 2002-04-07 Akim Demaille <akim@epita.fr>
17852 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
17853 the RHS of the rules.
17854 * src/output.c (output_gram): Likewise.
17856 2002-04-07 Akim Demaille <akim@epita.fr>
17858 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
17860 Adjust all dependencies.
17861 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
17862 `number' of the buckets too.
17863 * src/gram.h: Include `symtab.h'.
17864 (associativity): Move to...
17865 * src/symtab.h: here.
17866 No longer include `gram.h'.
17868 2002-04-07 Akim Demaille <akim@epita.fr>
17870 * src/gram.h, src/gram.c (rules_rhs_length): New.
17871 (ritem_longest_rhs): Use it.
17872 * src/gram.h (rule_t): `number' is a new member.
17873 * src/reader.c (packgram): Set it.
17874 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
17875 the end of `rules', and count them out of `nrules'.
17876 (reduce_output, dump_grammar): Adjust.
17877 * src/print.c (print_grammar): It is no longer needed to check for
17878 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
17879 * tests/reduce.at (Reduced Automaton): New test.
17881 2002-04-07 Akim Demaille <akim@epita.fr>
17883 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
17884 lacking `+ 1' to nrules, Bison reported as useless a token if it
17885 was used solely to set the precedence of the last rule...
17887 2002-04-07 Akim Demaille <akim@epita.fr>
17889 * data/bison.c++, data/bison.simple: Don't output the current file
17890 name in #line, to avoid useless diffs between two identical
17891 outputs under different names.
17893 2002-04-07 Akim Demaille <akim@epita.fr>
17895 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
17896 Normalize loops to using `< nrules + 1', not `<= nrules'.
17898 2002-04-07 Akim Demaille <akim@epita.fr>
17902 2002-04-07 Akim Demaille <akim@epita.fr>
17904 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
17905 bucket.value as bucket.number.
17907 2002-04-07 Akim Demaille <akim@epita.fr>
17909 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
17910 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
17911 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
17912 RHS, instead of being an index in RITEMS.
17914 2002-04-04 Paul Eggert <eggert@twinsun.com>
17916 * doc/bison.texinfo: Update copyright date.
17917 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
17918 (Symbols): Warn about running Bison in one character set,
17919 but compiling and/or running in an incompatible one.
17920 Warn about character code 256, too.
17922 2002-04-03 Paul Eggert <eggert@twinsun.com>
17924 * src/bison.data (YYSTACK_ALLOC): Depend on whether
17925 YYERROR_VERBOSE is nonzero, not whether it is defined.
17927 Merge changes from bison-1_29-branch.
17929 2002-03-20 Paul Eggert <eggert@twinsun.com>
17931 Merge fixes from Debian bison_1.34-1.diff.
17933 * configure.in (AC_PREREQ): 2.53.
17935 2002-03-20 Akim Demaille <akim@epita.fr>
17937 * src/conflicts.c (log_resolution): Argument `resolution' is const.
17939 2002-03-19 Paul Eggert <eggert@twinsun.com>
17941 * src/bison.simple (YYCOPY): New macro.
17942 (YYSTACK_RELOCATE): Use it.
17943 Remove Type arg; no longer needed. All callers changed.
17944 (yymemcpy): Remove; no longer needed.
17946 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
17947 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
17949 2002-03-19 Akim Demaille <akim@epita.fr>
17951 Test and fix the #line outputs.
17953 * tests/atlocal.at (GCC): New.
17954 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
17955 (Prologue synch line, %union synch line, Postprologue synch line)
17956 (Action synch line, Epilogue synch line): New tests.
17957 * src/reader.c (parse_union_decl): Define the muscle stype_line.
17958 * data/bison.simple, data/bison.c++: Use it.
17960 2002-03-19 Akim Demaille <akim@epita.fr>
17962 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
17963 (Solved SR Conflicts, %expect not enough, %expect right)
17964 (%expect too much): Move to...
17965 * tests/conflicts.at: this new file.
17967 2002-03-19 Akim Demaille <akim@epita.fr>
17969 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
17970 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
17971 that we can move to enums for instance.
17972 * src/output.c (token_definitions_output): Output a list of
17973 `token-name, token-number' instead of the #define.
17974 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
17976 2002-03-14 Akim Demaille <akim@epita.fr>
17978 Use Gettext 0.11.1.
17980 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
17982 * data/bison.c++: Make the user able to add members to the generated
17983 parser by subclassing.
17985 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
17987 * src/reader.c (read_additionnal_code): `c' should be an integer, not
17989 Reported by Nicolas Tisserand and Nicolas Burrus.
17991 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
17993 * src/reader.c: Warn about lacking semi-colons, do not complain.
17995 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
17997 * data/bison.c++: Remove a debug line.
17999 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
18001 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
18002 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
18003 provide a default implementation.
18005 2002-03-04 Akim Demaille <akim@epita.fr>
18007 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
18008 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
18009 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
18010 * tests/semantic.at (Parsing Guards): Similarly.
18011 * src/reader.at (readgram): Complain if the last rule is not ended
18014 2002-03-04 Akim Demaille <akim@epita.fr>
18016 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
18017 * src/closure.c: here.
18018 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
18020 * src/warshall.h, src/warshall.c: Remove.
18021 * tests/sets.at (Broken Closure): Adjust.
18023 2002-03-04 Akim Demaille <akim@epita.fr>
18025 * src/output.c (output_skeleton): tempdir is const.
18026 bytes_read is unused.
18028 2002-03-04 Akim Demaille <akim@epita.fr>
18030 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
18031 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
18033 From Michael Hayes.
18035 2002-03-04 Akim Demaille <akim@epita.fr>
18037 * src/closure.c (closure): `r' is unused.
18039 2002-03-04 Akim Demaille <akim@epita.fr>
18041 * tests/sets.at (Broken Closure): Add the ending `;'.
18042 * src/reader.at (readgram): Complain if a rule is not ended with a
18045 2002-03-04 Akim Demaille <akim@epita.fr>
18047 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
18048 (count_sr_conflicts): Use bitset_count.
18049 * src/reduce.c (inaccessable_symbols): Ditto.
18050 (bits_size): Remove.
18051 * src/warshall.h, src/warshall.c: Convert to bitsetv.
18053 2002-03-04 Akim Demaille <akim@epita.fr>
18055 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
18056 * src/reduce.c: Remove the `bitset_zero's following the
18057 `bitset_create's, as now it is performed by the latter.
18059 2002-03-04 Akim Demaille <akim@epita.fr>
18061 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
18062 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
18063 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
18064 latest sources from Michael.
18066 2002-03-04 Akim Demaille <akim@epita.fr>
18068 * src/output.c (output): Don't free the grammar.
18069 * src/reader.c (grammar_free): New.
18070 * src/main.c (main): Call it and don't free symtab here.
18072 2002-03-04 Akim Demaille <akim@epita.fr>
18074 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
18076 Reported by Benoit Perrot.
18078 2002-03-04 Akim Demaille <akim@epita.fr>
18080 Use bitset operations when possible, not loops over bits.
18082 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
18084 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
18085 * src/reduce.c (useless_nonterminals): Formatting changes.
18086 * src/warshall.c (TC): Use bitset_or.
18088 2002-03-04 Akim Demaille <akim@epita.fr>
18090 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
18091 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
18094 2002-03-04 Akim Demaille <akim@epita.fr>
18096 * src/lalr.c (F): Now a bitset*.
18097 Adjust all dependencies.
18099 2002-03-04 Akim Demaille <akim@epita.fr>
18101 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
18102 Adjust all dependencies.
18104 2002-03-04 Akim Demaille <akim@epita.fr>
18106 * src/L0.c, src/LR0.h (nstates): Be size_t.
18107 Adjust comparisons (signed vs unsigned).
18108 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
18110 Adjust all dependencies.
18112 2002-03-04 Akim Demaille <akim@epita.fr>
18114 * src/closure.c (firsts): Now, also a bitset.
18115 Adjust all dependencies.
18116 (varsetsize): Remove, now unused.
18117 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
18119 2002-03-04 Akim Demaille <akim@epita.fr>
18121 * src/print.c: Convert to use bitset.h, not hand coded iterations
18124 2002-03-04 Akim Demaille <akim@epita.fr>
18126 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
18128 2002-03-04 Akim Demaille <akim@epita.fr>
18130 * src/closure.c (ruleset): Be a bitset.
18131 (rulesetsize): Remove.
18133 2002-03-04 Akim Demaille <akim@epita.fr>
18135 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
18136 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
18137 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
18138 * src/closure.c (fderives): Be an array of bitsets.
18140 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
18142 * data/bison.c++: Merge the two generated headers. Insert a copyright
18143 notice in each output file.
18145 2002-02-28 Akim Demaille <akim@epita.fr>
18147 * data/bison.c++: Copy the prologue of bison.simple to fetch
18148 useful M4 definitions, such as b4_header_guard.
18150 2002-02-25 Akim Demaille <akim@epita.fr>
18152 * src/getargs.c (version): Give the name of the authors, and use a
18153 translator friendly scheme for the bgr
18156 2002-02-25 Akim Demaille <akim@epita.fr>
18158 * src/output.c (header_output): Remove, now handled completely via
18161 2002-02-25 Akim Demaille <akim@epita.fr>
18163 * m4/m4.m4: New, from CVS Autoconf.
18164 * configure.in: Invoke it.
18165 * src/output.c (output_skeleton): Use its result instead of the
18168 2002-02-25 Akim Demaille <akim@epita.fr>
18170 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
18172 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
18173 * src/output.c (output_skeleton): Use mkstemp to create a real
18175 Move the filling of `skeleton' and its muscle to...
18177 (output): Move the definition of the prologue muscle to...
18179 * src/system.h (DEFAULT_TMPDIR): New.
18181 2002-02-14 Paul Eggert <eggert@twinsun.com>
18183 Remove the support for C++ namespace cleanliness; it was
18184 causing more problems than it was curing, since it didn't work
18185 properly on some nonstandard C++ compilers. This can wait
18186 for a proper C++ parser.
18188 * NEWS: Document this.
18189 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
18190 of C++, as it's treated like C now.
18191 * src/bison.simple (YYSTD): Remove.
18192 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
18193 Treat C++ just like Standard C instead of trying to support
18194 namespace cleanliness.
18196 2002-02-14 Akim Demaille <akim@epita.fr>
18198 * tests/regression.at (else): Adjust to Andreas' change.
18200 2002-02-14 Akim Demaille <akim@epita.fr>
18202 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
18204 2002-02-13 Andreas Schwab <schwab@suse.de>
18206 * src/output.c (output_rule_data): Don't output NULL, it might
18207 not be defined yet.
18209 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
18211 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
18212 (Copyright notice): Update.
18214 2002-02-11 Akim Demaille <akim@epita.fr>
18216 * tests/regression.at (%nonassoc and eof): Don't include
18217 nonportable headers.
18219 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
18221 * data/bison.c++: Correct error recovery. Make the user able to
18222 initialize the starting location.
18224 2002-02-07 Akim Demaille <akim@epita.fr>
18226 * tests/input.at: New.
18228 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18230 * data/bison.c++: Replace some direct m4 expansions by constants. Be
18231 more consistent when naming methods and variables. Put preprocessor
18232 directives around tables only needed for debugging.
18234 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18236 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
18238 (yy::b4_name::parse): Use print_.
18240 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18242 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
18244 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
18246 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
18248 (yy::b4_name::parse): Build verbose error messages, and use error_.
18250 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
18252 * data/bison.c++: Fix m4 quoting in comments.
18254 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
18256 * data/bison.c++: Adjust the parser code. Fix some muscles that were
18257 not expanded by m4.
18259 2002-02-05 Akim Demaille <akim@epita.fr>
18261 * data/bison.c++: Adjust to the M4 back end.
18262 More is certainly needed.
18264 2002-02-05 Akim Demaille <akim@epita.fr>
18266 Give a try to M4 as a back end.
18268 * lib/readpipe.c: New, from wdiff.
18269 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
18271 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
18272 specific values. Now it is m4 that performs the lookup.
18273 * src/parse-skel.y: Remove.
18274 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
18275 * src/output.c (actions_output, guards_output)
18276 (token_definitions_output): No longer keeps track of the output
18277 line number, hence remove the second argument.
18278 (guards_output): Check against the guard member of a rule, not the
18281 (output_skeleton): Don't look for the skeleton location, let m4 do
18283 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
18285 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
18286 (prepare): Given that for the time being changesyntax is not
18287 usable in M4, rename the muscles using `-' to `_'.
18288 Define `defines_flag', `output_parser_name' and `output_header_name'.
18289 * src/output.h (actions_output, guards_output)
18290 (token_definitions_output): Adjust prototypes.
18291 * src/scan-skel.l: Instead of scanning the skeletons, it now
18292 processes the output of m4: `__oline__' and `#output'.
18293 * data/bison.simple: Adjust to be used by M4(sugar).
18294 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
18296 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
18297 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
18298 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
18299 shamelessly stolen from CVS Autoconf.
18301 2002-02-05 Akim Demaille <akim@epita.fr>
18303 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
18304 * configure.in: Check for the declarations of free and malloc.
18305 * src/muscle_tab.c: Adjust.
18307 2002-02-05 Akim Demaille <akim@epita.fr>
18309 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
18310 which have no values.
18312 2002-02-05 Akim Demaille <akim@epita.fr>
18314 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
18317 2002-01-29 Paul Eggert <eggert@twinsun.com>
18319 * src/bison.simple (YYSIZE_T): Do not define merely because
18320 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
18321 On some platforms, <alloca.h> does not declare YYSTD (size_t).
18323 2002-01-27 Akim Demaille <akim@epita.fr>
18325 Fix `%nonassoc and eof'.
18327 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
18328 which were not properly copied! Replace
18329 memcpy (res->errs, src->errs, src->nerrs);
18331 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
18333 * tests/regression.at (%nonassoc and eof): Adjust to newest
18334 Autotest: `.' is not in the PATH.
18336 2002-01-27 Akim Demaille <akim@epita.fr>
18338 * tests/sets.at (AT_EXTRACT_SETS): New.
18339 (Nullable): Use it.
18342 2002-01-26 Akim Demaille <akim@epita.fr>
18344 * tests/actions.at, tests/calc.at, tests/headers.at,
18345 * tests/torture.at: Adjust to the newest Autotest which no longer
18346 forces `.' in the PATH.
18348 2002-01-25 Akim Demaille <akim@epita.fr>
18350 * tests/regression.at (%nonassoc and eof): New.
18351 Suggested by Robert Anisko.
18353 2002-01-24 Akim Demaille <akim@epita.fr>
18355 Bison dumps core when trying to complain about broken input files.
18356 Reported by Cris van Pelt.
18358 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
18359 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
18361 (Invalid inputs): Strengthen: exercise parse_percent_token.
18363 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
18365 * src/Makefile.am: Add bison.c++.
18366 * src/bison.c++: New skeleton.
18368 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
18372 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
18374 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
18376 2002-01-20 Marc Autret <marc@gnu.org>
18378 * src/files.c (compute_output_file_names): Fix
18380 2002-01-20 Marc Autret <marc@gnu.org>
18382 * tests/output.at: New test.
18383 * src/files.c (compute_base_names): Don't map extensions when
18384 the YACC flag is set, use defaults.
18385 Reported by Evgeny Stambulchik.
18387 2002-01-20 Marc Autret <marc@gnu.org>
18389 * src/system.h: Need to define __attribute__ away for non-GCC
18390 compilers as well (i.e., the vendor C compiler).
18391 Suggested by Albert Chin-A-Young.
18393 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
18395 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
18396 canonical definition.
18397 * src/system.h: Use the canonical definition for PARAMS (avoids
18398 a conflict with the macro from lib/hash.h).
18400 2002-01-11 Akim Demaille <akim@epita.fr>
18402 * configure.in: Use AC_FUNC_STRNLEN.
18403 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
18405 2002-01-09 Akim Demaille <akim@epita.fr>
18407 * src/files.c, src/files.h (output_infix): New.
18408 (tab_extension): Remove.
18409 (compute_base_names): Compute the former, drop the latter.
18410 * src/output.c (prepare): Insert the muscles `output-infix', and
18412 * src/parse-skel.y (string, string.1): New.
18413 (section.header): Use it.
18414 (section.yacc): Remove.
18415 (prefix): Remove too.
18416 * src/scan-skel.l: Adjust.
18417 * src/bison.simple, src/bison.hairy: Adjust.
18419 2002-01-09 Akim Demaille <akim@epita.fr>
18421 * configure.in (WERROR_CFLAGS): Compute it.
18422 * src/Makefile.am (CFLAGS): Pass it.
18423 * tests/atlocal.in (CFLAGS): Idem.
18424 * src/files.c: Fix a few warnings.
18425 (get_extension_index): Remove, unused.
18427 2002-01-08 Akim Demaille <akim@epita.fr>
18429 * src/getargs.c (AS_FILE_NAME): New.
18430 (getargs): Use it to convert DOSish file names.
18431 * src/files.c (base_name): Rename as full_base_name to avoid
18432 clashes with `base_name ()'.
18433 (filename_split): New.
18434 (compute_base_names): N-th rewrite, using filename_split.
18436 2002-01-08 Akim Demaille <akim@epita.fr>
18438 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
18439 New, stolen from the Fileutils 4.1.
18440 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
18441 * configure.in: Check for the presence of memrchr, and of its
18444 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
18446 * lib/hash.h (__P): Added definition for this macro.
18447 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
18448 BUILT_SOURCES, to ensure they are generated first.
18449 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
18450 %error-verbose to allow bootstrapping with bison 1.30x.
18452 2002-01-06 Akim Demaille <akim@epita.fr>
18454 * src/reader.c (parse_braces): Don't fetch the next char, the
18455 convention is to fetch on entry.
18456 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
18457 'switch' without a following semicolon.
18458 * tests/regression.at (braces parsing): New.
18460 2002-01-06 Akim Demaille <akim@epita.fr>
18462 Bison is dead wrong in its RR conflict reports.
18464 * tests/torture.at (GNU Cim Grammar): New.
18465 * src/conflicts.c (count_rr_conflicts): Fix.
18467 2002-01-06 Akim Demaille <akim@epita.fr>
18469 Creating package.m4 from configure.ac causes too many problems.
18471 * tests/Makefile.am (package.m4): Create it by hand,
18472 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
18474 2002-01-06 Akim Demaille <akim@epita.fr>
18476 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
18479 2002-01-04 Paul Eggert <eggert@twinsun.com>
18481 * doc/bison.texinfo (Debugging):
18482 Remove YYSTDERR; it's no longer defined or used.
18483 Also, s/cstdio.h/cstdio/.
18485 2002-01-03 Akim Demaille <akim@epita.fr>
18487 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
18489 2002-01-03 Akim Demaille <akim@epita.fr>
18491 * src/parse-skel.y (process_skeleton): Don't bind the parser's
18492 tracing code to --trace, wait for a better --trace option, with
18495 2002-01-03 Akim Demaille <akim@epita.fr>
18497 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
18498 The ISO C++ standard is extremely clear about it: stderr is
18499 considered a macro, not a regular symbol (see table 94 `Header
18500 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
18501 Therefore std:: does not apply to it. It still does with fprintf.
18502 Also, s/cstdio.h/cstdio/.
18504 2002-01-03 Akim Demaille <akim@epita.fr>
18506 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
18507 for non system headers.
18509 2002-01-02 Akim Demaille <akim@epita.fr>
18511 Equip the skeleton chain with location tracking, runtime trace,
18512 pure parser and scanner.
18514 * src/parse-skel.y: Request a pure parser, locations, and prefix
18516 (%union): Having several members with the same type does not help
18517 type mismatches, simplify.
18518 (YYPRINT, yyprint): New.
18519 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
18520 (skel_error): this.
18522 * src/scan-skel.l: Adjust to these changes.
18523 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
18524 (LOCATION_PRINT, skel_control_t): New.
18526 2001-12-30 Akim Demaille <akim@epita.fr>
18528 * src/parse-skel.y: Get rid of the shift/reduce conflict:
18529 replace `gb' with BLANKS.
18530 * src/scan-skel.l: Adjust.
18532 2001-12-30 Akim Demaille <akim@epita.fr>
18534 * src/system.h: We don't need nor want bcopy.
18535 Throw away MS-DOS crap: we don't need getpid.
18536 * configure.in: We don't need strndup. It was even causing
18537 problems: because Flex includes the headers *before* us,
18538 _GNU_SOURCE is not defined by config.h, and therefore strndup was
18540 * lib/xstrndup.c: New.
18541 * src/scan-skel.l: Use it.
18542 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
18543 * src/parse-skel.y: Use %directives instead of #defines.
18545 2001-12-30 Akim Demaille <akim@epita.fr>
18547 * src/skeleton.h: New.
18548 * src/output.c (output_parser, output_master_parser): Remove, dead
18550 * src/output.h (get_lines_number, actions_output, guards_output)
18551 (token_definitions_output): Prototype them.
18552 * src/parse-skel.y: Add the license notice.
18553 Include output.h and skeleton.h.
18554 (process_skeleton): Returns void, and takes a single parameter.
18555 * src/scan-skel.l: Add the license notice.
18556 Include skeleton.h.
18557 Don't use %option yylineno: it seems that then Flex imagines
18558 REJECT has been used, and therefore it won't reallocate its
18559 buffers (which makes no other sense to me than a bug). It results
18560 in warnings for `unused: yy_flex_realloc'.
18562 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
18564 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
18565 (MUSCLE_INSERT_PREFIX): ...to there.
18566 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
18567 (MUSCLE_INSERT_PREFIX): Move from here...
18569 * src/bison.hairy: Add a section directive. Put braces around muscle
18570 names. This parser skeleton is still broken, but Bison should not
18571 choke on a bad muscle 'syntax'.
18572 * src/bison.simple: Add a section directive. Put braces around muscle
18575 * src/files.h (strsuffix, stringappend): Add declarations.
18576 (tab_extension): Add declaration.
18577 (short_base_name): Add declaration.
18579 * src/files.c (strsuffix, stringappend): No longer static. These
18580 functions are used in the skeleton parser.
18581 (tab_extension): New.
18582 (compute_base_names): Use the computations done in this function
18583 to guess if the generated parsers should have '.tab' in their
18585 (short_base_name): No longer static.
18587 * src/output.c (output_skeleton): New.
18588 (output): Disable call to output_master_parser, and give a try to
18589 a new skeleton handling system.
18590 (guards_output, actions_output): No longer static.
18591 (token_definitions_output, get_lines_number): No longer static.
18593 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
18595 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
18598 * src/parse-skel.y: New file.
18599 * src/scan-skel.l: New file.
18601 2001-12-29 Akim Demaille <akim@epita.fr>
18603 %name-prefix is broken.
18605 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
18606 Adjust all dependencies.
18607 * tests/headers.at (export YYLTYPE): Strengthen this test: use
18610 Renaming yylval but not yylloc is not consistent. Now we do.
18612 * src/bison.simple: Prefix yylloc if used.
18613 * doc/bison.texinfo (Decl Summary): Document that.
18615 2001-12-29 Akim Demaille <akim@epita.fr>
18617 * doc/bison.texinfo: Promote `%long-directive' over
18619 Remove all references to fixed-output-files, yacc is enough.
18621 2001-12-29 Akim Demaille <akim@epita.fr>
18623 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
18624 user prologue. These are defaults.
18625 * tests/actions.at (Mid-rule actions): Make sure the user can
18626 define YYDEBUG and YYERROR_VERBOSE.
18628 2001-12-29 Akim Demaille <akim@epita.fr>
18630 * src/output.c (header_output): Don't forget to export YYLTYPE and
18632 * tests/headers.at (export YYLTYPE): New, make sure it does.
18633 * tests/regression.at (%union and --defines, Invalid CPP headers):
18635 * tests/headers.at: here.
18637 2001-12-29 Akim Demaille <akim@epita.fr>
18639 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
18641 2001-12-29 Akim Demaille <akim@epita.fr>
18643 * tests/actions.at (Mid-rule actions): Output on a single line
18644 instead of several.
18646 2001-12-29 Akim Demaille <akim@epita.fr>
18648 * doc/bison.texinfo: Formatting changes.
18650 2001-12-29 Akim Demaille <akim@epita.fr>
18652 Don't store the token defs in a muscle, just be ready to output it
18653 on command. Now possible via `symbols'. Fixes a memory leak.
18655 * src/output.c (token_definitions_output): New.
18656 (output_parser, header_output): Use it.
18657 * src/reader.c (symbols_save): Remove.
18659 2001-12-29 Akim Demaille <akim@epita.fr>
18661 * src/bison.simple: Do not provide a default for YYSTYPE and
18662 YYLTYPE before the user's prologue. Otherwise it's hardly... a
18665 2001-12-29 Akim Demaille <akim@epita.fr>
18667 Mid-rule actions are simply... ignored!
18669 * src/reader.c (readgram): Be sure to attach mid-rule actions to
18670 the empty-rule associated to the dummy symbol, not to the host
18672 * tests/actions.at (Mid-rule actions): New.
18674 2001-12-29 Akim Demaille <akim@epita.fr>
18678 * src/reader.c (reader): Free grammar.
18680 2001-12-29 Akim Demaille <akim@epita.fr>
18684 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
18685 since it allocates it for each state, although only one is needed.
18686 (allocate_storage): Do it here.
18688 2001-12-29 Akim Demaille <akim@epita.fr>
18690 * src/options.h, src/options.c (create_long_option_table): Rename
18692 (long_option_table_new): this, with a clearer prototype.
18693 (percent_table): Remove, unused,
18694 * src/getargs.c (getargs): Adjust.
18696 2001-12-29 Akim Demaille <akim@epita.fr>
18698 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
18699 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
18702 2001-12-29 Akim Demaille <akim@epita.fr>
18704 * src/lalr.c (build_relations): Rename `states' as `states1'.
18705 Sorry, I don't understand exactly what it is, no better name...
18707 2001-12-29 Akim Demaille <akim@epita.fr>
18709 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
18710 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
18711 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
18714 2001-12-29 Akim Demaille <akim@epita.fr>
18716 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
18719 2001-12-29 Akim Demaille <akim@epita.fr>
18721 * src/reader.c, src/reader.h (user_toknums): Remove.
18722 Adjust all users to use symbols[i]->user_token_number.
18724 2001-12-29 Akim Demaille <akim@epita.fr>
18726 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
18727 Adjust all users to use symbols[i]->prec or ->assoc.
18729 2001-12-29 Akim Demaille <akim@epita.fr>
18731 * src/reader.c, src/reader.h (tags): Remove.
18732 Adjust all users to use symbols[i]->tag.
18734 2001-12-29 Akim Demaille <akim@epita.fr>
18736 * src/gram.h, src/gram.c (symbols): New, similar to state_table
18738 * src/reader.c (packsymbols): Fill this table.
18740 * src/conflicts.c (resolve_sr_conflict): Adjust.
18741 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
18743 Use symbols[i]->tag instead of tags[i].
18745 2001-12-29 Akim Demaille <akim@epita.fr>
18747 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
18748 In addition, put a comment in there, to replace...
18749 * tests/regression.at (%union and C comments): Remove.
18751 2001-12-29 Akim Demaille <akim@epita.fr>
18753 * tests/regression.at (Web2c Actions): Blindly move the actual
18754 output as expected output. The contents *seem* right to me, but I
18755 can't pretend reading perfectly parser tables... Nonetheless, all
18756 the other tests pass correctly, the table look OK, even though the
18757 presence of `$axiom' is to be noted: AFAICS it is useless (but
18760 2001-12-29 Akim Demaille <akim@epita.fr>
18762 * src/reader.c (readgram): Don't add the rule 0 if there were no
18763 rules read. In other words, add it _after_ having performed
18764 grammar sanity checks.
18765 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
18767 2001-12-29 Akim Demaille <akim@epita.fr>
18769 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
18770 visible, and some states have now a different number.
18772 2001-12-29 Akim Demaille <akim@epita.fr>
18774 * src/reader.c (readgram): Bind the initial rule's lineno to that
18776 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
18777 (Solved SR Conflicts): Adjust rule 0's line number.
18779 2001-12-29 Akim Demaille <akim@epita.fr>
18781 Fix the `GAWK Grammar' failure.
18783 * src/LR0.c (final_state): Initialize to -1 so that we do compute
18784 the reductions of the first state which was mistakenly confused
18785 with the final state because precisely final_state was initialized
18787 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
18788 now noticed by Bison.
18789 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
18790 have a reduction on $default.
18792 2001-12-29 Akim Demaille <akim@epita.fr>
18794 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
18796 * src/closure.c (print_closure): Likewise.
18797 * src/derives.c (print_derives): Likewise.
18798 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
18801 2001-12-29 Akim Demaille <akim@epita.fr>
18803 * src/lalr.c (lookaheads_print): New.
18804 (lalr): Call it when --trace-flag.
18805 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
18808 2001-12-29 Akim Demaille <akim@epita.fr>
18810 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
18811 when walking through ritem, even via rule->rhs.
18812 * src/reduce.c (dump_grammar, useful_production, reduce_output)
18813 (useful_production, useless_nonterminals): Likewise.
18814 (reduce_grammar_tables): Likewise, plus update nritems.
18815 * src/nullable.c (set_nullable): Likewise.
18816 * src/lalr.c (build_relations): Likewise.
18817 * tests/sets.at (Nullable): Adjust.
18818 Fortunately, now, the $axiom is no longer nullable.
18820 2001-12-29 Akim Demaille <akim@epita.fr>
18822 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
18824 * src/gram.c (ritem_longest_rhs): Likewise.
18825 * src/reduce.c (nonterminals_reduce): Likewise.
18826 * src/print_graph.c (print_graph): Likewise.
18827 * src/output.c (output_rule_data): Likewise.
18828 * src/nullable.c (set_nullable): Likewise.
18830 2001-12-29 Akim Demaille <akim@epita.fr>
18832 * src/output.c: Comment changes.
18834 2001-12-27 Paul Eggert <eggert@twinsun.com>
18836 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
18837 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
18838 Sparc, as they were causing more porting problems than the
18839 (minor) performance improvement was worth.
18841 Also, catch up with 1.31's YYSTD.
18843 2001-12-27 Akim Demaille <akim@epita.fr>
18845 * src/output.c (output_gram): Rely on nritems, not the
18846 0-sentinel. See below.
18847 Use -1 as separator, not 0.
18848 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
18849 Rely on -1 as separator in yyrhs, instead of 0.
18850 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
18851 twice `Now at end of input', therefore there are two lines less to
18854 2001-12-27 Akim Demaille <akim@epita.fr>
18856 * tests/regression.at (Unresolved SR Conflicts):
18857 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
18860 2001-12-27 Akim Demaille <akim@epita.fr>
18862 * src/LR0.c (new_state): Recognize the final state by the fact it
18863 is reached by eoftoken.
18864 (insert_start_shifting_state, insert_eof_shifting_state)
18865 (insert_accepting_state, augment_automaton): Remove, since now
18866 these states are automatically computed from the initial state.
18867 (generate_states): Adjust.
18868 * src/print.c: When reporting a rule number to the user, substract
18869 1, so that the axiom rule is rule 0, and the first user rule is 1.
18870 * src/reduce.c: Likewise.
18871 * src/print_graph.c (print_core): For the time being, just as for
18872 the report, depend upon --trace-flags to dump the full set of
18874 * src/reader.c (readgram): Once the grammar read, insert the rule
18875 0: `$axiom: START-SYMBOL $'.
18876 * tests/set.at: Adjust: rule 0 is now displayed, and since the
18877 number of the states has changed (the final state is no longer
18878 necessarily the last), catch up.
18880 2001-12-27 Akim Demaille <akim@epita.fr>
18882 Try to make the use of the eoftoken valid. Given that its value
18883 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
18884 is used instead of > 0 where appropriate, (ii), depend upon nritems
18885 instead of the 0-sentinel.
18887 * src/gram.h, src/gram.c (nritems): New.
18888 Expected to be duplication of nitems, but for the time being...
18889 * src/reader.c (packgram): Assert nritems and nitems are equal.
18890 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
18891 * src/closure.c (print_closure, print_fderives): Likewise.
18892 * src/gram.c (ritem_print): Likewise.
18893 * src/print.c (print_core, print_grammar): Likewise.
18894 * src/print_graph.c: Likewise.
18896 2001-12-27 Akim Demaille <akim@epita.fr>
18898 * src/main.c (main): If there are complains after grammar
18899 reductions, then output the report anyway if requested, then die.
18900 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
18901 * src/reader.c (eoftoken): New.
18902 (parse_token_decl): If the token being defined has value `0', it
18904 (packsymbols): No longer hack `tags' to insert `$' by hand.
18905 Be sure to preserve the value of the eoftoken.
18906 (reader): Make sure eoftoken is defined.
18907 Initialize nsyms to 0: now eoftoken is created just like the others.
18908 * src/print.c (print_grammar): Don't special case the eof token.
18909 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
18910 lie anyway, albeit pleasant.
18911 * tests/calc.at: Exercise error messages with eoftoken.
18912 Change the grammar so that empty input is invalid.
18913 Adjust expectations.
18914 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
18916 2001-12-27 Akim Demaille <akim@epita.fr>
18918 * configure.in: Check the protos of strchr ans strspn.
18919 Replace strchr if needed.
18920 * src/system.h: Provide the protos of strchr, strspn and memchr if
18922 * lib/strchr.c: New.
18923 * src/reader.c (symbols_save): Use strchr.
18925 2001-12-27 Akim Demaille <akim@epita.fr>
18927 * src/print.c, src/print_graph.c (escape): New.
18928 Use it to quote the TAGS outputs.
18929 * src/print_graph.c (print_state): Now errors are in red, and
18930 reductions in green.
18931 Prefer high to wide: output the state number on a line of its own.
18933 2001-12-27 Akim Demaille <akim@epita.fr>
18935 * src/state.h, src/state.c (reductions_new): New.
18936 * src/LR0.c (set_state_table): Let all the states have a
18937 `reductions', even if reduced to 0.
18938 (save_reductions): Adjust.
18939 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
18940 * src/print.c (print_reductions, print_actions): Adjust.
18941 * src/output.c (action_row): Adjust.
18943 2001-12-27 Akim Demaille <akim@epita.fr>
18945 * src/state.h, src/state.c (errs_new, errs_dup): New.
18946 * src/LR0.c (set_state_table): Let all the states have an errs,
18947 even if reduced to 0.
18948 * src/print.c (print_errs, print_reductions): Adjust.
18949 * src/output.c (output_actions, action_row): Adjust.
18950 * src/conflicts.c (resolve_sr_conflict): Adjust.
18952 2001-12-27 Akim Demaille <akim@epita.fr>
18954 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
18956 2001-12-27 Akim Demaille <akim@epita.fr>
18958 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
18959 * src/print.c: here.
18960 (lookaheadset, shiftset): New, used as additional storage by
18962 (print_results): Adjust.
18963 (print_shifts, print_gotos, print_errs): New, extracted from...
18964 (print_actions): here.
18965 * src/print_graph.c (print_actions): Remove dead code.
18967 2001-12-27 Akim Demaille <akim@epita.fr>
18969 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
18972 2001-12-27 Akim Demaille <akim@epita.fr>
18974 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
18975 (build_relations): Adjust.
18977 2001-12-27 Akim Demaille <akim@epita.fr>
18979 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
18982 2001-12-27 Akim Demaille <akim@epita.fr>
18984 * src/reader.c (packgram): Catch nitems overflows.
18986 2001-12-27 Akim Demaille <akim@epita.fr>
18988 * src/files.c, src/files.h (guard_obstack): Remove.
18989 * src/output.c (output): Adjust.
18990 * src/reader.c (parse_braces): New, factoring...
18991 (copy_action, copy_guard): these two which are renamed as...
18992 (parse_action, parse_guard): these.
18993 As a voluntary consequence, using braces around guards is now
18996 2001-12-27 Akim Demaille <akim@epita.fr>
18998 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
18999 * src/reader.c (symbol_list): `guard' and `guard_line' are new
19001 (symbol_list_new): Adjust.
19002 (copy_action): action_line is the first line, not the last.
19003 (copy_guard): Just as for actions, store the `action' only, not
19004 the switch/case/break flesh.
19005 Don't parse the user action that might follow the guard, let...
19006 (readgram): do it, i.e., now, there can be an action after a
19008 In other words the guard is just explicitly optional.
19009 (packgram): Adjust.
19010 * src/output.c (guards_output): New.
19011 (output_parser): Call it when needed.
19012 (output): Also free the guard and attrs obstacks.
19013 * src/files.c, src/files.h (obstack_save): Remove.
19014 (output_files): Remove.
19015 As a result, if one needs the former `.act' file, using an
19016 appropriate skeleton which requires actions and guards is now
19018 * src/main.c (main): Adjust.
19019 * tests/semantic.at: New.
19020 * tests/regression.at: Use `input.y' as input file name.
19021 Avoid 8+3 problems by requiring input.c when the test needs the
19024 2001-12-27 Akim Demaille <akim@epita.fr>
19026 * src/reader.c (symbol_list_new): Be sure to initialize all the
19029 2001-12-27 Akim Demaille <akim@epita.fr>
19031 All the hacks using a final pseudo state are now useless.
19033 * src/LR0.c (set_state_table): state_table holds exactly nstates.
19034 * src/lalr.c (nLA): New.
19035 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
19036 instead of lookaheadsp from the pseudo state (nstate + 1).
19038 2001-12-27 Akim Demaille <akim@epita.fr>
19040 * src/output.c (action_row, token_actions): Use a state_t instead
19041 of a integer, and nlookaheads instead of the following state's
19044 2001-12-27 Akim Demaille <akim@epita.fr>
19046 * src/conflicts.c (log_resolution, flush_shift)
19047 (resolve_sr_conflict, set_conflicts, solve_conflicts)
19048 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
19049 (conflicts_print, print_reductions): Use a state_t instead of an
19050 integer when referring to a state.
19051 As much as possible, depend upon nlookaheads, instead of the
19052 `lookaheadsp' member of the following state (since lookaheads of
19053 successive states are successive, the difference between state n + 1
19054 and n served as the number of lookaheads for state n).
19055 * src/lalr.c (add_lookback_edge): Likewise.
19056 * src/print.c (print_core, print_actions, print_state)
19057 (print_results): Likewise.
19058 * src/print_graph.c (print_core, print_actions, print_state)
19059 (print_graph): Likewise.
19060 * src/conflicts.h: Adjust.
19062 2001-12-27 Akim Demaille <akim@epita.fr>
19064 * src/bison.hairy: Formatting/comment changes.
19066 Remove `register' indications.
19067 Add plenty of `static'.
19069 2001-12-27 Akim Demaille <akim@epita.fr>
19071 * src/output.c (prepare): Drop the muscle `ntbase' which
19072 duplicates ntokens.
19073 * src/bison.simple: Formatting/comment changes.
19074 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
19075 is an undocumented synonym.
19077 2001-12-22 Akim Demaille <akim@epita.fr>
19079 * src/output.c (output_table_data): Change the prototype to use
19080 `int' for array ranges: some invocations do pass an int, not a
19082 Reported by Wayne Green.
19084 2001-12-22 Akim Demaille <akim@epita.fr>
19086 Some actions of web2c.y are improperly triggered.
19087 Reported by Mike Castle.
19089 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
19090 * tests/regression.at (Web2c): Rename as...
19091 (Web2c Report): this.
19092 (Web2c Actions): New.
19094 2001-12-22 Akim Demaille <akim@epita.fr>
19096 Reductions in web2c.y are improperly reported.
19097 Reported by Mike Castle.
19099 * src/conflicts.c (print_reductions): Fix.
19100 * tests/regression.at (Web2c): New.
19102 2001-12-18 Akim Demaille <akim@epita.fr>
19104 Some host fail on `assert (!"foo")', which expands to
19105 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
19106 Reported by Nelson Beebee.
19108 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
19109 `#define it_succeeded 0' and `assert (it_succeeded)'.
19111 2001-12-17 Marc Autret <autret_m@epita.fr>
19113 * src/bison.simple: Don't hard code the skeleton line and filename.
19114 * src/output.c (output_parser): Rename 'line' as 'output_line'.
19115 New line counter 'skeleton_line' (skeleton-line muscle).
19117 2001-12-17 Paul Eggert <eggert@twinsun.com>
19119 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
19120 YYDEBUG must be defined to a nonzero value.
19122 * src/bison.simple (yytname): Do not assume that the user defines
19123 YYDEBUG to a properly parenthesized expression.
19125 2001-12-17 Akim Demaille <akim@epita.fr>
19127 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
19128 nlookaheads is a new member.
19130 * src/lalr.h (nlookaheads): Remove this orphan declaration.
19131 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
19134 2001-12-17 Akim Demaille <akim@epita.fr>
19136 * src/files.h, src/files.c (open_files, close_files): Remove.
19137 * src/main.c (main): Don't open/close files, nor invoke lex_free,
19139 * src/reader.c (reader): Do it.
19141 2001-12-17 Akim Demaille <akim@epita.fr>
19143 * src/conflicts.c (print_reductions): Formatting changes.
19145 2001-12-17 Akim Demaille <akim@epita.fr>
19147 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
19148 (flush_reduce): New.
19149 (resolve_sr_conflict): Adjust.
19151 2001-12-17 Akim Demaille <akim@epita.fr>
19153 * src/output.c (output_obstack): Be static and rename as...
19154 (format_obstack): this, to avoid any confusion with files.c's
19156 * src/reader.h (muscle_obstack): Move to...
19157 * src/output.h: here, since it's defined in output.c.
19159 2001-12-17 Akim Demaille <akim@epita.fr>
19161 * src/output.c (action_row, save_column, default_goto)
19162 (sort_actions, matching_state, pack_vector): Better variable
19165 2001-12-17 Akim Demaille <akim@epita.fr>
19167 * src/output.c: Various formatting changes.
19169 2001-12-17 Akim Demaille <akim@epita.fr>
19171 * src/files.c (output_files): Free the output_obstack.
19172 * src/main.c (main): Call print and print_graph conditionally.
19173 * src/print.c (print): Work unconditionally.
19174 * src/print_graph.c (print_graph): Work unconditionally.
19175 * src/conflicts.c (log_resolution): Output only if verbose_flag.
19177 2001-12-16 Marc Autret <autret_m@epita.fr>
19179 * src/output.c (actions_output): Fix. When we use %no-lines,
19180 there is one less line per action.
19182 2001-12-16 Marc Autret <autret_m@epita.fr>
19184 * src/bison.simple: Remove a useless #line directive.
19185 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
19186 * src/output.c (get_lines_number): New.
19187 (output_parser): Adjust, now takes care about the lines of a
19189 Fix line numbering.
19190 (actions_output): Computes the number of lines taken by actions.
19191 (output_master_parser): Insert new skeleton which is the name of
19192 the output parser file name.
19194 2001-12-15 Marc Autret <autret_m@epita.fr>
19196 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
19198 2001-12-15 Marc Autret <autret_m@epita.fr>
19200 * src/output.c (output_gram): Keep track of the hairy one.
19202 2001-12-15 Akim Demaille <akim@epita.fr>
19204 Make `make distcheck' work.
19206 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
19207 system.h which uses libgettext.h.
19209 2001-12-15 Akim Demaille <akim@epita.fr>
19211 * src/nullable.c (set_nullable): Useless rules must be skipped,
19212 otherwise, since we range over their symbols, we might look at a
19213 nonterminal which no longer ``exists'', i.e., it is not counted in
19214 `nvars', hence we overflow our arrays.
19216 2001-12-15 Akim Demaille <akim@epita.fr>
19218 The header can also be produced directly, without any obstack!
19221 * src/files.c, src/files.h (defines_obstack): Remove.
19222 (compute_header_macro): Global.
19223 (defines_obstack_save): Remove.
19224 * src/reader.c (parse_union_decl): No longer output to
19225 defines_obstack: its content can be found in the `stype' muscle
19227 (output_token_translations): Merge into...
19228 (symbols_output): this.
19230 (symbols_save): this.
19232 * src/output.c (header_output): New.
19235 2001-12-15 Akim Demaille <akim@epita.fr>
19237 * src/reader.c (parse_union_decl): Instead of handling two obstack
19238 simultaneously, use one to define the `stype' muscle, and use the
19239 value of the latter to fill defines_obstack.
19240 (copy_comment): Remove.
19241 (copy_comment2): Work for a single obstack.
19243 (copy_comment): this.
19245 2001-12-15 Akim Demaille <akim@epita.fr>
19247 * src/lex.c, src/lex.h (xgetc): No longer static.
19248 * src/reader.c (parse_union_decl): Revamp.
19250 2001-12-15 Akim Demaille <akim@epita.fr>
19252 Still making progress in separating Bison into (i) input, (ii)
19253 process, (iii) output: now we can directly output the parser file
19254 without using table_obstack at all.
19256 * src/files.c, src/files.h (table_obstack): Bye bye.
19257 (parser_file_name): New.
19258 * src/files.c (compute_output_file_names): Compute it.
19259 * src/output.c (actions_output, output_parser)
19260 (output_master_parser): To a file instead of an obstack.
19262 2001-12-15 Akim Demaille <akim@epita.fr>
19264 Attach actions to rules, instead of pre-outputting them to
19267 * src/gram.h (rule_t): action and action_line are new members.
19268 * src/reader.c (symbol_list): Likewise.
19269 (copy_action): Save the actions within the rule.
19270 (packgram): Save them in rule_table.
19271 * src/output.c (actions_output): New.
19272 (output_parser): Use it on `%%actions'.
19273 (output_rule_data): Don't free rule_table.
19275 (prepare): Don't save the `action' muscle.
19276 * src/bison.simple: s/%%action/%%actions/.
19278 2001-12-15 Akim Demaille <akim@epita.fr>
19280 * src/reader.c (copy_action): When --yacc, don't append a `;'
19281 to the user action: let it fail if lacking.
19282 Suggested by Arnold Robbins and Tom Tromey.
19284 2001-12-14 Akim Demaille <akim@epita.fr>
19286 * src/lex.c (literalchar): Simply return the char you decoded, non
19287 longer mess around with obstacks and int pointers.
19288 Adjust all callers.
19290 2001-12-14 Akim Demaille <akim@epita.fr>
19292 * src/lex.c (literalchar): Don't escape the special characters,
19293 just decode them, and keep them as char (before, eol was output as
19294 the 2 char string `\n' etc.).
19295 * src/output.c (output_rule_data): Use quotearg to output the
19298 2001-12-13 Paul Eggert <eggert@twinsun.com>
19300 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
19301 Do not infringe on the global user namespace when using C++.
19302 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
19303 All uses of `fprintf' and `stderr' changed.
19305 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
19307 2001-12-13 Akim Demaille <akim@epita.fr>
19309 The computation of nullable is broken: it doesn't handle empty
19312 * tests/torture.at (GNU AWK Grammar): New.
19313 * tests/sets.at (Nullable): New.
19314 * src/nullable.c (set_nullable): Instead of blindly looping over
19315 `ritems', loop over the rules, and then over their rhs's.
19317 Work around Autotest bugs.
19319 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
19320 frame, because Autotest understand lines starting with a `+' as
19321 traces from the shell. Then, they are not processed properly.
19322 Admittedly an Autotest bug, but we don't have time to wait for
19323 Autotest to catch up.
19324 * tests/regression.at (Broken Closure): Adjust to the new table
19327 * tests/sets.at: here.
19329 2001-12-13 Akim Demaille <akim@epita.fr>
19331 * src/closure.c (closure): Use nrules instead of playing tricks
19332 with BITS_PER_WORD.
19334 2001-12-13 Akim Demaille <akim@epita.fr>
19336 * src/print.c (print_actions): Output the handling of `$' as the
19337 traces do: shifting the token EOF. Before EOF was treated as a
19339 * tests/regression.at: Adjust some tests.
19340 * src/print_graph.c (print_core): Complete the set of items via
19341 closure. The next-to-final and final states are still unsatisfying,
19342 but that's to be addressed elsewhere.
19343 No longer output the rule numbers, but do output the state number.
19344 A single loop for the shifts + gotos is enough, but picked a
19345 distinct color for each.
19346 (print_graph): Initialize and finalize closure.
19348 2001-12-13 Akim Demaille <akim@epita.fr>
19350 * src/reader.c (readgram): Remove dead code, an strip useless
19352 (get_type): Remove, unused.
19354 2001-12-12 Akim Demaille <akim@epita.fr>
19356 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
19357 on that of lib/error.c.
19359 2001-12-12 Akim Demaille <akim@epita.fr>
19361 Some hosts don't like `/' in includes.
19363 * src/system.h: Include libgettext.h without qualifying the path.
19364 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
19367 2001-12-11 Marc Autret <autret_m@epita.fr>
19369 * src/output.c (output_parser): Remove useless muscle.
19371 2001-12-11 Marc Autret <autret_m@epita.fr>
19373 * src/bison.simple: Remove #line just before %%epilogue. It
19374 is now handled in ...
19375 * src/reader.c (read_additionnal_code): Add the output of a
19376 #line for the epilogue.
19378 2001-12-10 Marc Autret <autret_m@epita.fr>
19380 * src/reader.c (copy_definition): Re-use CPP-outed code which
19381 replace precedent remove.
19382 * src/bison.simple: Remove #line before %%prologue because
19383 %%input-line is wrong at this time.
19385 2001-12-10 Marc Autret <autret_m@epita.fr>
19387 * src/reader.c (symbols_output): Clean up.
19388 * src/output.c (output_gram, output): Clean up.
19390 2001-12-10 Akim Demaille <akim@epita.fr>
19392 * src/lalr.c (initialize_lookaheads): New. Extracted from...
19393 * src/LR0.c (set_state_table): here.
19394 * src/lalr.c (lalr): Call it.
19396 2001-12-10 Akim Demaille <akim@epita.fr>
19398 * src/state.h (shifts): Remove the `number' member: shifts are
19399 attached to state, hence no longer need to be labelled with a
19402 2001-12-10 Akim Demaille <akim@epita.fr>
19404 Now that states have a complete set of members, the linked list of
19405 shifts is useless: just fill directly the state's shifts member.
19407 * src/state.h (shifts): Remove the `next' member.
19408 * src/LR0.c (first_state, last_state): Remove.
19409 Adjust the callers.
19410 (augment_automaton): Don't look for the shifts that must be added
19411 a shift on EOF: it is those of the state we looked for! But now,
19412 since shifts are attached, it is no longer needed to looking
19413 merely by its id: its number.
19415 2001-12-10 Akim Demaille <akim@epita.fr>
19417 * src/LR0.c (augment_automaton): Better variable locality.
19418 Remove an impossible branch: if there is a state corresponding to
19419 the start symbol being shifted, then there is shift for the start
19420 symbol from the initial state.
19422 2001-12-10 Akim Demaille <akim@epita.fr>
19424 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
19425 only when appropriate: when insert_start_shifting_state' is not
19427 * tests/regression.at (Rule Line Numbers): Adjust.
19429 2001-12-10 Akim Demaille <akim@epita.fr>
19431 * src/LR0.c (augment_automaton): Now that all states have shifts,
19432 merge the two cases addition shifts to the initial state.
19434 2001-12-10 Akim Demaille <akim@epita.fr>
19436 * src/lalr.c (set_state_table): Move to...
19438 * src/lalr.c (lalr): Don't call it...
19439 * src/LR0.c (generate_states): do it.
19440 * src/LR0.h (first_state): Remove, only the table is used.
19442 2001-12-10 Akim Demaille <akim@epita.fr>
19444 * src/LR0.h (first_shift, first_reduction): Remove.
19445 * src/lalr.c: Don't use first_shift: find shifts through the
19448 2001-12-10 Akim Demaille <akim@epita.fr>
19450 * src/LR0.c: Attach shifts to states as soon as they are
19452 * src/lalr.c (set_state_table): Instead of assigning shifts to
19453 state, just assert that the mapping was properly done.
19455 2001-12-10 Akim Demaille <akim@epita.fr>
19457 * src/LR0.c (insert_start_shift): Rename as...
19458 (insert_start_shifting_state): this.
19459 (insert_eof_shifting_state, insert_accepting_state): New.
19460 (augment_automaton): Adjust.
19461 Better locality of the variables.
19462 When looking if the start_symbol is shifted from the initial
19463 state, using `while (... symbol != start_symbol ...)' sounds
19464 better than `while (... symbol < start_symbol ...)': If fail
19465 to see how the order between symbols could be relevant!
19467 2001-12-10 Akim Demaille <akim@epita.fr>
19469 * src/getargs.h: Don't declare `spec_name_prefix' and
19470 `spec_file_prefix', declared by src/files.h.
19471 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
19472 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
19473 * src/output.c (prepare): Adjust.
19474 * src/reader.c (symbols_output): Likewise.
19475 * src/vmsgetargs.c: Vaguely adjust, but who cares?
19477 2001-12-10 Akim Demaille <akim@epita.fr>
19479 * src/muscle_tab.c (muscle_init): NULL is a better default than
19482 2001-12-10 Akim Demaille <akim@epita.fr>
19484 * src/reader.c (reader): Calling symbols_output once is enough.
19486 2001-12-10 Akim Demaille <akim@epita.fr>
19488 Now that states have a complete set of members, the linked list of
19489 reductions is useless: just fill directly the state's reductions
19492 * src/state.h (struct reductions): Remove member `number' and
19494 * src/LR0.c (first_reduction, last_reduction): Remove.
19495 (save_reductions): Don't link the new reductions, store them in
19497 * src/lalr.c (set_state_table): No need to attach reductions to
19498 states, it's already done.
19499 * src/output.c (output_actions): No longer free the shifts, then
19500 the reductions, then the states: free all the states and their
19503 2001-12-10 Akim Demaille <akim@epita.fr>
19505 * src/options.c (OPTN, DRTV, BOTH): New.
19506 (option_table): Use them.
19508 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
19509 the job of system.h.
19510 * src/options.c: Don't include stdio.h and xalloc.h for the same
19513 2001-12-10 Akim Demaille <akim@epita.fr>
19515 * src/output.c (output, prepare): Make sure the values of the
19516 muscles `action' and `prologue' are 0-terminated.
19518 2001-12-10 Akim Demaille <akim@epita.fr>
19520 Clean up GCC warnings.
19522 * src/reader.c (copy_action): `buf' is not used.
19523 (parse_skel_decl): Be static.
19524 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
19525 * src/options.h (create_long_option_table): Have a real prototype.
19526 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
19527 (hash_delete_at): Return const void *.
19528 Adjust casts to preserve the const.
19530 2001-12-10 Akim Demaille <akim@epita.fr>
19532 * configure.in: Require 2.52g.
19533 M4 is not needed, but AUTOM4TE is.
19534 * m4/m4.m4: Remove.
19535 * tests/Makefile.am: Adjust.
19537 2001-12-10 Akim Demaille <akim@epita.fr>
19539 One structure for states is enough, even though theoretically
19540 there are LR(0) states and LALR(1) states.
19542 * src/lalr.h (state_t): Remove.
19543 (state_table): Be state_t **, not state_t *.
19544 * src/state.h (core, CORE_ALLOC): Rename as...
19545 (state_t, STATE_ALLOC): this.
19546 Add the LALR(1) members: shifts, reductions, errs.
19547 * src/LR0.c (state_table): Rename as...
19548 (state_hash): this, to avoid name clashes with the global
19550 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
19551 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
19553 2001-12-10 Akim Demaille <akim@epita.fr>
19555 Bison dumps core on bash.y.
19556 Reported by Pascal Bart.
19558 * src/warshall.c (bitmatrix_print): New.
19560 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
19561 j must be the outer loop.
19562 * tests/regression.at (Broken Closure): New.
19564 2001-12-05 Akim Demaille <akim@epita.fr>
19566 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
19568 Reported by Peter Hamorsky.
19570 2001-12-05 Akim Demaille <akim@epita.fr>
19572 * src/conflicts.c (err_table): Remove.
19573 (resolve_sr_conflict): Adjust.
19574 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
19576 (state_t.reductions, state_t.shifts): this.
19578 2001-12-05 Akim Demaille <akim@epita.fr>
19580 * src/reduce.c (reduce_grammar_tables): No longer disable the
19581 removal of useless rules via CPP but via `if (0)', so that the
19582 compiler still check the code is valid.
19583 For instance, it should have noticed `rline' no longer exists: use
19584 the `line' member of rule_t.
19585 * src/gram.c (dummy, rline): Remove, unused.
19587 2001-12-05 Akim Demaille <akim@epita.fr>
19589 * src/output.c (pack_vector): Use assert, not berror.
19590 * src/main.c (berror): Remove, unused.
19592 2001-12-05 Akim Demaille <akim@epita.fr>
19594 New experimental feature: if --verbose --trace output all the
19595 items of a state, not only its kernel.
19597 * src/print.c (print_core): If `trace_flag', then invoke closure
19598 before outputting the items of the state (print_core is no longer
19599 a correct name them).
19600 (print_results): Invoke new_closure/free_closure if needed.
19602 2001-12-05 Akim Demaille <akim@epita.fr>
19604 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
19605 * src/closure.c, src/closure.h (itemsetsize): Rename as...
19606 (nitemset): for consistency with the rest of the project.
19608 2001-12-05 Akim Demaille <akim@epita.fr>
19610 * src/closure.c (print_closure): Improve.
19611 (closure): Use it for printing input and output.
19613 2001-12-05 Akim Demaille <akim@epita.fr>
19615 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
19616 indexed by nonterminals.
19618 2001-12-05 Akim Demaille <akim@epita.fr>
19620 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
19622 * src/warshall.h: Remove accidental duplication of the content.
19624 2001-12-05 Akim Demaille <akim@epita.fr>
19626 * src/closure.c (set_fderives): De-obfuscate.
19628 2001-12-05 Akim Demaille <akim@epita.fr>
19630 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
19632 2001-12-05 Akim Demaille <akim@epita.fr>
19634 * src/closure.c (set_firsts): De-obfuscate.
19636 2001-12-05 Akim Demaille <akim@epita.fr>
19638 * src/output.c (action_row): De-obfuscate
19639 using the good o' techniques: arrays not pointers, variable
19640 locality, BITISSET, RESETBIT etc.
19642 2001-12-05 Akim Demaille <akim@epita.fr>
19644 Pessimize the code to simplify it: from now on, all the states
19645 have a valid SHIFTS, which NSHIFTS is possibly 0.
19647 * src/LR0.c (shifts_new): Be global and move to..
19648 * src/state.c, src/state.h: here.
19649 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
19650 * src/print_graph: Adjust.
19652 2001-12-05 Akim Demaille <akim@epita.fr>
19654 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
19655 * src/conflicts.c: Use it.
19656 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
19657 incorrectly ``simplified''.
19659 2001-12-05 Akim Demaille <akim@epita.fr>
19661 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
19662 using the good o' techniques: arrays not pointers, variable
19663 locality, BITISSET, RESETBIT etc.
19665 2001-12-05 Akim Demaille <akim@epita.fr>
19667 * src/state.h (SHIFT_SYMBOL): New.
19668 * src/conflicts.c: Use it to deobfuscate.
19670 2001-12-05 Akim Demaille <akim@epita.fr>
19672 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
19673 (print_reductions): De-obfuscate using the good o' techniques:
19674 arrays not pointers, variable locality, BITISSET.
19676 2001-12-05 Akim Demaille <akim@epita.fr>
19678 * src/conflicts.c (print_reductions): Arrays, not pointers.
19681 2001-12-05 Akim Demaille <akim@epita.fr>
19683 * src/conflicts.c (print_reductions): Pessimize, but clarify.
19685 2001-12-05 Akim Demaille <akim@epita.fr>
19687 * src/conflicts.c (print_reductions): Improve variable locality.
19689 2001-12-05 Akim Demaille <akim@epita.fr>
19691 * src/conflicts.c (print_reductions): Pessimize, but clarify.
19693 2001-12-05 Akim Demaille <akim@epita.fr>
19695 * src/conflicts.c (print_reductions): Improve variable locality.
19697 2001-12-05 Akim Demaille <akim@epita.fr>
19699 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
19700 * src/lalr.c: Use them.
19702 2001-12-05 Akim Demaille <akim@epita.fr>
19704 * src/LR0.c (augment_automaton): Formatting changes.
19705 Better variable locality.
19707 2001-12-05 Akim Demaille <akim@epita.fr>
19709 * src/lalr.c (matrix_print): New.
19710 (transpose): Use it.
19711 Use arrays instead of pointers.
19713 2001-12-05 Akim Demaille <akim@epita.fr>
19715 * src/lalr.c (maxrhs): Move to...
19716 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
19717 * src/lalr.c (build_relations): Adjust.
19719 2001-12-05 Akim Demaille <akim@epita.fr>
19721 * src/lalr.c (transpose): Free the memory allocated to the
19722 argument, as it is replaced by the results by the unique caller.
19723 (build_relations): Merely invoke transpose: it handles the memory
19725 Improve variable locality.
19726 Avoid variables used as mere abbreviations.
19727 (compute_lookaheads): Use arrays instead of pointers.
19729 2001-12-05 Akim Demaille <akim@epita.fr>
19731 * src/lalr.c (initialize_F): Improve variable locality.
19732 Avoid variables used as mere abbreviations.
19734 2001-12-05 Akim Demaille <akim@epita.fr>
19736 * src/derives.c (print_derives): Display the ruleno.
19737 * src/lalr.c (initialize_F, transpose): Better variable locality
19738 to improve readability.
19739 Avoid variables used as mere abbreviations.
19741 2001-12-05 Akim Demaille <akim@epita.fr>
19743 * src/lalr.c (traverse): Use arrays instead of pointers.
19745 2001-12-05 Akim Demaille <akim@epita.fr>
19747 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
19748 the handling of squeue.
19749 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
19751 2001-12-05 Akim Demaille <akim@epita.fr>
19753 Because useless nonterminals are now kept alive (instead of being
19754 `destroyed'), we now sometimes examine them, and store information
19755 related to them. Hence we need to know their number, and adjust
19756 memory allocations.
19758 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
19760 * src/LR0.c (allocate_itemsets): The memory allocated to
19761 `symbol_count' was used for two different purpose: once to count
19762 the number of occurrences of each symbol, and later reassigned to
19763 `shift_symbol', containing the symbol that can be shifted from a
19765 Deobfuscate, i.e., allocate, use and free `symbol_count' here
19767 (new_itemsets): Allocate `shift_symbol' here.
19768 (allocate_itemsets): symbol_count includes useless nonterminals.
19769 Make room for them.
19770 (free_storage): Use `free', not `XFREE', for pointers that cannot
19773 2001-12-05 Akim Demaille <akim@epita.fr>
19775 * src/nullable.c (set_nullable): Deobfuscate the handling of
19777 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
19779 2001-12-05 Akim Demaille <akim@epita.fr>
19781 * src/gram.c, src/gram.h (ritem_print): New.
19782 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
19783 (This useless function was defined only to work around VMS linkers
19784 that can't handle compilation units with variables only).
19785 * src/reduce.c (dump_grammar): Use it to trace the construction of
19788 2001-12-04 Paul Eggert <eggert@twinsun.com>
19790 * src/bison.simple (union yyalloc): Change member names
19791 to be the same as the stack names.
19792 (yyparse): yyptr is now union yyalloc *, not char *.
19793 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
19794 and may generate better code on some machines.
19795 (yystpcpy): Use prototype if __STDC__ is defined, not just
19796 if __cplusplus is defined.
19798 2001-11-30 Akim Demaille <akim@epita.fr>
19800 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
19801 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
19802 Gettext doesn't compile cleanly, and dies with -Werror.
19803 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
19804 Include WARNING_CFLAGS here.
19805 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
19806 before being defined.
19808 2001-11-27 Paul Eggert <eggert@twinsun.com>
19810 * lib/quotearg.h (quotearg_n, quotearg_n_style):
19811 First arg is int, not unsigned.
19812 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
19813 (SIZE_MAX, UINT_MAX): New macros.
19814 (quotearg_n_options): Abort if N is negative.
19815 Avoid overflow check on hosts where size_t is 64 bits and int
19816 is 32 bits, as overflow is impossible there.
19817 Fix off-by-one typo that caused unnecessary reallocation.
19819 2001-11-29 Paul Eggert <eggert@twinsun.com>
19821 Name space cleanup in generated parser.
19823 * doc/bison.texinfo (Bison Parser): Discuss system headers
19824 and their effect on the user name space.
19826 * src/bison.simple:
19827 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
19828 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
19829 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
19831 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
19832 on user names when possible.
19834 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
19835 Simplify test for whather <alloca.h> exists.
19837 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
19839 (<stdio.h>): Include if YYDEBUG.
19841 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
19842 ! defined (yyoverflow) && ! defined (yymemcpy).
19844 (yymemcpy, yyparse): Rename local variables as needed so that
19845 they all begin with 'yy'.
19847 (yystrlen, yystpcpy): New functions.
19849 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
19852 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
19853 instead of relying on string.h functions. Use YYSTACK_ALLOC
19854 and YYSTACK_FREE instead of malloc and free.
19856 2001-11-30 Akim Demaille <akim@epita.fr>
19858 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
19859 before their first uses.
19860 (YYBISON, YYPURE): Move to the top of the output.
19862 2001-11-30 Akim Demaille <akim@epita.fr>
19864 * tests/reduce.at (Useless Nonterminals): Fix.
19866 2001-11-30 Akim Demaille <akim@epita.fr>
19868 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
19869 if body instead of `;' to pacify GCC's warnings.
19871 2001-11-30 Akim Demaille <akim@epita.fr>
19873 Instead of mapping the LHS of unused rules to -1, keep the LHS
19874 valid, but flag the rules as invalid.
19876 * src/gram.h (rule_t): `useful' is a new member.
19877 * src/print.c (print_grammar): Adjust.
19878 * src/derives.c (set_derives): Likewise.
19879 * src/reader.c (packgram, reduce_output): Likewise.
19880 * src/reduce.c (reduce_grammar_tables): Likewise.
19881 * tests/reduce.at (Underivable Rules, Useless Rules): New.
19883 2001-11-30 Akim Demaille <akim@epita.fr>
19885 * src/reduce.c (reduce_output): Formatting changes.
19886 * src/print.c (print_results, print_grammar): Likewise.
19887 * tests/regression.at (Rule Line Numbers)
19888 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
19890 2001-11-30 Akim Demaille <akim@epita.fr>
19892 * src/reduce.c (nonterminals_reduce): Instead of throwing away
19893 useless nonterminals, move them at the end of the symbol arrays.
19894 (reduce_output): Adjust.
19895 * tests/reduce.at (Useless Nonterminals): Adjust.
19897 2001-11-30 Akim Demaille <akim@epita.fr>
19899 * src/reduce.c: Various comment/formatting changes.
19900 (nonterminals_reduce): New, extracted from...
19901 (reduce_grammar_tables): here.
19902 (reduce_grammar): Call nonterminals_reduce.
19904 2001-11-29 Paul Eggert <eggert@twinsun.com>
19906 * src/bison.simple (YYSTACK_REALLOC): Remove.
19907 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
19908 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
19910 (union yyalloc): New type.
19911 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
19912 an arbitrary restriction on hosts where size_t is wider than int.
19914 (yyparse): Don't dump core if alloca or malloc fails; instead, report
19915 a parser stack overflow. Allocate just one block of memory for all
19916 three stacks, instead of allocating three blocks; this typically is
19917 faster and reduces fragmentation.
19919 Do not limit the number of items in the stack to a value that fits
19920 in 'int', as this is an arbitrary limit on hosts with 64-bit
19921 size_t and 32-bit int.
19923 2001-11-29 Marc Autret <autret_m@epita.fr>
19925 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
19926 of defining YYERROR_VERBOSE.
19927 [AT_DATA]: $4 is now out of C declarations in the prologue.
19929 2001-11-28 Marc Autret <autret_m@epita.fr>
19931 * src/reader.c (parse_dquoted_param): New.
19932 (parse_skel_decl): Use it.
19933 * src/lex.h: Add its prototype.
19934 * src/lex.c (literalchar): Become not static.
19936 2001-11-28 Marc Autret <autret_m@epita.fr>
19938 * src/output.h: And put its extern declaration here.
19939 * src/output.c (error_verbose): Define here.
19940 (prepare): Echo name modification.
19941 * src/getargs.h: Clean its extern declaration.
19942 * src/getargs.c (error_verbose_flag): Remove.
19943 (getargs): Remove case 'e'.
19944 * src/options.c (option_table): 'error-verbose' is now seen as simple
19948 * src/reader.c (read_declarations): Remove case tok_include.
19949 (parse_include_decl): Remove.
19950 * src/lex.h (token_t): Remove tok_include.
19951 * src/options.c (option_table): 'include' is now a simple command line
19954 2001-11-28 Marc Autret <autret_m@epita.fr>
19956 * src/bison.simple: Adjust muscle names.
19957 * src/muscle_tab.c (muscle_init): Also rename the muscles.
19958 * src/output.c (prepare): s/_/-/ for the muscles names.
19959 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
19961 2001-11-28 Marc Autret <autret_m@epita.fr>
19963 * src/bison.simple: Fix debug.
19964 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
19966 2001-11-28 Akim Demaille <akim@epita.fr>
19968 * src/LR0.c (shifts_new): New.
19969 (save_shifts, insert_start_shift, augment_automaton): Use it.
19971 2001-11-28 Akim Demaille <akim@epita.fr>
19973 * src/closure.c (closure): `b' and `ruleno' denote the same value:
19976 2001-11-28 Akim Demaille <akim@epita.fr>
19978 * src/closure.c (closure): Instead of looping over word in array
19979 then bits in words, loop over bits in array.
19981 2001-11-28 Akim Demaille <akim@epita.fr>
19983 * src/closure.c (closure): No longer optimize the special case
19984 where all the bits of `ruleset[r]' are set to 0, to make the code
19987 2001-11-28 Akim Demaille <akim@epita.fr>
19989 * src/closure.c (closure): `r' and `c' are new variables, used to
19990 de-obfuscate accesses to RULESET and CORE.
19992 2001-11-28 Akim Demaille <akim@epita.fr>
19994 * src/reduce.c (reduce_print): Use ngettext.
19995 (dump_grammar): Improve the trace accuracy.
19997 2001-11-28 Akim Demaille <akim@epita.fr>
19999 * src/reduce.c (dump_grammar): Don't translate trace messages.
20001 2001-11-28 Akim Demaille <akim@epita.fr>
20003 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
20004 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
20005 as all tags are free'ed afterwards.
20006 From Enrico Scholz.
20008 2001-11-27 Paul Eggert <eggert@twinsun.com>
20010 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
20011 use alloca when we didn't want to, and vice versa.
20013 2001-11-27 Marc Autret <autret_m@epita.fr>
20015 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
20017 * src/output.c (prepare): Remove its update.
20019 2001-11-27 Marc Autret <autret_m@epita.fr>
20021 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
20022 Use %error-verbose.
20024 2001-11-27 Marc Autret <autret_m@epita.fr>
20026 * src/bison.simple: Remove YYERROR_VERBOSE using.
20027 Use %%error_verbose.
20028 (yyparse): Likewise.
20029 * src/output.c (prepare): Give its final value.
20030 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
20031 * src/getargs.h: Add its extern declaration.
20032 * src/getargs.c (error_verbose_flag): New int.
20033 (getargs): Update to catch new case.
20034 * src/options.c (option_table): 'error-verbose' is a new option.
20035 (shortopts): Update.
20037 2001-11-27 Akim Demaille <akim@epita.fr>
20039 * src/system.h: Use intl/libgettext.h.
20040 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
20042 2001-11-27 Akim Demaille <akim@epita.fr>
20044 * tests/torture.at (Exploding the Stack Size with Malloc):
20045 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
20047 2001-11-27 Akim Demaille <akim@epita.fr>
20049 * src/files.c: Include error.h.
20050 Reported by Hans Aberg.
20052 2001-11-26 Marc Autret <autret_m@epita.fr>
20054 * src/reader.c (parse_include_decl): New, not yet implemented.
20055 (read_declarations): Add case tok_include.
20056 * src/getargs.h (include): Add its extern definition.
20057 * src/getargs.c (include): New const char *.
20058 (getargs): Add case '-I'.
20059 * src/options.c (option_table): Add include as command line and
20061 * src/lex.h (token_t): Add tok_include.
20063 2001-11-26 Akim Demaille <akim@epita.fr>
20065 * src/reader.c (readgram): Make sure rules for mid-rule actions
20066 have a lineno equal to that of their host rule.
20067 Reported by Hans Aberg.
20068 * tests/regression.at (Rule Line Numbers): New.
20070 2001-11-26 Akim Demaille <akim@epita.fr>
20072 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
20075 2001-11-26 Akim Demaille <akim@epita.fr>
20077 * src/complain.c, src/complain.h (error): Remove, provided by
20080 2001-11-26 Akim Demaille <akim@epita.fr>
20082 * src/reader.c (read_declarations): Don't abort on tok_illegal,
20083 issue an error message.
20084 * tests/regression.at (Invalid %directive): New.
20085 Reported by Hans Aberg.
20087 2001-11-26 Akim Demaille <akim@epita.fr>
20089 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
20090 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
20092 2001-11-26 Akim Demaille <akim@epita.fr>
20094 * src/conflicts.c (conflicts_print): Don't complain at all when
20095 there are no reduce/reduce conflicts, and as many shift/reduce
20096 conflicts as expected.
20097 * tests/regression.at (%expect right): Adjust.
20099 2001-11-23 Akim Demaille <akim@epita.fr>
20101 * lib/alloca.c: Update, from fileutils.
20103 2001-11-23 Akim Demaille <akim@epita.fr>
20105 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
20107 2001-11-23 Akim Demaille <akim@epita.fr>
20109 * src/system.h: Include alloca.h.
20110 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
20112 2001-11-23 Akim Demaille <akim@epita.fr>
20114 * src/print_graph.c (print_actions): Remove `rule', unused.
20115 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
20116 pacify GCC's signed < unsigned warnings.
20117 * src/closure.c (itemsetsize): Likewise.
20118 * src/reader.c (symbol_list_new): Static.
20120 2001-11-23 Akim Demaille <akim@epita.fr>
20122 Attaching lineno to buckets is stupid, since only one copy of each
20123 symbol is kept, only the line of the first occurrence is kept too.
20125 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
20126 * src/reader.c (rline_allocated): Remove, unused.
20127 (symbol_list): Have a `line' member.
20128 (symbol_list_new): New.
20129 (readgram): Use it.
20130 * src/print.c (print_grammar): Output the rule line numbers.
20131 * tests/regression.at (Solved SR Conflicts)
20132 (Unresolved SR Conflicts): Adjust.
20133 Reported by Hans Aberg.
20135 2001-11-22 Marc Autret <autret_m@epita.fr>
20137 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
20139 2001-11-22 Marc Autret <autret_m@epita.fr>
20141 * src/muscle_tab.c (muscle_init): Remove initialization of
20143 * src/output.c (output_master_parser): Do it here.
20145 2001-11-20 Akim Demaille <akim@epita.fr>
20148 * configure.in (ALL_LINGUAS): Adjust.
20149 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
20150 longer contains strings to translate.
20152 2001-11-19 Akim Demaille <akim@epita.fr>
20154 * src/conflicts.c (conflicts_print): Add a missing \n.
20156 2001-11-19 Akim Demaille <akim@epita.fr>
20158 * src/nullable.c (nullable_print): New.
20159 (set_nullable): Call it when tracing.
20160 Better locality of variables.
20162 2001-11-19 Akim Demaille <akim@epita.fr>
20164 * src/print.c (print_actions): Better locality of variables.
20166 2001-11-19 Akim Demaille <akim@epita.fr>
20168 * src/derives.c (print_derives): Fix and enrich.
20169 * src/closure.c (print_fderives): Likewise.
20171 2001-11-19 Akim Demaille <akim@epita.fr>
20173 * src/closure.c (itemsetend): Remove, replaced with...
20174 (itemsetsize): new.
20176 2001-11-19 Akim Demaille <akim@epita.fr>
20178 * src/LR0.c (kernel_end): Remove, replaced with...
20179 (kernel_size): new.
20181 2001-11-19 Akim Demaille <akim@epita.fr>
20183 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
20186 2001-11-19 Akim Demaille <akim@epita.fr>
20188 * src/closure.c (closure): Use arrays instead of pointers to clarify.
20190 2001-11-19 Akim Demaille <akim@epita.fr>
20192 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
20194 * src/LR0.c: Likewise.
20195 (allocate_itemsets): Use arrays instead of pointers to clarify.
20197 2001-11-19 Akim Demaille <akim@epita.fr>
20199 * src/getargs.c (statistics_flag): Replace with...
20201 (longopts): Accept --trace instead of --statistics.
20202 * src/getargs.h, src/options.c: Adjust.
20203 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
20204 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
20206 2001-11-19 Akim Demaille <akim@epita.fr>
20208 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
20209 pointers to clarify the code.
20210 (save_reductions, save_shifts): Factor common parts of alternatives.
20212 2001-11-19 Akim Demaille <akim@epita.fr>
20214 * src/LR0.c (new_state, get_state): Complete TRACE code.
20215 * src/closure.c: Include `reader.h' to get `tags', needed by the
20217 Rename the conditional DEBUG as TRACE.
20218 Output consistently TRACEs to stderr, not stdout.
20219 * src/derives.c: Likewise.
20220 * src/reduce.c: (inaccessable_symbols): Using if is better style
20222 Use `#if TRACE' instead of `#if 0' for tracing code.
20224 2001-11-19 Akim Demaille <akim@epita.fr>
20226 * src/system.h (LIST_FREE, shortcpy): New.
20227 * src/LR0.c: Use them.
20228 * src/output.c (free_itemsets, free_reductions, free_shifts):
20229 Remove, replaced by LIST_FREE.
20231 2001-11-19 Akim Demaille <akim@epita.fr>
20233 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
20234 (REDUCTIONS_ALLOC): New.
20235 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
20238 2001-11-19 Akim Demaille <akim@epita.fr>
20240 * src/LR0.c (new_state): Complete trace code.
20241 * src/nullable.c (set_nullable): Don't translate traces.
20243 2001-11-19 Akim Demaille <akim@epita.fr>
20245 * src/print_graph.c (print_core): Better locality of variables.
20246 * src/print.c (print_core): Likewise.
20248 2001-11-19 Akim Demaille <akim@epita.fr>
20250 * src/vcg.c: You do the output, so you are responsible of the
20251 handling of VCG syntax, in particular: use quotearg.
20252 * src/print_graph.c: Don't.
20253 (print_actions): Don't output the actions as part of the nodes,
20254 since that's the job of the edges.
20255 (print_state): Don't output by hand: fill the node description,
20256 and ask for its output.
20258 2001-11-19 Akim Demaille <akim@epita.fr>
20260 * src/bison.simple (yyparse): When verbosely reporting an error,
20261 no longer put additional quotes around token names.
20262 * tests/calc.at: Adjust.
20264 2001-11-19 Akim Demaille <akim@epita.fr>
20266 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
20267 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
20268 * src/output.c: Adjust.
20270 2001-11-19 Akim Demaille <akim@epita.fr>
20272 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
20274 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
20276 2001-11-19 Akim Demaille <akim@epita.fr>
20278 * src/gram.h (rule_t): New.
20280 (rrhs, rlhs): Remove, part of state_t.
20281 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
20282 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
20283 * src/reader.c, src/reduce.c: Adjust.
20285 2001-11-19 Akim Demaille <akim@epita.fr>
20287 * src/reader.c (symbols_output): New, extracted from...
20288 (packsymbols): Here.
20291 2001-11-19 Akim Demaille <akim@epita.fr>
20293 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
20294 (maxrhs): this new function.
20296 2001-11-19 Akim Demaille <akim@epita.fr>
20298 * src/lalr.c (F): New macro to access the variable F.
20301 2001-11-19 Akim Demaille <akim@epita.fr>
20303 * src/lalr.h (LA): New macro to access the variable LA.
20304 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20305 * src/lalr.c: Adjust.
20307 2001-11-19 Akim Demaille <akim@epita.fr>
20309 * src/lalr.c (initialize_LA): Only initialize LA. Let...
20310 (set_state_table): handle the `lookaheads' members.
20312 2001-11-19 Akim Demaille <akim@epita.fr>
20314 * src/lalr.h (lookaheads): Removed array, whose contents is now
20316 (state_t): this structure.
20317 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20320 2001-11-19 Akim Demaille <akim@epita.fr>
20322 * src/lalr.h (consistent): Removed array, whose contents is now
20324 (state_t): this structure.
20325 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20328 2001-11-19 Akim Demaille <akim@epita.fr>
20330 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
20331 contents are now members of...
20332 (state_t): this structure.
20333 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
20336 2001-11-19 Akim Demaille <akim@epita.fr>
20338 * src/lalr.h (state_t): New.
20339 (state_table): Be a state_t * instead of a core **.
20340 (accessing_symbol): Remove, part of state_t.
20341 * src/lalr.c: Adjust.
20342 (set_accessing_symbol): Merge into...
20343 (set_state_table): this.
20344 * src/print_graph.c, src/conflicts.c: Adjust.
20346 2001-11-14 Akim Demaille <akim@epita.fr>
20348 * tests/calc.at, tests/output.at, tests/regression.at,
20349 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
20350 now the tests are run in private dirs, therefore AC_CLEANUP and
20351 family can be simplified to 0-ary.
20352 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
20353 use abs. path to find config.h.
20354 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
20355 stderr, there can be way too much random noise.
20356 Instead pass -Werror to GCC and rely on the exit status.
20357 Reported by Wolfram Wagner.
20359 2001-11-14 Akim Demaille <akim@epita.fr>
20361 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
20362 defined only if yyoverflow is defined, to avoid `warning: unused
20364 Reported by The Test Suite.
20366 2001-11-14 Akim Demaille <akim@epita.fr>
20368 * src/print.c: Include reduce.h.
20369 Reported by Hans Aberg.
20371 2001-11-14 Akim Demaille <akim@epita.fr>
20373 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
20374 Revert a previous patch: these are really const.
20375 * src/conflicts.c (conflict_report): Additional useless pair of
20376 braces to pacify GCC's warnings for `if () if () {} else {}'.
20377 * src/lex.c (parse_percent_token): Replace equal_offset with
20380 Be sure to strdup `arg' when used, since there is no reason for
20381 token_buffer not to change.
20383 2001-11-14 Akim Demaille <akim@epita.fr>
20385 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
20387 * src/main.c (main): Use them.
20388 Suggested by Hans Aberg.
20390 2001-11-12 Akim Demaille <akim@epita.fr>
20392 * src/system.h (ngettext): Now that we use ngettext, be sure to
20393 provide a default definition when NLS are not used.
20395 2001-11-12 Akim Demaille <akim@epita.fr>
20397 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
20398 Use @kbd to denote user input.
20399 (Language and Grammar): ANSIfy the example.
20400 Adjust its layout for info/notinfo.
20401 (Location Tracking Calc): Output error messages to stderr.
20402 Output locations in a more GNUtically correct way.
20403 Fix a couple of Englishos.
20404 Adjust @group/@end group pairs.
20406 2001-11-12 Akim Demaille <akim@epita.fr>
20408 %expect was not functioning at all.
20410 * src/conflicts.c (expected_conflicts): Set to -1.
20411 (conflict_report): Use ngettext.
20412 (conflicts_print): Check %expect and make its violation an error.
20413 * doc/bison.texinfo (Expect Decl): Adjust.
20414 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
20415 * tests/regression.at (%expect not enough, %expect right)
20416 (%expect too much): New.
20418 2001-11-12 Akim Demaille <akim@epita.fr>
20420 * tests/regression.at (Conflicts): Rename as...
20421 (Unresolved SR Conflicts): this.
20422 (Solved SR Conflicts): New.
20424 2001-11-12 Akim Demaille <akim@epita.fr>
20426 * src/reduce.c (print_results): Rename as...
20427 (reduce_output): This.
20428 Output to OUT, passed as argument, instead of output_obstack.
20429 (dump_grammar): Likewise.
20430 (reduce_free): New.
20432 (reduce_grammar): No longer call reduce_output, since...
20433 * src/print.c (print_results): do it.
20434 * src/main.c (main): Call reduce_free;
20436 2001-11-12 Akim Demaille <akim@epita.fr>
20438 * src/conflicts.c (print_reductions): Accept OUT as argument.
20439 Output to it, not to output_obstack.
20440 * src/print.c (print_actions): Adjust.
20442 2001-11-12 Akim Demaille <akim@epita.fr>
20444 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
20445 the result instead of using...
20446 (src_total, rrc_total, src_count, rrc_count): Remove.
20447 (any_conflicts): Remove.
20448 (print_conflicts): Split into...
20449 (conflicts_print, conflicts_output): New.
20450 * src/conflicts.h: Adjust.
20451 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
20452 * src/print.c (print_grammar): Issue `\n' between two rules.
20453 * tests/regression.at (Conflicts): New.
20454 Reported by Tom Lane.
20456 2001-11-12 Akim Demaille <akim@epita.fr>
20458 * tests/regression.at (Invalid input): Remove, duplicate with
20459 ``Invalid input: 1''.
20461 2001-11-12 Akim Demaille <akim@epita.fr>
20463 * tests/torture.at (AT_DATA_STACK_TORTURE)
20464 (Exploding the Stack Size with Alloca)
20465 (Exploding the Stack Size with Malloc): New.
20467 2001-11-12 Akim Demaille <akim@epita.fr>
20469 * src/bison.simple (YYSTACK_REALLOC): New.
20470 (yyparse) [!yyoverflow]: Use it and free the old stack.
20471 Reported by Per Allansson.
20473 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
20475 * src/bison.simple: Define type yystype instead of YYSTYPE, and
20476 define CPP macro, which substitute YYSTYPE by yystype.
20477 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
20478 with yyltype/YYLTYPE. This allows inclusion of the generated
20479 header within the parser if the compiler, such as GGC, accepts
20480 multiple equivalent #defines.
20483 2001-11-05 Akim Demaille <akim@epita.fr>
20485 * src/reader.c (symbols_output): New, extracted from...
20486 (packsymbols): here.
20489 2001-11-05 Akim Demaille <akim@epita.fr>
20491 * src/lex.c (parse_percent_token): s/quotearg/quote/.
20493 2001-11-05 Akim Demaille <akim@epita.fr>
20495 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
20498 2001-11-05 Akim Demaille <akim@epita.fr>
20500 * src/options.h (struct option_table_struct): set_flags is void*.
20501 * src/options.c (longopts): Support `--output' and `%output'.
20503 * src/lex.h (tok_setopt): Remove, replaced with...
20504 (tok_intopt, tok_stropt): these new guys.
20505 * src/lex.c (getopt.h): Not needed.
20506 (token_buffer, unlexed_token_buffer): Not const.
20507 (percent_table): Promote `-' over `_' in directive names.
20508 Active `%name-prefix', `file-prefix', and `output'.
20509 (parse_percent_token): Accept possible arguments to directives.
20510 Promote `-' over `_' in directive names.
20512 2001-11-04 Akim Demaille <akim@epita.fr>
20514 * doc/bison.texinfo (Decl Summary): Split the list into
20515 `directives for grammars' and `directives for bison'.
20517 Add description of `%name-prefix', `file-prefix', and `output'.
20518 Promote `-' over `_' in directive names.
20519 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
20520 Simplify the description of `--name-prefix'.
20521 Promote `-' over `_' in directive names.
20522 Promote `--output' over `--output-file'.
20523 Fix the description of `--defines'.
20524 * tests/output.at: Exercise %file-prefix and %output.
20526 2001-11-02 Akim Demaille <akim@epita.fr>
20528 * doc/refcard.tex: Update.
20530 2001-11-02 Akim Demaille <akim@epita.fr>
20532 * src/symtab.h (SUNDEF): New.
20533 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
20534 stand for `uninitialized', instead of 0.
20535 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
20536 * src/lex.c (lex): Adjust.
20538 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
20540 Let yylex return it instead of a plain 0.
20541 Reported by Dick Streefland.
20543 2001-11-02 Akim Demaille <akim@epita.fr>
20545 * tests/regression.at (Mixing %token styles): New test.
20547 2001-11-02 Akim Demaille <akim@epita.fr>
20549 * src/reader.c (parse_thong_decl): Formatting changes.
20550 (token_translations_init): New, extracted from...
20551 (packsymbols): Here.
20554 2001-11-01 Akim Demaille <akim@epita.fr>
20556 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
20557 Check that `9foo.y' produces correct cpp guards.
20558 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
20562 2001-11-01 Akim Demaille <akim@epita.fr>
20564 * tests/regression.at (Invalid input: 2): New.
20565 * src/lex.c (unlexed_token_buffer): New.
20566 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
20570 2001-11-01 Akim Demaille <akim@epita.fr>
20572 * tests/calc.at: Catch up with 1.30.
20573 * configure.in: Bump to 1.49a.
20574 Adjust to newer Autotest.
20576 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
20578 * src/conflicts.c: Move global variables rrc_total and src_total ...
20579 (print_conflicts): here.
20580 * src/output.c (output): Free global variable user_toknums.
20581 * src/lex.c (token_obstack): Become static.
20583 2001-10-18 Akim Demaille <akim@epita.fr>
20585 * tests/atlocal.in (GCC): Add.
20586 * tests/calc.at: s/m4_match/m4_bmatch/.
20587 s/m4_patsubst/m4_bpatsubst/.
20588 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
20589 * configure.in: AC_SUBST(GCC).
20591 2001-10-14 Marc Autret <autret_m@epita.fr>
20593 * src/options.c (create_long_option_table): Fix.
20595 2001-10-10 Akim Demaille <akim@epita.fr>
20597 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
20599 2001-10-04 Akim Demaille <akim@epita.fr>
20601 * src/reader.c (parse_union_decl): Push the caracters in
20602 union_obstack, not attrs_obstack.
20604 2001-10-04 Akim Demaille <akim@epita.fr>
20606 Merge in the branch 1.29.
20608 * src/reader.c (packsymbols): Use a temporary obstack for
20609 `%%tokendef', since output_stack is already used elsewhere.
20611 2001-10-02 Akim Demaille <akim@epita.fr>
20615 2001-10-02 Akim Demaille <akim@epita.fr>
20619 2001-10-02 Akim Demaille <akim@epita.fr>
20621 * tests/regression.at (Invalid CPP headers): New.
20622 From Alexander Belopolsky.
20623 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
20625 2001-10-02 Akim Demaille <akim@epita.fr>
20627 * tests/regression.at (Invalid input): New.
20628 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
20631 2001-10-02 Akim Demaille <akim@epita.fr>
20633 * tests/calc.at: Now that --debug works, the tests must be adjusted.
20635 2001-10-02 Akim Demaille <akim@epita.fr>
20637 * src/output.c (output_parser): Assert `skeleton'.
20638 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
20642 2001-10-01 Marc Autret <autret_m@epita.fr>
20644 * src/lex.h: Echo modifications.
20645 * src/lex.c (unlex): Parameter is now token_t.
20648 2001-10-01 Marc Autret <autret_m@epita.fr>
20650 * src/main.c: Include lex.h.
20653 2001-09-29 Akim Demaille <akim@epita.fr>
20655 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
20657 2001-09-28 Akim Demaille <akim@epita.fr>
20659 * tests/testsuite.at: Update to newer Autotest.
20660 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
20662 2001-09-27 Akim Demaille <akim@epita.fr>
20664 Position independent wrapper.
20666 * tests/bison: Remove.
20667 * tests/bison.in: New.
20668 * configure.in: Adjust.
20670 2001-09-27 Paul Eggert <eggert@twinsun.com>
20672 Port quotearg fixes from tar 1.13.24.
20674 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
20676 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
20677 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
20679 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
20680 * m4/mbrtowc.m4: New file.
20681 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
20682 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
20684 2001-09-27 Akim Demaille <akim@epita.fr>
20688 2001-09-27 Akim Demaille <akim@epita.fr>
20692 2001-09-25 Akim Demaille <akim@epita.fr>
20694 * src/system.h: Include `xalloc.h'.
20695 Remove it from the C files.
20696 * src/files.c (output_files): Free the obstacks.
20697 * src/lex.c (init_lex): Rename as...
20700 * src/main.c (main): Use it.
20702 2001-09-24 Marc Autret <autret_m@epita.fr>
20704 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
20705 to output informations in fout (FILE*).
20706 (open_graph, close_graph): Likewise.
20707 (output_graph, output_edge, output_node): Likewise.
20708 * src/vcg.h: Update function prototypes.
20709 * src/print_graph.c (print_graph): Open output graph file.
20710 (print_actions): Adjust.
20711 * src/files.h: Remove extern declaration.
20712 * src/files.c: Remove graph_obstack declaration.
20713 (open_files): Remove graph_obstack initialization.
20714 (output_files): Remove graph_obstack saving.
20716 2001-09-24 Marc Autret <autret_m@epita.fr>
20718 * src/files.c (compute_output_file_names): Fix.
20720 2001-09-24 Marc Autret <autret_m@epita.fr>,
20721 Akim Demaille <akim@epita.fr>
20723 * src/reader.c (reader): Remove call to free_symtab ().
20724 * src/main.c (main): Call it here.
20726 * src/conflicts.c (initialize_conflicts): Rename as...
20727 (solve_conflicts): this.
20728 * src/print.c (print_core, print_actions, print_state)
20729 (print_grammar): Dump to a file instead a `output_obstack'.
20730 (print_results): Dump `output_obstack', and then proceed with the
20732 * src/files.c (compute_output_file_names, close_files): New.
20733 (output_files): Adjust.
20734 * src/main.c (main): Adjust.
20736 2001-09-23 Marc Autret <autret_m@epita.fr>
20738 * src/files.c (compute_header_macro): Computes header macro name
20739 from spec_defines_file when given.
20741 2001-09-23 Marc Autret <autret_m@epita.fr>
20743 * src/files.c (output_files): Add default extensions.
20745 2001-09-22 Akim Demaille <akim@epita.fr>
20747 * src/conflicts.c (finalize_conflicts): Rename as...
20748 (free_conflicts): this.
20750 2001-09-22 Akim Demaille <akim@epita.fr>
20752 * src/gram.c (gram_free): Rename back as...
20754 (output_token_translations): Free `token_translations'.
20755 * src/symtab.c (free_symtab): Free the tag field.
20757 2001-09-22 Akim Demaille <akim@epita.fr>
20759 Remove `translations' as it is always set to true.
20761 * src/gram.h: Adjust.
20762 * src/reader.c (packsymbols, parse_token_decl): Adjust
20763 * src/print.c (print_grammar): Adjust.
20764 * src/output.c (output_token_translations): Adjust.
20765 * src/lex.c (lex): Adjust.
20766 * src/gram.c: Be sure the set pointers to NULL.
20767 (dummy): Rename as...
20770 2001-09-22 Akim Demaille <akim@epita.fr>
20772 * configure.in: Invoke AM_LIB_DMALLOC.
20773 * src/system.h: Use dmalloc.
20774 * src/LR0.c: Be sure to have pointers initialized to NULL.
20775 (allocate_itemsets): Allocate kernel_items only if needed.
20777 2001-09-22 Akim Demaille <akim@epita.fr>
20779 * configure.in: Bump to 1.29b.
20780 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
20781 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
20782 need xmalloc.c in calc.y.
20785 2001-09-21 Akim Demaille <akim@epita.fr>
20788 * Makefile.maint, config/config.guess, config/config.sub,
20789 * config/missing: Update from masters.
20790 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
20792 * configure.in (ALL_LINGUAS): Add `tr'.
20794 2001-09-21 Akim Demaille <akim@epita.fr>
20796 * tests/Makefile.am (package.m4): Move to...
20797 ($(srcdir)/$(TESTSUITE)): here.
20799 2001-09-20 Akim Demaille <akim@epita.fr>
20801 * src/complain.c: No longer try to be standalone: use system.h.
20802 Don't assume __STDC__ is defined to 1. Just test if it is defined.
20803 * src/complain.h: Likewise.
20804 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
20805 Remove the unused variable `n'.
20806 From Albert Chin-A-Young.
20808 2001-09-18 Marc Autret <autret_m@epita.fr>
20810 * doc/bison.1: Update.
20811 * doc/bison.texinfo (Bison Options): Update --defines and --graph
20813 (Option Cross Key): Update.
20816 2001-09-18 Marc Autret <autret_m@epita.fr>
20818 * tests/regression.at: New test (comment in %union).
20820 2001-09-18 Marc Autret <autret_m@epita.fr>
20822 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
20824 Reported by Keith Browne.
20826 2001-09-18 Marc Autret <autret_m@epita.fr>
20828 * tests/output.at: Add tests for --defines and --graph.
20830 2001-09-18 Marc Autret <autret_m@epita.fr>
20832 * tests/output.at: Removes tests of %{header,src}_extension features.
20834 2001-09-18 Akim Demaille <akim@epita.fr>
20836 * tests/Makefile.am (package.m4): New.
20837 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
20838 (_AT_CHECK_CALC_ERROR): Likewise.
20839 Factor the `, ' part of verbose error messages.
20841 2001-09-18 Marc Autret <autret_m@epita.fr>
20843 * src/getargs.c (longopts): Declare --defines and --graph as options
20844 with optional arguments.
20845 * src/files.h: Add extern declarations.
20846 * src/files.c (spec_graph_file, spec_defines_file): New.
20847 (output_files): Update.
20848 Remove CPP-outed code.
20850 2001-09-18 Marc Autret <autret_m@epita.fr>
20852 Turn off %{source,header}_extension feature.
20854 * src/files.c (compute_exts_from_gf): Update.
20855 (compute_exts_from_src): Update.
20856 (output_files): CPP-out useless code.
20857 * src/files.h: Remove {header,source}_extension extern declarations.
20858 * src/reader.c (parse_dquoted_param): CPP-out.
20859 (parse_header_extension_decl): Remove.
20860 (parse_source_extension_decl): Remove.
20861 (read_declarations): Remove cases tok_{hdrext,srcext}.
20862 * src/lex.c (percent_table): Remove {header,source}_extension entries.
20863 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
20865 2001-09-10 Akim Demaille <akim@epita.fr>
20867 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
20868 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
20869 (AT_CHECK_OUTPUT): this.
20870 Merely check ls' exit status, its output is useless.
20872 2001-09-10 Akim Demaille <akim@epita.fr>
20874 * tests/calc.at: Use m4_match.
20875 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
20877 2001-09-10 Marc Autret <autret_m@epita.fr>,
20878 Akim Demaille <akim@epita.fr>
20880 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
20882 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
20884 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
20885 * src/lex.h: Adjust prototype.
20886 (token_t): Add `tok_undef'.
20887 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
20888 (parse_percent_token): Now returns token_t.
20889 Add default statement in switch.
20890 (lex): Separate `c' as an input variable, from the token_t result
20892 (unlexed): Is a token_t.
20894 2001-09-10 Akim Demaille <akim@epita.fr>
20896 * configure.in: Bump to 1.29a.
20898 2001-09-07 Akim Demaille <akim@epita.fr>
20902 2001-08-30 Akim Demaille <akim@epita.fr>
20904 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
20905 * m4/atconfig.m4: Remove.
20906 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
20907 * tests/bison: New.
20908 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
20909 m4_if, m4_patsubst, and m4_regexp.
20910 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
20911 `input' file instead of echo.
20913 2001-08-29 Akim Demaille <akim@epita.fr>
20917 2001-08-29 Akim Demaille <akim@epita.fr>
20921 2001-08-29 Paul Eggert <eggert@twinsun.com>
20923 * src/bison.simple (yyparse): Don't take the address of an
20924 item before the start of an array, as that doesn't conform to
20927 2001-08-29 Robert Anisko <anisko_r@epita.fr>
20929 * doc/bison.texinfo (Location Tracking Calc): New node.
20931 2001-08-29 Paul Eggert <eggert@twinsun.com>
20933 * src/output.c (output): Do not define const, as this now
20934 causes more problems than it cures.
20936 2001-08-29 Akim Demaille <akim@epita.fr>
20938 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
20940 Be sure to tag the `detailmenu'.
20942 2001-08-29 Akim Demaille <akim@epita.fr>
20944 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
20945 download in a tmp dir.
20947 2001-08-28 Marc Autret <autret_m@epita.fr>
20949 * config/depcomp: New file.
20951 2001-08-28 Marc Autret <autret_m@epita.fr>
20953 * doc/bison.1 (mandoc): Adjust.
20954 From Juan Manuel Guerrero.
20956 2001-08-28 Marc Autret <autret_m@epita.fr>
20958 * src/print_graph.c (print_state): Fix.
20960 2001-08-27 Marc Autret <autret_m@epita.fr>
20962 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
20964 Echo modifications to the functions prototypes.
20965 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
20967 2001-08-27 Marc Autret <autret_m@epita.fr>
20969 * src/vcg.c: Include `xalloc.h'.
20970 (add_colorentry): New.
20971 (add_classname): New.
20972 (add_infoname): New.
20973 * src/vcg.h: Add new prototypes.
20975 2001-08-27 Akim Demaille <akim@epita.fr>
20977 * Makefile.maint: Sync. again with CVS Autoconf.
20979 2001-08-27 Akim Demaille <akim@epita.fr>
20981 * Makefile.maint: Formatting changes.
20982 (po-update, cvs-update, update): New targets.
20985 2001-08-27 Akim Demaille <akim@epita.fr>
20987 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
20988 * Makefile.maint: Sync. with CVS Autoconf.
20990 2001-08-27 Marc Autret <autret_m@epita.fr>
20992 * src/vcg.h (struct infoname_s): New.
20993 (struct colorentry_s): New.
20994 (graph_s): New fields {vertical,horizontal}_order in structure.
20995 Add `infoname' field.
20996 Add `colorentry' field;
20997 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
20998 (G_HORIZONTAL_ORDER): New.
21000 (G_COLORENTRY): New.
21001 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
21002 Add output of `infoname'.
21003 Add output of `colorentry'.
21005 2001-08-27 Marc Autret <autret_m@epita.fr>
21007 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
21008 This one shadowed a global parameter.
21010 2001-08-24 Marc Autret <autret_m@epita.fr>
21012 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
21013 instead of `unsigned'.
21014 (print_state): Do not call obstack_object_size () in obstack_grow ()
21015 to avoid macro variables shadowing.
21017 2001-08-23 Marc Autret <autret_m@epita.fr>
21019 * src/lex.c (percent_table): Typo: s/naem/name/.
21021 Normalize new options declarations.
21023 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
21025 * tests/suite.at: Exercise %header_extension and %source_extension.
21027 2001-08-16 Marc Autret <autret_m@epita.fr>
21029 * src/reader.c (parse_dquoted_param): New.
21030 (parse_header_extension_decl): Use it.
21031 (parse_source_extension_decl): Likewise.
21033 2001-08-16 Marc Autret <autret_m@epita.fr>
21035 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
21036 (get_xxxx_str): Use assert () instead of complain ().
21037 Remove return invokations in default cases.
21038 (get_decision_str): Modify default behaviour. Remove second argument.
21039 Echo modifications on calls.
21040 (output_graph): Fix.
21042 2001-08-16 Marc Autret <autret_m@epita.fr>
21044 * src/getargs.c (usage): Update with ``-g, --graph''.
21046 2001-08-16 Marc Autret <autret_m@epita.fr>
21048 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
21049 (Option Cross Key): Likewise.
21050 * doc/bison.1: Update.
21052 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
21054 * src/output.c (output_master_parser): Don't finish action_obstack.
21055 (output_parser): Don't care about the muscle action, here.
21056 (prepare): Copy the action_obstack in the action muscle.
21057 (output): Free action_obstack.
21059 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
21061 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
21062 will contain `%union' declaration.
21063 (parse_union_decl): Delete #line directive output.
21064 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
21065 informations about %union.
21066 (parse_union_decl): Copy the union_obstack in the muscle stype.
21067 * src/bison.simple: Add new #line directive.
21068 Add typdef %%stype YYSTYPE.
21070 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
21072 * src/bison.simple: Add new `#line' directive.
21074 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
21076 * src/bison.simple: New `#line' directive.
21077 * src/output.c (output_parser): Support new dynamic muscle input_line.
21079 2001-09-22 Marc Autret <autret_m@epita.fr>
21081 * src/output.c (output_master_parser): New.
21082 (output_parser): Be more re-entrant.
21084 2001-09-21 Marc Autret <autret_m@epita.fr>
21086 * src/reader.c (copy_definition, parse_union_decl): Update and use
21088 (copy_action): Likewise.
21089 Use obstack_1grow ().
21090 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
21092 2001-09-21 Marc Autret <autret_m@epita.fr>
21094 * src/options.c (option_table): Adjust.
21095 * src/lex.c (parse_percent_token): Fix.
21097 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
21099 * src/options.c (symtab.h): Include it, need by lex.h.
21101 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
21103 * src/lex.c (parse_percent_token): Change type of variable `tx', which
21104 is now an option_table_struct*.
21105 (option_strcmp): New function option_strcmp.
21106 (parse_percent_token): Call option_strcmp.
21107 * src/getargs.c (xalloc.h, options.h): Include it.
21108 (getargs): Call create_long_option_table.
21109 (getargs): Free longopts at the end of the function.
21110 (shortopts): Move in options.c.
21111 * src/options.c (create_long_option_table): New function. Convert
21112 information from option_table to option structure.
21113 * src/reader.c (options.h): Include it.
21115 * src/Makefile.am: Adjust.
21116 * src/options.c (option_table): Create from longopts and percent_table.
21117 * src/getargs.c (longopts): Delete.
21118 * src/lex.c (struct percent_table_struct): Delete.
21119 (percent_table): Delete.
21120 (options.h): Include it.
21121 * src/options.c: Create.
21122 * src/options.h: Create.
21123 Declare enum opt_access_e.
21124 Define struct option_table_struct.
21126 2001-09-20 Marc Autret <autret_m@epita.fr>
21128 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
21131 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
21133 * src/bison.simple: s/%%filename/%%skeleton.
21134 * src/muscle_tab.c (getargs.h): Include it.
21135 (muscle_init): Insert new muscle skeleton.
21137 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
21139 * src/output.c (output_parser): Delete unused variable actions_dumped.
21141 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
21143 * src/output.c (output): Delete call to reader_output_yylsp.
21144 * src/reader.c (reader): Likewise.
21145 * src/reader.h: Delete declaration of reader_output_yylsp.
21147 2001-09-02 Marc Autret <autret_m@epita.fr>
21149 * src/reader.c: Include muscle_tab.h.
21150 (parse_union_decl): Update.
21151 (parse_macro_decl): Rename parse_muscle_decl.
21152 Update to use renamed functions and variable.
21153 (read_declarations, copy_action, read_additionnal_code, : Updated
21154 with correct variables and functions names.
21155 (packsymbols, reader): Likewise.
21157 * src/reader.h (muscle_obstack): Extern declaration update.
21159 * src/output.c: Include muscle_tab.h
21160 In all functions using macro_insert, change by using muscle_insert ().
21161 (macro_obstack): Rename muscle_obstack.
21162 Echo modifications in the whole file.
21163 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
21164 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
21165 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
21167 * src/muscle_tab.h: Update double inclusion macros.
21168 (macro_entry_s): Rename muscle_entry_s.
21171 * src/muscle_tab.c: Include muscle_tab.h.
21172 Rename macro_tabble to muscle_table.
21173 (mhash1, mhash2, mcmp): Use muscle_entry.
21174 (macro_init): Rename muscle_init. Update.
21175 (macro_insert): Rename muscle_insert. Update.
21176 (macro_find): Rename muscle_find. Update.
21178 * src/main.c: Include muscle_tab.h.
21179 (main): Call muscle_init ().
21180 * src/Makefile.am (bison_SOURCES): Echo modifications.
21182 2001-09-02 Marc Autret <autret_m@epita.fr>
21184 Now the files macro_tab.[ch] are named muscle_tab.[ch].
21186 * src/muscle_tab.c, src/muscle_tab.h: Add files.
21188 2001-09-02 Marc Autret <autret_m@epita.fr>
21190 * src/macrotab.c, src/macrotab.h: Remove.
21192 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
21194 * src/reader.c (copy_guard): Use muscle to specify the `#line'
21197 2001-09-01 Marc Autret <autret_m@epita.fr>
21199 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
21200 to an explicit value to activate the feature. We do it here.
21202 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21204 * src/output.c (prepare): Delete the `filename' muscule insertion.
21205 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
21206 (parse_union_decl): Likewise.
21207 * src/macrotab.c (macro_init): Initialize filename by infile.
21209 2001-08-31 Marc Autret <autret_m@epita.fr>
21211 * src/bison.simple (YYLSP_NEEDED): New definition.
21212 * src/output.c (prepare): Add macro insertion of `locations_flag'
21214 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21216 * src/output.c (prepare): Delete insertion of previous muscles,
21217 and insert the `prefix' muscles.
21218 * src/macrotab.c (macro_init): Likewise.
21219 (macro_init): Initialization prefix directive by `yy'.
21220 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
21221 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
21222 yylval, yydebug, yyerror, yynerrs and yyparse.
21223 New directive `#define' to substitute yydebug, ... with option
21226 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21228 * src/main.c (main): Standardize.
21229 * src/output.c (output_table_data, output_parser): Likewise.
21230 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
21232 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
21234 * src/reader.c (read_additionnal_code): Rename %%user_code to
21236 * src/output.c (output): Rename %%declarations to %%prologue.
21237 * src/bison.simple: Echo modifications.
21239 2001-08-31 Marc Autret <autret_m@epita.fr>
21241 * src/reader.c (readgram): CleanUp.
21242 (output_token_defines): Likewise.
21243 (packsymbols): Likewise.
21244 (reader): Likewise.
21245 * src/output.c (output): CPP-out useless code.
21247 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
21249 * src/reader.c (reader): Delete obsolete call to function
21250 output_trailers and output_headers.
21251 * src/output.h: Remove obsolete functions prototypes of output_headers
21252 and output_trailers.
21254 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
21256 * src/main.c: Include macrotab.h.
21257 * src/macrotab.h (macro_entry_s): Constify fields.
21258 Adjust functions prototypes.
21259 * src/macrotab.c (macro_insert): Constify key and value.
21260 (macro_find): Constify key.
21261 (macro_insert): Include 'xalloc.h'
21262 (macro_insert): Use XMALLOC.
21263 (macro_find): Constify return value.
21264 * src/output.c (output_table_data): Rename table to table_data.
21265 (output_parser): Constify macro_key, macro_value.
21267 2001-08-30 Marc Autret <autret_m@epita.fr>
21269 * src/reader.c (parse_skel_decl): New.
21270 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
21271 * src/lex.h (token_t): New token `tok_skel'.
21272 * src/lex.c (percent_table): Add skeleton option entry.
21275 2001-08-29 Marc Autret <autret_m@epita.fr>
21277 * src/bison.simple: Add %%user_code directive at the end.
21278 * src/reader.c (read_additionnal_code): New.
21280 * src/output.c (output_program): Remove.
21283 2001-08-28 Marc Autret <autret_m@epita.fr>
21285 * src/output.c (output_actions): Clean up.
21286 (output_gram): CPP-out useless code.
21287 * src/reader.c (reader): Clean up, CPP-out useless code.
21289 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
21291 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
21293 * src/bison.simple: Add `%%definitions'.
21295 2001-08-28 Marc Autret <autret_m@epita.fr>
21297 * config/depcomp: New file.
21299 2001-08-27 Paul Eggert <eggert@twinsun.com>
21301 * src/bison.simple (yyparse): Don't take the address of an
21302 item before the start of an array, as that doesn't conform to
21305 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
21307 * src/output.c (output): Remove the initialization of the macro
21308 obstack. It was done too late here.
21310 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
21312 (reader): Initialize the macro obstack here, since we need it to grow
21313 '%define' directives.
21315 * src/reader.h: Declare the macro obstack as extern.
21317 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
21319 * src/output.c (output_parser): Fix. Store single '%' characters in
21320 the output obstack instead of throwing them away.
21322 2001-08-27 Akim Demaille <akim@epita.fr>
21324 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
21326 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21328 * lib/Makefile.am: Adjust.
21330 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21332 * src/bison.simple: Update and add '%%' directives.
21334 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21336 * src/reader.c (reader): Remove calls to 'output_headers' and
21337 'output_trailers'. Remove some C output.
21338 (readgram): Disable a piece of code that was writing a default
21339 definition for 'YYSTYPE'.
21340 (reader_output_yylsp): Remove.
21341 (packsymbols): Output token defintions to a macro.
21342 (copy_definition): Disable C output.
21344 * src/reader.c (parse_macro_decl): New function used to parse macro
21346 (copy_string2): Put the body of copy_string into this new function.
21347 Add a parameter to let the caller choose whether he wants to copy the
21348 string delimiters or not.
21349 (copy_string): Be a simple call to copy_string2 with the last argument
21351 (read_declarations): Add case for macro definition.
21352 (copy_identifier): New.
21353 (parse_macro_decl): Read macro identifiers using copy_identifier
21356 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21358 * src/output.c (prepare): Add prefixed names.
21359 (output_parser): Output semantic actions.
21360 (output_parser): Fix bug on '%%line' directives.
21362 * src/output.c (output_headers): Remove. The C code printed by this
21363 function should now be in the skeletons.
21364 (output_trailers): Remove.
21365 (output): Disable call to 'reader_output_yylsp'.
21366 (output_rule_data): Do not output tables to the table obstack.
21368 * src/output.c: Remove some C dedicated output.
21369 Improve the use of macro and output obstacks.
21370 (output_defines): Remove.
21372 * src/output.c (output_token_translations): Associate 'translate'
21373 table with a macro. No output to the table obstack.
21374 (output_gram): Same for 'rhs' and 'prhs'.
21375 (output_stos): Same for 'stos'.
21376 (output_rule_data): Same for 'r1' and 'r2'.
21377 (token_actions): Same for 'defact'.
21378 (goto_actions): Same for 'defgoto'.
21379 (output_base): Same for 'pact' and 'pgoto'.
21380 (output_table): Same for 'table'.
21381 (output_check): Same for 'check'.
21383 * src/output.c (output_table_data): New function.
21384 (output_short_table): Remove.
21385 (output_short_or_char_table): Remove.
21387 * src/output.c (output_parser): Replace most of the skeleton copy code
21388 with something new. Skeletons are now processed character by character
21389 rather than line by line, and Bison looks for '%%' macros. This is the
21390 first step in making Bison's output process (a lot) more flexible.
21391 (output_parser): Use the macro table.
21393 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21395 * src/main.c (main): Initialize the macro table.
21397 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21399 * src/lex.c (percent_table): Add tok_define.
21400 * src/lex.h: Add tok_define.
21402 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21404 * src/macrotab.c: New file.
21405 * src/macrotab.h: New file.
21406 * src/Makefile.am: Update.
21408 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
21410 * lib/hash.c: New file.
21411 * lib/hash.h: New file.
21412 * lib/Makefile.am: Update.
21414 2001-08-15 Akim Demaille <akim@epita.fr>
21418 2001-08-15 Marc Autret <autret_m@epita.fr>
21420 * src/reader.c (readgram): Indent output macro YYSTYPE.
21421 (packsymbols): Likewise.
21422 (output_token_defines): Likewise.
21423 * src/files.c: Standardize.
21424 (compute_header_macro): New.
21425 (defines_obstack_save): New. Use compute_header_macro.
21426 (output_files): Update. Use defines_obstack_save.
21428 2001-08-15 Akim Demaille <akim@epita.fr>
21430 * doc/bison.texinfo (Table of Symbols): Document
21431 YYSTACK_USE_ALLOCA.
21433 2001-08-15 Akim Demaille <akim@epita.fr>
21435 * missing: Update from CVS Automake.
21436 * config/config.guess, config/config.sub, config/texinfo.tex:
21437 Update from gnu.org.
21439 2001-08-15 Akim Demaille <akim@epita.fr>
21441 * Makefile.maint: Sync with CVS Autoconf.
21443 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
21445 * doc/bison.texinfo: Include GNU Free Documentation License from
21447 * doc/fdl.texi: Add to package.
21449 2001-08-14 Marc Autret <autret_m@epita.fr>
21451 Turn on %{source,header}_extension features.
21453 * src/lex.c (percent_table): Un-CPP out header_extension and
21455 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
21456 (compute_exts_from_src): Remove conditions. It restores priorities
21459 2001-08-14 Marc Autret <autret_m@epita.fr>
21461 * src/files.c (compute_base_names): Add extensions computing when
21462 `--file-prefix' used.
21463 Standardize function calls.
21465 2001-08-13 Marc Autret <autret_m@epita.fr>
21467 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
21468 defining it (defined but null disables alloca).
21470 2001-08-13 Marc Autret <autret_m@epita.fr>
21472 * src/bison.simple (_yy_memcpy): CPP reformat.
21474 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
21476 * tests/atconfig.in (CPPFLAGS): Fix.
21478 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
21480 * doc/bison.texinfo: Include GNU General Public License from
21482 * doc/gpl.texi: Add to package.
21484 2001-08-10 Marc Autret <autret_m@epita.fr>
21486 * src/print_graph.h: Fix.
21487 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
21489 2001-08-10 Akim Demaille <akim@epita.fr>
21491 * src/system.h: Provide default declarations for stpcpy, strndup,
21494 2001-08-10 Robert Anisko <anisko_r@epita.fr>
21496 * doc/bison.texinfo (Locations): Update @$ stuff.
21498 2001-08-09 Robert Anisko <anisko_r@epita.fr>
21500 * src/bison.simple (YYLLOC_DEFAULT): Update.
21503 2001-08-08 Marc Autret <autret_m@epita.fr>
21505 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
21506 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
21507 Reported by Fabrice Bauzac.
21509 2001-08-08 Marc Autret <autret_m@epita.fr>
21511 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
21512 * src/vcg.c (output_node): Fix.
21513 * src/vcg.h: Cleanup.
21514 * src/print_graph.c: Add comments.
21515 (node_output_size): New global variable. Simplify the formatting of
21516 the VCG graph output.
21517 (print_actions): Unused code is now used. It notifies the final state
21518 and no action states in the VCG graph. It also give the reduce actions.
21519 The `shift and goto' edges are red and the `go to state' edges are
21521 Get the current node name and node_obstack by argument.
21522 (node_obstack): New variable.
21523 (print_state): Manage node_obstack.
21524 (print_core): Use node_obstack given by argument.
21525 A node is not only computed here but in print_actions also.
21526 (print_graph): CPP out useless code instead of commenting it.
21528 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
21530 * tests/atconfig.in (CPPFLAGS): Fix.
21532 2001-08-07 Akim Demaille <akim@epita.fr>
21534 * src/print_graph.c (quote): New.
21535 (print_core): Use it.
21537 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
21539 * src/vcg.c (complain.h): Include it.
21540 Unepitaize `return' invocations.
21541 [NDEBUG] (main): Remove.
21542 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
21543 * src/files.c (open_files): Initialize graph_obstack.
21544 * src/print_graph.c (print_actions): CPP out useless code.
21545 (print_core): Don't output the last `\n' in labels.
21547 * src/files.c (output_files): Output the VCG file.
21548 * src/main.c (main): Invoke print_graph ();
21550 2001-08-06 Marc Autret <autret_m@epita.fr>
21552 Automaton VCG graph output.
21553 Using option ``-g'' or long option ``--graph'', you can generate
21554 a gram_filename.vcg file containing a VCG description of the LALR (1)
21555 automaton of your grammar.
21557 * src/main.c: Call to print_graph() function.
21558 * src/getargs.h: Update.
21559 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
21560 (graph_flag): New flag.
21561 (longopts): Update.
21562 (getargs): Add case `g'.
21563 * src/files.c (graph_obstack): New obstack struct.
21564 (open_files): Initialize new obstack.
21565 (output_files): Saves graph_obstack if required.
21566 * src/files.h (graph_obstack): New extern declaration.
21567 * src/Makefile.am: Add new source files.
21569 2001-08-06 Marc Autret <autret_m@epita.fr>
21571 * src/print_graph.c, src/print_graph.h (graph): New.
21572 * src/vcg.h: New file.
21573 * src/vcg.c: New file, VCG graph handling.
21575 2001-08-06 Marc Autret <autret_m@epita.fr>
21577 Add of %source_extension and %header_extension which specify
21578 the source or/and the header output file extension.
21580 * src/files.c (compute_base_names): Remove initialisation of
21581 src_extension and header_extension.
21582 (compute_exts_from_gf): Update.
21583 (compute_exts_from_src): Update.
21584 (output_files): Update.
21585 * src/reader.c (parse_header_extension_decl): New.
21586 (parse_source_extension_decl): New.
21587 (read_declarations): New case statements for the new tokens.
21588 * src/lex.c (percent_table): Add entries for %source_extension
21589 and %header_extension.
21590 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
21592 2001-08-06 Marc Autret <autret_m@epita.fr>
21594 * configure.in: Bump to 1.28c.
21595 * doc/bison.texinfo: Texinfo thingies.
21597 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
21599 * tests/atconfig.in (CPPFLAGS): Add.
21600 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
21602 2001-08-03 Akim Demaille <akim@epita.fr>
21606 2001-08-03 Akim Demaille <akim@epita.fr>
21608 * tests/Makefile.am (check-local): Ship testsuite.
21609 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
21610 Include `string.h'.
21612 2001-08-03 Akim Demaille <akim@epita.fr>
21614 * configure.in: Try using -Wformat when compiling.
21616 2001-08-03 Akim Demaille <akim@epita.fr>
21618 * configure.in: Bump to 1.28b.
21620 2001-08-03 Akim Demaille <akim@epita.fr>
21622 * src/complain.c: Adjust strerror_r portability issues.
21624 2001-08-03 Akim Demaille <akim@epita.fr>
21628 2001-08-03 Akim Demaille <akim@epita.fr>
21630 * src/getargs.c, src/getarg.h (skeleton)): Constify.
21631 * src/lex.c (literalchar): Avoid name clashes on `buf'.
21632 * src/getargs.c: Include complain.h.
21633 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
21634 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
21636 2001-08-03 Akim Demaille <akim@epita.fr>
21638 * src/reader.c (readgram): Display hidden chars in error messages.
21640 2001-08-03 Akim Demaille <akim@epita.fr>
21642 Update to gettext 0.10.39.
21644 2001-08-03 Akim Demaille <akim@epita.fr>
21646 * lib/strspn.c: New.
21648 2001-08-01 Marc Autret <autret_m@epita.fr>
21650 * doc/bison.texinfo: Update.
21651 * doc/bison.1 (mandoc): Update.
21652 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
21653 * src/files.c: Support output files extensions computing.
21654 (src_extension): New static variable.
21655 (header_extension): New static variable.
21656 (tr): New function.
21657 (get_extension_index): New function, gets the index of an extension
21658 filename in a string.
21659 (compute_exts_from_gf): New function, computes extensions from the
21660 grammar file extension.
21661 (compute_exts_from_src): New functions, computes extensions from the
21662 C source file extension, file given by ``-o'' option.
21663 (compute_base_names): Update.
21664 (output_files): Update.
21666 2001-08-01 Robert Anisko <anisko_r@epita.fr>
21668 * doc/bison.texi: Document @$.
21669 (Locations): New section.
21671 2001-07-18 Akim Demaille <akim@epita.fr>
21673 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
21674 * config/prev-version.txt, config/move-if-change: New.
21675 * Makefile.am: Adjust.
21677 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
21679 * src/bison.simple (yyparse): Suppress warning `comparaison
21680 between signed and unsigned'.
21682 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
21684 * src/getargs.h (raw_flag): Remove.
21685 * src/getargs.c: Die on `-r'/`--raw'.
21686 * src/lex.c (parse_percent_token): Die on `%raw'.
21687 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
21688 * tests/calc.at: Suppress test with option `--raw'.
21690 2001-07-14 Akim Demaille <akim@epita.fr>
21693 * configure.in: Require Autoconf 2.50.
21694 Update to gettext 0.10.38.
21696 2001-03-16 Akim Demaille <akim@epita.fr>
21698 * doc/bison.texinfo: ANSIfy the examples.
21700 2001-03-16 Akim Demaille <akim@epita.fr>
21702 * getargs.c (skeleton): New variable.
21703 (longopts): --skeleton is a new option.
21704 (shortopts, getargs): -S is a new option.
21705 * getargs.h: Declare skeleton.
21706 * output.c (output_parser): Use it.
21708 2001-03-16 Akim Demaille <akim@epita.fr>
21710 * m4/strerror_r.m4: New.
21711 * m4/error.m4: Run AC_FUNC_STRERROR_R.
21712 * lib/error.h, lib/error.c: Update.
21714 2001-03-16 Akim Demaille <akim@epita.fr>
21716 * src/getargs.c (longopts): Clean up.
21718 2001-02-21 Akim Demaille <akim@epita.fr>
21720 * src/reader.c (gensym): `gensym_count' is your own.
21721 Use a static buf to create the symbol name, as token_buffer is no
21724 2001-02-08 Akim Demaille <akim@epita.fr>
21726 * src/conflicts.c (conflict_report): Be sure not to append to res
21727 between two calls, which could happen if both first sprintf were
21728 skipped, but not the first cp += strlen.
21730 2001-02-08 Akim Demaille <akim@epita.fr>
21732 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
21733 New, from fileutils 4.0.37.
21734 * configure.in: Require Autoconf 2.49c. I took some time before
21735 making this decision. This is the only way out for portability
21736 issues in Bison, it would mean way too much duplicate effort to
21737 import in Bison features implemented in 2.49c since 2.13.
21738 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
21740 2001-02-02 Akim Demaille <akim@epita.fr>
21742 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
21743 * lib/xalloc.h, lib/xmalloc.c: Update.
21745 2001-01-19 Akim Demaille <akim@epita.fr>
21747 Get rid of the ad hoc handling of token_buffer in the scanner: use
21750 * src/lex.c (token_obstack): New.
21751 (init_lex): Initialize it. No longer call...
21752 (grow_token_buffer): this. Remove it.
21753 Adjust all the places which used it to use the obstack.
21755 2001-01-19 Akim Demaille <akim@epita.fr>
21757 * src/lex.h: Rename all the tokens:
21758 s/\bENDFILE\b/tok_eof/g;
21759 s/\bIDENTIFIER\b/tok_identifier/g;
21761 Let them be enums, not #define, to ease debugging.
21762 Adjust all the code.
21764 2001-01-18 Akim Demaille <akim@epita.fr>
21766 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
21767 * src/lex.c (maxtoken, grow_token_buffer): Static.
21769 2001-01-18 Akim Demaille <akim@epita.fr>
21771 Since we now use obstacks, more % directives can be enabled.
21773 * src/lex.c (percent_table): Also accept `%yacc',
21774 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
21776 Handle the actions for `%semantic_parser' and `%pure_parser' here,
21777 instead of returning a token.
21778 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
21779 * src/reader.c (read_declarations): Adjust.
21780 * src/files.c (open_files): Don't call `compute_base_names', don't
21781 compute `attrsfile' since they depend upon data which might be
21782 *in* the input file now.
21783 (output_files): Do it here.
21784 * src/output.c (output_headers): Document the fact that this patch
21785 introduces a guaranteed SEGV for semantic parsers.
21786 * doc/bison.texinfo: Document them.
21787 * tests/suite.at: Exercise these %options.
21789 2000-12-20 Akim Demaille <akim@epita.fr>
21791 Also handle the output file (--verbose) with obstacks.
21793 * files.c (foutput): Remove.
21794 (output_obstack): New.
21795 Adjust all dependencies.
21796 * src/conflicts.c: Return a string.
21797 * src/system.h (obstack_grow_string): Rename as...
21798 (obstack_sgrow): this. Be ready to work with non literals.
21799 (obstack_fgrow4): New.
21801 2000-12-20 Akim Demaille <akim@epita.fr>
21803 * src/files.c (open_files): Fix the computation of short_base_name
21804 in the case of `-o foo.tab.c'.
21806 2000-12-20 Akim Demaille <akim@epita.fr>
21808 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
21809 (copy_dollar): Now that everything uses obstacks, get rid of the
21812 2000-12-20 Akim Demaille <akim@epita.fr>
21814 * src/files.c (open_files): Actually the `.output' file is based
21815 on the short_base_name, not base_name.
21816 * tests/suite.at (Checking output file names): Adjust.
21818 2000-12-20 Akim Demaille <akim@epita.fr>
21820 * src/bison.s1: Remove, we now use directly...
21821 * src/bison.simple: this.
21822 * src/Makefile.am: Use pkgdata instead of data.
21824 2000-12-20 Akim Demaille <akim@epita.fr>
21826 * src/files.c (guard_obstack): New.
21827 (open_files): Initialize it.
21828 (output_files): Dump it...
21829 * src/files.h: Export it.
21830 * src/reader.c (copy_guard): Use it.
21832 2000-12-19 Akim Demaille <akim@epita.fr>
21834 * src/files.c (outfile, defsfile, actfile): Removed as global
21836 (open_files): Don't compute them.
21837 (output_files): Adjust.
21838 (base_name, short_base_name): Be global.
21839 Adjust dependencies.
21841 2000-12-19 Akim Demaille <akim@epita.fr>
21843 * src/files.c (strsuffix): New.
21844 (stringappend): Be just like strcat but allocate.
21845 (base_names): Eve out from open_files.
21846 Try to simplify the rather hairy computation of base_name and
21848 (open_files): Use it.
21849 * tests/suite.at (Checking output file names): New test.
21851 2000-12-19 Akim Demaille <akim@epita.fr>
21853 * src/system.h (obstack_grow_literal_string): Rename as...
21854 (obstack_grow_string): this.
21855 * src/output.c (output_parser): Recognize `%% actions' instead of
21857 * src/bison.s1: s/$/%% actions/.
21858 * src/bison.hairy: Likewise.
21860 2000-12-19 Akim Demaille <akim@epita.fr>
21862 * src/output.c (output_parser): Compute the `#line' lines when
21864 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
21865 Suggested by Hans Aberg.
21867 2000-12-19 Akim Demaille <akim@epita.fr>
21869 Let the handling of the skeleton files be local to the procedures
21872 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
21874 (fparser, open_extra_files): Remove.
21875 (open_files, output_files): Don't take care of fparser.
21876 * src/files.h: Adjust.
21877 * src/output.c (output_parser): Open and close the file to the
21879 * src/reader.c (read_declarations): When %semantic_parser, open
21882 2000-12-19 Akim Demaille <akim@epita.fr>
21884 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
21885 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
21887 2000-12-19 Akim Demaille <akim@epita.fr>
21889 * src/files.c (open_files): Yipee! We no longer need all the code
21890 looking for `/tmp' since we have no tmp file.
21892 2000-12-19 Akim Demaille <akim@epita.fr>
21894 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
21896 * src/files.c (open_files): Less dependency on MSDOS etc.
21898 2000-12-14 Akim Demaille <akim@epita.fr>
21900 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
21901 Provide a default definition.
21902 Use it when executing the default @ action.
21903 * src/reader.c (reader_output_yylsp): No longer include
21904 `timestamp' and `text' in the default YYLTYPE.
21906 2000-12-12 Akim Demaille <akim@epita.fr>
21908 * src/reader.c (copy_definition, parse_union_decl, copy_action)
21909 (copy_guard): Quote the file names.
21910 Reported by Laurent Mascherpa.
21912 2000-12-12 Akim Demaille <akim@epita.fr>
21914 * src/output.c (output_headers, output_program, output): Be sure
21915 to escape special characters when outputting filenames.
21916 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
21917 (output_headers): Don't depend on them, Use ACTSTR.
21919 2000-11-17 Akim Demaille <akim@epita.fr>
21921 * lib/obstack.h: Formatting changes.
21922 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
21923 prevents type checking.
21924 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
21925 cast the value to (void *): assigning a `foo *' to a `void *'
21927 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
21928 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
21931 2000-11-17 Akim Demaille <akim@epita.fr>
21933 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
21935 (suite.m4, regression.m4, calc.m4): these.
21936 * tests/atgeneral.m4: Update from CVS Autoconf.
21938 2000-11-17 Akim Demaille <akim@epita.fr>
21940 * tests/regression.m4 (%union and --defines): New test,
21941 demonstrating a current bug in the obstack implementation.
21943 2000-11-17 Akim Demaille <akim@epita.fr>
21945 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
21947 Use them to declare the variables which are global or local to
21950 2000-11-17 Akim Demaille <akim@epita.fr>
21952 * acconfig.h: Remove, no longer used.
21954 2000-11-07 Akim Demaille <akim@epita.fr>
21956 * src: s/Copyright (C)/Copyright/g.
21958 2000-11-07 Akim Demaille <akim@epita.fr>
21960 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
21962 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
21964 2000-11-07 Akim Demaille <akim@epita.fr>
21966 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
21967 Merge in a single CPP if/else.
21969 2000-11-07 Akim Demaille <akim@epita.fr>
21971 * src/output.c (output): Remove useless variables.
21972 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
21973 argument `data' for consistency with the prototypes.
21974 Qualify it `const'.
21975 (obstack_copy, obstack_copy0): Rename the second argument as
21976 `address' for consistency. Qualify it `const'.
21977 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
21978 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
21979 `const' their input argument (`data' or `address').
21980 Adjust the corresponding macros to include `const' in casts.
21982 2000-11-03 Akim Demaille <akim@epita.fr>
21984 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
21985 s/PFILE1/BISON_HAIRY/.
21986 Adjust dependencies.
21988 2000-11-03 Akim Demaille <akim@epita.fr>
21990 For some reason, this was not applied.
21992 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
21993 `unlink': it's no longer used.
21995 2000-11-03 Akim Demaille <akim@epita.fr>
21997 * src/files.c (skeleton_find): New function, eved out of...
21998 (open_files, open_extra_files): here.
22000 2000-11-03 Akim Demaille <akim@epita.fr>
22002 Don't use `atexit'.
22004 * src/files.c (obstack_save): New function.
22005 (done): Rename as...
22006 (output_files): this.
22007 Use `obstack_save'.
22008 * src/main.c (main): Don't use `atexit' to register `done', since
22009 it no longer has to remove tmp files, just call `output_files'
22010 when there are no errors.
22012 2000-11-02 Akim Demaille <akim@epita.fr>
22014 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
22015 `unlink': it's no longer used.
22016 * src/files.h: Formatting changes.
22018 2000-11-02 Akim Demaille <akim@epita.fr>
22020 Remove the last uses of mktemp and unlink/delete.
22022 * src/files.c (fdefines, ftable): Removed.
22023 (defines_ostack, table_obstack): New.
22024 Adjust dependencies of the former into uses of the latter.
22025 * src/output.c (output_short_or_char_table, output_short_table):
22026 Convert to using obstacks.
22027 * src/reader.c (copy_comment2): Accept one FILE * and two
22029 (output_token_defines, reader_output_yylsp): Use obstacks.
22030 * src/system.h (obstack_fgrow3): New.
22031 * po/POTFILES.in: Adjust.
22033 2000-11-01 Akim Demaille <akim@epita.fr>
22035 Change each use of `fattrs' into a use of `attrs_obstack'.
22037 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
22038 * src/files.c (fattrs): Remove.
22039 (attrs_obstack): New.
22040 Adjust all dependencies.
22041 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
22043 2000-11-01 Akim Demaille <akim@epita.fr>
22045 Introduce obstacks.
22046 Change each use of `faction' into a use of `action_obstack'.
22048 * lib/obstack.h, lib/obstack.c: New files.
22049 * src/files.c (faction): Remove.
22050 (action_obstack): New.
22051 Adjust all dependencies.
22053 2000-10-20 Akim Demaille <akim@epita.fr>
22055 * lib/quote.h (PARAMS): New macro. Use it.
22057 2000-10-16 Akim Demaille <akim@epita.fr>
22059 * src/output.c (output_short_or_char_table): New function.
22060 (output_short_table, output_token_translations): Use it.
22061 (goto_actions): Use output_short_table.
22063 2000-10-16 Akim Demaille <akim@epita.fr>
22065 * src/symtab.c (bucket_new): New function.
22068 * src/output.c (output_short_table): New argument to display the
22069 comment associated with the table.
22070 Adjust dependencies.
22071 (output_gram): Use it.
22072 (output_rule_data): Nicer output layout for YYTNAME.
22074 2000-10-16 Akim Demaille <akim@epita.fr>
22076 * src/lex.c (read_typename): New function.
22078 * src/reader.c (copy_dollar): Likewise.
22080 2000-10-16 Akim Demaille <akim@epita.fr>
22082 * src/reader.c (copy_comment2): Expect the input stream to be on
22083 the `/' which is suspected to open a comment, instead of being
22084 called after `//' or `/*' was read.
22085 (copy_comment, copy_definition, parse_union_decl, copy_action)
22086 (copy_guard): Adjust.
22088 2000-10-16 Akim Demaille <akim@epita.fr>
22090 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
22091 `read_signed_integer'.
22093 2000-10-16 Akim Demaille <akim@epita.fr>
22095 * src/reader.c (copy_dollar): New function.
22096 (copy_guard, copy_action): Use it.
22098 2000-10-16 Akim Demaille <akim@epita.fr>
22100 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
22101 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
22102 New files, from Fileutils 4.0.27.
22103 * src/main.c (printable_version): Remove.
22104 * src/lex.c, src/reader.c: Use `quote'.
22106 2000-10-04 Akim Demaille <akim@epita.fr>
22108 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
22110 2000-10-04 Akim Demaille <akim@epita.fr>
22112 * doc/bison.texinfo: Various typos spotted by Neil Booth.
22114 2000-10-04 Akim Demaille <akim@epita.fr>
22116 When a literal string is used to define two different tokens,
22117 `bison -v' segfaults.
22118 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
22120 * tests/regression.m4: New file.
22121 Include the core of the sample provided by Piotr Gackiewicz.
22122 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
22125 2000-10-04 Akim Demaille <akim@epita.fr>
22127 * src/reader.c (parse_expect_decl): Keep `count' within the size
22131 2000-10-02 Paul Eggert <eggert@twinsun.com>
22133 * bison.s1 (yyparse): Assign the default value
22134 unconditionally, to avoid a GCC warning and make the parser a
22137 2000-10-02 Akim Demaille <akim@epita.fr>
22139 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
22142 2000-10-02 Akim Demaille <akim@epita.fr>
22144 * src/derives.c, src/print.c, src/reduce.c: To ease the
22145 translation, move some `\n' out of the translated strings.
22147 2000-10-02 Akim Demaille <akim@epita.fr>
22149 The location tracking mechanism is precious for parse error
22150 messages. Nevertheless, it is enabled only when `@n' is used in
22151 the grammar, which is a different issue (you can use it in error
22152 message, but not in the grammar per se). Therefore, there should
22153 be another means to enable it.
22155 * src/getargs.c (getargs): Support `--locations'.
22156 (usage): Report it.
22157 * src/getargs.h (locationsflag): Export it.
22158 * src/lex.c (percent_table): Support `%locations'.
22159 * src/reader.c (yylsp_needed): Remove this variable, now replaced
22160 with `locationsflag'.
22161 * doc/bison.texinfo: Document `--locations' and `%locations'.
22163 * tests/calc.m4: Test it.
22165 For regularity of the names, replace each
22166 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
22167 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
22168 In addition replace each `flag' with `_flag'.
22170 2000-10-02 Akim Demaille <akim@epita.fr>
22172 Also test parse error messages, including with YYERROR_VERBOSE.
22174 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
22176 Use it to check the computations.
22177 Use it to check `nonassoc' is honored.
22178 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
22179 `--yyerror-verbose'.
22180 (_AT_CHECK_CALC): Adjust to this option.
22181 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
22183 2000-10-02 Akim Demaille <akim@epita.fr>
22185 Test also `--verbose', `--defines' and `--name-prefix'. Testing
22186 the latter demonstrates a flaw in the handling of non debugging
22187 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
22188 was used in order to simplify:
22204 unfortunately this leads to a CPP conflict when
22205 `--name-prefix=foo' is used since it produces `#define yydebug
22208 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
22209 (YYDPRINTF): New macro.
22211 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
22213 Also test `--verbose', `--defines' and `--name-prefix'.
22215 2000-10-02 Akim Demaille <akim@epita.fr>
22217 Improve the readability of the produced parsers.
22219 * src/bison.s1: Formatting changes.
22220 Improve the comment related to the `$' mark.
22221 (yydefault): Don't fall through to `yyresume': `goto' there.
22222 * src/output.c (output_parser): When the `$' is met, skip the end
22224 New variable, `number_of_dollar_signs', to check there's exactly
22225 one `$' in the parser skeleton.
22227 2000-10-02 Akim Demaille <akim@epita.fr>
22229 * lib/xstrdup.c: New file, from the fileutils.
22230 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
22231 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
22232 instead of strlen + xmalloc + strcpy.
22233 * src/symtab.c (copys): Remove, use xstrdup instead.
22235 2000-10-02 Akim Demaille <akim@epita.fr>
22237 * src/gram.h (associativity): New enum type which replaces the
22238 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
22239 `right_assoc', `left_assoc' and `non_assoc'.
22240 Adjust all dependencies.
22241 * src/reader.c: Formatting changes.
22242 (LTYPESTR): Don't define it, use it as a literal in
22243 `reader_output_yylsp'.
22244 * src/symtab.h (symbol_class): New enum type which replaces the
22245 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
22246 `sunknown', `stoken and `snterm'.
22248 2000-10-02 Akim Demaille <akim@epita.fr>
22250 * src/getargs.c (fixed_outfiles): Rename as...
22251 (yaccflag): for consistency and accuracy.
22252 Adjust dependencies.
22254 2000-10-02 Akim Demaille <akim@epita.fr>
22256 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
22257 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
22258 difficult and introduced a lot of core dump. It turns out that
22259 Bison used an implementation of `xmalloc' based on `calloc', and
22260 at various places it does depend upon the initialization to 0. I
22261 have not tried to isolate the pertinent places, and all the former
22262 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
22263 someone should address this issue.
22265 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
22266 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
22268 Adjust dependencies.
22269 * src/warshall.h: New file.
22272 2000-10-02 Akim Demaille <akim@epita.fr>
22274 Various anti-`extern in *.c' changes.
22276 * src/system.h: Include `assert.h'.
22278 2000-10-02 Akim Demaille <akim@epita.fr>
22280 * src/state.h (nstates, final_state, first_state, first_shift)
22281 (first_reduction): Move their exportation from here...
22282 * src/LR0.h: to here.
22283 Adjust dependencies.
22284 * src/getargs.c (statisticsflag): New variable.
22285 Add support for `--statistics'.
22286 Adjust dependencies.
22288 Remove a lot of now useless `extern' statements in most files.
22290 2000-10-02 Akim Demaille <akim@epita.fr>
22292 * src/LR0.h: New file.
22295 2000-10-02 Akim Demaille <akim@epita.fr>
22297 * src/print.h: New file.
22299 * src/print.c: Formatting and ordering changes.
22300 (verbose, terse): Replace with...
22301 (print_results): this new function.
22302 Adjust dependencies.
22304 2000-10-02 Akim Demaille <akim@epita.fr>
22306 * src/conflicts.c (conflict_report): New function.
22307 (conflict_log, verbose_conflict_log): Replace with...
22308 (print_conflicts): this function.
22309 Adjust dependencies.
22310 * src/conflicts.h: New file.
22311 Propagate its inclusion.
22313 2000-10-02 Akim Demaille <akim@epita.fr>
22315 * src/nullable.h: New file.
22316 Propagate its inclusion.
22317 * src/nullable.c: Formatting changes.
22319 2000-10-02 Akim Demaille <akim@epita.fr>
22321 * src/reduce.h: New file.
22322 Propagate its inclusion.
22323 * src/reduce.c: Topological sort and other formatting changes.
22324 (bool, TRUE, FALSE): Move their definition to...
22325 * src/system.h: here.
22327 2000-10-02 Akim Demaille <akim@epita.fr>
22329 * src/files.c: Formatting changes.
22330 (tryopen, tryclose, openfiles): Rename as...
22331 (xfopen, xfclose, open_files): this.
22332 (stringappend): static.
22333 * src/files.h: Complete the list of exported symbols.
22336 2000-10-02 Akim Demaille <akim@epita.fr>
22338 * src/reader.h: New file.
22339 Propagate its use instead of tedious list of `extern' and
22341 * src/reader.c: Formatting changes, topological sort,
22344 2000-10-02 Akim Demaille <akim@epita.fr>
22346 * src/lex.h: Prototype `lex.c' exported functions.
22347 * src/reader.c: Adjust.
22348 * src/lex.c: Formatting changes.
22349 (safegetc): Rename as...
22352 2000-10-02 Akim Demaille <akim@epita.fr>
22354 * src/lalr.h: New file.
22355 Propagate its inclusion instead of prototypes and `extern'.
22356 * src/lalr.c: Formatting changes, topological sorting etc.
22358 2000-10-02 Akim Demaille <akim@epita.fr>
22360 * src/output.c (token_actions): Introduce a temporary array,
22361 YYDEFACT, that makes it possible for this function to use
22362 output_short_table.
22364 2000-10-02 Akim Demaille <akim@epita.fr>
22366 `user_toknums' is output as a `short[]' in `output.c', while it is
22367 defined as a `int[]' in `reader.c'. For consistency with the
22368 other output tables, `user_toknums' is now defined as a table of
22371 * src/reader.c (user_toknums): Be a short table instead of an int
22373 Adjust dependencies.
22375 Factor the short table outputs.
22377 * src/output.c (output_short_table): New function.
22378 * src/output.c (output_gram, output_stos, output_rule_data)
22379 (output_base, output_table, output_check): Use it.
22381 2000-10-02 Akim Demaille <akim@epita.fr>
22383 * src/output.c (output): Topological sort of the functions, in
22384 order to get rid of the `static' prototypes.
22385 No longer use `register'.
22386 * src/output.h: New file.
22387 Propagate its inclusion in files explicitly prototyping functions
22390 2000-09-21 Akim Demaille <akim@epita.fr>
22392 * src/atgeneral.m4: Update from Autoconf.
22394 2000-09-21 Akim Demaille <akim@epita.fr>
22396 * src/closure.h: New file.
22397 * src/closure.c: Formatting changes, topological sort over the
22398 functions, use of closure.h.
22399 (initialize_closure, finalize_closure): Rename as...
22400 (new_closure, free_closure): these. Adjust dependencies.
22401 * src/LR0.c: Formatting changes, topological sort, use of
22403 (initialize_states): Rename as...
22404 (new_states): this.
22405 * src/Makefile.am (noinst_HEADERS): Adjust.
22407 2000-09-20 Akim Demaille <akim@epita.fr>
22409 * src/acconfig.h: Don't protect config.h against multiple
22411 Don't define PARAMS.
22412 * src/system.h: Define PARAMS.
22413 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
22414 purpose of config.h. system.h must not try to fix wrong
22415 definitions in config.h.
22417 2000-09-20 Akim Demaille <akim@epita.fr>
22419 * src/derives.h: New file.
22420 * src/main.c, src/derives.h: Use it.
22421 Formatting changes.
22422 * src/Makefile.am (noinst_HEADERS): Adjust.
22424 2000-09-20 Akim Demaille <akim@epita.fr>
22426 * tests/atgeneral.m4: Update from Autoconf.
22427 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
22428 (AT_CHECK_CALC): New macros.
22429 Use these macros to test bison with options `', `--raw',
22430 `--debug', `--yacc', `--yacc --debug'.
22432 2000-09-19 Akim Demaille <akim@epita.fr>
22434 * src/output.c: Formatting changes.
22435 * src/machine.h: Remove, leaving its contents in...
22436 * src/system.h: here.
22438 Adjust all dependencies on stdio.h and machine.h.
22439 * src/getargs.h: New file.
22440 Let all `extern' declarations about getargs.c be replaced with
22441 inclusion of `getargs.h'.
22442 * src/Makefile.am (noinst_HEADERS): Adjust.
22444 * tests/calc.m4 (yyin): Be initialized in main, not on the global
22446 (yyerror): Returns void, not int.
22447 * doc/bison.texinfo: Formatting changes.
22449 2000-09-19 Akim Demaille <akim@epita.fr>
22451 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
22454 2000-09-18 Akim Demaille <akim@epita.fr>
22456 * configure.in: Append WARNING_CFLAGS to CFLAGS.
22457 * src/Makefile.am (INCLUDES): Don't.
22458 Be ready to fetch headers in lib/.
22460 2000-09-18 Akim Demaille <akim@epita.fr>
22462 * doc/bison.texinfo: Update the copyright.
22463 ANSIfy and GNUify the examples.
22464 Remove the old menu.
22466 2000-09-18 Akim Demaille <akim@epita.fr>
22468 First set of tests: use the `calc' example from the documentation.
22470 * src/bison.s1 (yyparse): Condition the code using `yytname' which
22471 is defined only when YYDEBUG is.
22472 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
22473 * src/files.c (tryopen, tryclose): Formatting changes.
22474 Move to the top and be static.
22475 * src/reader.c (read_signed_integer): Likewise.
22476 * tests/calc.m4: New file.
22477 * Makefile.am, suite.m4: Adjust.
22478 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
22480 2000-09-18 Akim Demaille <akim@epita.fr>
22482 Add support for an Autotest test suite for Bison.
22484 * m4/m4.m4, m4/atconfig.m4: New files.
22485 * m4/Makefile.am (EXTRA_DIST): Adjust.
22486 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
22488 * src/getargs.c: Display a more standard --version message.
22489 * src/reader.c (reader): Formatting changes.
22490 No longer depend upon VERSION_STRING.
22491 * configure.in: No longer use `dnl'.
22492 Set up the test suite and the new directory `tests/.
22493 (VERSION_STRING): Remove.
22495 2000-04-14 Akim Demaille <akim@epita.fr>
22497 * src/reader.c (copy_comment2): New function, same as former
22498 `copy_comment', but outputs into two FILE *.
22499 (copy_comment): Use it.
22500 (parse_union_decl): Use it.
22501 (get_type, parse_start_decl): Use the same `invalid' message.
22502 (parse_start_decl, parse_union_decl): Use the same `multiple'
22504 (parse_union_decl, copy_guard, copy_action): Use the same
22505 `unmatched' message.
22506 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
22508 2000-03-31 Akim Demaille <akim@epita.fr>
22510 * src/files.c (tryopen, tryclose): Move to the top.
22513 2000-03-31 Akim Demaille <akim@epita.fr>
22515 * src/main.c (main): Don't call `done', exit does it.
22517 2000-03-31 Akim Demaille <akim@epita.fr>
22519 * allocate.c: s/return (foo)/return foo/.
22520 * lalr.c: Likewise.
22522 * output.c: Likewise.
22523 * reader.c: Likewise.
22524 * symtab.c: Likewise.
22525 * vmsgetargs.c: Likewise.
22527 2000-03-31 Akim Demaille <akim@epita.fr>
22529 Clean up the error reporting functions.
22531 * src/report.c: New file.
22532 * src/report.h: Likewise.
22533 * src/Makefile.am: Adjust.
22534 * m4/error.m4: New file.
22535 * m4/Makefile.am: Adjust.
22536 * configure.in (jm_PREREQ_ERROR): Call it.
22537 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
22539 (fatal, fatals): Remove. All callers use complain.c::fatal.
22540 (warn, warni, warns, warnss, warnss): Remove. All callers use
22541 complain.c::complain.
22542 (toomany): Remove, use fatal instead.
22543 * src/files.c (done): No argument, use complain_message_count.
22544 * src/main.c (main): Register `done' to `atexit'.
22546 * src/getargs.c (usage): More `fputs', less `fprintf'.
22548 2000-03-28 Akim Demaille <akim@epita.fr>
22550 * lib/: New directory.
22551 * Makefile.am (SUBDIRS): Adjust.
22552 * configure.in: Adjust.
22553 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
22555 * src/alloca.c: Moved to lib/.
22556 * src/getopt.c: Likewise.
22557 * src/getopt1.c: Likewise.
22558 * src/getopt.h: Likewise.
22559 * src/ansi2knr.c: Likewise.
22560 * src/ansi2knr.1: Likewise.
22561 * src/Makefile.am: Adjust.
22562 * lib/Makefile.am: New file.
22564 2000-03-28 Akim Demaille <akim@epita.fr>
22566 * src/getargs.c (usage): Refresh the help message.
22568 2000-03-17 Akim Demaille <akim@epita.fr>
22570 * src/getopt1.c: Updated from textutils 2.0e
22571 * src/getopt.c: Likewise.
22572 * src/getopt.h: Likewise.
22574 2000-03-17 Akim Demaille <akim@epita.fr>
22576 * src/Makefile.am (bison.simple): Fix the awk program: quote only
22577 the file name, not the whole `#line LINE FILE'.
22579 2000-03-17 Akim Demaille <akim@epita.fr>
22581 On syntax errors, report the token on which we choked.
22583 * src/bison.s1 (yyparse): In the label yyerrlab, when
22584 YYERROR_VERBOSE, add yychar in msg.
22586 2000-03-17 Akim Demaille <akim@epita.fr>
22588 * src/reader.c (copy_at): New function.
22589 (copy_guard): Use it.
22590 (copy_action): Use it.
22592 2000-03-17 Akim Demaille <akim@epita.fr>
22594 Be kind to translators, save some useless translations.
22596 * src/main.c (banner): New function.
22597 (fatal_banner): Use it.
22598 (warn_banner): Use it.
22600 2000-03-17 Akim Demaille <akim@epita.fr>
22602 * src/reader.c (copy_definition): Use copy_string and
22603 copy_comment. Removed now unused `match', `ended',
22605 (copy_comment, copy_string): Moved, to be visible from
22608 2000-03-17 Akim Demaille <akim@epita.fr>
22610 * src/reader.c (copy_string): Declare `static inline'. No
22611 problems with inline, since it is checked by configure.
22612 (copy_comment): Likewise.
22614 2000-03-17 Akim Demaille <akim@epita.fr>
22616 * src/reader.c (packsymbols): Formatting changes.
22618 2000-03-17 Akim Demaille <akim@epita.fr>
22620 * src/reader.c (copy_comment): New function, factored out from:
22621 (copy_action): Use it. Removed now unused `match', `ended',
22623 (copy_guard): Likewise.
22625 2000-03-17 Akim Demaille <akim@epita.fr>
22627 * src/reader.c (copy_string): New function, factored out from:
22628 (copy_action): Use it.
22629 (copy_guard): Likewise.
22631 2000-03-17 Akim Demaille <akim@epita.fr>
22633 Change the handling of @s so that they behave exactly like $s.
22634 There is now a pseudo variable @$ (readble and writable), location
22635 of the lhs of the rule (by default ranging from the location of
22636 the first symbol of the rhs, to the location of the last symbol,
22637 or, if the rhs is empty, YYLLOC).
22639 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
22641 (yyparse): When providing a default semantic action, provide a
22642 default location action.
22643 (after the $): No longer change `*YYLSP', just stack YYLOC the
22644 same way you stack YYVAL.
22645 * src/reader.c (read_declarations): Use warns.
22646 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
22647 (copy_action, case '@'): Likewise.
22648 Use a standard error message, to save useless work from
22651 2000-03-17 Akim Demaille <akim@epita.fr>
22653 * src/bison.s1: Formatting and cosmetics changes.
22654 * src/reader.c: Likewise.
22655 Update the Copyright notice.
22657 2000-03-17 Akim Demaille <akim@epita.fr>
22659 * src/bison.s1 (#line): All set to `#line' only, since the
22660 Makefile now handles them.
22662 2000-03-16 Akim Demaille <akim@epita.fr>
22664 * src/output.c (output_rule_data): Output the documentation of
22665 some of the tables.
22666 (Copyright notice): Update.
22667 Formatting changes.
22669 2000-03-16 Akim Demaille <akim@epita.fr>
22671 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
22672 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
22673 One `#if YYDEBUG' remains, since it uses variables which are
22674 defined only if `YYDEBUG != 0'.
22676 2000-03-16 Akim Demaille <akim@epita.fr>
22678 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
22679 and related variables so that the similarities are highlighted.
22681 2000-03-16 Akim Demaille <akim@epita.fr>
22683 * src/bison.s1: Properly indent CPP directives.
22685 2000-03-16 Akim Demaille <akim@epita.fr>
22687 * src/bison.s1: Properly indent the `alloca' CPP section.
22689 2000-03-16 Akim Demaille <akim@epita.fr>
22691 Do not hard code values of directories in `configure.in'.
22692 Update the `configure' tool chain.
22694 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
22696 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
22697 (AC_OUTPUT): Add m4/Makefile.
22698 Bump to bison 1.28a, 1.29 has never been released.
22699 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
22700 handled via src/Makefile.am.
22701 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
22702 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
22704 * Makefile.am (SUBDIRS): Add m4.
22705 (ACLOCAL_AM_FLAGS): New variable.
22706 (AUTOMAKE_OPTIONS): Add check-news.
22707 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
22708 the proper line number and file name.
22709 (DEFS): Propagate the location of bison library files and of the
22711 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
22713 * acinclude.m4: Remove, replaced by the directory m4.
22714 * m4/Makefile.am (EXTRA_DIST): New variable.
22715 * m4/gettext.m4: New file, from the fileutils.
22716 * m4/lcmessage.m4: Likewise
22717 * m4/progtest.m4: Likewise.
22718 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
22720 2000-03-10 Akim Demaille <akim@epita.fr>
22723 Formatting changes of various comments.
22724 Respect the GNU coding standards at various places.
22725 Don't use `_()' when no translation is needed.
22727 1999-12-13 Jesse Thilo <jthilo@gnu.org>
22730 OS/2 honors TMPDIR environment variable.
22732 1999-12-13 Jesse Thilo <jthilo@gnu.org>
22734 * doc/bison.texinfo: Tweaked spelling and grammar.
22736 Removed reference to price of printed copy.
22737 Mention BISON_SIMPLE and BISON_HAIRY.
22739 1999-12-13 Jesse Thilo <jthilo@gnu.org>
22741 * configure.in, NEWS:
22742 Bison 1.29 released.
22744 1999-10-27 Jesse Thilo <jthilo@gnu.org>
22746 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
22747 Added reference card.
22749 1999-07-26 Jesse Thilo <jthilo@gnu.org>
22751 * po/ru.po: Added Russian translation.
22753 1999-07-26 Jesse Thilo <jthilo@gnu.org>
22755 * configure.in: Added Russian translation.
22757 1999-07-06 Jesse Thilo <jthilo@gnu.org>
22759 * configure.in, NEWS, README:
22760 Released version 1.28.
22762 1999-06-14 Jesse Thilo <jthilo@gnu.org>
22765 Squashed redefinition warning on some systems.
22767 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
22768 Have configure build version string instead of relying on ANSI string
22771 1999-06-14 Jesse Thilo <jthilo@gnu.org>
22773 * po/POTFILES.in: Got rid of version.c.
22775 1999-06-14 Jesse Thilo <jthilo@gnu.org>
22777 * acconfig.h, configure.in:
22778 Have configure build version string instead of relying on ANSI string
22781 1999-06-08 Jesse Thilo <jthilo@gnu.org>
22784 Dropped mention of `+' for long-named options.
22786 1999-05-30 Jesse Thilo <jthilo@gnu.org>
22788 * src/files.c: Added <unistd.h> for unlink().
22790 * src/Makefile.am, src/system.h:
22793 1999-05-30 Jesse Thilo <jthilo@gnu.org>
22795 * README: Added a FAQ list.
22797 * configure.in, acconfig.h:
22800 1999-05-30 Jesse Thilo <jthilo@gnu.org>
22802 * doc/FAQ, doc/Makefile.am:
22805 1999-05-19 Jesse Thilo <jthilo@gnu.org>
22807 * src/alloc.h, src/symtab.h, src/version.c:
22808 Protected inclusion of "config.h" with HAVE_CONFIG_H.
22810 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22812 * src/.cvsignore, src/Makefile.am:
22813 Reorganized: sources in `src', documentation in `doc'.
22815 * src/lex.c (literalchar):
22816 fixed the code for escaping double quotes (thanks
22819 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22821 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
22822 Adjusted paths to reflect directory reorganization.
22824 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22826 * doc/.cvsignore, doc/Makefile.am:
22827 Reorganized: sources in `src', documentation in `doc'.
22829 1999-04-18 Jesse Thilo <jthilo@gnu.org>
22832 Updated AC_INIT file to reflect directory reorganization.
22834 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
22835 Reorganized: sources in `src', documentation in `doc'.
22837 1999-04-13 Jesse Thilo <jthilo@gnu.org>
22840 Don't declare calloc() and realloc() if not necessary.
22842 1999-04-13 Jesse Thilo <jthilo@gnu.org>
22844 * configure.in, acconfig.h, acinclude.m4:
22845 Don't declare calloc() and realloc() if not necessary.
22847 1999-03-23 Jesse Thilo <jthilo@gnu.org>
22849 * po/.cvsignore: Added i18n support.
22851 1999-03-23 Jesse Thilo <jthilo@gnu.org>
22853 * acconfig.h, configure.in, Makefile.am:
22854 Added i18n support.
22856 1999-03-22 Jesse Thilo <jthilo@gnu.org>
22858 * src/bison.s1: Fixed #line numbers.
22860 1999-03-15 Jesse Thilo <jthilo@gnu.org>
22862 * po/es.po, po/fr.po, po/nl.po, po/de.po:
22863 Added PO files from Translation Project.
22865 1999-03-03 Jesse Thilo <jthilo@gnu.org>
22868 Added support for non-ANSI compilers (ansi2knr).
22870 1999-02-16 Jesse Thilo <jthilo@gnu.org>
22872 * configure.in: Bumped version number to 1.27.
22875 Added `bison.simple' to list of files removed by `make distclean'.
22877 1999-02-12 Jesse Thilo <jthilo@gnu.org>
22879 * src/files.c, src/files.h:
22880 Defined locations of parser files in config.h instead of Makefile.
22882 1999-02-12 Jesse Thilo <jthilo@gnu.org>
22884 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
22885 Defined locations of parser files in config.h instead of Makefile.
22887 1999-02-09 Jesse Thilo <jthilo@gnu.org>
22890 Removed inappropriate use of $< macro.
22892 1999-02-05 Jesse Thilo <jthilo@gnu.org>
22894 * po/Makefile.in.in, po/POTFILES.in:
22895 Add `po' directory skeleton.
22897 1999-01-27 Jesse Thilo <jthilo@gnu.org>
22899 * README: Document help-bison list.
22901 * configure.in: Add check for mkstemp().
22903 1999-01-20 Jesse Thilo <jthilo@gnu.org>
22905 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
22906 Hush a few compiler warnings.
22909 Add tryclose(), which verifies that fclose was successful.
22910 Hush a couple of compiler warnings.
22912 1999-01-20 Jesse Thilo <jthilo@gnu.org>
22914 * Makefile.am, OChangeLog:
22915 ChangeLog is now automatically generated. Include the old version as
22918 1999-01-14 Jesse Thilo <jthilo@gnu.org>
22920 * 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:
22921 Update FSF address.
22923 1999-01-14 Jesse Thilo <jthilo@gnu.org>
22925 * doc/bison.texinfo: Fix formatting glitch.
22927 * doc/bison.texinfo: Update FSF address.
22929 1999-01-14 Jesse Thilo <jthilo@gnu.org>
22931 * acconfig.h: Update FSF address.
22933 1999-01-08 Jesse Thilo <jthilo@gnu.org>
22936 Don't define PACKAGE here, since config.h defines it.
22938 1998-12-30 Jesse Thilo <jthilo@gnu.org>
22940 * src/reader.c: Update copyright date.
22943 Ditch sprintf to statically-sized buffers in fatal/warn functions in
22944 favor of output directly to stderr (avoids buffer overruns).
22946 * src/reader.c: Some checks for premature EOF.
22948 * 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:
22949 Use prototypes if the compiler understands them.
22951 * src/files.c: Honor TMPDIR on Unix hosts.
22952 Use prototypes if the compiler understands them.
22955 Fix a couple of buffer overrun bugs.
22956 Use prototypes if the compiler understands them.
22958 * src/system.h: Include unistd.h and ctype.h.
22959 Use #ifdef instead of #if for NLS symbols.
22961 1998-12-30 Jesse Thilo <jthilo@gnu.org>
22963 * doc/bison.texinfo:
22964 Delete comment "consider using @set for edition number, etc..." since
22965 we now are doing so.
22967 1998-12-30 Jesse Thilo <jthilo@gnu.org>
22970 Use prototypes if the compiler understands them.
22972 * NEWS: Document 1.26 highlights.
22974 * Makefile.am: Require Automake 1.3 or later.
22977 Use prototypes if the compiler understands them.
22979 1998-12-29 Jesse Thilo <jthilo@gnu.org>
22982 Use VERSION symbol from automake for version number.
22984 1998-12-29 Jesse Thilo <jthilo@gnu.org>
22986 * acconfig.h, configure.in, version.cin:
22987 Use VERSION symbol from automake for version number.
22989 1998-11-28 Jesse Thilo <jthilo@gnu.org>
22992 Distribute original version of simple parser (bison.s1), not built
22993 version (bison.simple).
22995 1998-11-28 Jesse Thilo <jthilo@gnu.org>
22997 * doc/bison.texinfo: Add info dir entry.
22999 * doc/bison.texinfo:
23000 Let automake put version number into documentation.
23002 1998-11-26 Jesse Thilo <jthilo@gnu.org>
23004 * src/bison.cld, src/build.com, src/vmshlp.mar:
23005 Add non-RCS files from /gd/gnu/bison.
23007 1998-11-26 Jesse Thilo <jthilo@gnu.org>
23010 Document the BISON_HAIRY and BISON_SIMPLE variables.
23012 1998-11-25 Jesse Thilo <jthilo@gnu.org>
23014 * src/version.c: Build version.c automatically.
23017 Fix token numbering (used to start at 258, not 257).
23019 * src/system.h: Include config.h.
23021 * src/getargs.c: Update bug report address.
23023 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
23024 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
23026 1998-11-25 Jesse Thilo <jthilo@gnu.org>
23029 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
23031 * configure.in, version.cin:
23032 Build version.c automatically.
23034 * AUTHORS: Add AUTHORS file.
23036 * README: Update bug report address.
23039 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
23041 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
23042 Add automake stuff.
23044 1998-11-25 Jesse Thilo <jthilo@gnu.org>
23046 * doc/bison.texinfo: Clean up some formatting.
23048 1998-05-05 Richard Stallman <rms@gnu.org>
23050 * doc/bison.texinfo:
23051 Explain better why to make a pure parser.
23053 1998-01-05 Richard Stallman <rms@gnu.org>
23055 * src/files.c (openfiles):
23056 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
23057 find a temporary directory, if possible. Do not unlink files while
23060 1997-08-25 Richard Stallman <rms@gnu.org>
23062 * src/reader.c (stack_offset;):
23063 Change some warni to warns.
23065 * src/lex.c (literalchar): Use warns, not warni.
23067 1997-06-28 Richard Stallman <rms@gnu.org>
23069 * src/bison.s1: Add a Bison version comment.
23071 * src/main.c (fatal, warn, berror):
23074 1997-06-28 Richard Stallman <rms@gnu.org>
23076 * Makefile.in (bison_version): New variable.
23077 (dist): Use that variable.
23078 (bison.s1): Substitute the Bison version into bison.simple.
23080 * bison.simple: Add a Bison version comment.
23082 1997-06-18 Richard Stallman <rms@gnu.org>
23084 * src/main.c (fatal, warn, berror):
23085 Make error messages standard.
23086 (toomany): Improve error message text.
23088 * 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:
23089 new.h renamed to alloc.h.
23091 1997-06-18 Richard Stallman <rms@gnu.org>
23093 * Makefile.in: new.h renamed to alloc.h.
23095 1997-05-24 Richard Stallman <rms@gnu.org>
23097 * src/lex.c (literalchar):
23098 Fix the code for escaping \, " and '.
23100 (lex): Avoid trouble when there are many chars
23101 to discard in a char literal with just several chars in it.
23103 1997-05-17 Richard Stallman <rms@gnu.org>
23106 Use malloc, if using alloca is troublesome.
23107 (YYSTACK_USE_ALLOCA): New flag macro.
23108 Define it for some systems and compilers.
23109 (YYSTACK_ALLOC): New macro.
23110 (yyparse): Use YYSTACK_ALLOC to allocate stack.
23111 If it was malloc'd, free it.
23113 1997-05-17 Richard Stallman <rms@gnu.org>
23116 Use malloc, if using alloca is troublesome.
23117 (YYSTACK_USE_ALLOCA): New flag macro.
23118 Define it for some systems and compilers.
23119 (YYSTACK_ALLOC): New macro.
23120 (yyparse): Use YYSTACK_ALLOC to allocate stack.
23121 If it was malloc'd, free it.
23123 1997-04-23 Richard Stallman <rms@gnu.org>
23126 (alloca) [__hpux]: Always define as __builtin_alloca.
23128 1997-04-23 Richard Stallman <rms@gnu.org>
23131 (alloca) [__hpux]: Always define as __builtin_alloca.
23133 1997-04-22 Richard Stallman <rms@gnu.org>
23136 [__hpux]: Include alloca.h (right for HPUX 10)
23137 instead of declaring alloca (right for HPUX 9).
23139 * src/bison.s1 (__yy_memcpy):
23140 Declare arg `count' as unsigned int.
23141 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
23143 1997-04-22 Richard Stallman <rms@gnu.org>
23146 [__hpux]: Include alloca.h (right for HPUX 10)
23147 instead of declaring alloca (right for HPUX 9).
23149 * bison.simple (__yy_memcpy):
23150 Declare arg `count' as unsigned int.
23151 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
23153 1997-01-03 Richard Stallman <rms@gnu.org>
23155 * src/allocate.c: [__STDC__ or _MSC_VER]:
23156 Declare calloc and realloc to return void *.
23158 1997-01-02 Richard Stallman <rms@gnu.org>
23161 [_MSC_VER]: Include stdlib.h and process.h.
23162 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
23164 * src/main.c (main): Return FAILURE as a value.
23165 (printable_version): Declare arg as int, not char.
23167 1997-01-02 Richard Stallman <rms@gnu.org>
23169 * Makefile.in (dist):
23170 Explicitly check for symlinks, and copy them.
23172 1996-12-19 Richard Stallman <rms@gnu.org>
23175 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
23177 1996-12-18 Paul Eggert <eggert@gnu.org>
23179 * src/bison.s1 (yyparse):
23180 If __GNUC__ and YYPARSE_PARAM are both defined,
23181 declare yyparse to have a void * argument.
23183 1996-12-18 Paul Eggert <eggert@gnu.org>
23185 * bison.simple (yyparse):
23186 If __GNUC__ and YYPARSE_PARAM are both defined,
23187 declare yyparse to have a void * argument.
23189 1996-12-17 Richard Stallman <rms@gnu.org>
23191 * src/reduce.c (nbits): Add some casts.
23193 1996-08-12 Richard Stallman <rms@gnu.org>
23195 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
23197 1996-08-12 Richard Stallman <rms@gnu.org>
23199 * bison.simple: Test _MSDOS as well as _MSDOS_.
23201 1996-07-31 Richard Stallman <rms@gnu.org>
23204 [__sun && __i386]: Include alloca.h.
23206 1996-07-31 Richard Stallman <rms@gnu.org>
23209 [__sun && __i386]: Include alloca.h.
23211 1996-07-30 Richard Stallman <rms@gnu.org>
23213 * src/bison.s1: Comment change.
23215 * src/bison.s1: Test _MSDOS_, not MSDOS.
23217 1996-07-30 Richard Stallman <rms@gnu.org>
23219 * bison.simple: Comment change.
23221 * bison.simple: Test _MSDOS_, not MSDOS.
23223 1996-06-01 Richard Stallman <rms@gnu.org>
23225 * 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:
23226 Insert `_' macro around many string constants.
23229 Insert `_' macro around many string constants.
23231 (main): Call setlocale, bindtextdomain and textdomain.
23233 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
23234 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
23235 [ENABLE_NLS]: Include libintl.h.
23236 [ENABLE_NLS] (gettext): Define.
23237 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
23238 (N_, PACKAGE, LOCALEDIR): New macros.
23240 1996-06-01 Richard Stallman <rms@gnu.org>
23242 * POTFILES.in: New file.
23244 * Makefile.in (allocate.o):
23245 Define target explicitly.
23247 * Makefile.in (CFLAGS): Set to @CFLAGS@.
23248 (LDFLAGS): Set to @LDFLAGS@.
23249 (configure): Run autoconf only if preceding `cd' succeeds.
23250 (bison.s1): Redirect output to temporary file then move the
23251 temporary to the target, rather than redirecting directly to bison.s1.
23252 (clean): Remove config.status and config.log.
23253 (distclean): Don't remove config.status here.
23255 1996-05-12 Richard Stallman <rms@gnu.org>
23258 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
23260 1996-05-12 Richard Stallman <rms@gnu.org>
23263 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
23265 1996-05-11 Richard Stallman <rms@gnu.org>
23267 * src/bison.s1 (__yy_memcpy):
23268 Really reorder the args, as was supposedly done on Feb 14 1995.
23269 (yyparse): Calls changed accordingly.
23271 1996-05-11 Richard Stallman <rms@gnu.org>
23273 * Makefile.in (dist): Don't use $(srcdir).
23275 * bison.simple (__yy_memcpy):
23276 Really reorder the args, as was supposedly done on Feb 14 1995.
23277 (yyparse): Calls changed accordingly.
23279 1996-01-27 Richard Stallman <rms@gnu.org>
23281 * src/output.c (output_rule_data):
23282 Test YYERROR_VERBOSE in the conditional
23283 around the definition of ttyname.
23285 1995-12-29 Richard Stallman <rms@gnu.org>
23288 Fix line numbers in #line commands.
23290 1995-12-29 Richard Stallman <rms@gnu.org>
23293 Fix line numbers in #line commands.
23295 1995-12-27 Richard Stallman <rms@gnu.org>
23297 * src/bison.s1 (YYPARSE_PARAM_DECL):
23298 In C++, make it always null.
23299 (YYPARSE_PARAM_ARG): New macro.
23300 (yyparse): Use YYPARSE_PARAM_ARG.
23302 1995-12-27 Richard Stallman <rms@gnu.org>
23304 * bison.simple (YYPARSE_PARAM_DECL):
23305 In C++, make it always null.
23306 (YYPARSE_PARAM_ARG): New macro.
23307 (yyparse): Use YYPARSE_PARAM_ARG.
23309 1995-11-29 Richard Stallman <rms@gnu.org>
23311 * doc/bison.texinfo:
23312 Describe literal string tokens, %raw, %no_lines, %token_table.
23314 1995-11-29 Daniel Hagerty <hag@gnu.org>
23316 * doc/bison.texinfo: Fixed update date
23318 1995-10-16 Richard Stallman <rms@gnu.org>
23320 * src/version.c: Version 1.25.
23322 1995-10-16 Richard Stallman <rms@gnu.org>
23324 * NEWS: *** empty log message ***
23326 1995-10-16 Richard Stallman <rms@gnu.org>
23328 * doc/bison.1, doc/bison.rnh:
23331 1995-10-15 Richard Stallman <rms@gnu.org>
23333 * src/vmsgetargs.c, src/getargs.c:
23334 Added -n, -k, and -raw switches.
23335 (noparserflag, toknumflag, rawtoknumflag): New variables.
23337 * src/symtab.h (SALIAS):
23338 New #define for adding aliases to %token.
23339 (struct bucket): Added `alias' field.
23341 * src/reduce.c (reduce_grammar):
23342 Revise error message.
23343 (print_notices): Remove final `.' from error message.
23345 * src/reader.c (reader_output_yylsp):
23347 (readgram): Use `#if 0' around code that accepted %command
23348 inside grammar rules: The documentation doesn't allow it,
23349 and it will fail since the %command processors scan for the next %.
23350 (parse_token_decl): Extended the %token
23351 declaration to allow a multi-character symbol as an alias.
23352 (parse_thong_decl): New function.
23353 (read_declarations): Added %thong declarations.
23354 (read_declarations): Handle NOOP to deal with allowing
23355 % declarations as another means to specify the flags.
23356 (readgram): Allow %prec prior to semantics embedded in a rule.
23357 (skip_to_char, read_declarations, copy_definition)
23358 (parse_token_decl, parse_start_decl, parse_type_decl)
23359 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
23360 (get_type_name, copy_guard, copy_action, readgram)
23361 (get_type, packsymbols): Revised most error messages.
23362 Changed `fatal' to `warnxxx' to avoid aborting for error.
23363 Revised and use multiple warnxxx functions to avoid using VARARGS1.
23364 (read_declarations): Improve the error message for
23365 an invalid character. Do not abort.
23366 (read_declarations, copy_guard, copy_action): Use
23367 printable_version to avoid unprintable characters in printed output.
23368 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
23369 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
23370 Allow the type of a non-terminal can be given
23371 more than once, as long as all specifications give the same type.
23374 (output_headers, output_trailers, output, output_gram)
23375 (output_rule_data): Implement noparserflag variable.
23376 Implement toknumflag variable.
23377 (output): Call reader_output_yylsp to output LTYPESTR.
23379 * src/main.c (main):
23380 If reader sees an error, don't process the grammar.
23381 (fatals): Updated to not use VARARGS1.
23382 (printable_version, int_to_string, warn, warni, warns, warnss)
23383 (warnsss): New error reporting functions. Avoid abort for error.
23386 Added THONG and NOOP for alias processing.
23387 Added SETOPT for the new code that allows setting options with %flags.
23390 Include getopt.h. Add some extern decls.
23391 (safegetc): New function to deal with EOF gracefully.
23392 (literalchar); new function to deal with reading \ escapes.
23393 (lex): Use literalchar.
23394 (lex): Implemented "..." tokens.
23395 (literalchar, lex, parse_percent_token): Made tokenbuffer
23396 always contain the token. This includes growing the token
23397 buffer while reading an integer.
23398 (parse_percent_token): Replaced if-else statement with percent_table.
23399 (parse_percent_token): Added % declarations as another
23400 way to specify the flags -n, -l, and -r. Also added hooks for
23401 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
23402 major changes to files.c.
23403 (lex) Retain in the incoming stream a character following
23405 (skip_white_space, lex): Revised most error messages
23406 and changed fatal to warn to avoid aborting.
23407 (percent_table): Added %thong declarations.
23409 * src/gram.h: Comment changes.
23411 * src/files.c (openfiles, open_extra_files, done):
23413 and actfile file. Handle noparserflag. Both for -n switch.
23415 * src/conflicts.c (resolve_sr_conflict):
23416 Remove use of alloca.
23418 1995-06-01 Jim Meyering <meyering@gnu.org>
23420 * doc/bison.texinfo: *** empty log message ***
23422 1995-05-06 Richard Stallman <rms@gnu.org>
23424 * src/bison.s1: Comment change.
23426 1995-05-06 Richard Stallman <rms@gnu.org>
23428 * bison.simple: Comment change.
23430 1995-05-03 Richard Stallman <rms@gnu.org>
23432 * src/version.c: Version now 1.24.
23434 * src/bison.s1: Change distribution terms.
23436 * src/version.c: Version now 1.23.
23438 1995-05-03 Richard Stallman <rms@gnu.org>
23440 * doc/bison.texinfo:
23441 Rewrite "Conditions for Using Bison".
23442 Update version to 1.24.
23444 1995-05-03 Richard Stallman <rms@gnu.org>
23446 * bison.simple: Change distribution terms.
23448 1995-02-23 Richard Stallman <rms@gnu.org>
23450 * src/files.c: Test __VMS_POSIX as well as VMS.
23452 1995-02-14 Jim Meyering <meyering@gnu.org>
23454 * src/bison.s1 (__yy_memcpy):
23455 Renamed from __yy_bcopy to avoid
23456 confusion. Reverse FROM and TO arguments to be consistent with
23459 1995-02-14 Jim Meyering <meyering@gnu.org>
23461 * bison.simple (__yy_memcpy):
23462 Renamed from __yy_bcopy to avoid
23463 confusion. Reverse FROM and TO arguments to be consistent with
23466 1994-11-10 David J. MacKenzie <djm@gnu.org>
23472 * Makefile.in (DISTFILES): Include NEWS.
23474 * Makefile.in (DISTFILES):
23475 Include install-sh, not install.sh.
23477 * configure.in: Update to Autoconf v2 macro names.
23479 1994-10-05 David J. MacKenzie <djm@gnu.org>
23481 * Makefile.in: fix typo
23483 * Makefile.in (prefix, exec_prefix):
23484 Let configure set them.
23486 1994-09-28 David J. MacKenzie <djm@gnu.org>
23488 * Makefile.in: Set datadir to $(prefix)/share.
23490 1994-09-15 Richard Stallman <rms@gnu.org>
23493 Update copyright notice and GPL version.
23495 1994-09-15 Richard Stallman <rms@gnu.org>
23498 Update copyright notice and GPL version.
23500 1994-07-12 Richard Stallman <rms@gnu.org>
23502 * src/reduce.c, src/reader.c:
23505 1994-05-05 David J. MacKenzie <djm@gnu.org>
23507 * Makefile.in: entered into RCS
23509 1994-03-26 Richard Stallman <rms@gnu.org>
23511 * src/bison.s1: entered into RCS
23513 1994-03-26 Richard Stallman <rms@gnu.org>
23515 * bison.simple: entered into RCS
23517 1994-03-25 Richard Stallman <rms@gnu.org>
23519 * src/main.c: entered into RCS
23521 1994-03-24 Richard Stallman <rms@gnu.org>
23523 * src/conflicts.c: entered into RCS
23525 1994-01-02 Richard Stallman <rms@gnu.org>
23527 * Makefile.in: *** empty log message ***
23529 1993-11-21 Richard Stallman <rms@gnu.org>
23531 * src/bison.s1: *** empty log message ***
23533 1993-11-21 Richard Stallman <rms@gnu.org>
23535 * doc/bison.texinfo: entered into RCS
23537 * doc/bison.texinfo: *** empty log message ***
23539 1993-11-21 Richard Stallman <rms@gnu.org>
23541 * bison.simple: *** empty log message ***
23543 1993-10-25 David J. MacKenzie <djm@gnu.org>
23545 * doc/bison.texinfo: *** empty log message ***
23547 1993-10-19 Richard Stallman <rms@gnu.org>
23549 * src/bison.s1: *** empty log message ***
23551 1993-10-19 Richard Stallman <rms@gnu.org>
23553 * bison.simple: *** empty log message ***
23555 1993-10-14 Richard Stallman <rms@gnu.org>
23557 * src/bison.s1: *** empty log message ***
23559 1993-10-14 Richard Stallman <rms@gnu.org>
23561 * bison.simple: *** empty log message ***
23563 1993-09-14 David J. MacKenzie <djm@gnu.org>
23565 * doc/bison.texinfo: *** empty log message ***
23567 1993-09-13 Noah Friedman <friedman@gnu.org>
23569 * Makefile.in: *** empty log message ***
23571 1993-09-10 Richard Stallman <rms@gnu.org>
23573 * src/conflicts.c: *** empty log message ***
23575 * src/system.h: entered into RCS
23577 1993-09-10 Richard Stallman <rms@gnu.org>
23579 * doc/bison.1: entered into RCS
23581 1993-09-06 Noah Friedman <friedman@gnu.org>
23583 * src/version.c: entered into RCS
23585 1993-09-06 Noah Friedman <friedman@gnu.org>
23587 * Makefile.in: *** empty log message ***
23589 1993-07-30 David J. MacKenzie <djm@gnu.org>
23591 * Makefile.in: *** empty log message ***
23593 1993-07-24 Richard Stallman <rms@gnu.org>
23595 * src/bison.s1: *** empty log message ***
23597 1993-07-24 Richard Stallman <rms@gnu.org>
23599 * bison.simple: *** empty log message ***
23601 1993-07-08 David J. MacKenzie <djm@gnu.org>
23603 * Makefile.in: *** empty log message ***
23605 1993-07-04 Richard Stallman <rms@gnu.org>
23607 * src/bison.s1: *** empty log message ***
23609 1993-07-04 Richard Stallman <rms@gnu.org>
23611 * bison.simple: *** empty log message ***
23613 1993-06-26 David J. MacKenzie <djm@gnu.org>
23615 * src/getargs.c: entered into RCS
23617 1993-06-26 David J. MacKenzie <djm@gnu.org>
23619 * doc/bison.texinfo: *** empty log message ***
23621 * doc/bison.1: New file.
23623 1993-06-25 Richard Stallman <rms@gnu.org>
23625 * src/getargs.c: New file.
23627 1993-06-16 Richard Stallman <rms@gnu.org>
23629 * src/bison.s1: *** empty log message ***
23631 1993-06-16 Richard Stallman <rms@gnu.org>
23633 * bison.simple: *** empty log message ***
23635 1993-06-03 Richard Stallman <rms@gnu.org>
23637 * src/bison.s1: New file.
23639 1993-06-03 Richard Stallman <rms@gnu.org>
23641 * doc/bison.texinfo: *** empty log message ***
23643 1993-06-03 Richard Stallman <rms@gnu.org>
23645 * bison.simple: New file.
23647 1993-05-19 Richard Stallman <rms@gnu.org>
23649 * doc/bison.texinfo: New file.
23651 1993-05-07 Noah Friedman <friedman@gnu.org>
23653 * Makefile.in: *** empty log message ***
23655 1993-04-28 Noah Friedman <friedman@gnu.org>
23657 * src/reader.c: *** empty log message ***
23659 1993-04-23 Noah Friedman <friedman@gnu.org>
23661 * src/alloc.h: entered into RCS
23663 1993-04-20 David J. MacKenzie <djm@gnu.org>
23665 * src/version.c: *** empty log message ***
23667 * src/files.c, src/allocate.c:
23670 * src/reader.c: *** empty log message ***
23672 * src/lex.c: entered into RCS
23674 * src/conflicts.c: New file.
23676 * src/symtab.c: entered into RCS
23678 * src/alloc.h: New file.
23680 * src/LR0.c: entered into RCS
23682 1993-04-18 Noah Friedman <friedman@gnu.org>
23684 * src/reader.c: New file.
23686 * src/version.c: *** empty log message ***
23688 1993-04-18 Noah Friedman <friedman@gnu.org>
23690 * Makefile.in: *** empty log message ***
23692 1993-04-17 Noah Friedman <friedman@gnu.org>
23694 * Makefile.in: *** empty log message ***
23696 1993-04-15 Richard Stallman <rms@gnu.org>
23698 * src/main.c, src/files.c:
23701 1993-04-15 Noah Friedman <friedman@gnu.org>
23703 * configure.in: entered into RCS
23705 * configure.in: *** empty log message ***
23707 * configure.in: New file.
23709 1993-04-14 Richard Stallman <rms@gnu.org>
23711 * Makefile.in: New file.
23713 1993-04-13 Richard Stallman <rms@gnu.org>
23715 * src/version.c: New file.
23717 1993-03-25 Richard Stallman <rms@gnu.org>
23719 * src/output.c: entered into RCS
23721 1992-09-25 Richard Stallman <rms@gnu.org>
23723 * configure.bat: entered into RCS
23725 1992-06-22 Richard Stallman <rms@gnu.org>
23727 * src/vmsgetargs.c: entered into RCS
23729 1992-06-22 Richard Stallman <rms@gnu.org>
23731 * doc/bison.rnh: entered into RCS
23733 1992-04-20 David J. MacKenzie <djm@gnu.org>
23735 * README: entered into RCS
23737 1992-01-22 Richard Stallman <rms@gnu.org>
23739 * src/machine.h: entered into RCS
23741 1991-12-21 Richard Stallman <rms@gnu.org>
23743 * src/lalr.c, src/closure.c:
23746 1991-12-20 Richard Stallman <rms@gnu.org>
23748 * src/state.h: entered into RCS
23750 1991-12-18 Richard Stallman <rms@gnu.org>
23752 * src/print.c, src/nullable.c, src/derives.c:
23755 1991-11-03 David J. MacKenzie <djm@gnu.org>
23757 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
23760 1988-09-09 Richard Stallman <rms@gnu.org>
23762 * src/bison.hairy: entered into RCS
23764 1987-12-16 Richard Stallman <rms@gnu.org>
23766 * REFERENCES: entered into RCS
23771 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
23772 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
23773 2008, 2009 Free Software Foundation, Inc.
23775 Copying and distribution of this file, with or without
23776 modification, are permitted provided the copyright notice and this
23777 notice are preserved.